mburbidg
May 23rd, 2008, 02:47 PM
I'm really frustrated. Spring-DM is exactly what I want to base our architecture on. Conceptually it and OSGi are fantastic. But I'm about to the end of my rope trying to get a basic embedded version of Tomcat running. I've tried equinox and hit a roadblock. I've tried the equinox forums and here and no one has had any suggestions that help.
So now I'm trying Knoplerfish. There is a lot more documentation on the startup process than for equinox so that is good. Equinox documentation is all intermingled with Eclipse which makes it difficult to know how to use equinox server-side.
I'm getting the following problem with Knoplerfish. I took the standard installation and simply added the following lines to the bottom of the init.xargs:
-startlevel 8
-install clover/jcl104-over-slf4j-1.4.3.jar
-startlevel 9
-install clover/aopalliance.osgi-1.0-SNAPSHOT.jar
-install clover/servlet-api.osgi-2.5-SNAPSHOT.jar
-install clover/slf4j-api-1.4.3.jar
-install clover/slf4j-log4j12-1.4.3.jar
-install clover/catalina.osgi-5.5.23-SNAPSHOT.jar
-istart clover/catalina.start.osgi-1.0-SNAPSHOT.jar
When I start Knoplerfish I get the following exception:
> [stdout] ## DEBUG: errors - FrameworkErrorEvent bundle #27
[stdout] ## DEBUG: errors - FrameworkErrorEvent throwable:
[stderr] org.osgi.framework.BundleException: BundleActivator start failed
[stderr] at org.knopflerfish.framework.BundleImpl.start0(Bundl eImpl.java:418)
[stderr] at org.knopflerfish.framework.PermissionOps.callStart 0(PermissionOps.java:205)
[stderr] at org.knopflerfish.framework.BundleImpl.start(Bundle Impl.java:320)
[stderr] at org.knopflerfish.framework.StartLevelImpl.increase StartLevel(StartLevelImpl.java:278)
[stderr] at org.knopflerfish.framework.StartLevelImpl$1.run(St artLevelImpl.java:210)
[stderr] at org.knopflerfish.framework.StartLevelImpl.run(Star tLevelImpl.java:171)
[stderr] at java.lang.Thread.run(Thread.java:613)
[stderr] Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
[stderr] at org.springframework.osgi.web.tomcat.internal.Activ ator.<clinit>(Activator.java:58)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
[stderr] at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
[stderr] at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
[stderr] at java.lang.Class.newInstance0(Class.java:350)
[stderr] at java.lang.Class.newInstance(Class.java:303)
[stderr] at org.knopflerfish.framework.BundleImpl.start0(Bundl eImpl.java:371)
[stderr] ... 6 more
[stdout] Nested bundle exception:
[stderr] java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
[stderr] at org.springframework.osgi.web.tomcat.internal.Activ ator.<clinit>(Activator.java:58)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
[stderr] at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
[stderr] at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
[stderr] at java.lang.Class.newInstance0(Class.java:350)
[stderr] at java.lang.Class.newInstance(Class.java:303)
[stderr] at org.knopflerfish.framework.BundleImpl.start0(Bundl eImpl.java:371)
[stderr] at org.knopflerfish.framework.PermissionOps.callStart 0(PermissionOps.java:205)
[stderr] at org.knopflerfish.framework.BundleImpl.start(Bundle Impl.java:320)
[stderr] at org.knopflerfish.framework.StartLevelImpl.increase StartLevel(StartLevelImpl.java:278)
[stderr] at org.knopflerfish.framework.StartLevelImpl$1.run(St artLevelImpl.java:210)
[stderr] at org.knopflerfish.framework.StartLevelImpl.run(Star tLevelImpl.java:171)
[stderr] at java.lang.Thread.run(Thread.java:613)
Bundle #27 is the catalina.start.osgi bundle.
I can see from the console that jcl104-over-slf4j is installed. My understanding is that catalina.start.osgi should be able to getting the commons logging classes from jcl104-over-slf4j.
Please, if you have suggestions let me know. I admit that I'm new to OSGi, but it just doesn't seem like it should be this difficult.
Thanks,
Michael-
p.s. I'm happy to pay for some consulting time. I've sent a request through the Spring website twice now and have gotten no response. If you feel you're an expert with Spring-DM/Tomcat/Spring and are interested in consulting, send me a private message. What I need is a jump start!
So now I'm trying Knoplerfish. There is a lot more documentation on the startup process than for equinox so that is good. Equinox documentation is all intermingled with Eclipse which makes it difficult to know how to use equinox server-side.
I'm getting the following problem with Knoplerfish. I took the standard installation and simply added the following lines to the bottom of the init.xargs:
-startlevel 8
-install clover/jcl104-over-slf4j-1.4.3.jar
-startlevel 9
-install clover/aopalliance.osgi-1.0-SNAPSHOT.jar
-install clover/servlet-api.osgi-2.5-SNAPSHOT.jar
-install clover/slf4j-api-1.4.3.jar
-install clover/slf4j-log4j12-1.4.3.jar
-install clover/catalina.osgi-5.5.23-SNAPSHOT.jar
-istart clover/catalina.start.osgi-1.0-SNAPSHOT.jar
When I start Knoplerfish I get the following exception:
> [stdout] ## DEBUG: errors - FrameworkErrorEvent bundle #27
[stdout] ## DEBUG: errors - FrameworkErrorEvent throwable:
[stderr] org.osgi.framework.BundleException: BundleActivator start failed
[stderr] at org.knopflerfish.framework.BundleImpl.start0(Bundl eImpl.java:418)
[stderr] at org.knopflerfish.framework.PermissionOps.callStart 0(PermissionOps.java:205)
[stderr] at org.knopflerfish.framework.BundleImpl.start(Bundle Impl.java:320)
[stderr] at org.knopflerfish.framework.StartLevelImpl.increase StartLevel(StartLevelImpl.java:278)
[stderr] at org.knopflerfish.framework.StartLevelImpl$1.run(St artLevelImpl.java:210)
[stderr] at org.knopflerfish.framework.StartLevelImpl.run(Star tLevelImpl.java:171)
[stderr] at java.lang.Thread.run(Thread.java:613)
[stderr] Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
[stderr] at org.springframework.osgi.web.tomcat.internal.Activ ator.<clinit>(Activator.java:58)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
[stderr] at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
[stderr] at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
[stderr] at java.lang.Class.newInstance0(Class.java:350)
[stderr] at java.lang.Class.newInstance(Class.java:303)
[stderr] at org.knopflerfish.framework.BundleImpl.start0(Bundl eImpl.java:371)
[stderr] ... 6 more
[stdout] Nested bundle exception:
[stderr] java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
[stderr] at org.springframework.osgi.web.tomcat.internal.Activ ator.<clinit>(Activator.java:58)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
[stderr] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
[stderr] at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
[stderr] at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
[stderr] at java.lang.Class.newInstance0(Class.java:350)
[stderr] at java.lang.Class.newInstance(Class.java:303)
[stderr] at org.knopflerfish.framework.BundleImpl.start0(Bundl eImpl.java:371)
[stderr] at org.knopflerfish.framework.PermissionOps.callStart 0(PermissionOps.java:205)
[stderr] at org.knopflerfish.framework.BundleImpl.start(Bundle Impl.java:320)
[stderr] at org.knopflerfish.framework.StartLevelImpl.increase StartLevel(StartLevelImpl.java:278)
[stderr] at org.knopflerfish.framework.StartLevelImpl$1.run(St artLevelImpl.java:210)
[stderr] at org.knopflerfish.framework.StartLevelImpl.run(Star tLevelImpl.java:171)
[stderr] at java.lang.Thread.run(Thread.java:613)
Bundle #27 is the catalina.start.osgi bundle.
I can see from the console that jcl104-over-slf4j is installed. My understanding is that catalina.start.osgi should be able to getting the commons logging classes from jcl104-over-slf4j.
Please, if you have suggestions let me know. I admit that I'm new to OSGi, but it just doesn't seem like it should be this difficult.
Thanks,
Michael-
p.s. I'm happy to pay for some consulting time. I've sent a request through the Spring website twice now and have gotten no response. If you feel you're an expert with Spring-DM/Tomcat/Spring and are interested in consulting, send me a private message. What I need is a jump start!