java.lang.NoSuchMethodException: org.apache.lucene.analysis.cn.Chine seAnalyzer.<init>(org.apache.lucene.util.Version)

Sakai JIRA | Gary LAM | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    in dspace.conf, if set search.analyzer = org.apache.lucene.analysis.cn.ChineseAnalyzer if will fail with #ant fresh-install ..... [java] 2012-05-09 17:02:18,195 ERROR org.dspace.search.DSIndexer @ Unable t o create index directory: c:\dspace180/search [java] 2012-05-09 17:02:18,203 FATAL org.dspace.search.DSIndexer @ anonymou s:no_context:no_search_analyzer:search.analyzer=org.apache.lucene.analysis.cn.Ch ineseAnalyzer [java] java.lang.NoSuchMethodException: org.apache.lucene.analysis.cn.Chine seAnalyzer.<init>(org.apache.lucene.util.Version) [java] at java.lang.Class.getConstructor0(Class.java:2706) [java] at java.lang.Class.getDeclaredConstructor(Class.java:1985) [java] at org.dspace.search.DSIndexer.getAnalyzer(DSIndexer.java:635) [java] at org.dspace.search.DSIndexer.openIndex(DSIndexer.java:914) [java] at org.dspace.search.DSIndexer.<clinit>(DSIndexer.java:225) [java] java.lang.ExceptionInInitializerError [java] Caused by: java.lang.IllegalStateException: java.lang.NoSuchMethodEx ception: org.apache.lucene.analysis.cn.ChineseAnalyzer.<init>(org.apache.lucene. util.Version) [java] at org.dspace.search.DSIndexer.getAnalyzer(DSIndexer.java:644) [java] at org.dspace.search.DSIndexer.openIndex(DSIndexer.java:914) [java] at org.dspace.search.DSIndexer.<clinit>(DSIndexer.java:225) [java] Could not find the main class: org.dspace.search.DSIndexer. Program will exit. [java] Exception in thread "main" If I don't set .ChineseAnalyzer before install, ant build successful, and then I edit the dspace.conf set it to use ChineseAnalyzer, same error message will got when use #dspace index-init

    Sakai JIRA | 5 years ago | Gary LAM
    java.lang.NoSuchMethodException: org.apache.lucene.analysis.cn.Chine seAnalyzer.<init>(org.apache.lucene.util.Version)
  2. 0

    in dspace.conf, if set search.analyzer = org.apache.lucene.analysis.cn.ChineseAnalyzer if will fail with #ant fresh-install ..... [java] 2012-05-09 17:02:18,195 ERROR org.dspace.search.DSIndexer @ Unable t o create index directory: c:\dspace180/search [java] 2012-05-09 17:02:18,203 FATAL org.dspace.search.DSIndexer @ anonymou s:no_context:no_search_analyzer:search.analyzer=org.apache.lucene.analysis.cn.Ch ineseAnalyzer [java] java.lang.NoSuchMethodException: org.apache.lucene.analysis.cn.Chine seAnalyzer.<init>(org.apache.lucene.util.Version) [java] at java.lang.Class.getConstructor0(Class.java:2706) [java] at java.lang.Class.getDeclaredConstructor(Class.java:1985) [java] at org.dspace.search.DSIndexer.getAnalyzer(DSIndexer.java:635) [java] at org.dspace.search.DSIndexer.openIndex(DSIndexer.java:914) [java] at org.dspace.search.DSIndexer.<clinit>(DSIndexer.java:225) [java] java.lang.ExceptionInInitializerError [java] Caused by: java.lang.IllegalStateException: java.lang.NoSuchMethodEx ception: org.apache.lucene.analysis.cn.ChineseAnalyzer.<init>(org.apache.lucene. util.Version) [java] at org.dspace.search.DSIndexer.getAnalyzer(DSIndexer.java:644) [java] at org.dspace.search.DSIndexer.openIndex(DSIndexer.java:914) [java] at org.dspace.search.DSIndexer.<clinit>(DSIndexer.java:225) [java] Could not find the main class: org.dspace.search.DSIndexer. Program will exit. [java] Exception in thread "main" If I don't set .ChineseAnalyzer before install, ant build successful, and then I edit the dspace.conf set it to use ChineseAnalyzer, same error message will got when use #dspace index-init

    Sakai JIRA | 5 years ago | Gary LAM
    java.lang.NoSuchMethodException: org.apache.lucene.analysis.cn.Chine seAnalyzer.<init>(org.apache.lucene.util.Version)
  3. 0

    [SPR-1986] Cannot inject a map without a default constructor such as UnmodifiableMap into a bean. - Spring JIRA

    spring.io | 1 year ago
    java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    This bug exist in latest head checkout a couple of days before I created this bug. Test Case: <bean id="map" class="java.util.HashMap"/> <bean id="unmodifiableMap" class="java.util.Collections" factory-method="unmodifiableMap"> <constructor-arg ref="map"/> </bean> <bean id="unmodifiableMap2" class="java.util.Collections" factory-method="unmodifiableMap" lazy-init="false"> <constructor-arg ref="unmodifiableMap"/> </bean> Exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'unmodifiableMap2' defined in ServletContext resource [/WEB-INF/spring-contexts/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.Collections$UnmodifiableMap]: No default constructor found; nested exception is java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>() org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.Collections$UnmodifiableMap]: No default constructor found; nested exception is java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>() java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>() at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.getDeclaredConstructor(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:149) at org.springframework.beans.PropertyTypeConverter.convertToTypedMap(PropertyTypeConverter.java:316) at org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:188) at org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:124) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:792) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:673) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:371) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:235) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:520) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:152) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3727) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    Spring JIRA | 1 decade ago | Mike Youngstrom
    java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>()
  6. 0

    This bug exist in latest head checkout a couple of days before I created this bug. Test Case: <bean id="map" class="java.util.HashMap"/> <bean id="unmodifiableMap" class="java.util.Collections" factory-method="unmodifiableMap"> <constructor-arg ref="map"/> </bean> <bean id="unmodifiableMap2" class="java.util.Collections" factory-method="unmodifiableMap" lazy-init="false"> <constructor-arg ref="unmodifiableMap"/> </bean> Exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'unmodifiableMap2' defined in ServletContext resource [/WEB-INF/spring-contexts/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.Collections$UnmodifiableMap]: No default constructor found; nested exception is java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>() org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.Collections$UnmodifiableMap]: No default constructor found; nested exception is java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>() java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>() at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.getDeclaredConstructor(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:149) at org.springframework.beans.PropertyTypeConverter.convertToTypedMap(PropertyTypeConverter.java:316) at org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:188) at org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:124) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:792) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:673) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:371) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:235) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:520) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:152) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3727) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    Spring JIRA | 1 decade ago | Mike Youngstrom
    java.lang.NoSuchMethodException: java.util.Collections$UnmodifiableMap.<init>()

  1. batwalrus76 3 times, last 4 days ago
  2. filpgame 1 times, last 2 weeks ago
  3. empt-ak 1 times, last 5 months ago
  4. Luka 12 times, last 6 months ago
  5. andyglick 28 times, last 6 months ago
10 more registered users
47 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoSuchMethodException

    org.apache.lucene.analysis.cn.Chine seAnalyzer.<init>(org.apache.lucene.util.Version)

    at java.lang.Class.getConstructor0()
  2. Java RT
    Class.getDeclaredConstructor
    1. java.lang.Class.getConstructor0(Class.java:2706)
    2. java.lang.Class.getDeclaredConstructor(Class.java:1985)
    2 frames
  3. DSpace Kernel :: API and Implementation
    DSIndexer.<clinit>
    1. org.dspace.search.DSIndexer.getAnalyzer(DSIndexer.java:635)
    2. org.dspace.search.DSIndexer.openIndex(DSIndexer.java:914)
    3. org.dspace.search.DSIndexer.<clinit>(DSIndexer.java:225)
    3 frames