File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Issue when deploying Struts app that runs on weblogic 8.1 to weblogic 11g Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Issue when deploying Struts app that runs on weblogic 8.1 to weblogic 11g" Watch "Issue when deploying Struts app that runs on weblogic 8.1 to weblogic 11g" New topic
Author

Issue when deploying Struts app that runs on weblogic 8.1 to weblogic 11g

M Alex
Greenhorn

Joined: Mar 23, 2011
Posts: 2
If I deploy an ear file on my local weblogic 8.1 server, it is working perfectly fine. But when I deploy it on Weblogic 11g, it gives an error.

Here is the scenario –

The first page of the application asks you to select the user. On user selection it will execute the RolesAction and take you to the roles page wherein the roles that are assiociated with the user will come as a drop down.

Once I deploy Argus application and select user on test login page, entire RolesAction class is getting executed but instead of getting page with roles associated to that user in the dropdown, I am getting “Error 404—Not Found” error page and in log file getting below mentioned error.

<Mar 20, 2011 8:20:42 PM GMT> <Error> <HTTP> <BEA-101017> <[ServletContext@406125315[app:ArgusDEV module:ArgusWeb path:/ArgusWeb spec-version:null]] Root cause of ServletException. java.lang.NoSuchMethodError: org/apache/struts/config/ForwardConfig.getContextRelative()Z at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:298) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) Any inputs??

My Roles.jsp has the tld declaration as below:

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> Do you see any issue wrt the tld declaration?


The first page that comes up in the application wherein you select the user is the Login.jsp. In this jsp, the tlds are declared as below: This page is displyed. However, the roles.jsp page is the one that gives the error.

Login.jsp tld declaration:

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

Both the jsp's have the same tld declaration, and 1 gets displayed whereas the other one gives an error.

Also, I checked my application lib and found struts.jar as well as struts-core-1.3.8.jar in the lib.
Do you see any issue in using 2 jars, in the tld etc. I am not sure of what is actually causing the issue.

Thoughts?

Thanks!


Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8907
    
    8

M Alex wrote:
Also, I checked my application lib and found struts.jar as well as struts-core-1.3.8.jar in the lib.
Do you see any issue in using 2 jars, in the tld etc. I am not sure of what is actually causing the issue.


Absolutely. You can never be sure which version will come first in the application classpath. I'd say it is the most likely cause of your issue.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
M Alex
Greenhorn

Joined: Mar 23, 2011
Posts: 2
Thanks Joe.

Checked the application lib folder to find struts-core-1.3.8.jar as well as struts.jar. It is because of this that the exception was thrown.

struts.jar has the forwardConfig class and getContextRelative() method.

struts-core-1.3.8.jar has the forwardConfig class , but not the getContextRelative() method.

This was causing the issue.

Therefore remove struts.jar so that 1.3.8 version is used.

-- Additionally add struts-extras-1.3.8.jar to the application lib

-- In the jsp, correct the tag lib uri to:

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

This solves the problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue when deploying Struts app that runs on weblogic 8.1 to weblogic 11g