karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Karaf 2.3.2: ClassNotFoundException for javax.* packages
Date Wed, 14 Aug 2013 15:28:20 GMT
Hi Ioan,

in your case, I'm pretty sure it comes from Xerces in the lib/endorsed 
folder (and different version used).

Could you try to remove Xerces jar file from lib/endorsed ?

Thanks,
Regards
JB

On 08/14/2013 12:33 PM, Ioan Eugen Stan wrote:
> Hello JB,
>
> Similar issue : Upgrade app from 2.3.1 to 2.3.2 breaks with
> ClassCastException . Removing xercesImpl from endorsed folder solved
> my problem.
>
> java.lang.ClassCastException:
> org.apache.xerces.util.XMLGrammarPoolImpl cannot be cast to
> org.apache.xerces.xni.grammars.XMLGrammarPool
>      at org.apache.xerces.impl.xs.XMLSchemaLoader.reset(Unknown Source)[:]
>      at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(Unknown Source)[:]
>      at org.apache.xerces.parsers.XML11Configuration.configurePipeline(Unknown
> Source)[:]
>      at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.configurePipeline(Unknown
> Source)[:]
>      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
>      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
>      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
>      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)[:]
>      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)[:]
>      at org.apache.commons.digester.Digester.parse(Digester.java:1892)
>      at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
>      at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230)
>      at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)
>      at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:224)
>      at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:481)
>      at com.docprocess.dx.platform.bus.processors.JasperXmlToPdfTransformer.<init>(JasperXmlToPdfTransformer.java:50)
>
>
>
>
> On Fri, Aug 9, 2013 at 6:27 PM, Jean-Baptiste Onofré <jb@nanthrax.net> wrote:
>> It could be related to the Spring update. Let me try to reproduce the issue
>> with a bundle test case.
>>
>> Regards
>> JB
>>
>>
>> On 08/09/2013 05:01 PM, vetalok wrote:
>>>
>>> Removed all the jars from endorsed folder but the problem still exist:
>>>
>>> karaf@root> Exception in thread "SpringOsgiExtenderThread-6"
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'h
>>> azelcast' defined in URL
>>> [bundleentry://160.fwk1329414206/META-INF/spring/HazelcastInstance.xml]:
>>> Instantiation of bean failed; nested exception is or
>>> g.springframework.beans.factory.BeanDefinitionStoreException: Factory
>>> method
>>> [public static com.hazelcast.core.HazelcastInstance com.hazelcast.core.Ha
>>> zelcast.newHazelcastInstance(com.hazelcast.config.Config)] threw
>>> exception;
>>> nested exception is java.lang.NoClassDefFoundError: javax/security/auth/lo
>>> gin/LoginException
>>>           at
>>>
>>> org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
>>>           at
>>>
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFacto
>>> ry.java:1025)
>>>           at
>>>
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:921
>>> )
>>>           at
>>>
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
>>>           at
>>>
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
>>>           at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
>>>           at
>>>
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
>>>           at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
>>>           at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
>>>           at
>>>
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
>>>           at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
>>>           at
>>>
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationCont
>>> ext.java:69)
>>>           at
>>>
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.ja
>>> va:355)
>>>           at
>>>
>>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>>           at
>>>
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplication
>>> Context.java:320)
>>>           at
>>>
>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(Dependen
>>> cyWaiterApplicationContextExecutor.java:132)
>>>           at java.lang.Thread.run(Thread.java:722)
>>> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Factory method [public static com.hazelcast.core.HazelcastInstance
>>> com.haze
>>> lcast.core.Hazelcast.newHazelcastInstance(com.hazelcast.config.Config)]
>>> threw exception; nested exception is java.lang.NoClassDefFoundError:
>>> javax/sec
>>> urity/auth/login/LoginException
>>>           at
>>>
>>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181)
>>>           at
>>>
>>> org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
>>>           ... 16 more
>>> Caused by: java.lang.NoClassDefFoundError:
>>> javax/security/auth/login/LoginException
>>>           at com.hazelcast.impl.Node.<init>(Node.java:171)
>>>           at com.hazelcast.impl.FactoryImpl.<init>(FactoryImpl.java:374)
>>>           at
>>>
>>> com.hazelcast.impl.FactoryImpl.newHazelcastInstanceProxy(FactoryImpl.java:121)
>>>           at
>>>
>>> com.hazelcast.impl.FactoryImpl.newHazelcastInstanceProxy(FactoryImpl.java:107)
>>>           at
>>> com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:507)
>>>           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>           at
>>>
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>           at
>>>
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>           at java.lang.reflect.Method.invoke(Method.java:601)
>>>           at
>>>
>>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
>>>           ... 17 more
>>> Caused by: java.lang.ClassNotFoundException:
>>> javax.security.auth.login.LoginException
>>>           at
>>>
>>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://karaf.922171.n3.nabble.com/Karaf-2-3-2-ClassNotFoundException-for-javax-packages-tp4029428p4029430.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message