從websphere6.1遷移到weblogic10.3的問題總結

xz43發表於2011-04-20
以前用weblogic低版本的時候,感覺挺容易的,也沒什麼要注意的,這次真正把應用從websphere遷移到weblogic下後,發現問題還是真多了。
 

系統採用war包的方式部署。

 

問題一:

####<2011-3-29 下午051743 CST> <> <> <1301390263593>

####<2011-3-29 下午051746 CST> <> <> <> <1301390266609>

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">           

                  

                           

                                     classpath:/com/edu/nts/entity

                           

                  

解決辦法:

針對weblogic的部署方式,必須改為如下方式。

                   class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">           

                  

                           

                                     com/edu/nts/entity/AidStudentInfo.hbm.xml              

                                     com/edu/nts/entity/AidStudentList.hbm.xml

                                     com/edu/nts/entity/AidStudentListTemp.hbm.xml

                                     。。。

                           

雖然沒法偷懶用上面的注入方式,但還是可以透過編寫一個小程式生成上面的明細注入片段,修改量不會太大。

 

問題二:

<2011-3-29 下午051946 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.(StubLifecycleHelper.java:48)

        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.(StubLifecycleHelper.java:48)

        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.xmllog4j的配置方式問題,預設情況log4j.properties放在classes目錄下,而由於war沒展開,找不到這個檔案,所以把它直接放WEB-INF目錄下,並去掉原來web.xml裡面的如下配置:

        

                   log4j

                  

                            org.springframework.web.util.Log4jConfigServlet

                  

                   1

        

解決辦法:

新建一個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檔案中:

    Log4jInitServlet

    com.edu.nts.web.servlet.Log4jInitServlet

    0

 

 

問題三:

由於種種原因,該應用程式必須部署到伺服器的根目錄(/)下面,否則樣式及功能都會出現問題。

解決辦法:

為了把應用程式的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">

    10.3.2

    /

 

問題四:

開啟登入頁面報錯,後臺錯誤如下:

####<2011-4-2 下午060011 CST> <> <> <> <1301738411265> <1:1: the="" validator="" class:="" has="" failed="" with="" following="" exception:="" weblogic.xml.jaxp.registrysaxparserfactory="" cannot="" be="" cast="" to="" javax.xml.parsers.saxparserfactory="">

^---------------------------------------------^

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中增加如下:

        

                   true

        

使classloader首先載入webinfo下的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">

    10.3.2

    /

        

                   true

        

 

問題五:

部署應用程式過程中,報如下錯誤:

####<2011-4-2 下午093556 CST> <> <> <1301751356796>

####<2011-4-2 下午093557 CST> <> <> <> <1301751357265>

####<2011-4-2 下午093557 CST> <> <> <> <1301751357265>

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章