Chinese developer notice: run tomcat 7.0 using eclipse juno throw exception - eclipse

When I try to run the tomcat 7.0 using the eclipse juno I encountered a problem. The console throw exception saying
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap

It turned out to be a really stupid mistake, I put the tomcat into a path with Chinese character in it like /Users/thomas/Desktop/源码包/tomcat, and as soon as I put the folder into a path without any Chinese character, problem solved!

Related

CDT Plugin Error ClassNotFoundException

Made a plugin using Eclipse Java (in Windows).
Tested and Exported the plugin.
Imported the plugin in Eclipse CDT (in Linux).
Get the following exception:
Caused by: java.lang.ClassNotFoundException: com.myUI cannot be found by myJar_1.0.0.201708011131
Any idea as to why? I have been researching this for some time and have tried many many "solutions".
Please advise.

Eclipse Neon cannot start a java debug session

I'm using Eclipse Neon from the release date. Yesterday I got some strange errors in Eclipse and after a reboot of the Eclipse instance everything was gone. I installed Eclipse and my plugins again. Everything is working again but when I launch the Java debugger on one of my project I got the error:
An internal error occurred during: "XXXX".
java.lang.NullPointerException
This error occurs on debugging all my projects also in another workspace. Can someone help me with this? The error is not explaining what the exact problem is.
In the logfile of Eclipse I can found the follow error:
java.lang.NullPointerException
at org.eclipse.jdi.Bootstrap.virtualMachineManager(Bootstrap.java:36)
at org.eclipse.jdt.internal.launching.StandardVMDebugger.getConnector(StandardVMDebugger.java:560)
at org.eclipse.jdt.internal.launching.StandardVMDebugger.run(StandardVMDebugger.java:246)
at org.eclipse.pde.launching.AbstractPDELaunchConfiguration.launch(AbstractPDELaunchConfiguration.java:79)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I fully removed my previous Eclipse environment. Settings included.
Installed Eclipse environment from a clean install and installed all my plugins again. The problem was fixed.

javax.servlet.ServletException: PWC1391: Servlet.init() for servlet <project>.webservice.ApplicationConfig threw exception

What could be the cause for this error while running my Java EE 6 app from embedded container using Eclipse?
HTTP Status 500 -
type Exception report
message
description: The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: PWC1391: Servlet.init() for servlet <project>.webservice.ApplicationConfig threw exception
root cause
com.sun.jersey.spi.inject.Errors$ErrorMessagesException
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1.2.2 logs.
Edit: Basically since I ran it successfully, I upgraded eclipse and made some changes in project (refactor/renaming variables) and svn repository setup.
Have you tried the suggestions Google produces when you search for PWC1391? Namely resolving potential version conflicts with the Jersey library (i.e. removing it from project).
Finally figured out that there were some libraries missing...including Glassfish 3.1.2 being the major one from "Web"'s "Java Build Path > Libraries".

Apache Sling - OSGI framework exception when starting in Windows

I received the following error message when starting Sling on Windows with Java 1.7 (see below). I'm using Sling 6 (http://www.apache.org/dyn/closer.cgi/sling/org.apache.sling.launchpad-6-standalone.jar). Any idea what could be wrong?
Last time I tried using the same Sling version on Mac OSX and it worked perfectly.
Failed to Start OSGi framework
org.osgi.framework.BundleException: Uncaught Instantiation Issue:
java.lang.ArrayIndexOutOfBoundsException: -1
at
org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:245)
at
org.apache.sling.launchpad.base.app.MainDelegate$1.<init>(MainDelegate.java:159)
at
org.apache.sling.launchpad.base.app.MainDelegate.start(MainDelegate.java:159)
at org.apache.sling.launchpad.app.Main.startSling(Main.java:244)
at org.apache.sling.launchpad.app.Main.<init>(Main.java:107)
at org.apache.sling.launchpad.app.Main.main(Main.java:56)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at
org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.java:1046)
at
org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java:863)
at
org.apache.sling.launchpad.base.impl.SlingFelix.getSymbolicName(SlingFelix.java:32)
at org.apache.felix.framework.Felix.toString(Felix.java:1012)
at org.apache.felix.framework.Logger.doLog(Logger.java:128)
at org.apache.felix.framework.Logger._log(Logger.java:181)
at org.apache.felix.framework.Logger.log(Logger.java:114)
at
org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:201)
at org.apache.felix.framework.Felix.<init>(Felix.java:374)
at
org.apache.sling.launchpad.base.impl.SlingFelix.<init>(SlingFelix.java:39)
at
org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:235)
I had exactly the same error when using java 1.7. After switching to 1.6 everything seems to be fine. You check your java version by typing java -version in the terminal.

java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()

I am getting this error java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()
at the runtime in eclipse. However, eclipse shows the method on doing intelligence search, but at runtime it fails to identify it.
I am using the latest log4j1.2.16 jar and it is added in the classpath.
Any suggestions?