Hello,
I think I'm facing a slices beginners problem...
After installing the Slices Subsystem (slices-1.0.0.CI-39) as discussed here, the dm Server (v2.0.1.RELEASE) starts up like expected saying the slices plan was started correctly:
Then I wanted to rebuild the menu bar example by myself using eclipse 3.5.Code:[2010-06-02 16:24:53.557] system-artifacts <DE0000I> Installing plan 'com.springsource.osgi.slices' version '1.0.0'. [2010-06-02 16:24:53.578] system-artifacts <DE0000I> Installing bundle 'com.springsource.osgi.slices.api' version '1.0.0.BUILD-20100309145748'. [2010-06-02 16:24:53.622] system-artifacts <DE0000I> Installing bundle 'com.springsource.osgi.slices.core' version '1.0.0.BUILD-20100309151201'. [2010-06-02 16:24:53.691] system-artifacts <DE0001I> Installed bundle 'com.springsource.osgi.slices.api' version '1.0.0.BUILD-20100309145748'. [2010-06-02 16:24:53.698] system-artifacts <DE0001I> Installed bundle 'com.springsource.osgi.slices.core' version '1.0.0.BUILD-20100309151201'. [2010-06-02 16:24:53.804] system-artifacts <DE0001I> Installed plan 'com.springsource.osgi.slices' version '1.0.0'. [2010-06-02 16:24:53.863] system-artifacts <DE0004I> Starting plan 'com.springsource.osgi.slices' version '1.0.0'. [2010-06-02 16:24:53.871] system-artifacts <DE0004I> Starting bundle 'com.springsource.osgi.slices.api' version '1.0.0.BUILD-20100309145748'. [2010-06-02 16:24:53.884] system-artifacts <DE0004I> Starting bundle 'com.springsource.osgi.slices.core' version '1.0.0.BUILD-20100309151201'. [2010-06-02 16:24:53.894] start-signalling-2 <DE0005I> Started bundle 'com.springsource.osgi.slices.api' version '1.0.0.BUILD-20100309145748'. [2010-06-02 16:24:54.071] start-signalling-2 <DE0005I> Started bundle 'com.springsource.osgi.slices.core' version '1.0.0.BUILD-20100309151201'. [2010-06-02 16:24:54.078] start-signalling-2 <DE0005I> Started plan 'com.springsource.osgi.slices' version '1.0.0'.
So this is what I did (as I always do developing dm Server bundles with web functionality):
- Create Dynamic Web Project "slices.host"
- Add OSGi Bundle Project Nature via Spring Tools Option
- Enable Bundle Classpath Container via Spring Tools Option
- Edit src/main/webapp/MANIFEST.MF by changing the copied content of animal.menu.bar template.mf:
- Copy the folders 'images', 'styles', 'WEB-INF' and the files 'bottom.jsp', 'index.jsp', 'top.jsp' from animal.menu.bar webapp folder to slices.host webapp folderCode:Manifest-Version: 1 Bundle-SymbolicName: slices.host Bundle-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: My Host Web-ContextPath: /hostbar Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.3)", com.springsource.javax.servlet.jsp.jstl;version="[1.1.2, 1.1.3)", com.springsource.osgi.slices.api;version="[1.0,2.0)" Import-Package: com.springsource.osgi.slices.core;version="[1.0,2.0)"
Adding this bundle to the dm Server within Eclipse works just fine and I can access the page at http://localhost:8080/hostbar/.
Code:[2010-06-02 16:25:57.542] TCP Connection(4)-127.0.0.1 <DE0000I> Installing bundle 'slices.host' version '1.0.0'. [2010-06-02 16:25:57.658] TCP Connection(4)-127.0.0.1 <DE0001I> Installed bundle 'slices.host' version '1.0.0'. [2010-06-02 16:25:57.811] TCP Connection(4)-127.0.0.1 <DE0004I> Starting bundle 'slices.host' version '1.0.0'. [2010-06-02 16:25:57.818] Thread-3 <WE0000I> Starting web bundle 'slices.host' version '1.0.0' with context path '/hostbar'. [2010-06-02 16:25:58.144] start-signalling-2 <ME0001W> A message with the key 'SL0000I' was not found. The inserts for the message were '[/hostbar]' [2010-06-02 16:25:58.151] Thread-3 <WE0001I> Started web bundle 'slices.host' version '1.0.0' with context path '/hostbar'. [2010-06-02 16:25:58.155] start-signalling-2 <DE0005I> Started bundle 'slices.host' version '1.0.0'.
Then I did nearly the same for creating a Slice:
- Create Dynamic Web Project "slices.slice"
- Add OSGi Bundle Project Nature via Spring Tools Option
- Enable Bundle Classpath Container via Spring Tools Option
- Edit src/main/webapp/MANIFEST.MF by changing the copied content of cat.menu.item template.mf:
- Copy the folders 'images', 'WEB-INF' and the files 'index.jsp' from cat.menu.item webapp folder to slices.slice webapp folderCode:Manifest-Version: 1.0 Bundle-SymbolicName: slices.slice Bundle-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: My Slice Slice-Host: slices.host;version="[1.0, 2.0)" Slice-ContextPath: /barentry Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.3)", com.springsource.javax.servlet.jsp.jstl;version="[1.1.2, 1.1.3)", com.springsource.osgi.slices.api;version="[1.0,2.0)" Import-Package: com.springsource.osgi.slices.core;version="[1.0,2.0)"
- Copy and edit slice.properties to META-INF folder of slices.slice
But when I add this project to the server I'm only receiving the following output and nothing else happens.
Does anyone has a hint what's wrong?Code:[2010-06-02 16:27:02.825] TCP Connection(6)-127.0.0.1 <DE0000I> Installing bundle 'slices.slice' version '1.0.0'.
The sources are attached as .zip but packaged as .7z please change after download.
I also tried to export the projects as .war files (using Eclipse: Export - WAR file) and then getting them started via the admin console of dm Server.
Again, slices.host.war works fine, but when I try to upload slices.slice.war I get this exception:
Code:HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: com.springsource.osgi.webcontainer.core.WebBundleManifestTransformer.transform(Lcom/springsource/util/osgi/manifest/BundleManifest;Ljava/net/URL;Lcom/springsource/osgi/webcontainer/core/InstallationOptions;)V org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NoSuchMethodError: com.springsource.osgi.webcontainer.core.WebBundleManifestTransformer.transform(Lcom/springsource/util/osgi/manifest/BundleManifest;Ljava/net/URL;Lcom/springsource/osgi/webcontainer/core/InstallationOptions;)V com.springsource.osgi.slices.core.internal.deployer.SliceTransformer.doTransform(SliceTransformer.java:81) com.springsource.osgi.slices.core.internal.deployer.SliceTransformer$1.visit(SliceTransformer.java:70) com.springsource.util.common.ThreadSafeArrayListTree.visit(ThreadSafeArrayListTree.java:172) com.springsource.osgi.slices.core.internal.deployer.SliceTransformer.transform(SliceTransformer.java:64) com.springsource.kernel.install.pipeline.stage.transform.internal.TransformationStage.doProcessTree(TransformationStage.java:64) com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50) ...


