2 Replies Latest reply on Apr 9, 2013 11:35 PM by dlmiles

    OSGi-JPA AS7 how to switch off OSGi for a JAR?


      AS 7.1.1.Final (would use EAP 6.1 but some research indicates useful stuff is missing,

        JBoss Tooling, connector doesn't know about modules/systems/layers/base/** change, and maybe other matters,

        snowdrop needs a new release rolled)


      Is there anyway to manually instruct JBoss OSGi to ignore all OSGi aspects of a JAR ?


      When trying to deploy a JPA jar I get the:


      [code]Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017223: Failed to get module attachment for deployment "my.domain.appname.jpa-1.2.3-SNAPSHOT.jar"[/code]


      It seems some header in the MANIFEST.MF triggers this but I don't want to customize (butcher) my JPA JARs just so JBoss OSGi doesn't choke itself trying to delpoy it.

        • 1. Re: OSGi-JPA AS7 how to switch off OSGi for a JAR?

          Just to say that JBoss Tooling since 4.0.1 built of Mar 27 does support EAP 6.1.  I recently reinstalled Juno SR2 and there is me thinking I am uptodate but the tooling guys made another release over the past week.

          • 2. Re: OSGi-JPA AS7 how to switch off OSGi for a JAR?

            I have rebuilt SNOWDROP to work for EAP 6.1 and filed various bugs.


            I have upgradeed manuallythe JARs for module org.hibernate:main from version 4.2.0.CR1 to 4.2.0.Final (to bypass the HHH-8015 wrong class loader issue)



            But on EAP 6.1 I get:


            WARN  [org.jboss.as.osgi] (MSC service thread 1-14) JBAS011910: Cannot resolve requirements: [XPackageRequirement[atts={osgi.wiring.package=org.hibernate.criterion},[com.domain.jpa:0.0.1.SNAPSHOT]]]



            I have filed bug https://issues.jboss.org/browse/HIBERNATE-141 on this as I don't believe I am doing anything wrong.



            The bundled hibernate-core-4.2.0.CR1.jar   does not contain OSGi manifest data.
            My upgraded hibernate-core-4.2.0.Final.jar does     contain OSGi manifest data.
            Looking at the data there are many reference to the org.hibernate.criterion in the Export-Package header.

            How does this affect how things work ?


            I would expect JBoss AS to automatically make use of the explicitly set OSGi data from MANIFEST.MF when it is found to be present, otherwise it will build such data based on whatever the policy is.