Bug 34302 - Tomcat doesn't read JDK 1.5 correctly
Summary: Tomcat doesn't read JDK 1.5 correctly
Status: RESOLVED WORKSFORME
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Servlet & JSP API (show other bugs)
Version: 5.5.8
Hardware: HP Windows XP
: P4 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords: JDK1.5
Depends on:
Blocks:
 
Reported: 2005-04-05 15:11 UTC by vin maxie
Modified: 2005-05-03 07:54 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vin maxie 2005-04-05 15:11:33 UTC
I am using JDK 1.5.0_02 b09  and Tomcat 5.5.8.   When I run the page I get the 
Server Error:  java.lang.VerifyError: (class: util/emenuUserLogin, method: 
insertDBtest signature: (Ljava/lang/String;)Ljava/lang/String;) Incompatible 
object argument for function call  

It's a simple login page and string concatenation within the class.

JSP CODE:

<%@ page import="util.mainUserLogin"%>
<%@ page import="java.io.*" %>

<html>
<head>
<title>New Client</title>
</head>
<%
  if(request.getMethod().equalsIgnoreCase("post")){

		
		String userId = request.getParameter("ulogin");
		String pWord = request.getParameter("upword");

		System.out.print(userId);

		int i = 0;

		mainUserLogin emUL = new mainUserLogin();
		String imback = emUL.insertDBtest(userId);

		i = 1;
		System.out.print(imback);
} 
%>

<body>
<table border="0">

<tr>
	
	<td>
 <form method="POST" action="">
 <p></b><font color="#FF0000" size="4">*</font><font face="Arial" 
size="2"><b>denotes required information</b></font></p>
 <table border="0" width="100%">
  
  
  <tr>
    <td width="30%" align="right"><font face="Arial" 
size="2">Login:</font></td>
    <td width="20%" align="left"><input type="text" name="ulogin" 
size="20"><font color="#FF0000" size="4">*</font></td>
 	<td width="30%" align="right"><font face="Arial" size="2"></font></td>
 </tr>
 <tr>   
    <td width="30%" align="right"><font face="Arial" size="2">Email 
Address:</font></td>
    <td width="20%" align="left"> <input type="text" name="upword" 
size="20"><font color="#FF0000" size="4">*</font></td>
  </tr>
 
  <tr>
    <td width="30%" align="right"></td>
    <td width="20%" align="left"><input type="submit" value="   Complete 
Registration  " name="btnAddUser"></td>
    <td width="30%" align="right"></td>
    <td width="20%" align="left"></td>
  </tr>
 </table>

</form>
</tr>
</table>
</body>
</html>

*************
Condensed Java Code:

package util;

import java.io.*;



public class mainUserLogin {


    public String insertDBtest(String uLogin) throws Exception{


          String qry = "select count(clientid) as cnt from main_client "+
                   "where login = lower('"+ uLogin +"')";


        return qry;

    }

}

*******************

I'm not sure if this is related to Bugzilla 31777 or not...  I don't think it 
is, and perhaps there is an easy way for me to get the appropriate JDK and 
Tomcat .jar files in sync, however I am new to that part of the programming 
world and need some specific instructions...  (If this is a duplicate, 
shouldn't Tomcat automatically download w/ the corresponding JVM to 1.5 by 
now?)

My own work around was to point my compiler back to JDK 1.3, and then 
everything works fine on Tomcat, but I would much rather stay on 1.5 and get 
Tomcat coordinated.

Hope this makes sense...  My apologies if this is a duplicate or there is an 
easy answer that I have simply overlooked. 

Keep up the good work
Comment 1 Yoav Shapira 2005-05-03 15:54:27 UTC
Please ask on the tomcat-user mailing list.  A VerifyError is almost always a
configuration error on your behalf, it's not internal to Tomcat.