[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
[jetty-dev] Jetty Migration Issur
 | 
Hi ,
I'm migrating Jetty6.1.19  to  Jetty9.1.1. I'm using the jetty-all-9.1.1.jar.
I'm facing NullPointerException in 
WebAppProvider.start()
 method. Below is the code snippet where I'm facing exception. Since 
there is no  setContext() method, I have not set context explicitly.
Here the value of warpath is '
webapps'. In my application the WAR file exists in the path ' 
pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/axis2/WEB-INF/services/App.war '. I have attached the log. While scanning it throws NullPointer. 
         this.jettyWebServer =new Server();         WebAppProvider webAppDeployer=new
 WebAppProvider();
        
       
//webAppDeployer.setContexts(this.jettyWebServer); ->commented setcontext
      
        webAppDeployer.setMonitoredDirName(warpath); -->warpth is 'webapps'
        webAppDeployer.setExtractWars(true);
        webAppDeployer.setParentLoaderPriority(true);
        webAppDeployer.start(); -->NullPointerException while scanning.
 
       
this.jettyWebServer.setStopAtShutdown(true);
        this.jettyWebServer.start();
       
        this.jettyWebServer.join();
Could someone please help me what is wrong in this?. Do I need to setContext manually.Please see the log attached.
Thanks,
Arun 
2015-09-07 16:04:35,195 DEBUG [l.component.ContainerLifeCycle] [main] - org.eclipse.jetty.server.Server@1c28a6a added {ServerConnector@d86850{HTTP/1.1}{0.0.0.0:14101},AUTO}
2015-09-07 16:04:35,276 DEBUG [il.component.AbstractLifeCycle] [main] - starting org.eclipse.jetty.deploy.providers.WebAppProvider@374059
2015-09-07 16:04:35,276 DEBUG [.providers.ScanningAppProvider] [main] - WebAppProvider.doStart()
2015-09-07 16:04:35,276 INFO  [.providers.ScanningAppProvider] [main] - Deployment monitor [file:/pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/] at interval 0
2015-09-07 16:04:35,282 DEBUG [il.component.AbstractLifeCycle] [main] - starting org.eclipse.jetty.util.Scanner@a9f5e9
2015-09-07 16:04:35,285 DEBUG [org.eclipse.jetty.util.Scanner] [main] - scan accepted /pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/axis2
2015-09-07 16:04:35,288 DEBUG [org.eclipse.jetty.util.Scanner] [main] - scanned [/pab/max/assume/msc/DEV/check/7.1.2_EV/webapps]: {/pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/axis2=ADDED}
2015-09-07 16:04:35,290 DEBUG [org.eclipse.jetty.util.Scanner] [main] - scan accepted /pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/axis2
2015-09-07 16:04:35,291 DEBUG [org.eclipse.jetty.util.Scanner] [main] - scanned [/pab/max/assume/msc/DEV/check/7.1.2_EV/webapps]: {/pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/axis2=ADDED}
2015-09-07 16:04:35,291 DEBUG [.providers.ScanningAppProvider] [main] - added /pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/axis2
2015-09-07 16:04:35,295 WARN  [org.eclipse.jetty.util.Scanner] [main] - org.eclipse.jetty.deploy.providers.ScanningAppProvider$1@12ccbba failed on '/pab/max/assume/msc/DEV/check/7.1.2_EV/webapps/axis2
java.lang.NullPointerException
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:605)
        at org.eclipse.jetty.util.Scanner.reportDifferencmsc(Scanner.java:528)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
        at com.pab.ged.assume.check.jetty.JeetyStart.startJetty(JeetyStart.java:110)
        at com.pab.ged.assume.check.jetty.JeetyStart.main(JeetyStart.java:145)
2015-09-07 16:04:35,297 DEBUG [il.component.AbstractLifeCycle] [main] - STARTED org.eclipse.jetty.util.Scanner@a9f5e9
2015-09-07 16:04:35,297 DEBUG [il.component.AbstractLifeCycle] [main] - STARTED org.eclipse.jetty.deploy.providers.WebAppProvider@374059
2015-09-07 16:04:35,297 INFO  [mentserver.jetty.JeetyStart] [main] - Jetty before --Application start-->
2015-09-07 16:04:35,298 DEBUG [il.component.AbstractLifeCycle] [main] - starting org.eclipse.jetty.server.Server@1c28a6a
2015-09-07 16:04:35,302 INFO  [rg.eclipse.jetty.server.Server] [main] - jetty-9.1.1.v20140108
2015-09-07 16:04:35,342 DEBUG [server.handler.AbstractHandler] [main] - starting org.eclipse.jetty.server.Server@1c28a6a
2015-09-07 16:04:35,342 DEBUG [il.component.AbstractLifeCycle] [main] - starting qtp10560341{STOPPED,8<=0<=200,i=0,q=0}
2015-09-07 16:04:35,376 DEBUG [il.component.AbstractLifeCycle] [main] - STARTED qtp10560341{STARTED,8<=8<=200,i=7,q=0}
2015-09-07 16:04:35,377 DEBUG [il.component.AbstractLifeCycle] [main] - starting ServerConnector@d86850{HTTP/1.1}{0.0.0.0:14101}
2015-09-07 16:04:35,396 DEBUG [l.component.ContainerLifeCycle] [main] - ServerConnector@d86850{HTTP/1.1}{0.0.0.0:14101} added {sun.nio.ch.ServerSocketChannelImpl[/0.0.0