Thanks Frank that's my bad. Really missed that one
Arpan On Mon, Dec 30, 2013 at 3:44 PM, Frank Lyaruu <[email protected]> wrote: > I think you are missing the 'org.apache.felix.http.bridge' bundle. If I > recall correctly, the 'org.apache.felix.http.proxy' (in WEB-INF/lib) and > the 'org.apache.felix.http.bridge' (in WEB-INF/bundles) should be deployed > as a pair. > > regards, rank > > > On Mon, Dec 30, 2013 at 9:49 AM, Arpan Mukhopadhyay < > [email protected]> wrote: > > > Nope, in fact I am having a different issue now while starting the felix > > embeded in tomcat. > > > > Here is the details exception > > > > Dec 30, 2013 11:52:53 AM org.apache.catalina.core. > > AprLifecycleListener init > > INFO: The APR based Apache Tomcat Native library which allows optimal > > performance in production environments was not found on the > > java.library.path: > > > > > D:\installedsoftwares\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:/installedsoftwares/Java/jre7/bin/client;D:/installedsoftwares/Java/jre7/bin;D:/installedsoftwares/Java/jre7/lib/i386;C:\Program > > Files\PC Connectivity Solution\;C:\Program Files\Common Files\Microsoft > > Shared\Windows > > Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program > > Files\Intel\DMIX;C:\Program > > > > > Files\WinMerge;C:\Python27;D:\Jagadeesh\Venturi_VVO\Installers\;C:\ffmpeg\bin;D:\installedsoftwares\Java\jdk1.7.0_25\bin;D:\installedsoftwares\SlikSvn\bin;D:\installedsoftwares\TortoiseSVN\bin;D:\installedsoftwares\mongodb\bin;D:\installedsoftwares\apachemaven\bin;D:\installedsoftwares\apache-ant-1.7.1\bin;D:\installedsoftwares\nodejs\;D:\other-downloads\spring-roo-1.2.5.BUILD-SNAPSHOT\bin;D:\installedsoftwares\jetty\bin;D:\Program > > Files\SQL Anywhere > > > > > 16\bin32;D:\installedsoftwares\gradle-1.9\bin;D:\installedsoftwares\groovy-2.2.1\bin;C:\Documents > > and Settings\arpan\Application Data\npm;C:\Program > > Files\CrSSL\bin;D:\installedsoftwares\eclipse;;. > > Dec 30, 2013 11:52:53 AM > org.apache.tomcat.util.digester.SetPropertiesRule > > begin > > WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting > > property 'source' to 'org.eclipse.jst.jee.server:osgi-demo' did not find > a > > matching property. > > Dec 30, 2013 11:52:54 AM org.apache.coyote.AbstractProtocol init > > INFO: Initializing ProtocolHandler ["http-bio-8080"] > > Dec 30, 2013 11:52:54 AM org.apache.coyote.AbstractProtocol init > > INFO: Initializing ProtocolHandler ["ajp-bio-8009"] > > Dec 30, 2013 11:52:54 AM org.apache.catalina.startup.Catalina load > > INFO: Initialization processed in 384 ms > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.StandardService > > startInternal > > INFO: Starting service Catalina > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.StandardEngine > > startInternal > > INFO: Starting Servlet Engine: Apache Tomcat/7.0.47 > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.ApplicationContext log > > INFO: Installing bundle > > > > > [jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.webconsole-4.2.0-all.jar] > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.ApplicationContext log > > INFO: Installing bundle > > > > > [jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.gogo.shell-0.10.0.jar] > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.ApplicationContext log > > INFO: Installing bundle > > > > > [jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.gogo.command-0.12.0.jar] > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.ApplicationContext log > > INFO: Installing bundle > > > > > [jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.bundlerepository-1.6.6.jar] > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.ApplicationContext log > > INFO: Installing bundle > > > > > [jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.gogo.runtime-0.10.0.jar] > > ERROR: Bundle org.apache.felix.webconsole [1] Error starting > > > > > jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.webconsole-4.2.0-all.jar > > (org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.webconsole [1]: Unable to resolve 1.0: missing > requirement > > [1.0] osgi.wiring.package; > > > > > (&(osgi.wiring.package=org.osgi.service.http)(version>=1.2.0)(!(version>=2.0.0)))) > > org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.webconsole [1]: Unable to resolve 1.0: missing > requirement > > [1.0] osgi.wiring.package; > > > > > (&(osgi.wiring.package=org.osgi.service.http)(version>=1.2.0)(!(version>=2.0.0))) > > at > > org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974) > > at org.apache.felix.framework.Felix.startBundle(Felix.java:2037) > > at > > org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291) > > at > > > > > org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) > > at java.lang.Thread.run(Unknown Source) > > org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.gogo.shell [2]: Unable to resolve 2.0: missing > requirement > > [2.0] osgi.wiring.package; > > > > > (&(osgi.wiring.package=org.apache.felix.service.command)(status=provisional)(version>=0.10.0)) > > [caused by: Unable to resolve 5.0: missing requirement [5.0] > > osgi.wiring.package; (osgi.wiring.package=org.osgi.util.tracker)] > > at > > org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974) > > at org.apache.felix.framework.Felix.startBundle(Felix.java:2037) > > at > > org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291) > > at > > > > > org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) > > at java.lang.Thread.run(Unknown Source) > > ERROR: Bundle org.apache.felix.gogo.shell [2] Error starting > > > > > jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.gogo.shell-0.10.0.jar > > (org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.gogo.shell [2]: Unable to resolve 2.0: missing > requirement > > [2.0] osgi.wiring.package; > > > > > (&(osgi.wiring.package=org.apache.felix.service.command)(status=provisional)(version>=0.10.0)) > > [caused by: Unable to resolve 5.0: missing requirement [5.0] > > osgi.wiring.package; (osgi.wiring.package=org.osgi.util.tracker)]) > > ERROR: Bundle org.apache.felix.gogo.command [3] Error starting > > > > > jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.gogo.command-0.12.0.jar > > (org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.gogo.command [3]: Unable to resolve 3.0: missing > > requirement [3.0] osgi.wiring.package; > > > > > (&(osgi.wiring.package=org.apache.felix.service.command)(status=provisional)(version>=0.10.0)(!(version>=1.0.0))) > > [caused by: Unable to resolve 5.0: missing requirement [5.0] > > osgi.wiring.package; (osgi.wiring.package=org.osgi.util.tracker)]) > > org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.gogo.command [3]: Unable to resolve 3.0: missing > > requirement [3.0] osgi.wiring.package; > > > > > (&(osgi.wiring.package=org.apache.felix.service.command)(status=provisional)(version>=0.10.0)(!(version>=1.0.0))) > > [caused by: Unable to resolve 5.0: missing requirement [5.0] > > osgi.wiring.package; (osgi.wiring.package=org.osgi.util.tracker)] > > at > > org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974) > > at org.apache.felix.framework.Felix.startBundle(Felix.java:2037) > > at > > org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291) > > at > > > > > org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) > > at java.lang.Thread.run(Unknown Source) > > ERROR: Bundle org.apache.felix.gogo.runtime [5] Error starting > > > > > jndi:/localhost/osgi-demo/WEB-INF/bundles/org.apache.felix.gogo.runtime-0.10.0.jar > > (org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.gogo.runtime [5]: Unable to resolve 5.0: missing > > requirement [5.0] osgi.wiring.package; > > (osgi.wiring.package=org.osgi.util.tracker)) > > org.osgi.framework.BundleException: Unresolved constraint in bundle > > org.apache.felix.gogo.runtime [5]: Unable to resolve 5.0: missing > > requirement [5.0] osgi.wiring.package; > > (osgi.wiring.package=org.osgi.util.tracker) > > at > > org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974) > > at org.apache.felix.framework.Felix.startBundle(Felix.java:2037) > > at > > org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291) > > at > > > > > org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) > > at java.lang.Thread.run(Unknown Source) > > Dec 30, 2013 11:52:54 AM org.apache.catalina.core.ApplicationContext log > > SEVERE: OSGi framework started > > Dec 30, 2013 11:52:54 AM org.apache.catalina.startup.HostConfig > > deployDirectory > > INFO: Deploying web application directory > > D:\installedsoftwares\apache-tomcat-7.0.47\webapps\docs > > Dec 30, 2013 11:52:55 AM org.apache.catalina.startup.HostConfig > > deployDirectory > > INFO: Deploying web application directory > > D:\installedsoftwares\apache-tomcat-7.0.47\webapps\examples > > Dec 30, 2013 11:52:55 AM org.apache.catalina.core.ApplicationContext log > > INFO: ContextListener: contextInitialized() > > Dec 30, 2013 11:52:55 AM org.apache.catalina.core.ApplicationContext log > > INFO: SessionListener: contextInitialized() > > Dec 30, 2013 11:52:55 AM org.apache.catalina.core.ApplicationContext log > > INFO: ContextListener: > > attributeAdded('org.apache.jasper.compiler.TldLocationsCache', > > 'org.apache.jasper.compiler.TldLocationsCache@133bf6d') > > Dec 30, 2013 11:52:55 AM org.apache.catalina.startup.HostConfig > > deployDirectory > > INFO: Deploying web application directory > > D:\installedsoftwares\apache-tomcat-7.0.47\webapps\host-manager > > Dec 30, 2013 11:52:55 AM org.apache.catalina.startup.HostConfig > > deployDirectory > > INFO: Deploying web application directory > > D:\installedsoftwares\apache-tomcat-7.0.47\webapps\manager > > Dec 30, 2013 11:52:55 AM org.apache.catalina.startup.HostConfig > > deployDirectory > > INFO: Deploying web application directory > > D:\installedsoftwares\apache-tomcat-7.0.47\webapps\ROOT > > Dec 30, 2013 11:52:55 AM org.apache.coyote.AbstractProtocol start > > INFO: Starting ProtocolHandler ["http-bio-8080"] > > Dec 30, 2013 11:52:55 AM org.apache.coyote.AbstractProtocol start > > INFO: Starting ProtocolHandler ["ajp-bio-8009"] > > Dec 30, 2013 11:52:55 AM org.apache.catalina.startup.Catalina start > > INFO: Server startup in 1391 ms > > > > > > I took the example from > > > > > http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html#using-the-servlet-bridge > > > > All jars are downloaded from http://felix.apache.org/downloads.cgi > > > > > > jars inside /WEB-INF/lib is listed below > > > > felix.jar > > org.apache.felix.http.proxy-2.2.2.jar > > > > and the bundles are inside /WEB-INF/bundles and the list is below > > > > org.apache.felix.bundlerepository-1.6.6.jar > > org.apache.felix.gogo.command-0.12.0.jar > > org.apache.felix.gogo.runtime-0.10.0.jar > > org.apache.felix.gogo.shell-0.10.0.jar > > org.apache.felix.webconsole-4.2.0-all.jar > > > > > > Thanks > > Arpan > > > > > > > > > > On Mon, Dec 30, 2013 at 1:50 PM, ajinkya prabhune < > > [email protected]> wrote: > > > > > Hi Arpan, > > > > > > Were you able to solve the problem ? > > > > > > > > > > > > On Fri, Dec 27, 2013 at 6:29 AM, ajinkya prabhune < > > > [email protected]> wrote: > > > > > > > Hi Arpan, > > > > > > > > I am not sure what your use case is exactly, but would suggest you to > > use > > > > "osgi-bundlecontext" from your web application bundle (wab) and > access > > > the > > > > osgi bundle which you have created in step1 > > > > > > > > Regards > > > > Ajinkya > > > > > > > > On Friday, December 27, 2013, Arpan Mukhopadhyay wrote: > > > > > > > >> I have two projects. > > > >> > > > >> 1. An osgi bundle (eclipse plugin project). > > > >> 2. A simple web application (deployable in tomcat). > > > >> > > > >> I have started the felix container from tomcat with no problem by > > > >> following > > > >> the link below > > > >> > > > >> > > > >> > > > > > > http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html#using-the-servlet-bridge > > > >> > > > >> Now I am stuck how to call the classes of the bundle (already > > installed > > > in > > > >> the felix container) from a servlet. It is throwing class not found > > > error > > > >> as the bundle project is not in the classpath but in the following > > > >> location > > > >> /WEB-IN/bundles.(I have to use this location for the bundles). So > how > > it > > > >> could be achieved ? > > > >> > > > >> Thanks > > > >> > > > >> Arpan > > > >> > > > > > > > > > > > > -- > > > > Thank you and Regards > > > > Ajinkya Prabhune > > > > > > > > > > > > > > > > > -- > > > Thank you and Regards > > > Ajinkya Prabhune > > > > > >

