jaco
May 5th, 2008, 04:13 AM
Hi,
I created a sample project using the archetype as described in the docs.
mvn archetype:create \
-DarchetypeGroupId=org.springframework.osgi \
-DarchetypeArtifactId=spring-osgi-bundle-archetype \
-DarchetypeVersion=1.1.0-m2 \
-DgroupId=<your-project-groupId> \
-DartifactId=<your-project-artifactId> \
-Dversion=<your-project-version>
Running 'mvn package' for the created project fails with the following exception.
Caused by: java.lang.NoClassDefFoundError: org.osgi.vendor.framework property not set
at org.osgi.framework.FrameworkUtil$1.run(FrameworkUt il.java:54)
at java.security.AccessController.doPrivileged(Native Method)
at org.osgi.framework.FrameworkUtil.<clinit>(FrameworkUtil.java:49)
at org.springframework.osgi.util.OsgiFilterUtils.crea teFilter(OsgiFilterUtils.java:233)
at org.springframework.osgi.service.importer.support. AbstractOsgiServiceImportFactoryBean.getUnifiedFil ter(AbstractOsgiServiceImportFactoryBean.java:159)
at org.springframework.osgi.service.importer.support. AbstractOsgiServiceImportFactoryBean.afterProperti esSet(AbstractOsgiServiceImportFactoryBean.java:12 4)
at org.springframework.osgi.service.importer.support. OsgiServiceCollectionProxyFactoryBean.afterPropert iesSet(OsgiServiceCollectionProxyFactoryBean.java: 126)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener.createListenersList(Conte xtLoaderListener.java:794)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener.initListenerService(Conte xtLoaderListener.java:748)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener.start(ContextLoaderListen er.java:385)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl$2.run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.startActivator(BundleContextImpl.java:985 )
However changing 'spring.osgi.version' in the generated pom to '1.0.2' works fine.
Thanks Jaco
I created a sample project using the archetype as described in the docs.
mvn archetype:create \
-DarchetypeGroupId=org.springframework.osgi \
-DarchetypeArtifactId=spring-osgi-bundle-archetype \
-DarchetypeVersion=1.1.0-m2 \
-DgroupId=<your-project-groupId> \
-DartifactId=<your-project-artifactId> \
-Dversion=<your-project-version>
Running 'mvn package' for the created project fails with the following exception.
Caused by: java.lang.NoClassDefFoundError: org.osgi.vendor.framework property not set
at org.osgi.framework.FrameworkUtil$1.run(FrameworkUt il.java:54)
at java.security.AccessController.doPrivileged(Native Method)
at org.osgi.framework.FrameworkUtil.<clinit>(FrameworkUtil.java:49)
at org.springframework.osgi.util.OsgiFilterUtils.crea teFilter(OsgiFilterUtils.java:233)
at org.springframework.osgi.service.importer.support. AbstractOsgiServiceImportFactoryBean.getUnifiedFil ter(AbstractOsgiServiceImportFactoryBean.java:159)
at org.springframework.osgi.service.importer.support. AbstractOsgiServiceImportFactoryBean.afterProperti esSet(AbstractOsgiServiceImportFactoryBean.java:12 4)
at org.springframework.osgi.service.importer.support. OsgiServiceCollectionProxyFactoryBean.afterPropert iesSet(OsgiServiceCollectionProxyFactoryBean.java: 126)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener.createListenersList(Conte xtLoaderListener.java:794)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener.initListenerService(Conte xtLoaderListener.java:748)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener.start(ContextLoaderListen er.java:385)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl$2.run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.startActivator(BundleContextImpl.java:985 )
However changing 'spring.osgi.version' in the generated pom to '1.0.2' works fine.
Thanks Jaco