cancel
Showing results for 
Search instead for 
Did you mean: 

What does means "Entering compatibility mode" Warn Message

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

I created an empty bundle/I test a bundle developed for a Nuxeo before 5.4.2 into a Nuxeo 5.4.2 (or higher) version. Here is my configuration files:

MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 1
Bundle-Name: Kasaba Sample project
Bundle-SymbolicName: org.nuxeo.project.sample;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Nuxeo
Require-Bundle: org.nuxeo.runtime,
 org.nuxeo.ecm.core.api,
 org.nuxeo.ecm.core,
 org.nuxeo.ecm.webapp.core
Nuxeo-Component: OSGI-INF/actions-contrib.xml

And here is my deployment-fragment.xml file:

<?xml version="1.0"?>
<fragment>
  <extension target="application#MODULE">
    <module>
      <java>${bundle.fileName}</java>
    </module>
  </extension>
  <install>
    <!-- Unzip the war template -->
    <unzip from="${bundle.fileName}" to="/">
      <include>nuxeo.war/**</include>
    </unzip>   
  </install>
</fragment>

I have this message

[org.nuxeo.runtime.deployment.preprocessor.DeploymentPreprocessor] 
Entering compatibility mode - Please update the deployment-fragment.xml in my-bundle-1.0-SNASHOT.jar to use new dependency management.

Is it a real problem ? What I have to do to in my deployment-fragment.xml ?

1 ACCEPTED ANSWER

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Dear Me,

Don't be afraid this is not a hard problem. In fact since Nuxeo Runtime 5.4.2 version, the dependency informations are no more exposed into the MANIFEST.MF file.

  • So first you must remove the Require-Bundle entry into your MANIFEST.MF file.
  • Next, you must report this dependency information into your deployment-fragment.xml file
  • To specify to the runtime that you are no more using the old dependency exposition add a version attribute to your deployment-fragment.xml with the value "1"

So your MANIFEST.MF must be something like that:

Manifest-Version: 1.0
Bundle-ManifestVersion: 1
Bundle-Name: Kasaba Sample project
Bundle-SymbolicName: org.nuxeo.project.sample;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Nuxeo
Nuxeo-Component: OSGI-INF/actions-contrib.xml

And your deployment-fragment.xml:

<?xml version="1.0"?>
<fragment version="1">
  <require>the.name.of.bundle.before.me</require>
  <requiredBy>the.name.of.bundle.after.me</requiredBy>

  .... your web.xml contributions, etc ...

  <install>
    <!-- Unzip the war template -->
    <unzip from="${bundle.fileName}" to="/">
      <include>nuxeo.war/**</include>
    </unzip>
  </install>
</fragment>

I will just add that you have this following dependency information that you can set into your deployment-fragement.xml:

  • <require>the.name.of.bundle.before.me</require> specify that your bundle will be deployed after the.name.of.bundle.before.me
  • <requiredBy>the.name.of.bundle.after.me</requiredBy> specify that your bundle will be deployed before the.name.of.bundle.after.me
  • <require>all</require> will ask to the runtime to be deployed after all other bundles.
  • If you contribute to a service in a xml file - into the OSGI-INF directory - dependency declaration of this service into the deployment-fragment is not required. The runtime will automatically activate your bundle after the service you are contributing.
  • if you have no dependency information to transmit to the runtime, no template to populate, no pre-processing to execute that will mean that your deployment-fragment is empty, you can remove it.

The reason of this modification is that MANIFEST.MF is a descriptor for the OSGi container and preprocessing is not related to OSGi neither to JAR Manifests. Preprocessing is more like a build time operation (let say a post build task). And Nuxeo is preparing the migration the platform to a standard OSGi container.

View answer in original post

4 REPLIES 4

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Dear Me,

Don't be afraid this is not a hard problem. In fact since Nuxeo Runtime 5.4.2 version, the dependency informations are no more exposed into the MANIFEST.MF file.

  • So first you must remove the Require-Bundle entry into your MANIFEST.MF file.
  • Next, you must report this dependency information into your deployment-fragment.xml file
  • To specify to the runtime that you are no more using the old dependency exposition add a version attribute to your deployment-fragment.xml with the value "1"

So your MANIFEST.MF must be something like that:

Manifest-Version: 1.0
Bundle-ManifestVersion: 1
Bundle-Name: Kasaba Sample project
Bundle-SymbolicName: org.nuxeo.project.sample;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Nuxeo
Nuxeo-Component: OSGI-INF/actions-contrib.xml

And your deployment-fragment.xml:

<?xml version="1.0"?>
<fragment version="1">
  <require>the.name.of.bundle.before.me</require>
  <requiredBy>the.name.of.bundle.after.me</requiredBy>

  .... your web.xml contributions, etc ...

  <install>
    <!-- Unzip the war template -->
    <unzip from="${bundle.fileName}" to="/">
      <include>nuxeo.war/**</include>
    </unzip>
  </install>
</fragment>

I will just add that you have this following dependency information that you can set into your deployment-fragement.xml:

  • <require>the.name.of.bundle.before.me</require> specify that your bundle will be deployed after the.name.of.bundle.before.me
  • <requiredBy>the.name.of.bundle.after.me</requiredBy> specify that your bundle will be deployed before the.name.of.bundle.after.me
  • <require>all</require> will ask to the runtime to be deployed after all other bundles.
  • If you contribute to a service in a xml file - into the OSGI-INF directory - dependency declaration of this service into the deployment-fragment is not required. The runtime will automatically activate your bundle after the service you are contributing.
  • if you have no dependency information to transmit to the runtime, no template to populate, no pre-processing to execute that will mean that your deployment-fragment is empty, you can remove it.

The reason of this modification is that MANIFEST.MF is a descriptor for the OSGi container and preprocessing is not related to OSGi neither to JAR Manifests. Preprocessing is more like a build time operation (let say a post build task). And Nuxeo is preparing the migration the platform to a standard OSGi container.

not sure if you have the description quite right there - I think you mean

Yes you're right. I change into my answer... Thanks...

Adjusted answer to use the correct &lt;requiredBy&gt; and not &lt;required-by&gt;.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.