This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

VerifyError when compiling jetty


Hello.

I'm trying to compile an application that uses the Jetty server
(jetty.mortbay.org) with gcj.
I've tried both compiling it into native code, and into bytecode.

It works perfectly when compiled with sun's javac 1.2, 1.3 and 1.4, but when
I'd _successfully_ compiled it into bytecode using gcj, I got this error
when I tried to run it:

<------------------clip--------------------------------------------->

10:18:20.965 EVENT  Starting Jetty/4.1
10:18:28.977 EVENT  Started ServletHttpContext[/doc]
Exception in thread "main" java.lang.VerifyError: (class:
org/mortbay/jetty/servlet/AbstractSessionManager$SessionScavenger, method:
run signature: ()V) Illegal use of nonvirtual function call
        at
org.mortbay.jetty.servlet.AbstractSessionManager.start(AbstractSessionManage
r.java:251)
        at
org.mortbay.jetty.servlet.ServletHandler.start(ServletHandler.java:413)
        at org.mortbay.http.HttpContext.startHandlers(HttpContext.java:1793)
        at org.mortbay.http.HttpContext.start(HttpContext.java:1763)
        at org.mortbay.http.HttpServer.start(HttpServer.java:677)
        at cd.server.cdServer.main(cdServer.java:57)

<------------------/clip-------------------------------------------->

I also tried to compile that same bytecode into a native executable but I
got the following compilation errors:

<------------------clip--------------------------------------------->

gcj --main=cd.server.cdServer -I/usr/java/jetty/ext/jmxri.jar -I/usr/java/ja
vasdkee/lib/j2ee.jar -o jettyTestexe jettyTest.jar

org/mortbay/http/ajp/AJP13Connection.java: In class
`org.mortbay.http.ajp.AJP13Connection':
org/mortbay/http/ajp/AJP13Connection.java: In method
`org.mortbay.http.ajp.AJP13Connection.handleNext()':
org/mortbay/http/ajp/AJP13Connection.java:136: verification error at PC=50
org/mortbay/http/ajp/AJP13Connection.java:136: loading local variable 8
which has unknown type
org/mortbay/http/HttpConnection.java: In class
`org.mortbay.http.HttpConnection':
org/mortbay/http/HttpConnection.java: In method
`org.mortbay.http.HttpConnection.handleNext()':
org/mortbay/http/HttpConnection.java:871: verification error at PC=544
org/mortbay/http/HttpConnection.java:871: types could not be merged
org/mortbay/http/ContextLoader.java: In class
`org.mortbay.http.ContextLoader':
org/mortbay/http/ContextLoader.java: In method
`org.mortbay.http.ContextLoader.getPermissions(java.security.CodeSource)':
org/mortbay/http/ContextLoader.java:190: class 'java.net.URLClassLoader' has
no method named 'getPermissions' matching signature
'(Ljava/security/CodeSource;)Ljava/security/PermissionCollection;'
ThreadPool.java: In class `org.mortbay.util.ThreadPool$JobRunner':
ThreadPool.java: In method `org.mortbay.util.ThreadPool$JobRunner.run()':
ThreadPool.java:658: verification error at PC=471
ThreadPool.java:658: label part of different subroutines
org/mortbay/util/URLResource.java: In class `org.mortbay.util.URLResource':
org/mortbay/util/URLResource.java: In method
`org.mortbay.util.URLResource.getFile()':
org/mortbay/util/URLResource.java:153: class 'java.net.URLConnection' has no
method named 'getPermission' matching signature
'()Ljava/security/Permission;'
org/mortbay/util/FileResource.java: In class
`org.mortbay.util.FileResource':
org/mortbay/util/FileResource.java: In constructor `(java.net.URL)':
org/mortbay/util/FileResource.java:57: class 'java.net.URLConnection' has no
method named 'getPermission' matching signature
'()Ljava/security/Permission;'
org/mortbay/xml/XmlParser.java: In class `org.mortbay.xml.XmlParser':
org/mortbay/xml/XmlParser.java: In constructor `()':
org/mortbay/xml/XmlParser.java:60: cannot find file for class
javax.xml.parsers.SAXParserFactory
org/mortbay/xml/XmlParser.java:60: cannot find file for class
javax.xml.parsers.SAXParserFactory
org/mortbay/xml/XmlParser.java:60: cannot find file for class
javax.xml.parsers.SAXParserFactory
org/mortbay/xml/XmlParser.java:60: cannot find file for class
javax.xml.parsers.SAXParserFactory
org/mortbay/xml/XmlParser.java:60: class
'javax.xml.parsers.SAXParserFactory' has no method named 'newInstance'
matching signature '()Ljavax/xml/parsers/SAXParserFactory;'
org/mortbay/xml/XmlParser.java:61: cannot find file for class
javax.xml.parsers.SAXParserFactory
org/mortbay/xml/XmlParser.java:61: class
'javax.xml.parsers.SAXParserFactory' has no method named 'setValidating'
matching signature '(Z)V'
org/mortbay/xml/XmlParser.java:62: cannot find file for class
javax.xml.parsers.SAXParserFactory
org/mortbay/xml/XmlParser.java:62: class
'javax.xml.parsers.SAXParserFactory' has no method named 'newSAXParser'
matching signature '()Ljavax/xml/parsers/SAXParser;'
org/mortbay/xml/XmlParser.java:62: confused by earlier errors, bailing out

<------------------/clip-------------------------------------------->

Can anyone please tell me what those errors mean and how I can fix this or
work around it and whether anyone has ever compiled jetty using gcj
successfully.
I'm using RedHat 6.1 and version 3.2.1 of GCJ

Thanks,
Bjarni


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]