Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6003

IllegalStateException: Need active coordination - cannot use JPA and Jasypt

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 4.2.1
    • 4.2.2
    • karaf
    • None

    Description

      In version 4.2.1 one cannot use JPA because it causes java.lang.IllegalStateException: Need active coordination. After my investigation I have found that it is caused because proxy service is not created properly. When someone use JPA in the same bundle, as in Karaf tests, it works fine. But problem occurs when using osgi service and osgi reference.

      Downgrading to version 4.1.5 of Karaf results in no possibility of using Jasypt (to protect passwords) [using: org.jasypt.encryption.pbe.StandardPBEStringEncryptor]. It does not decrypt passwords having marks ENC(...).

      I found that upgrading Blueprint fixes problem, so that JPA and Jasypt works perfectly. I know that sometime ago ticket on Camel blocked Blueprint upgrade. It was: https://issues.apache.org/jira/browse/CAMEL-12570. Currently this ticket is closed.

      Patch (for current code, which is version 4.2.1) is:

      diff --git a/pom.xml b/pom.xml
      index 3d314da48c..f049b7ff86 100644
      --- a/pom.xml
      +++ b/pom.xml
      @@ -218,10 +218,11 @@
               <aries.application.api.version>1.0.0</aries.application.api.version>
               <aries.application.management.version>1.0.0</aries.application.management.version>
               <aries.blueprint.api.version>1.0.1</aries.blueprint.api.version>
      -        <aries.blueprint.core.version>1.9.0</aries.blueprint.core.version>
      +        <aries.blueprint.core.version>1.10.0</aries.blueprint.core.version>
               <aries.blueprint.core.compatibility.version>1.0.0</aries.blueprint.core.compatibility.version>
      -        <aries.blueprint.cm.version>1.2.0</aries.blueprint.cm.version>
      -        <aries.blueprint.web.version>1.0.1</aries.blueprint.web.version>
      +        <aries.blueprint.cm.version>1.3.0</aries.blueprint.cm.version>
      +        <aries.blueprint.web.version>1.1.1</aries.blueprint.web.version>
      +        <aries.blueprint.webosgi.version>1.0.1</aries.blueprint.webosgi.version>
               <aries.blueprint.spring.version>0.6.0</aries.blueprint.spring.version>
               <aries.blueprint.spring.extender.version>0.4.0</aries.blueprint.spring.extender.version>
               <aries.jmx.api.version>1.1.5</aries.jmx.api.version>
      

      and

      diff --git a/assemblies/features/standard/src/main/feature/feature.xml b/assemblies/features/standard/src/main/feature/feature.xml
      index d19b87eb00..1813b2a0a5 100644
      --- a/assemblies/features/standard/src/main/feature/feature.xml
      +++ b/assemblies/features/standard/src/main/feature/feature.xml
      @@ -1429,7 +1429,7 @@ org.apache.felix.eventadmin.AddSubject=true
               blueprint inside web-bundle containers" version="${project.version}">
               <feature>war</feature>
               <feature>aries-blueprint</feature>
      -        <bundle>mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.webosgi/${aries.blueprint.web.version}</bundle>
      +        <bundle>mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.webosgi/${aries.blueprint.webosgi.version}</bundle>
           </feature>
       
           <feature name="wrap" description="Wrap URL handler" version="${pax.url.version}">
      
      

      Hope it helps.

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jbonofre Jean-Baptiste Onofré
            mluniews Marek Łuniewski
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment