• Post Reply Bookmark Topic Watch Topic
  • New Topic

Moving an app from WAS 4 to 5. Seeing issues.

 
Mush Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, let me say I'm not a java developer. I really only do deployments of applications. Basically, the developer who put this together walked out on us, so I'm learning on the fly. We have to move an application from one server (WebSphere 4) to another(WebSphere 5) and are seeing some issues. I realize it could be a number of things, so I'm just looking for a good place to start. Basically, I have a simple jsp based app that references a few class files. The app loads properly into WebSphere, I am able to get calls made to the class files from the jsp files.

Basically, I'm seeing one error I can't get a handle on within one of the jsp files when I try to access that file via browser:

An error occurred between lines: 44 and 72 in the jsp file: /user.jsp Generated servlet error: /opt/WebSphere/AppServer/temp/servername/server1/eNT/eNT.war/_user.java:206: cannot resolve symbol symbol : class Vector location: class org.apache.jsp._user Vector eesm_ids = new Vector();

Is there something specific to the java environment that needs to be setup in order for this type of method to be called? Maybe the java version is not up properly or something? Any help would be greatly appreciated.
[ December 16, 2004: Message edited by: Mush Smith ]
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you see the below statement, or something like it in your jsp?

The Vector class is not available to JSPs by default, so it must be imported like the above example. Try putting that code snippet in the JSP page and see if that solves your problem.
 
Mush Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anthony Watson:
Do you see the below statement, or something like it in your jsp?

The Vector class is not available to JSPs by default, so it must be imported like the above example. Try putting that code snippet in the JSP page and see if that solves your problem.


Mr. Watson, thanks for helping. I took a look at the file, and there is no import of java.util.Vector. I've copied below what I am importing:

<%@ page import="java.sql.*,eNT.*,java.net.*" buffer="32kb" errorPage="dbError.jsp" %>

I will try adding the import you mentioned. But let me ask this, why is it working on the other server then? I mean it's the same file, with the same import statement. Am I just not understanding something?
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr. Smith,

My previous post was just a suggestion of something to try. I saw that no one else had replied, so I took a stab at trying to help you. You are right though, theoretically, if the JSP worked before, it should still work. However, if the JSP references the Vector class, you should need an import statement like I recommended. Let me know if my proposed change helped though.
 
Mush Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anthony Watson:
Mr. Smith,

My previous post was just a suggestion of something to try. I saw that no one else had replied, so I took a stab at trying to help you. You are right though, theoretically, if the JSP worked before, it should still work. However, if the JSP references the Vector class, you should need an import statement like I recommended. Let me know if my proposed change helped though.


It did help. And I thank you for that. Unfortunately it led me to another issue:

Unable to compile class for JSP An error occurred between lines: 2 and 5 in the jsp file: /dbError.jsp Generated servlet error: /opt/WebSphere/AppServer/temp/sbymlx01/server1/eNT/eNT.war/_dbError.java:75: cannot resolve symbol symbol : variable exception location: class org.apache.jsp._dbError SQLException sql_ex = (SQLException) exception; ^ 1 error

There's an authentication page handling the login process. It fails, which is ok for now, but the dbError.jsp page spits out the above error. Even if I simplify the page significantly:

<%@ page import="java.sql.*,eNT.*,java.net.*,java.util.Vector,java.io.PrintWriter" %>
<%
SQLException sql_ex = (SQLException) exception;
int error_code = sql_ex.getErrorCode();
%>
<B>Error Code</B> <%= error_code %><BR>
[ December 16, 2004: Message edited by: Mush Smith ]
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't use the JSP implicit variable, 'exception,' unless you have the following declaration at the top of your page:
 
Mush Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr. Watson, sorry it took me forever to respond. I was out traveling with the holidays and all. Just wanted to thank you for your help. You of course correct in your last post and it helped me get where I needed to be. Turns out most of the issues I was seeing was due to the differences between websphere 4 and 5.

Thanks again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!