Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Jetty Migration Issur

WebAppProvider is something that the DeploymentManager object needs.
And the DeploymentManager is just a Bean on the Server object.

Let the normal LifeCycle management handle the start/stop process.
You should only ever have 1 call to *.start(), and that's the one for the Server.start().

See LikeJettyXml.java example for how this DeploymentManager is setup and configured.

https://github.com/eclipse/jetty.project/blob/jetty-9.3.3.v20150827/examples/embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java#L156-L171

Joakim Erdfelt / joakim@xxxxxxxxxxx

On Mon, Sep 7, 2015 at 9:31 AM, Arun Kumar <arunkumarstay@xxxxxxxxx> wrote:
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

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top