I have a web application that uses Struts2, Spring and JPA. In the application we use annotations. When we deploy the application in eclipse, if we deploy it as a virtual application (right-click on the server, select properties, select "WebLogic", select "Publish Mode"), the application works fine . This option generates the _auto_generated_ear file and works great with the application. When I deploy it as a blasted archive or manually deploy the application as a .war file through the admin console, the following error message appears :
[[ACTIVE] ExecuteThread: "8" for the queue: "weblogic.kernel.Default (self-tuning) '] WARN org.apache.struts2.dispatcher.Dispatcher - Could not find an action or result: /eServices/login.action No action mapped for the namespace [/] and action name [login] associated with the context path [/ eServices]. - [unknown location] in com.opensymphony.xwork2.DefaultActionProxy.prepare (DefaultActionProxy.java:185) in org.apache.struts2 .impl.StrutsActionProxy.prepare (StrutsActionProxy.java:63) in org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy (StrutsActionProxyFactory.java:37) in com.opensymphony.xwork2.DefaultActionProxyFactory.proxyFactory.ProctionFactory.projectFactory.Factory.ProjectFactory.Factory.Factory.java org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.javahaps52) in org.apache.struts2.dispatcher.ng.ExecuteOperations.execut eAction (ExecuteOperations.java:77) in org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter (StrutsPrepareAndExecuteFilter.java:99) in weblogic.servlet.internal.FilterChainImpl.ChainFlplainDilpl .security.jps.ee.http.JpsAbsFilter $ 1.run (JpsAbsFilter.java:111) in java.security.AccessController.doPrivileged (native method) in oracle.security.jps.util.JpsSubject.doAsPrivileged (JpsSubject.java1313 ) in oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode (JpsPlatformUtil.java:413) in oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode (JpsAbsFilter.java:94) in oracle.se. ee.http.JpsAbsFilter.doFilter (JpsAbsFilter.java:161) at oracle.security.jps.ee.http.JpsFilter.doFilter (JpsFilter.java:71) in weblogic.servlet.internal.FilterChainImpl.doFilter.ava 56) in oracle.dms.servlet.DMSServletFilter.doFilter (DMSServletFilter.java:136) in weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.ja va: 56) in weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715) in weblogic.servlet.internal.WebAppServletContext $ ServletInvocation.ctionunrn.oconloconloconlocontext.vonconiconlocontext.vloconloconoconloconoconloconloconoconloconoconloconet6868 .AuthenticatedSubject.doAs (AuthenticatedSubject.java:321) in weblogic.security.service.SecurityManager.runAs (SecurityManager.java:120) in weblogic.servlet.internal.WebAppServletContext.securedExecute (WebAppServletCon77.java.java.java). internal.WebAppServletContext.execute (WebAppServletContext.java:2183) in weblogic.servlet.internal.ServletRequestImpl.run (ServletRequestImpl.java:1454) in weblogic.work.ExecuteThread.execute (ExecuteThread.java20readThj.alog:read14 .run (ExecuteThread.java:178)
Can any WebLogic gurus point me in the right direction? Is there a problem with the convention plugin for Struts2 running on WebLogic? Any help would be greatly appreciated. Thanks in advance.
Updated:
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>eServices</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextClass</param-name> <param-value> org.springframework.web.context.support.AnnotationConfigWebApplicationContext </param-value> </context-param> <context-param> <param-name>contextConfigLocation</param-name> <param-value>com.ceiwc.es.config</param-value> </context-param> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <session-config> <session-timeout>20</session-timeout> </session-config> </web-app>
struts.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.devMode" value="false" /> <constant name="struts.custom.i18n.resources" value="global" /> <constant name="struts.ui.theme" value="simple" /> </struts>
source share