Hi All,
Since the start of the week, launching a sling server using
maven-launchpad-plugin with default bundle list 6-SNAPSHOT has been failing --
the server starts but Sling's content is not imported, seemingly because the
sling namespace prefix is not being registered. Is this a known/expected
problem?
We are getting the following errors:
03.08.2010 13:52:31.369 *ERROR* [FelixDispatchQueue]
org.apache.felix.webconsole.plugins.memoryusage FrameworkEvent ERROR
(org.osgi.framework.ServiceException: Service factory exception:
org/apache/felix/webconsole/ConfigurationPrinter)
org.osgi.framework.ServiceException: Service factory exception:
org/apache/felix/webconsole/ConfigurationPrinter
at
org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:311)
at
org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:221)
at
org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:295)
at org.apache.felix.framework.Felix.getService(Felix.java:3022)
at
org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:329)
at org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:442)
at
org.apache.felix.http.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:35)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)
at
org.apache.felix.http.whiteboard.internal.WhiteboardActivator.addTracker(WhiteboardActivator.java:56)
at
org.apache.felix.http.whiteboard.internal.WhiteboardActivator.doStart(WhiteboardActivator.java:48)
at
org.apache.felix.http.base.internal.AbstractActivator.start(AbstractActivator.java:41)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:633)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1862)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1779)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1188)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoClassDefFoundError:
org/apache/felix/webconsole/ConfigurationPrinter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1824)
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1685)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
org.apache.felix.webconsole.plugins.memoryusage.internal.Activator$2.createObject(Activator.java:59)
at
org.apache.felix.webconsole.plugins.memoryusage.internal.Activator$AbstractServiceFactory.getService(Activator.java:120)
at
org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:307)
... 20 more
Caused by: java.lang.ClassNotFoundException:
org.apache.felix.webconsole.ConfigurationPrinter
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1685)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 31 more
Followed by the following for every time sling tries to add content to jcr
03.08.2010 13:52:32.349 *ERROR* [FelixStartLevel]
org.apache.sling.jcr.contentloader.internal.ContentLoaderService activate:
Problem while loading initial content and registering mappings for existing
bundles javax.jcr.NamespaceException: sling: is not a registered namespace
prefix.
at
org.apache.jackrabbit.core.NamespaceRegistryImpl.getURI(NamespaceRegistryImpl.java:423)
at
org.apache.jackrabbit.commons.AbstractSession.getNamespaceURI(AbstractSession.java:132)
at org.apache.jackrabbit.core.SessionImpl.getURI(SessionImpl.java:704)
at
org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:187)
at
org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:64)
at
org.apache.jackrabbit.spi.commons.conversion.CachingNameResolver.getQName(CachingNameResolver.java:76)
at
org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQName(DefaultNamePathResolver.java:74)
at org.apache.jackrabbit.core.SessionImpl.getQName(SessionImpl.java:719)
at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:2074)
at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1992)
at
org.apache.sling.jcr.contentloader.internal.ContentLoaderService.createRepositoryPath(ContentLoaderService.java:199)
at
org.apache.sling.jcr.contentloader.internal.ContentLoaderService.activate(ContentLoaderService.java:254)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:214)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at
org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:550)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:442)
at
org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:138)
at
org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:226)
at
org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:972)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:309)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:133)
at
org.apache.felix.scr.impl.config.ConfiguredComponentHolder.enableComponents(ConfiguredComponentHolder.java:247)
at
org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253)
at
org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)
at
org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111)
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:255)
at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:173)
at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:800)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3734)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1807)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1188)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:637)
Our pom is
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
THE ORIGINAL CODE THIS FILE WAS EDITED FROM BORE THIS COPYRIGHT NOTICE:
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<groupId>au.com.nicta.cose.comlex.server.remote</groupId>
<artifactId>launchpad</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Launchpad</name>
<description>
Starts a Sling instance using the Maven Launchpad Plugin.
This was edited from the pom for the Sling launchpad/testing project.
Also, see this forum comment:
http://dev.day.com/discussion-groups/content/lists/sling-dev/2010-02/2010-02-17_Minimal_pom_for_maven_launchpad_plugin__Bertrand_Delacretaz.html
and this example project:
http://svn.apache.org/repos/asf/sling/whiteboard/bdelacretaz/mini-standalone-sling/pom.xml
</description>
<properties>
<!-- HTTP port to use when running mvn jetty:run -->
<run.http.port>8888</run.http.port>
<!-- Timeout when checking for Sling readyness before starting tests -->
<HttpTestBase.readyTimeoutSeconds>62</HttpTestBase.readyTimeoutSeconds>
<!-- path suffix for HTTP access to Sling -->
<http.base.path />
<!-- path suffix for WebDAV access to the repository -->
<webdav.workspace.path />
<!-- hostname for integration tests -->
<test.host>localhost</test.host>
<!--
Defines which tests are for the "integration-testing" phase
-->
<integration.test.code.path>
**/launchpad/webapp/integrationtest
</integration.test.code.path>
<!--
Set this to true to stop mvn once the integration test Jetty
instance is
started. Useful to manually test the integration testing webapp.
-->
<integration.test.wait>false</integration.test.wait>
<resources.bundles.path>${project.build.directory}/launchpad-bundles/resources/bundles</resources.bundles.path>
</properties>
<!-- Add the Apache Snaphsots repository, where Sling 6-SNAPSHOT is. -->
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<url>http://repository.apache.org/snapshots/</url>
<!-- The releases element here is due to an issue in Maven 2.0 that will
be
fixed in future releases. This should be able to be disabled
altogether. -->
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.snapshots</id>
<url>http://repository.apache.org/snapshots/</url>
<!-- The releases element here is due to an issue in Maven 2.0 that will
be
fixed in future releases. This should be able to be disabled
altogether. -->
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>derby.log</include>
<include>cachedir</include>
<include>sling</include>
<include>jackrabbit</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>reserve-network-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<portNames>
<portName>http.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>delete-sling-folder</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>SLING-845 - delete parent sling folder
before integration tests</echo>
<delete dir="../../sling" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addDefaultImplementationEntries>
true
</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<executions>
<execution>
<id>prepare-package</id>
<goals>
<goal>prepare-package</goal>
</goals>
</execution>
<execution>
<id>default-cli</id>
<configuration>
<httpPort>${run.http.port}</httpPort>
</configuration>
</execution>
</executions>
<configuration>
<!-- Determines which list of default bundles to use -->
<defaultBundleList>
<version>6-SNAPSHOT</version>
</defaultBundleList>
<!-- Standalone jar requires an OSGi http service
implementation -->
<jarWebSupport>
<groupId>org.apache.cxf.dosgi</groupId>
<artifactId>cxf-dosgi-ri-singlebundle-distribution</artifactId>
<version>1.2</version>
</jarWebSupport>
<!-- Add our own bundles -->
<additionalBundles>
</additionalBundles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<!--
These settings are used when running the
integration against a different
instance of Sling. See README.txt for more
information.
-->
<property>
<name>launchpad.http.server.url</name>
<value>
http://${test.host}:${http.port}/${http.base.path}
</value>
</property>
<property>
<name>launchpad.webdav.server.url</name>
<value>
http://${test.host}:${http.port}/${webdav.workspace.path}
</value>
</property>
<property>
<name>HttpTestBase.readyTimeoutSeconds</name>
<value>
${HttpTestBase.readyTimeoutSeconds}
</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<!-- maven-launchpad-plugin builds on the launchpad.base app -->
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.base</artifactId>
<version>2.2.0</version>
<classifier>webapp</classifier>
<type>war</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Thanks in Advance
________________________________
The information in this e-mail may be confidential and subject to legal
professional privilege and/or copyright. National ICT Australia Limited accepts
no liability for any damage caused by this email or its attachments.