----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


Hi,

I'm using Apache 1.3.9, Jserv 1.1 on solaris.  I have a class with a
method that returns a Serializable object.  If this method ends up
returning a String array, then the servlet engine ends up throwing a
java.lang.VerifyError when trying just to load the class.  A dummy
testcase is as follows:

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class TestServlet extends HttpServlet {

  public Serializable test() {
    return ((Serializable) new String[0]);
  }

  public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
  {
    PrintWriter out = new PrintWriter(res.getOutputStream());
    out.println("hello world");
    out.close(); 
  }
}

The 'test' method is not even called, but simply trying to load this
class through the apache jserv engine gives me the following error in
the jserv log:

java.lang.VerifyError
        at java.lang.ClassLoader.resolveClass(Compiled Code)
        at org.apache.java.lang.AdaptiveClassLoader.loadClass(Compiled
Code)
        at java.lang.ClassLoader.loadClass(Compiled Code)
        at org.apache.jserv.JServServletManager.load_init(Compiled Code)
        at org.apache.jserv.JServServletManager.loadServlet(Compiled
Code)
        at org.apache.jserv.JServConnection.processRequest(Compiled
Code)
        at org.apache.jserv.JServConnection.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)

Has anyone seen this problem before, or have any suggestions about what
to do?  Thanks in advance for any help.


-Rich


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to