Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] webby server classpath, running on external Jetty

Rafał Krzewski wrote:

My applications needs a JDBC driver on it's classpath but I don't
package one in the war for obvious reasons. Webby run configuration page
does not have classpath tab where I could add the driver, therefore I'm
unable to run my application on embedded Jetty servers. I think it
something to consider for future development because it's probably quite
common use case.

Yes, that's right.

Then I decided to try external Jetty
[...]
And here's JRE output:

Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: . Program will exit.

Apparently the launcher passed "." as the name of main class to JRE.

I also checked Jetty 6.1.26 with similar results. Is this a bug in Webby
or do external Jetty instances need some configuration to make them usable?

This was a bug in Webby where the cmdline on Unix-like platforms wasn't properly created. I uploaded a fixed version of Webby to the known update site:

  http://m2eclipse.sonatype.org/sites/m2e-webby/


Benjamin


Back to the top