Re: 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

2018-07-09 Thread Thomas Broyer


On Sunday, July 8, 2018 at 11:02:29 PM UTC+2, Leto wrote:
>
> Just out of curiosity: Is there a difference between launching the DevMode 
> with "-noserver" and CodeServer with "-launchDir"?
>

No, it will make no difference.

-- 
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+unsubscr...@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.


Re: 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

2018-07-08 Thread Leto
Hello Thomas,

sorry for my slow response, work schedule was a bit full the last days...

Eventually I could solve my problems and get it up running again - I really 
appreciate your help Thomas, thank you!



Am Montag, 2. Juli 2018 16:26:12 UTC+2 schrieb Thomas Broyer:
>
>
> Just to clarify: by "in the logs", I specifically meant the "Jetty" tab in 
> the DevMode window.
>  
>
 
Oh I see. I checked it, there was no log message of the kind you mentioned.


 

> Given what you shared about your classpath and WEB-INF/lib (where both 
> classes only exist in gwt-dev.jar), I'm ready to bet that this is a 
> classloader issue, where at one point the gwt-dev.jar is added to the 
> webapp classloader (almost as if it was in the WEB-INF/lib), and then there 
> are "conflicts" between the same class from the system classloader 
> (DevMode) and the webapp classloader (WEB-INF/lib) can't be cast from/to 
> one another.
>

Thanks for the explanation, that might be the problem. I was not able to 
check that, but fortunately, I could solve the problem by using a separate 
webserver, as you suggested.


 

> When you start the CodeServer with -launcherDir, it writes a special 
> myapp.nocache.js that automatically calls the CodeServer to (re)compile the 
> application and then load the compiled app.
>
> When it starts, the CodeServer starts a server (HTTP, port 9876 by 
> default) *and* writes the a myapp/myapp.nocache.js in the -launcherDir, 
> that references the CodeServer's URL (when you launch the DevMode, it 
> actually launches the CodeServer behind the scene, with the -launcherDir 
> being the same as the -war).
> When your browser loads that myapp.nocache.js (through the web server that 
> serves your webapp), it automatically "calls" the CodeServer to compile the 
> app and then load it; this is what the bookmarklets did prior to GWT 2.7 
> (and can still do, if you don't use -launcherDir).
>

It is really helpful that you took the time to describe the process, now I 
understand it way better.


I ended up using the Eclipse Jetty Plugin to start my webapp and I created 
an Ant task to start the CodeServer like this:


















This setup works for me.

Just out of curiosity: Is there a difference between launching the DevMode 
with "-noserver" and CodeServer with "-launchDir"?



Thomas, thanks again for taking the time to help!


Kind regards

-- 
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+unsubscr...@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.


Re: 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

2018-07-02 Thread Thomas Broyer


On Monday, July 2, 2018 at 2:21:21 PM UTC+2, Leto wrote:
>
> Hello Thomas,
>
> you answer is much appreciated, thank you!
>
>
> Am Sonntag, 1. Juli 2018 21:32:56 UTC+2 schrieb Thomas Broyer:
>>
>> In the logs, do you see an entry with "Server […] could not be found in 
>> the web app, but was found on the system classpath" and then "Adding 
>> classpath entry '[…]gwt-dev.jar' to the web app classpath for this session" 
>> ?
>>
>
> unfortunately, I don't see any of that line. I set the log level to 
> "TRACE" for "com.google.gwt.dev.DevMode" via
>
> 
> 
>
> but the only line containing the word "classpath" is 
>
> [java] 2018-07-02 13:18:18.743:INFO:/:main: No Spring 
> WebApplicationInitializer types detected on classpath
>
> but I think this has nothing to do with the problem.
>

Just to clarify: by "in the logs", I specifically meant the "Jetty" tab in 
the DevMode window.
 

>  
>
>> That would in general mean that you're missing a JAR in your WEB-INF/lib 
>> for the given class or resource. But there can be false positives 
>> unfortunately, and no way to change GWT's behavior (which has always been 
>> that way, but in the mean time we updated Jetty which changed quite a few 
>> things here).
>>
>
> Ok I understand. Until now, and still, I think the reason for the 
> exception is, that there is more than one implementation of 
> "org.eclipse.jetty.apache.jsp.JuliLog", or the wrong implementation for 
> "org.apache.juli.logging.Log", I'm not exactly sure how to interpret the 
> exception.
>

Given what you shared about your classpath and WEB-INF/lib (where both 
classes only exist in gwt-dev.jar), I'm ready to bet that this is a 
classloader issue, where at one point the gwt-dev.jar is added to the 
webapp classloader (almost as if it was in the WEB-INF/lib), and then there 
are "conflicts" between the same class from the system classloader 
(DevMode) and the webapp classloader (WEB-INF/lib) can't be cast from/to 
one another.
 

>  
>
>> The recommended setup with GWT 2.7+ is to run your webapp out of a 
>> "standard" server (Jetty, Tomcat, etc.), as an "exploded WAR", and running 
>> Super Dev Mode (CodeServer with -launchDir, or DevMode with -noserver) 
>> separately, pointing to the same directory that the server serves as the 
>> webapp (or configuring the server to *also* look into an additional 
>> directory for web resources, so it can find and serve the *.nocache.js 
>> generated by the Super Dev Mode)
>>
>
> Ok - so, is my understanding correct, that when I have a separate 
> webserver, like Jetty (e.g. via Eclipse Jetty plugin) or Tomcat, and I 
> start my WebApp with it (via an exploded WAR) and I also start DevMode 
> without the embedded server OR the CodeServer, those two (the separate 
> webserver and the CodeServer) do communicate with the help of the 
> "myapp.nocache.js" file?
>
>
> What I do not understand is, there is also the bookmarklet "Dev Mode 
> On/Off", how does that work / what is it doing, or is that bookmarklet of 
> no use with the aforementioned setup?
>

When you start the CodeServer with -launcherDir, it writes a special 
myapp.nocache.js that automatically calls the CodeServer to (re)compile the 
application and then load the compiled app.

When it starts, the CodeServer starts a server (HTTP, port 9876 by default) 
*and* writes the a myapp/myapp.nocache.js in the -launcherDir, that 
references the CodeServer's URL (when you launch the DevMode, it actually 
launches the CodeServer behind the scene, with the -launcherDir being the 
same as the -war).
When your browser loads that myapp.nocache.js (through the web server that 
serves your webapp), it automatically "calls" the CodeServer to compile the 
app and then load it; this is what the bookmarklets did prior to GWT 2.7 
(and can still do, if you don't use -launcherDir).

-- 
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+unsubscr...@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.


Re: 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

2018-07-02 Thread Leto
Hello Thomas,

you answer is much appreciated, thank you!


Am Sonntag, 1. Juli 2018 21:32:56 UTC+2 schrieb Thomas Broyer:
>
> In the logs, do you see an entry with "Server […] could not be found in 
> the web app, but was found on the system classpath" and then "Adding 
> classpath entry '[…]gwt-dev.jar' to the web app classpath for this session" 
> ?
>

unfortunately, I don't see any of that line. I set the log level to "TRACE" 
for "com.google.gwt.dev.DevMode" via




but the only line containing the word "classpath" is 

[java] 2018-07-02 13:18:18.743:INFO:/:main: No Spring 
WebApplicationInitializer types detected on classpath

but I think this has nothing to do with the problem.

 

> That would in general mean that you're missing a JAR in your WEB-INF/lib 
> for the given class or resource. But there can be false positives 
> unfortunately, and no way to change GWT's behavior (which has always been 
> that way, but in the mean time we updated Jetty which changed quite a few 
> things here).
>

Ok I understand. Until now, and still, I think the reason for the exception 
is, that there is more than one implementation of 
"org.eclipse.jetty.apache.jsp.JuliLog", or the wrong implementation for 
"org.apache.juli.logging.Log", I'm not exactly sure how to interpret the 
exception.


 

> The recommended setup with GWT 2.7+ is to run your webapp out of a 
> "standard" server (Jetty, Tomcat, etc.), as an "exploded WAR", and running 
> Super Dev Mode (CodeServer with -launchDir, or DevMode with -noserver) 
> separately, pointing to the same directory that the server serves as the 
> webapp (or configuring the server to *also* look into an additional 
> directory for web resources, so it can find and serve the *.nocache.js 
> generated by the Super Dev Mode)
>

Ok - so, is my understanding correct, that when I have a separate 
webserver, like Jetty (e.g. via Eclipse Jetty plugin) or Tomcat, and I 
start my WebApp with it (via an exploded WAR) and I also start DevMode 
without the embedded server OR the CodeServer, those two (the separate 
webserver and the CodeServer) do communicate with the help of the 
"myapp.nocache.js" file?


What I do not understand is, there is also the bookmarklet "Dev Mode 
On/Off", how does that work / what is it doing, or is that bookmarklet of 
no use with the aforementioned setup?


Thank you for any further help you can offer!

-- 
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+unsubscr...@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.


Re: 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

2018-07-01 Thread Thomas Broyer
In the logs, do you see an entry with "Server […] could not be found in the 
web app, but was found on the system classpath" and then "Adding classpath 
entry '[…]gwt-dev.jar' to the web app classpath for this session" ?
That would in general mean that you're missing a JAR in your WEB-INF/lib 
for the given class or resource. But there can be false positives 
unfortunately, and no way to change GWT's behavior (which has always been 
that way, but in the mean time we updated Jetty which changed quite a few 
things here).

The recommended setup with GWT 2.7+ is to run your webapp out of a 
"standard" server (Jetty, Tomcat, etc.), as an "exploded WAR", and running 
Super Dev Mode (CodeServer with -launchDir, or DevMode with -noserver) 
separately, pointing to the same directory that the server serves as the 
webapp (or configuring the server to *also* look into an additional 
directory for web resources, so it can find and serve the *.nocache.js 
generated by the Super Dev Mode)

On Sunday, July 1, 2018 at 10:53:37 AM UTC+2, Leto wrote:
>
> 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.(LogFactory.java:78)
> at org.apache.juli.logging.LogFactory.(LogFactory.java:66)
> at org.apache.jasper.runtime.TagHandlerPool.(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:
>
> 
> 
> 
> 
> 
> 
>  />
>  />
> 
> 
> 
> 
> 
>  />
> 
> 
> 
> 
>
>
>  "com.google.gwt.dev.DevMode">
> 
> 
> 
> 
> 
> 
>  "-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"
>  
> />
>  "-Djavax.xml.parsers

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

2018-07-01 Thread Leto
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.(LogFactory.java:78)
at org.apache.juli.logging.LogFactory.(LogFactory.java:66)
at org.apache.jasper.runtime.TagHandlerPool.(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:





































${toString:gwtDevModeClasspath}





After the dev mode GUI window has been closed, I print the used classpath 
via , 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-o