Tomcat 7.0.25 is not starting with Eclipse Indigo - eclipse

I have configured Tomcat 7.0.25 with eclipse indigo. When I start tomcat from eclipse , I get following error
java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap
I also get a logging error, but I added tomcat-juli.jar to classpath. However I am not able to resolve above error. Although I have verified that catalina.jar is present in TOMCAT_HOME/bin folder, it seems it is not picked in classpath when tomcat is started. I am using JDK 1.6.0_29 .
Any inputs ???
Thanks

It sounds like you have a corrupted 7.0.25 install. There is no need to add catalina.jar to the bin directory. The only JARs required in bin are bootstrap.jar, commons-daemon.jar and tomcat-juli.jar

Related

eclipse tomcat : java.lang.AbstractMethodError: javax.ws.rs.core.Response$ResponseBuilder.status(ILjava/lang/String)

I built my Gradle project and generated a War file.
when I run it on a separated Tomcat installation it works fine.
but when I run it in eclipse's tomcat I get this error.
java.lang.AbstractMethodError:javax.ws.rs.core.Response$ResponseBuilder.status(ILjava/lang/String;)Ljavax/ws/rs/core/Response$ResponseBuilder;

WFLYSRV0177: Error getting reflective information for class

I am developing a JEE project using Eclipse JEE (2019-09), Maven, Wildfly 17, JSF, PrimeFaces 7.0 running on Ubuntu 18.04.
My project used to compile, deploy and run on the WildFly 17 server until today. However, because I recieved strange errors when debugging, I installed an earlier Eclipse IDE to try to run my project on it.
After installing the older version of Eclipse (2019-03) in its own dedicated workspace, I got this error message when deploying my application to WildFly:
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class
I then switched back to my initial Eclipse JEE (2019-09) Version, but then I kept recieving the same error message upon deploying.
I' ve searched the internet and found these two similar problems:
Error getting reflective information for class
Wildfly: Error getting reflective information for class
but actually not a solution to my problem.
Could somebody please help?
The problem was that the Maven jar- dependencies were not added to the WEB-INF/lib path.
Actually, in the deployed .war file the folder WEB-INF/lib was completely missing.
I fixed the problem by right-mouse click on my project in Eclipse, then "Properties", then "Deployment Assembly".
I added the missing entry "Maven Dependencies" as follows:
1.) BEFORE MY FIX:
2.) AFTER MY FIX:

Eclipse Jetty Issue: WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext - java.util.zip.ZipException: invalid code lengths set

Eclipse with run-jetty-run suddenly starts to fail with the message:
2014-05-09 13:31:08.360:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,[file:~/api-public/src/main/webapp/]}
java.util.zip.ZipException: invalid code lengths set
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:193)
at java.util.jar.JarInputStream.read(JarInputStream.java:207)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:117)
at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)
at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)
at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:156)
at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:82)
at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:64)
at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:78)
at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:78)
at runjettyrun.webapp.RJRMetaInfoConfiguration.preConfigure(RJRMetaInfoConfiguration.java:14)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:417)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:263)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at runjettyrun.Bootstrap.main(Bootstrap.java:80)
Things done to try to fix:
Delete de workspace and regenerate
Reinstall eclipse
Reimport the maven project
Eclipse Kepler SR2 + run-jetty-run
Quite weird.
I changed the run-jetty server version from 8 to 7 and the error changed to a maven library dependency.
I deleted this library from my local maven repository (.m2/repositories/...), reinstalled and now is working perfectly.

java.lang.ClassNotFoundException for a class in external JAR

I have a maven project in Eclipse Java EE IDE for Web Developers.
When running Tomcat, I'm getting an error for a class that I can see that I have included.
My question is - do I have to add these JARs to an additional place because of Tomcat Apache?
Error:
SEVERE: Servlet /Resource threw load() exception
java.lang.ClassNotFoundException: org.odata4j.jersey.producer.resources.ODataApplication
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at com.sun.jersey.core.reflection.ReflectionHelper.classForNameWithException(ReflectionHelper.java:240)
at com.sun.jersey.core.reflection.ReflectionHelper.classForNameWithException(ReflectionHelper.java:220)
at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:711)
And here is the class in my Library:
UPDATE:
My Web Deployment Assembly looks like:
The issue you are seeing is due to the fact that tomcat is looking at the wrong directory. It is currently most likely pointed at your src/main/webapp directory of your project. This does not jive with how maven works. Maven downloads the dependencies, but will only include them in the target build. You need to have the tomcat server look at target/myapp-0.0.1, or build to a war and deploy that way. The easiest solution as of now, would be for you to use the tomcat plugin. After setting it up, you can use an imbedded server, and just use the following command 'mvn tomcat:run'.
Maven Tomcat Plugin Docs
UPDATE:
I looked at the properties settings, and you should actually be able to edit the "Web Deployment Assembly" settings for your project (under project properties). Check screenshot for how I have mine setup. Notice how Maven Dependencies is mapped.
http://imgur.com/ofxryns

problem installing eclipse groovy plugin in galileo

I'm trying to install groovy plugin in eclipse 3.5 using this update site.
It does install but when it tries to restart I get an exception.
!SESSION Sat Aug 29 15:47:17 PDT 2009 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2009-08-29 15:47:17.287
!MESSAGE Exception launching the Eclipse Platform:
!STACK java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
I tried to start using -clean options,deleted workspace no luck
Did anyone get this too??
It looks like you're missing a class or a jar required by the plugin; I'm not sure which one though, since the stacktrace does not indicate any such plugin specific class. You could attempt the following:
Examine the .log file of the workspace to view any additional details of the exception.
Verify if all the Groovy Eclipse plugin jars are present in the plugins and features directory of the Eclipse installation.
Start Eclipse with the consolelog and debug switches, and pipe the output to a debug log file. Examine for anything indicative of the problem in the logfile; if needed post the log file. The command to start Eclipse in this mode would be $eclipse -consolelog -debug | tee debugfile.log
Install the plugin on a clean installation of Eclipse.
OK now finally i fixed it after 2 days of war with eclipse, so for some reason when groovy plugin was installed eclipse modified config.ini file inside configuration folder
so I have to modify config.ini file to replace osgi.bundles value with
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.100.v20090520-1905.jar#1\:start,reference\:file\:plugins/org.eclipse.jdt.core_3.5.0.xx-20090828-1900-e35.jar#4,reference\:file\:/Applications/galileo/plugins/org.apache.commons.collections_3.2.1.jar#4,reference\:file\:/Applications/galileo/plugins/org.apache.commons.lang_2.3.0.v200803061910.jar#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy_1.7.0.xx-20090828-1900-e35/#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.ant_2.0.0.xx-20090828-1900-e35/#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.codeassist.completion_2.0.0.xx-20090828-1900-e35.jar#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.codebrowsing_2.0.0.xx-20090828-1900-e35.jar#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.core_2.0.0.xx-20090828-1900-e35.jar#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.core.help_2.0.0.xx-20090828-1900-e35/#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.cstviewer_2.0.0.xx-20090828-1900-e35.jar#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.refactoring_2.0.0.xx-20090828-1900-e35.jar#4,reference\:file\:/Applications/galileo/plugins/org.codehaus.groovy.eclipse.ui_2.0.0.xx-20090828-1900-e35.jar#4,reference\:file\:/Applications/galileo/plugins/org.eclipse.jdt.groovy.core_1.0.0.xx-20090828-1900-e35.jar#4
By default osgi.bundles value is osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.100.v20090520-1905.jar#1\:start but as soon as I installed groovy plugin I had a modified value which caused eclipse fali to start.
now my eclipse starts and i see the groovy features too..
I had the same problem with installing the CVS plugin on a Eclipse Platform installation running TeXlipse. Turns out, after installing CVS, the installer had modified not the osgi.bundles, but the osgi.framework.
/Applications/TeXlipse/configuration/config.ini said:
osgi.framework=file\:/Applications/TeXlipse/Eclipse.app/Contents/MacOS/plugins/org.eclipse.osgi_3.5.2.R35x_v20100126.jar
and it was supposed to say
osgi.framework=file\:/Applications/TeXlipse/plugins/org.eclipse.osgi_3.5.2.R35x_v20100126.jar