java - Heroku App Crashing with NoClassDefFoundError: org/eclipse/jetty/server/Handler -
i trying run app on heroku. doing ci on travis , deploying it. code @ https://github.com/santoshkt/cdetsd123
when went through logs in heroku, see following
2014-03-10t03:14:08.180220+00:00 heroku[web.1]: starting process command `j ava $java_opts -cp target/classes:target/dependency/* mytest.main` 2014-03-10t03:14:10.692378+00:00 app[web.1]: picked java_tool_options: -djav a.rmi.server.usecodebaseonly=true -djava.rmi.server.usecodebaseonly=true 2014-03-10t03:14:11.217814+00:00 app[web.1]: exception in thread "main" java.lan g.noclassdeffounderror: org/eclipse/jetty/server/handler 2014-03-10t03:14:11.286992+00:00 app[web.1]: caused by: java.lang.classnotfounde xception: org.eclipse.jetty.server.handler 2014-03-10t03:14:11.287150+00:00 app[web.1]: @ java.net.urlclassloader$1.run (urlclassloader.java:217) 2014-03-10t03:14:11.287380+00:00 app[web.1]: @ java.net.urlclassloader.findc lass(urlclassloader.java:205) 2014-03-10t03:14:11.287271+00:00 app[web.1]: @ java.security.accesscontrolle r.doprivileged(native method) 2014-03-10t03:14:11.287380+00:00 app[web.1]: @ java.lang.classloader.loadcla ss(classloader.java:321) 2014-03-10t03:14:11.287380+00:00 app[web.1]: @ sun.misc.launcher$appclassloa der.loadclass(launcher.java:294) 2014-03-10t03:14:11.287645+00:00 app[web.1]: @ java.lang.classloader.loadcla ss(classloader.java:266) 2014-03-10t03:14:11.296871+00:00 app[web.1]: not find main class: myte st.main. program exit.
to run software locally, use mvn jetty:run
command , works fine. btw i'm using maven + jetty in application. i'm trying debug last 6 hours no clues. appreciated.
instead of using main method start server, solved changing procfile of heroku using below.
web: java $java_opts -jar target/dependency/jetty-runner.jar --port $port target/*.war
hope helps facing same issue.
Comments
Post a Comment