| View previous topic :: View next topic |
| Author |
Message |
ShinyDoofy n00b

Joined: 22 Jul 2006 Posts: 51
|
Posted: Mon Aug 20, 2012 7:35 pm Post subject: [solved] www-servers/tomcat-7.0.29-r1 with Eclipse WST |
|
|
Hi there,
quite some time ago, I updated to tomcat 7.0.29-r1, which, according to the ChangeLog file, was a complete rewrite ebuild-wise. Both 7.0.29 and 7.0.29-r1 work just fine when manually started from bash. However, I can't get -r1 working within Eclipse, as it can't seem to find critical classes anymore when booting:
| Code: | SEVERE: Begin event threw error
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
[...]
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[...] |
Diff'ing the two installed ebuilds, I noticed that -r1 doesn't have servlet-api.jar in its lib directory anymore. However, there's still /usr/share/tomcat-servlet-api-3.0/lib/servlet-api.jar and a few others from package dev-java/tomcat-servlet-api. Trying to include these files needed to successfully boot tomcat, I've added /usr/share/tomcat-servlet-api-3.0/lib/ in tomcat's launch configuration inside Eclipse - still it's the very same error message popping up with no change whatsoever. Also, some of my classes complain about missing classes (like HttpServletRequest usually contained in servlet-api.jar). Installing 7.0.29 again (without -r1) fixes things, but it's a rather ugly workaround imho.
So, has anyone managed to get tomcat-7.0.29-r1 running from within Eclipse? Are there any special options I need to set after updating tomcat?
Frankly, I'm both out of ideas and things to look for, any input is more than welcome.
Closing information: Eclipse 4.2 (wasn't different in 3.7) installed locally in my user's $HOME, ~amd64 system, current Oracle JDK and JRE 7. If you need more info, please ping.
Last edited by ShinyDoofy on Sat Sep 01, 2012 8:06 pm; edited 1 time in total |
|
| Back to top |
|
 |
ShinyDoofy n00b

Joined: 22 Jul 2006 Posts: 51
|
Posted: Sat Sep 01, 2012 8:06 pm Post subject: |
|
|
Bumping with some hack that got it running for me again.
Go to /usr/share/tomcat-7/lib and run these commands:
| Code: | ln -s /usr/share/eclipse-ecj-3.7/lib/ecj.jar
ln -s /usr/share/tomcat-servlet-api-3.0/lib/el-api.jar
ln -s /usr/share/tomcat-servlet-api-3.0/lib/jsp-api.jar
ln -s /usr/share/tomcat-servlet-api-3.0/lib/servlet-api.jar |
Granted, that's not a perfect way to fix things and it's prone to errors in case of updates, but oh well. Will mark this solved for now. If anybody else has a proper solution for this, I'm all ears. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|