[groovy-user] [Newbie] embedded jetty error

97 views
Skip to first unread message

Raphael Bauduin

unread,
Sep 20, 2013, 11:10:01 AM9/20/13
to us...@groovy.codehaus.org
Hi,

When embedding Jetty in a script, I get this error:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during class generation: class "javax.servlet.ServletRegistration$Dynamic"'s signer information does not match signer information of other classes in the same package

java.lang.SecurityException: class "javax.servlet.ServletRegistration$Dynamic"'s signer information does not match signer information of other classes in the same package
        at java.lang.ClassLoader.checkCerts(ClassLoader.java:939)
        at java.lang.ClassLoader.preDefineClass(ClassLoader.java:653)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:781)

I've found a post (http://sysgears.com/articles/embedding-recent-jetty-in-groovy-using-grape/) about this problem but I'm not sure it applies in my case.

Any suggestion?

Thanks in advance!

Raph

PS Here are the jars I load from my groovy-starter.conf:

lib/
lib/slf4j-api-1.6.4.jar
lib/test
lib/test/jetty-servlet-9.0.5.v20130815.jar
lib/test/jetty-util-9.0.5.v20130815.jar
lib/test/jetty-security-9.0.5.v20130815.jar
lib/test/jetty-xml-9.0.5.v20130815.jar
lib/test/jetty-io-9.0.5.v20130815.jar
lib/test/jetty-servlets-9.0.5.v20130815.jar
lib/test/servlet-api-3.0.jar
lib/test/jetty-webapp-9.0.5.v20130815.jar
lib/test/jetty-http-9.0.5.v20130815.jar
lib/test/jetty-server-9.0.5.v20130815.jar
lib/jwt-auth-3.3.1.jar
lib/jwt-3.3.1.jar

and here are the imports from the script:

import javax.servlet.http.HttpServlet                                            
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.server.Request                                          
import org.eclipse.jetty.servlet.ServletContextHandler                           
import org.eclipse.jetty.webapp.WebAppContext                                    
import org.eclipse.jetty.server.handler.HandlerList                              
import org.eclipse.jetty.server.Handler                                              
import org.eclipse.jetty.servlet.ServletHolder

Some versions information:    
Groovy Version: 2.1.7 JVM: 1.7.0_03 Vendor: Oracle Corporation OS: Linux

And the whole script is available at http://pastie.org/8341965

Raphael Bauduin

unread,
Sep 20, 2013, 11:51:37 AM9/20/13
to us...@groovy.codehaus.org
I discovered groovy ships with a servlet-api jar, and removing this file from the groovy /lib directory solved the problem.

Raph
--
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org
Reply all
Reply to author
Forward
0 new messages