[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[m2e-users] webby server classpath, running on external Jetty
|
Hi, I have more questions regarding webby :)
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.
I managed to run my application on external Tomcat 7.x with no problems
- I've symlinked the JDBC driver into tomcat's lib directory.
Then I decided to try external Jetty - I've never actually used it
before so please bear with me - I might be missing something obvious here.
I've downloaded jetty-distribution-7.4.3.zip from
http://download.eclipse.org/jetty/stable-7/dist/ and unpacked to a local
folder. I checked that it starts up by running bin/jetty.sh run. Then I
update my Webby run configuration to Jetty7x, installed and changed Home
folder to the unpacked Jetty distribution (same way I did with Tomcat).
Unfortunately the server failed to start. Here's Webby console ouput:
Runtime classpath:
/home/rafal/workspaces/cyklotron-indigo/cyklotron-webapp/target/classes
/home/rafal/workspaces/cyklotron-indigo/cyklotron-core/target/classes
/home/rafal/workspaces/cyklotron-indigo/ledge-components/target/classes
/home/rafal/.m2/repository/dna/dna-api/1.1-rc2/dna-api-1.1-rc2.jar
/home/rafal/.m2/repository/dna/dna-impl/1.1-rc2/dna-impl-1.1-rc2.jar
/home/rafal/.m2/repository/log4j/log4j/1.2.8/log4j-1.2.8.jar
/home/rafal/.m2/repository/picocontainer/picocontainer/1.1/picocontainer-1.1.jar
... (all of my application modules & dependencies AFAICT)
Provided classpath:
Deploying
[/home/rafal/workspaces/cyklotron-indigo/cyklotron-webapp/target/m2e-webby/war]
to
[/home/rafal/workspaces/cyklotron-indigo/cyklotron-webapp/target/m2e-webby/container/webapps]...
Jetty 7.x starting...
Running Jetty As:
Deployable [http://localhost:8080/cargocpc/index.html] failed to finish
deploying within the timeout period [60000]. The Deployable state is
thus unknown.
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?
cheers,
Rafał