This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

FatalParseException on Export/Import-Package META-INFPage Title Module

FatalParseException on Export/Import-Package META-INF

Oct 21st, 2008, 02:22 PM

All,

I am very new to the Spring DM and OSGI world.

While trying to deploy the CXF Apache OSGI Bundle to the Springsource DM Server 1.0.0 Release, I am getting a FatalParseException. It appears to be attributed to the fact that CXF is uses META-INF.cxf as both an Export-Package and Import-Package.

There are required spring config files under META-INF/cxf that can be import ed into your OSGI module.

The OSGi spec defines a package name as being a made up of a series of dot-separated identifiers, where an identifier may only contain letters and digits, i.e. '-' is not a legal character in a package name. See sections 3.5.5 and 1.3.2 in the 4.1 OSGi spec for the exact details.

I'd recommend opening a Jira against CXF referencing these two sections of the OSGi spec.

Comment

This behaviour is due to the fact that Spring DM parses OSGi manifests strictly and disallows the "-" character in package names. It doesn't therefore allow META-INF resources to be imported or exported. We have raised this limitation in the OSGi standards body.

Meanwhile, you should try to use bundles with OSGi manifests that conform to the spec. There is an old request against the SpringSource Enterprise Bundle Repository for Apache CXF, but I understand it has been delayed because of the relative complexity of producing valid bundles for CXF. You may to comment on this issue to add your voice to the request.

One workaround may be to create your own bundle which imbeds all the Apache CXF jars on the bundle classpath. This would avoid the need to import and export resources and packages between the CXF jars.