camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kulbhushan Azad <kulbhushan.cu...@gmail.com>
Subject Re: Spring-Camel Context initialization error in weblogic 12c
Date Tue, 28 May 2013 04:58:54 GMT
hi Frank
i added below in the weblogic.xml and tried a clean build and redeployment
, now i am seeing another new error as below


May 28, 2013 12:52:43 AM org.springframework.web.context.ContextLoader
initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
May 28, 2013 12:52:43 AM
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Tue May 28
00:52:43 EDT 2013]; root of context hierarchy
May 28, 2013 12:52:43 AM
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource
[/WEB-INF/applicationContext.xml]
May 28, 2013 12:52:43 AM org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.FatalBeanException: Invalid NamespaceHandler
class [org.apache.camel.spring.handler.CamelNamespaceHandler] for namespace
[http://camel.apache.org/schema/spring]: problem with handler class file or
dependent class; nested exception is java.lang.LinkageError: loader
constraint violation: when resolving method
"org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;"
the class loader (instance of
weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class,
org/slf4j/LoggerFactory, and the class loader (instance of
sun/misc/Launcher$AppClassLoader) for resolved class,
org/slf4j/impl/StaticLoggerBinder, have different Class objects for the
type org/slf4j/ILoggerFactory used in the signature
    at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
    at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
    at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
    at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
    at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
    at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
    at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
    at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)
    at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
    at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
    at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at
weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:582)
    at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at
weblogic.servlet.internal.EventsManager.executeContextListener(EventsManager.java:233)
    at
weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:190)
    at
weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
    at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1730)
    at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2740)
    at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1704)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
    at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
    at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
    at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
    at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
    at
weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:212)
    at
weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)
    at
weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
    at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
    at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
    at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
    at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
    at
weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
    at
weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
    at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
    at
weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
    at
weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
    at
weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
    at
weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at
weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:192)
    at
weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:369)
    at
weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at
weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at
weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at
weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at
weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at
weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at
weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:186)
    at
weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:94)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: org.springframework.beans.FatalBeanException: Invalid
NamespaceHandler class
[org.apache.camel.spring.handler.CamelNamespaceHandler] for namespace [
http://camel.apache.org/schema/spring]: problem with handler class file or
dependent class; nested exception is java.lang.LinkageError: loader
constraint violation: when resolving method
"org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;"
the class loader (instance of
weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class,
org/slf4j/LoggerFactory, and the class loader (instance of
sun/misc/Launcher$AppClassLoader) for resolved class,
org/slf4j/impl/StaticLoggerBinder, have different Class objects for the
type org/slf4j/ILoggerFactory used in the signature
    at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:139)
    at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1414)
    at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1409)
    at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
    at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
    at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
    at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
    at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
    ... 55 more
Caused by: java.lang.LinkageError: loader constraint violation: when
resolving method
"org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;"
the class loader (instance of
weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class,
org/slf4j/LoggerFactory, and the class loader (instance of
sun/misc/Launcher$AppClassLoader) for resolved class,
org/slf4j/impl/StaticLoggerBinder, have different Class objects for the
type org/slf4j/ILoggerFactory used in the signature
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:299)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
    at
org.apache.camel.spring.handler.CamelNamespaceHandler.<clinit>(CamelNamespaceHandler.java:74)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
    at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104)
    at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:129)
    ... 62 more





On Mon, May 27, 2013 at 2:05 AM, Frank Ertl <
frank.ertl@f-i-solutions-plus.de> wrote:

> Hi,
>
> I had a similar problem when deploying camel 2.10.2 to weblogic 12c.
> Tracking the problem down I found it was a classloader issue. Could you try
> to put a file "weblogic.xml" with the following content in your
> WEB-INF-folder?
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app.xsd"
> xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
>     <container-descriptor>
>         <prefer-web-inf-classes>true</prefer-web-inf-classes>
>     </container-descriptor>
> </weblogic-web-app>
>
>
> Frank
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Spring-Camel-Context-initialization-error-in-weblogic-12c-tp5733202p5733237.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Thanks
Kulbhusan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message