ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory

同一个项目,部署在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: Error creating bean with name 'cmbCreditCardServiceInfo': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude()Z
Caused by:
java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude()Z
 at org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isOperation(JaxWsServiceConfiguration.java:158)
 at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isValidMethod(ReflectionServiceFactoryBean.java:1479)
 at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:698)
 at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:311)
 at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:370)
 at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:162)
 at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:97)
 at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:74)
 at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114)
 at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:160)
 at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:325)
 at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:242)
 at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:192)
 at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:378)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1242)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1208)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
 at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
 at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:375)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
 at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:83)
 at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1591)
 at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2734)
 at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:892)
 at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)
 at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
 at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
 at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
 at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
 at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
 at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
 at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
 at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
 at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
 at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)
 at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
 at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:229)
 at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
 at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
 at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181)
 at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:352)
 at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52)
 at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186)
 at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
 at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
 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:173)
 at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
 at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
 at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

引用: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long 引用: 在执行时出现类型转换错误:java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long 引用: org.apache.ibatis.exceptions.PersistenceException: Error querying database. Cause: java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long 问题描述中提到的错误是java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer,而不是java.lang.Long cannot be cast to java.lang.Integer。这个错误可能发生在数据库查询中,在执行查询时,将java.lang.Long类型错误地转换为java.lang.Integer类型。 要解决这个问题,可以考虑以下几个步骤: 1. 检查数据库表中相应的列的数据类型是否为java.lang.Integer类型,而不是java.lang.Long类型。如果列的数据类型为java.lang.Long,请将其更改为java.lang.Integer。 2. 检查数据库连接是否正确,确保数据库连接的配置与实际情况相符。 3. 检查MyBatis的映射文件中的查询语句,确保查询结果被正确地映射为java.lang.Integer类型。 4. 如果以上步骤都没有解决问题,可以考虑重新编译和构建项目,以确保所有依赖项和配置文件都正确地加载和使用。 需要注意的是,这只是一种可能的解决方法,具体的解决方案可能根据实际情况而异。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long](https://blog.csdn.net/qq_36785719/article/details/90201942)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [关于hibernate执行select count( *) 出现java.lang.ClassCastException问题](https://blog.csdn.net/cekong0704/article/details/9944731)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值