You can find the reference test case at [1] which install org.wso2.sample.is.sso.agent.war on tomcat.
[1] https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/is/5.1.0/modules/integration/tests/src/test/java/org/wso2/carbon/identity/tests/saml/SAMLSSOTestCase.java Thanks, Krishantha. On Mon, Oct 27, 2014 at 11:06 AM, Godwin Amila Shrimal <[email protected]> wrote: > Hi Supun, > > I am working on writing test integration for IS OAuth flow. for that I > need to start a tomcat instance and deploy playground webapp. > > On Mon, Oct 27, 2014 at 11:00 AM, Supun Malinga <[email protected]> wrote: > >> Hi, >> >> AFAIK IS ships with webapp mgt features. What's the requirement to use >> tomcat separately ?. >> >> thanks, >> >> On Mon, Oct 27, 2014 at 10:46 AM, Godwin Amila Shrimal <[email protected]> >> wrote: >> >>> Hi Dimuthu, >>> >>> Thanks, I'll try this and get back to you. >>> >>> >>> On Fri, Oct 24, 2014 at 7:18 PM, Dimuthu De Lanerolle <[email protected] >>> > wrote: >>> >>>> We have embedded TomcatServerManager extension class in TAF. [1] Hope >>>> this helps. >>>> >>>> [1] >>>> https://github.com/wso2-dev/carbon-platform-integration/tree/master/test-automation-framework/org.wso2.carbon.automation.extensions/src/main/java/org/wso2/carbon/automation/extensions/servers/tomcatserver >>>> >>>> Regards >>>> >>>> On Fri, Oct 24, 2014 at 6:25 PM, Godwin Amila Shrimal <[email protected]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I am working on writing integration testing for Identity Server. 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. >>>>> >>>>> Code Snippet to create tomcat instance and deploy webapp >>>>> >>>>> private void createTomcat() { >>>>> tomcat = new Tomcat(); >>>>> tomcat.getService().setContainer(tomcat.getEngine()); >>>>> tomcat.setPort(8080); >>>>> tomcat.setBaseDir("."); >>>>> >>>>> StandardHost stdHost = (StandardHost) tomcat.getHost(); >>>>> >>>>> stdHost.setAppBase("."); >>>>> stdHost.setAutoDeploy(true); >>>>> stdHost.setDeployOnStartup(true); >>>>> stdHost.setUnpackWARs(true); >>>>> tomcat.setHost(stdHost); >>>>> } >>>>> >>>>> private void startTomcat(String webAppUrl, String webAppPath) >>>>> throws LifecycleException { >>>>> tomcat.addWebapp(tomcat.getHost(), webAppUrl, webAppPath); >>>>> tomcat.start(); >>>>> } >>>>> >>>>> >>>>> >>>>> *Error* >>>>> >>>>> INFO: >>>>> validateJarFile(/Users/godwin/Documents/Amila/Product/IS/Source/svn/wso2_platform/products/is/5.1.0/modules/integration/tests/target/carbontmp1414152511254/wso2is-5.1.0/tomcat.8080/work/Tomcat/localhost/playground2/WEB-INF/lib/servlet-api-2.5.jar) >>>>> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: >>>>> javax/servlet/Servlet.class >>>>> Oct 24, 2014 5:41:56 PM org.apache.catalina.startup.ContextConfig >>>>> getDefaultWebXmlFragment >>>>> INFO: No global web.xml found >>>>> Oct 24, 2014 5:41:56 PM org.apache.tomcat.util.scan.StandardJarScanner >>>>> scan >>>>> WARNING: Failed to scan JAR >>>>> [jndi:/localhost/playground2/WEB-INF/lib/axiom-1.2.11.wso2v1.jar] from >>>>> WEB-INF/lib >>>>> java.io.FileNotFoundException: >>>>> jndi:/localhost/playground2/WEB-INF/lib/axiom-1.2.11.wso2v1.jar >>>>> at >>>>> org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:389) >>>>> at >>>>> org.apache.tomcat.util.scan.UrlJar.createJarInputStream(UrlJar.java:87) >>>>> at org.apache.tomcat.util.scan.UrlJar.<init>(UrlJar.java:38) >>>>> at >>>>> org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:36) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2625) >>>>> at >>>>> org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241) >>>>> at >>>>> org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:166) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1917) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1268) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369) >>>>> at >>>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) >>>>> at >>>>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) >>>>> at >>>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) >>>>> 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) >>>>> Oct 24, 2014 5:41:56 PM org.apache.tomcat.util.scan.StandardJarScanner >>>>> scan >>>>> WARNING: Failed to scan JAR >>>>> [jndi:/localhost/playground2/WEB-INF/lib/annotations-api.jar] from >>>>> WEB-INF/lib >>>>> java.io.FileNotFoundException: >>>>> jndi:/localhost/playground2/WEB-INF/lib/annotations-api.jar >>>>> at >>>>> org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:389) >>>>> at >>>>> org.apache.tomcat.util.scan.UrlJar.createJarInputStream(UrlJar.java:87) >>>>> at org.apache.tomcat.util.scan.UrlJar.<init>(UrlJar.java:38) >>>>> at >>>>> org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:36) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2625) >>>>> at >>>>> org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241) >>>>> at >>>>> org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:166) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1917) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1268) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) >>>>> at >>>>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369) >>>>> at >>>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) >>>>> at >>>>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) >>>>> at >>>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) >>>>> 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) >>>>> Oct 24, 2014 5:41:56 PM org.apache.tomcat.util.scan.StandardJarScanner >>>>> scan >>>>> >>>>> >>>>> Can anyone help me to sort out this issue ? >>>>> >>>>> Thanks >>>>> Godwin >>>>> >>>>> >>>>> -- >>>>> *Godwin Amila Shrimal* >>>>> Senior Software Engineer >>>>> WSO2 Inc.; http://wso2.com >>>>> lean.enterprise.middleware >>>>> >>>>> mobile: *+94772264165* >>>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>* >>>>> twitter: https://twitter.com/godwinamila >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Dimuthu De Lanerolle >>>> Software Engineer >>>> WSO2 Inc. >>>> lean . enterprise . middlewear. >>>> http://wso2.com/ >>>> Tel. : +94 11 2145345 Fax : +94 11 2145300 email : [email protected] >>>> >>>> >>> >>> >>> -- >>> *Godwin Amila Shrimal* >>> Senior Software Engineer >>> WSO2 Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >>> mobile: *+94772264165* >>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>* >>> twitter: https://twitter.com/godwinamila >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Supun Malinga, >> >> Senior Software Engineer, >> WSO2 Inc. >> http://wso2.com >> email: [email protected] <[email protected]> >> mobile: +94 (0)71 56 91 321 >> > > > > -- > *Godwin Amila Shrimal* > Senior Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: *+94772264165* > linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>* > twitter: https://twitter.com/godwinamila > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
