ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory

strburnchang 2012-01-12

同一个项目,部署在WEBLOGIC10和WEBLOGIC9下,在10下成功,但在WEBLOGIC9.2下不成功,出现了下面的异常信息;

该信息主要是WEBLOGIC在加载JAR包的时候,首先使用了自身的JAR,解决这个问题的办法是

在startWebLogic.cmd这个文件中增加下面一行,位置放在绿色字体上方;

增加的内容见红色部分;

set PRE_CLASSPATH=%WL_HOME%/server/lib/antlr-2.7.5H3.jar;%WL_HOME%/server/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar;

set CLASSPATH=%PRE_CLASSPATH%;%CLASSPATH%

set CLASSPATH=%CLASSPATH%;%MEDREC_WEBLOGIC_CLASSPATH%

2012-01-12 13:27:18,796] | ERROR  | [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' | ContextLoader         (204) |---- Context initialization failed

org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'cmbCreditCardServiceInfo':Invocationofinitmethodfailed;nestedexceptionisjava.lang.NoSuchMethodError:javax.jws.WebMethod.exclude()Z

Causedby:

java.lang.NoSuchMethodError:javax.jws.WebMethod.exclude()Z

atorg.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isOperation(JaxWsServiceConfiguration.java:158)

atorg.apache.cxf.service.factory.ReflectionServiceFactoryBean.isValidMethod(ReflectionServiceFactoryBean.java:1479)

atorg.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:698)

atorg.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:311)

atorg.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:370)

atorg.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:162)

atorg.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:97)

atorg.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:74)

atorg.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114)

atorg.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:160)

atorg.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:325)

atorg.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:242)

atorg.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:192)

atorg.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:378)

atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)

atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

atjava.lang.reflect.Method.invoke(Method.java:585)

atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1242)

atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1208)

atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)

atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)

atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)

atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)

atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)

atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)

atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)

atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)

atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)

atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)

atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)

atweblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:375)

atweblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

atweblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)

atweblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:83)

atweblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1591)

atweblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2734)

atweblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:892)

atweblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)

atweblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)

atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)

atweblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)

atweblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)

atweblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)

atweblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)

atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)

atweblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)

atweblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)

atweblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)

atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)

atweblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:229)

atweblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)

atweblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)

atweblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181)

atweblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:352)

atweblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52)

atweblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186)

atweblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)

atweblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)

atweblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)

atweblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)

atweblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)

atweblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)

atweblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)

atweblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

atweblogic.work.ExecuteThread.run(ExecuteThread.java:181)

相关推荐