從websphere6.1遷移到weblogic10.3的問題總結
系統採用war包的方式部署。
問題一:
####<2011-3-29 下午05時17分43秒 CST>
####<2011-3-29 下午05時17分46秒 CST>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext_Hibernate.xml]: Initialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource [com/edu/nts/entity] cannot be resolved to absolute file path because it does not reside in the file system: zip:D:/soft/Middleware/user_projects/domains/my_domain/servers/AdminServer/tmp/_WL_user/MIS-437/lhcsnh/war/WEB-INF/lib/_wl_cls_gen.jar!/com/edu/nts/entity
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:370)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
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 weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
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:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1799)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
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:37)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:40)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
java.io.FileNotFoundException: class path resource [com/edu/nts/entity] cannot be resolved to absolute file path because it does not reside in the file system: zip:D:/soft/Middleware/user_projects/domains/my_domain/servers/AdminServer/tmp/_WL_user/MIS-437/lhcsnh/war/WEB-INF/lib/_wl_cls_gen.jar!/com/edu/nts/entity
at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:173)
at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:169)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:676)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
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 weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
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:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1799)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
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:37)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:40)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
原因:
在weblogic上部署war包的話,預設是不展開的,所以如下的hibernate配置不能解析。
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
解決辦法:
針對weblogic的部署方式,必須改為如下方式。
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
。。。
雖然沒法偷懶用上面的注入方式,但還是可以透過編寫一個小程式生成上面的明細注入片段,修改量不會太大。
問題二:
<2011-3-29 下午05時19分46秒 CST>
java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:92)
java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:92)
at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:117)
at org.springframework.web.util.Log4jConfigServlet.init(Log4jConfigServlet.java:58)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1913)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1887)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1805)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
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:37)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:40)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
'
weblogic.application.ModuleException: [HTTP:101216]Servlet: "log4j" failed to preload on startup in Web application: "MIS-beta-4.0.38.war".
java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:92)
at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:117)
at org.springframework.web.util.Log4jConfigServlet.init(Log4jConfigServlet.java:58)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1913)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1887)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1805)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
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:37)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
原因:
在web.xml中log4j的配置方式問題,預設情況log4j.properties放在classes目錄下,而由於war沒展開,找不到這個檔案,所以把它直接放WEB-INF目錄下,並去掉原來web.xml裡面的如下配置:
org.springframework.web.util.Log4jConfigServlet
解決辦法:
新建一個servlet,初始化log4j配置檔案:
public void init() throws ServletException {
InputStream is = getServletContext().getResourceAsStream(
"/WEB-INF/log4j.properties");
Properties props = new Properties();
try {
props.load(is);
} catch (IOException e) {
System.err.println("Load log4j configuration failed");
}
PropertyConfigurator.configure(props);
}
並註冊到web.xml檔案中:
問題三:
由於種種原因,該應用程式必須部署到伺服器的根目錄(/)下面,否則樣式及功能都會出現問題。
解決辦法:
為了把應用程式的context root改到根目錄,建立了一個weblogic.xml檔案,放到war包的WEB-INF目錄下,內容如:
xmlns:xsi="" xsi:schemaLocation="
/web-app_2_5.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
問題四:
開啟登入頁面報錯,後臺錯誤如下:
####<2011-4-2 下午06時00分11秒 CST>
^---------------------------------------------^
redirect.jsp:1:1: The validator class: "org.apache.taglibs.standard.tlv.JstlFmtTLV" has failed with the following exception: "java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory".
^---------------------------------------------^
>
原因:jar包衝突,以及jar包載入順序的問題引起
解決辦法:
刪除lib目錄下的xml-apis.jar,並在上面的weblogic.xml中增加如下:
使classloader首先載入web-info下的jar檔案,修改後的weblogic.xml如下:
xmlns:xsi="" xsi:schemaLocation="
/web-app_2_5.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
問題五:
部署應用程式過程中,報如下錯誤:
####<2011-4-2 下午09時35分56秒 CST>
####<2011-4-2 下午09時35分57秒 CST>
####<2011-4-2 下午09時35分57秒 CST>
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:350)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:411)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:74)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:66)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:40)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:407)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.commit(DeploymentReceiverCallbackDeliverer.java:63)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.callDeploymentReceivers(AwaitingCommit.java:235)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.handleCommit(AwaitingCommit.java:131)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.receivedCommit(AwaitingCommit.java:44)
at weblogic.deploy.service.internal.transport.CommonMessageReceiver.receiveRequestCommitMsg(CommonMessageReceiver.java:510)
at weblogic.deploy.service.internal.transport.CommonMessageReceiver$3.run(CommonMessageReceiver.java:782)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
weblogic.common.ResourceException: Failed to bind remote object (ClusterableRemoteRef(-4790033318770968615S::my_domain:Server-0 null)/287 [weblogic.jdbc.common.internal.RemoteDataSource]) to replica aware stub at orcl(ClusterableRemoteRef(-4790033318770968615S::my_domain:Server-0 [-4790033318770968615S::my_domain:Server-0/286])/286 [weblogic.jdbc.common.internal.RemoteDataSource])
at weblogic.jdbc.common.internal.RmiDataSource.start(RmiDataSource.java:395)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:136)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:97)
at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:347)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:411)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:74)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:66)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:40)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:407)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.commit(DeploymentReceiverCallbackDeliverer.java:63)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.callDeploymentReceivers(AwaitingCommit.java:235)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.handleCommit(AwaitingCommit.java:131)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.receivedCommit(AwaitingCommit.java:44)
at weblogic.deploy.service.internal.transport.CommonMessageReceiver.receiveRequestCommitMsg(CommonMessageReceiver.java:510)
at weblogic.deploy.service.internal.transport.CommonMessageReceiver$3.run(CommonMessageReceiver.java:782)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
原因:
配置的weblogic連線池名稱命民規則問題。
解決辦法:
由於資料來源的jndi為:jdbc/orcl,資料來源的名稱必須為jdbc.orcl,否則就會報上面的類似錯誤。
問題六:
錯誤資訊忘記了,頁面訪問報編譯錯誤。
原因:
類似如下的jstl判斷語法不能正確解析,真是奇怪
${changeForm.change.oldVal == 1 ? 男 : changeForm.change.oldVal ==0?女:’’}
解決辦法:
採用choose語法修改為如下
問題七:
getServletContext().getRealPath("/upload");返回為null的問題。
原因:
由於weblogic下,war沒有展開,所以也就不存在相對於應用程式的路徑realpath。
解決辦法:
若是為了得到相對路徑,採用以下方式
getServletContext().getResource("/upload").getPath();
若是為了載入資原始檔,則採用如下方式
InputStream is = getServletContext().getResourceAsStream(
"/WEB-INF/log4j.properties");
Properties props = new Properties();
try {
props.load(is);
} catch (IOException e) {
System.err.println("Load log4j configuration failed");
}
PropertyConfigurator.configure(props);
問題八:
採用jquery的方式非同步請求後臺資料,後臺採用PrintWriter返回結果,結果頁面不能正確載入資料。
原因:
PrintWriter writer = (PrintWriter) response.getWriter();
writer.write("failure");
writer.close();
以上close之前,少了一句
PrintWriter writer = (PrintWriter) response.getWriter();
writer.write("failure");
writer.flush();
writer.close();
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9399028/viewspace-692974/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- svn 遷移到 git 的問題Git
- 事務型系統由SQL遷移到NoSQL問題總結(轉)SQL
- mysql遷移到greenplum sql改造總結MySql
- 從Perforce遷移到GitGit
- 資料遷移部分問題總結
- 從 golang flag 遷移到 cmdrGolang
- 從 Nginx 遷移到 Envoy ProxyNginx
- Oracle遷移到PPAS(PostgreSQL)時的日期計算問題OracleSQL
- GoldenGate資料遷移的問題總結(一)Go
- GoldenGate資料遷移的問題總結(二)Go
- 資料遷移中的幾個問題總結
- 一招解決遷移到ModStart後連結不相容問題
- [譯]從 SQLite 逐步遷移到 RoomSQLiteOOM
- 從mpvue遷移到uni-appVueAPP
- EF Core從TPH遷移到TPT
- [譯] 從 SQLite 逐步遷移到 RoomSQLiteOOM
- Linode從Xen遷移到KVM
- 將表 從mysql 遷移到oracleMySqlOracle
- Window遷移到Linux下Tomcat配置問題LinuxTomcat
- JavaScript 專案遷移到 TypeScript 步驟以及遇到的問題JavaScriptTypeScript
- Azure VM從ASM遷移到ARM(二)ASM
- Azure VM從ASM遷移到ARM(一)ASM
- PayPal從Java遷移到Node.jsJavaNode.js
- 從SpringMVC遷移到SpringbootSpringMVCSpring Boot
- iOS swift2.3 遷移到3.0 遇到的一些問題iOSSwift
- 從 CRUD 遷移到事件溯源的祕訣 - eventstore事件
- expdp/impdp跨版本升級遷移問題總結
- 從過時的 Windows 機器遷移到 LinuxWindowsLinux
- 從單體遷移到微服務的十二種方法微服務
- 平安科技從 Oracle 遷移到 UbiSQL 的實踐OracleSQL
- 從MySQL遷移到VoltDB的一點經驗MySql
- 使用DynamoShake從dynamodb遷移到mongodbMongoDB
- 從檔案系統遷移到ASM上ASM
- oralce 從檔案系統遷移到ASMASM
- 如果需要從Oracle遷移到MS SQLServer (2)OracleSQLServer
- 如果需要從Oracle遷移到MS SQLServer (1)OracleSQLServer
- 海量資料遷移之一個誤操作的問題總結
- 通過impdp做資料庫遷移遇到的問題總結資料庫