Hi, Thanks, I'll try this and get back to you.
On Thu, Dec 11, 2014 at 6:17 PM, Nuwan Wimalasekara <[email protected]> wrote: > Hi > Please refer the documentation[1] for how to deploy a web application on > the tomcat server which can be started with test framework. You can follow > sample test case from[2] > > [1] > https://docs.wso2.com/display/TA430/Using+Embedded+Tomcat+Server+as+a+JAX-RS+Backend+for+REST+Testing > > [2] > https://github.com/wso2-dev/product-esb/blob/master/modules/integration/tests-integration/tests-service/src/test/java/org/wso2/carbon/esb/jaxrs/rest/test/SoapToRestPeopleSampleTestCase.java > > Thanks, > Nuwanw > > On Thu, Dec 11, 2014 at 6:05 PM, Irham Iqbal <[email protected]> wrote: > >> Yes we have, >> >> This[1] test case is for deploy a web application in AS. >> >> Using this code[2] you can see how we start,stop and restart carbon >> servers. >> >> [1] >> https://github.com/wso2-dev/product-as/blob/master/modules/integration/tests-integration/src/test/java/org/wso2/appserver/integration/tests/webapp/mgt/WebApplicationDeploymentTestCase.java >> >> [2] >> https://github.com/wso2-dev/carbon-platform-integration/blob/master/test-automation-framework/org.wso2.carbon.automation.extensions/src/main/java/org/wso2/carbon/automation/extensions/servers/carbonserver/CarbonServerManager.java >> >> Thanks, >> >> >> On Thu, Dec 11, 2014 at 5:29 PM, Kasun Indrasiri <[email protected]> wrote: >> >>> Do we have any test cases that we deploy web apps during integration >>> test. Can you shed some light please. >>> >>> On Thu, Dec 11, 2014 at 1:20 PM, Irham Iqbal <[email protected]> wrote: >>> >>>> Hi Vijitha, >>>> >>>> Did you try this manually ? >>>> >>>> I mean deploy your web application to a tomcat manually. >>>> >>>> Thanks, >>>> Iqbal >>>> >>>> On Thu, Dec 11, 2014 at 1:13 PM, Vijitha Ekanayake <[email protected]> >>>> wrote: >>>> >>>>> Hi Malithi, >>>>> >>>>> Thanks for the response. >>>>> the servlet-api jar is already inside WEB-INF/lib. as you said i was >>>>> packaging the war adding dependency in provided scope. i tried packaging >>>>> the war removing dependency provided scope. but still having the same >>>>> issue. >>>>> >>>>> >>>>> On Thu, Dec 11, 2014 at 10:37 AM, Malithi Edirisinghe < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi Vijitha, >>>>>> >>>>>> Can you make sure whether you have the servlet-api jar inside >>>>>> WEB-INF/lib or may be you are packaging the war adding this dependency in >>>>>> provided scope. >>>>>> >>>>>> Thanks, >>>>>> Malithi. >>>>>> >>>>>> On Thu, Dec 11, 2014 at 10:23 AM, Vijitha Ekanayake < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I am working on writing integration testing for ESB. Here I need to >>>>>>> start a tomcat instance and deploy web app to tomcat dynamically.When I >>>>>>> start and deploy the web app it gives following warning and application >>>>>>> failed to deploy. Same war file getting deployed successfully in >>>>>>> external tomcat Web Server. >>>>>>> >>>>>>> codes which have used to create tomcat instance and deploy webapp >>>>>>> >>>>>>> private final Tomcat tomcat = new Tomcat(); >>>>>>> >>>>>>> // Configure the standard host >>>>>>> StandardHost stdHost = (StandardHost) tomcat.getHost(); >>>>>>> stdHost.setAutoDeploy(true); >>>>>>> stdHost.setDeployOnStartup(true); >>>>>>> stdHost.setUnpackWARs(true); >>>>>>> tomcat.setHost(stdHost); >>>>>>> >>>>>>> //deploy Service >>>>>>> tomcat.addWebapp(tomcat.getHost(), *webAppUrl, >>>>>>> webAppPath*); >>>>>>> >>>>>>> *tomcat.start();* >>>>>>> >>>>>>> >>>>>>> INFO: No global web.xml found >>>>>>> Dec 11, 2014 10:08:50 AM org.apache.catalina.core.ApplicationContext >>>>>>> log >>>>>>> INFO: Marking servlet jsp as unavailable >>>>>>> Dec 11, 2014 10:08:50 AM org.apache.catalina.core.StandardContext >>>>>>> loadOnStartup >>>>>>> SEVERE: Servlet /service threw load() exception >>>>>>> java.lang.ClassNotFoundException: >>>>>>> org.apache.jasper.servlet.JspServlet >>>>>>> at >>>>>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) >>>>>>> at >>>>>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) >>>>>>> at >>>>>>> org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532) >>>>>>> at >>>>>>> org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514) >>>>>>> at >>>>>>> org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133) >>>>>>> at >>>>>>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1137) >>>>>>> at >>>>>>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081) >>>>>>> at >>>>>>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027) >>>>>>> at >>>>>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314) >>>>>>> at >>>>>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) >>>>>>> at >>>>>>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) >>>>>>> at >>>>>>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) >>>>>>> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) >>>>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:138) >>>>>>> at >>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) >>>>>>> at >>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) >>>>>>> at java.lang.Thread.run(Thread.java:695) >>>>>>> >>>>>>> I put the required jars to to the classpath but still getting the >>>>>>> same issue.Can anyone help me to sort out this issue? >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Vijitha Ekanayake >>>>>>> Software Engineer*, *WSO2, Inc.; http://wso2.com/ >>>>>>> Mobile : +94 777 24 73 39 | +94 718 74 44 08 >>>>>>> lean.enterprise.middleware >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Dev mailing list >>>>>>> [email protected] >>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> *Malithi Edirisinghe* >>>>>> Senior Software Engineer >>>>>> WSO2 Inc. >>>>>> >>>>>> Mobile : +94 (0) 718176807 >>>>>> [email protected] >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Vijitha Ekanayake >>>>> Software Engineer*, *WSO2, Inc.; http://wso2.com/ >>>>> Mobile : +94 777 24 73 39 | +94 718 74 44 08 >>>>> lean.enterprise.middleware >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Irham Iqbal >>>> Software Engineer - Test Automation >>>> WSO2, Inc.: http://wso2.com >>>> lean. enterprise. middleware >>>> phone: +94 777888452 >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Kasun Indrasiri >>> Software Architect >>> WSO2, Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >>> cell: +94 77 556 5206 >>> Blog : http://kasunpanorama.blogspot.com/ >>> >> >> >> >> -- >> Irham Iqbal >> Software Engineer - Test Automation >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> phone: +94 777888452 >> > > > > -- > Nuwan Wimalasekara > Senior Software Engineer - Test Automation > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > > phone: +94 71 668 4620 > > > > -- Vijitha Ekanayake Software Engineer*, *WSO2, Inc.; http://wso2.com/ Mobile : +94 777 24 73 39 | +94 718 74 44 08 lean.enterprise.middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
