Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F26F9BE9 for ; Mon, 13 Feb 2012 16:43:43 +0000 (UTC) Received: (qmail 54251 invoked by uid 500); 13 Feb 2012 16:43:43 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 54168 invoked by uid 500); 13 Feb 2012 16:43:42 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 54160 invoked by uid 99); 13 Feb 2012 16:43:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 16:43:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 16:43:35 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Rwyzi-0006eU-LC for users@felix.apache.org; Mon, 13 Feb 2012 08:43:14 -0800 Message-ID: <33316197.post@talk.nabble.com> Date: Mon, 13 Feb 2012 08:43:14 -0800 (PST) From: Quecas To: users@felix.apache.org Subject: Embedding Tomcat 7 with webservices MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jms.cercas@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hello everyone, Is it possible to embed tomcat 7 + metro as an OSGi bundle? I am trying to embed tomcat 7 in my OSGi project using Felix. I have created a bundle and included the three jars that are required: - tomcat-embedded-core.jar - tomcat-embedded-logging-juli.jar - webservices-rt.jar (metro) I am programatically defining an application listener: Context ctx = tomcat.addContext("/", Paths.get("webroot/webapps", "ws1").toAbsolutePath().toString()); Tomcat.addServlet(ctx, JAXWS_SERVLET_NAME, WSServlet.class.getName()); ctx.addApplicationListener(WSServletContextListener.class.getName()); ctx.addServletMapping("/ws1", JAXWS_SERVLET_NAME); When I startup Felix a class not found exception is thrown: SEVERE: Error configuring application listener of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.servlet.WSServletContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Seems to be related to tomcat's class loading policy. Thanks, Jorge -- View this message in context: http://old.nabble.com/Embedding-Tomcat-7-with-webservices-tp33316197p33316197.html Sent from the Apache Felix - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org