西西軟件園多重安全檢測(cè)下載網(wǎng)站、值得信賴(lài)的軟件下載站!
軟件
軟件
文章
搜索

首頁(yè)編程開(kāi)發(fā)其它知識(shí) → Struts2與Weblogic服務(wù)器配置注意事項(xiàng)

Struts2與Weblogic服務(wù)器配置注意事項(xiàng)

相關(guān)軟件相關(guān)文章發(fā)表評(píng)論 來(lái)源:西西整理時(shí)間:2013/10/9 19:29:58字體大。A-A+

作者:西西點(diǎn)擊:548次評(píng)論:0次標(biāo)簽: Struts2

  • 類(lèi)型:系統(tǒng)其它大。20M語(yǔ)言:中文 評(píng)分:10.0
  • 標(biāo)簽:
立即下載

最近新項(xiàng)目打算用struts2與weblogic服務(wù)器搭建項(xiàng)目環(huán)境,本以為會(huì)很容易成功,沒(méi)想到卻花了我好多時(shí)間。

進(jìn)入正題:

環(huán)境:weblogic9.2 MP3  、JDK1.7.3、MyEclipse8.5

一開(kāi)始按照基本的struts2搭配環(huán)節(jié)進(jìn)行,發(fā)現(xiàn)在服務(wù)器啟動(dòng)的時(shí)候,報(bào)錯(cuò),大致如下:

<<WLS Kernel>> <> <> <1272511848921> <BEA-101165> <Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.
Unable to load configuration. - [unknown location]
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
        at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
        at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
        at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:309)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:88)
        at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:56)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1610)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2750)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:889)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:333)
        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:635)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
        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:358)
        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.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Error loading configuration file struts.xml - [unknown location]

在網(wǎng)上查了好多資料,都以為是jar包沖突,或者是jar沒(méi)有導(dǎo)入導(dǎo)致的,其實(shí)還有另外的一種原因。

weblogic9.2啟動(dòng)部署的時(shí)候,默認(rèn)的自帶的jdk1.5,而這個(gè)時(shí)候我們的MyEclipse8.5用的是自己安裝的jdk1.7.3,導(dǎo)致版本不一致

解決方法如下:右鍵需要部署的項(xiàng)目,選擇—》properties—》java Compiler

將項(xiàng)目的編譯器改成jdk.1.5的版本就OK了,再次部署,就不會(huì)出現(xiàn)找不到action的錯(cuò)誤了

    相關(guān)評(píng)論

    閱讀本文后您有什么感想? 已有人給出評(píng)價(jià)!

    • 8 喜歡喜歡
    • 3 頂
    • 1 難過(guò)難過(guò)
    • 5 囧
    • 3 圍觀圍觀
    • 2 無(wú)聊無(wú)聊

    熱門(mén)評(píng)論

    最新評(píng)論

    發(fā)表評(píng)論 查看所有評(píng)論(0)

    昵稱(chēng):
    表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
    字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過(guò)審核才能顯示)