tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonard Bouchet <...@lajoiedelire.ch>
Subject classformaterror
Date Tue, 19 Sep 2000 23:08:28 GMT
Hi,

I have a classFormatError exception using tomcat and jdk 1.2.2 with this
code:
// source code
    public ResultSet action() {
        Statement stmt = null;
        try {
            stmt = dbConnect.createStatement();
            if(stmt.execute("Select asdf from Reservations")) {
                return stmt.getResultSet();
            }      
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (stmt != null)
                    stmt.close();
                } catch (SQLException e) {
                    e.printStackTrace();
            }
        }
        return null;
    }
// end source code

but if I comment out the 'return stmt.getResultSet();' line, it works fine!

can anyone help me on this?

thanks a lot

-leo

here is the exception code:
java.lang.ClassFormatError: leo001/DBMS (Illegal Variable name "<return>")
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled Code)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:392)
    at 
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava, Compiled Code)
    at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
    at leo001.Facade.<init>(Facade.java:34)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java, Compiled Code)
    at java.beans.Beans.instantiate(Beans.java:211)
    at java.beans.Beans.instantiate(Beans.java:55)
    at 
_0002findex_0002ejspindex_jsp_47._jspService(_0002findex_0002ejspindex_jsp_4
7.java:66)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
    at 
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
    at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
    at 
org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.j
ava:163)
    at 
org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:187)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
    at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
    at 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:156)
    at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
    at java.lang.Thread.run(Thread.java:479)


Mime
View raw message