Sunday, July 1, 2018

After upgrading to GWT 2.8.2: Exception "ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype" during Super Dev Mode

Hello,

I recently had to upgrade a project from GWT 2.6.0 to GWT 2.8.2, while, at the same time, the project migrated from Java 6 to Java 8, including a new version of the IDE, namely Eclipse Oxygen.

For developing, we start the Super Dev Mode via an Ant script, which opens the window where one can click on "Launch default browser" to open the GWT app.

Unfortunately, upon opening the GWT app (clicking on the "Launch default browser" button), I'm facing the following exception (shown in the console and within the browser):


HTTP ERROR 500
Problem accessing /Login.jsp. Reason:


   
Server Error
Caused by:
javax
.servlet.ServletException: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype
    at org
.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
    at org
.eclipse.jetty.jsp.JettyJspServlet.service(JettyJspServlet.java:107)
    at javax
.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org
.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    at org
.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at org
.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
    at org
.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
   
[...]
Caused by: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype
    at java
.util.ServiceLoader.fail(ServiceLoader.java:239)
    at java
.util.ServiceLoader.access$300(ServiceLoader.java:185)
    at java
.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
    at java
.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java
.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org
.apache.juli.logging.LogFactory.<init>(LogFactory.java:78)
    at org
.apache.juli.logging.LogFactory.<clinit>(LogFactory.java:66)
    at org
.apache.jasper.runtime.TagHandlerPool.<clinit>(TagHandlerPool.java:42)
    at org
.apache.jsp.Login_jsp._jspInit(Login_jsp.java:40)
    at org
.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
    at org
.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:180)
    at org
.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
   
[...]



Now, I found some posts about this problem:

  • https://stackoverflow.com/questions/43527854/upgrading-gwt-from-2-1-1-to-2-8-0-serviceconfigurationerror-org-apache-juli-lo
  • https://github.com/tbroyer/gwt-maven-plugin/issues/65 ("GWT Eclipse Plugin Running DevMode throws the famous jetty exception. #65")
  • https://github.com/gwtproject/gwt/issues/9343 ("Jetty Exception Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype #9343")

But neither of those were of help for me - maybe because I'm lacking some experience with GWT and Java web apps in general.

The part of the Ant script to start the Super Dev Mode looks like this:

    <target name="dev" depends="javac" description="Super Dev Mode">
   
       
<path id="gwtDevModeClasspath">
               
<pathelement location="src" />
               
<path>
                   
<pathelement location="${classes}" />
                   
<pathelement location="${env.GWT_HOME}/gwt-user.jar" />
                   
<fileset dir="${env.GWT_HOME}" includes="gwt-dev*.jar" />
                   
<fileset dir="${lib}">
                       
<include name="gin-2.1.2.jar" />
                           
<include name="guice-3.0.jar" />
                               
<include name="javax.inject-1.jar" />
                               
<include name="aopalliance-1.0.jar" />
                           
<include name="guice-assistedinject-3.0.jar" />
                       
<include name="gwt-visualization-1.1.2.jar" />
                   
</fileset>
               
</path>
       
</path>


       
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
           
<classpath>
               
<path refid="gwtDevModeClasspath" />
           
</classpath>
           
<jvmarg value="-Xmx256m" />
           
<jvmarg value="-Xss8m" />
           
<jvmarg value="-Dgwt.codeserver.port=9876" />
           
<jvmarg value="-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl" />
           
<jvmarg value="-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" />
           
<arg value="-startupUrl" />
           
<arg value="MyApp.html" />
           
<arg value="com.MyApp.MyApp" />
           
<arg value="-logLevel" />
           
<arg value="INFO" />
       
</java>
       
       
<echo>${toString:gwtDevModeClasspath}</echo>


   
</target>


After the dev mode GUI window has been closed, I print the used classpath via <echo>, which is:

D:\[...]\gwt-2.8.2\gwt-user.jar
D
:\[...]\gwt-2.8.2\gwt-dev.jar
D
:\[...]\Eclipse\MyGwtApp\src
D
:\[...]\Eclipse\MyGwtApp\war\WEB-INF\classes
D
:\[...]\Eclipse\MyGwtApp\war\WEB-INF\lib\aopalliance-1.0.jar
D
:\[...]\Eclipse\MyGwtApp\war\WEB-INF\lib\gin-2.1.2.jar
D
:\[...]\Eclipse\MyGwtApp\war\WEB-INF\lib\guice-3.0.jar
D
:\[...]\Eclipse\MyGwtApp\war\WEB-INF\lib\guice-assistedinject-3.0.jar
D
:\[...]\Eclipse\MyGwtApp\war\WEB-INF\lib\gwt-visualization-1.1.2.jar
D
:\[...]\Eclipse\MyGwtApp\war\WEB-INF\lib\javax.inject-1.jar

There are quite a few libraries in the "WEB-INF/lib" directory, which the GWT app needs:

aopalliance-1.0.jar
c3p0
-0.9.2.1.jar
chart
-2.2.1.jar
dom4j
-1.6.1.jar
dozer
-5.5.1.jar
gin
-2.1.2.jar
gson
-2.8.5.jar
guice
-3.0.jar
guice
-assistedinject-3.0.jar
gwt
-servlet.jar
gwt
-user-2.8.2.jar
gwt
-visualization-1.1.2.jar
gwt
-vl-2.0b-without-hibernate.jar
hamcrest
-core-1.3.jar
hibernate
-commons-annotations-4.0.2.Final.jar
hibernate
-core-4.2.6.Final.jar
hibernate
-jpa-2.0-api-1.0.1.Final.jar
itext
-4.2.1.jar
javassist
-3.15.0-GA.jar
javax
.inject-1.jar
javax
.servlet-api-3.1.0.jar
javax
.servlet.jsp.jstl-api-1.2.1.jar
jboss
-logging-3.1.0.GA.jar
jboss
-transaction-api_1.1_spec-1.0.1.Final.jar
jcl
-over-slf4j-1.7.5.jar
jcommon
-1.0.17.jar
jdom
-2.0.2.jar
jfreechart
-1.0.15.jar
jna
-4.0.0.jar
jsinterop
-annotations-1.0.2-sources.jar
jsinterop
-annotations-1.0.2.jar
libs
.txt
log4j
-1.2.17.jar
mchange
-commons-java-0.2.3.4.jar
mysql
-connector-java-5.1.26.jar
objenesis
-1.3.jar
openhtmltopdf
-core-0.0.1-RC4.jar
openhtmltopdf
-log4j-0.0.1-RC4.jar
openhtmltopdf
-pdfbox-0.0.1-RC4.jar
poi
-3.9.jar
poi
-ooxml-3.9.jar
poi
-ooxml-schemas-3.9.jar
sac
-1.3.jar
simple
-xml-2.7.1.jar
slf4j
-api-1.7.5.jar
slf4j
-simple-1.7.5.jar
spring
-aop-4.2.5.RELEASE.jar
spring
-beans-4.2.5.RELEASE.jar
spring
-context-4.2.5.RELEASE.jar
spring
-context-support-4.2.4.RELEASE.jar
spring
-core-4.2.5.RELEASE.jar
spring
-expression-4.2.5.RELEASE.jar
spring
-jdbc-4.2.5.RELEASE.jar
spring
-jms-4.0.9.RELEASE.jar
spring
-orm-4.2.5.RELEASE.jar
spring
-oxm-4.0.9.RELEASE.jar
spring
-retry-1.1.2.RELEASE.jar
spring
-security-config-4.0.4.RELEASE.jar
spring
-security-core-4.0.4.RELEASE.jar
spring
-security-web-4.0.4.RELEASE.jar
spring
-tx-4.2.5.RELEASE.jar
spring
-web-4.0.9.RELEASE.jar
spring
-webmvc-4.0.9.RELEASE.jar
spring
-ws-core-2.2.4.RELEASE.jar
spring
-ws-support-2.2.4.RELEASE.jar
spring
-xml-2.2.4.RELEASE.jar
spring4gwt
-0.0.1.jar
standard
.jar
validation
-api-1.0.0.GA-sources.jar
validation
-api-1.0.0.GA.jar
xml
-apis-1.3.04.jar
xmlbeans
-2.3.0.jar
xpp3
-1.1.3.3.jar




In Eclipse, using the "Open Type" dialog, I can only find one "org.apache.juli.logging.Log" and only one "org.eclipse.jetty.apache.jsp.JuliLog", both are included in "gwt-dev.jar".

I'm currently stuck and do not know how to proceed from here.


Any advice is much appreciated !


Thanks a lot in advance


Kind regards,
Leto


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment