0

This question has been asked many times, but I have yet to see anyone discuss it regarding debugging GWT with Eclipse.

I started getting this error after upgrading from GWT 2.6.0 to 2.6.1 and now 2.7.0.

I can add tomcat-juhli.jar, which is now found in the bin directory, to the classpath and make the error go away, but then I may get a variety of other errors. (Jasper, Permissions, JSTL).

After many hours of moving jars from the classpath into the WEB-INF/lib folder and back again, I no longer can get the eclipse debug perspective to open.

dfdumaresq
  • 1,618
  • 4
  • 17
  • 22

2 Answers2

1

All jars that you use in your server code must be both on the build path and in the WEB-INF/lib folder.

If you get other errors when you do that, you have to deal with those errors.

Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58
  • Ok, I'll try putting the tomcat-juli.jar into the WEB-INF-lib folder and let you know. Thanks! – dfdumaresq Mar 21 '15 at 20:41
  • No, they don't need to be on the class path (that can only slow down Dev mode and cause various issues), they have to be on your build path though to compile your code. – Thomas Broyer Mar 22 '15 at 12:55
  • @ThomasBroyer: You are right, of course, but this is a terminology issue. Most people mean build path when they say "added to classpath in Eclipse". I corrected my answer. – Andrei Volgin Mar 22 '15 at 15:15
  • Okay, now I'm confused, I understood Andrei Vogin to mean classpath (as in the .classpath in my project. Clearly I'm not most people.) So what is the build path in Eclipse? – dfdumaresq Mar 23 '15 at 01:59
  • Right-click on a project > Build path > Configure Build Path. Also, check out this question: http://stackoverflow.com/questions/1821571/classpath-java-buld-path-eclipse-and-web-inf-lib-what-to-use-when-and-wh?rq=1 – Andrei Volgin Mar 23 '15 at 02:34
  • Ahh, that build path! I'm so used to editing the .classpath file--which is the container within the project to hold references to project libraries--that I started thinking of it as the CLASSPATH environment variable, which is what ThomasBroyer meant. – dfdumaresq Mar 23 '15 at 15:26
0

The tomcat-juli file is required by Tomcat to do its logging, usually not required by either eclipse or your app.

the correct location in that case is the tomcat lib folder, next to jakarta etc.

there should also be a juli adapter jar.

not sure if this is really related to gwt.

Update: Check this page regarding logging in Tomcat: http://tomcat.apache.org/tomcat-7.0-doc/logging.html

If I understand your problem correctly, your chapter is the log4j chapter. Esp. the part with the juli jars. You need to fix the classpath for the tomcat adapter in eclipse to fix it.

thst
  • 4,592
  • 1
  • 26
  • 40
  • In Tomcat7 the tomcat-juhli jar is in the bin directory. I don't contemplate moving it. Also I see know jakarta files or juhli adapter. In any case the error I mentioned happens when I upgrade GWT from 2.6.0. Also it doesn't seem to go away after downgrading. – dfdumaresq Mar 23 '15 at 02:01
  • Updated the answer, did you switch to tomcat 7 with the gwt update? – thst Mar 23 '15 at 02:35
  • I think that's what happened...I was away on parental leave at the time. Anyway, the big Ah-Ha (besides a new baby boy) is that debugging is now happening in Chrome. Still unable to debug in Eclipse without using something like http://sdbg.github.io/ – dfdumaresq Mar 24 '15 at 20:13
  • Congratulations then ( for the baby ) - I took your question to be related to the server side code, where you debug the tomcat. Happy coding. – thst Mar 24 '15 at 21:46