Expand my Community achievements bar.

SOLVED

Including com.fasterxml.jackson dependency - Causing errors(i.e. core bundle is always in install state)

Avatar

Level 2

We have requirement that we have to upgrade the jackson-databind version 2.8.2 to 2.12.5. I have updated the pom.xml, but after building the code OSGI bundle is in always install state. If anyone worked on similar requirement then please let me know.

PFB jackson-databind dependency in pom.xml.

aaqibk92586681_0-1632483899178.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, @aaqibk92586681, let me try to summarize and confirm my understanding is correct. You've updated version of jackson-* dependencies from 2.8.2 to 2.12.5. After this operation bundle of your application is in install state.

 

I do not know what error you can see in the logs, however to me it looks that your bundle expecting 2.12.5 version of jackson-* dependencies, but on AEM you have different versions. Could you please check what bundle version of above jackson dependencies are available on your AEM instance?

 

Those are OOTB bundles, so if you still want to use different version, then the one provided by AEM, then you should embed it in your bundle. You can find some more information here https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#_embedd...

 

View solution in original post

9 Replies

Avatar

Community Advisor

Hi @aaqibk92586681 could you please share screen shot from OSGi bundles console, with details of each bundle. Probably some dependencies are missing and jackson bundles are not able to start.

 

You can also try to start bundle manually from OSGi bundles console and see if this will work.

Avatar

Level 2

PFB jackson dependency details:

aaqibk92586681_0-1632487054305.png

We have manually tried to install the bundle, but it is not working.

Avatar

Community Advisor

So when you are trying to install it manually, are there any errors in the log? I would also assume that previous version of bundles worked fine?

Avatar

Level 2

Hi @lukasz-m 

Yes, We are getting error log while installing the bundle manually and previous version of bundle is working fine.

 

 

Avatar

Correct answer by
Community Advisor

Hi, @aaqibk92586681, let me try to summarize and confirm my understanding is correct. You've updated version of jackson-* dependencies from 2.8.2 to 2.12.5. After this operation bundle of your application is in install state.

 

I do not know what error you can see in the logs, however to me it looks that your bundle expecting 2.12.5 version of jackson-* dependencies, but on AEM you have different versions. Could you please check what bundle version of above jackson dependencies are available on your AEM instance?

 

Those are OOTB bundles, so if you still want to use different version, then the one provided by AEM, then you should embed it in your bundle. You can find some more information here https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#_embedd...

 

Avatar

Community Advisor

Embed these bundles in your pom.xml

 

 

            <plugin>
                <groupId>org.apache.jackrabbit</groupId>
                <artifactId>filevault-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <group>com.sample</group>
                    <packageType>container</packageType>
                    <!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
                    <skipSubPackageValidation>true</skipSubPackageValidation>
                    <embeddeds>                       
                        <embedded>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-core</artifactId>
                            <type>jar</type>
                            <target>/apps/sampleproject/application/install</target>
                        </embedded>
                        <embedded>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-annotations</artifactId>
                            <type>jar</type>
                            <target>/apps/sampleproject/application/install</target>
                        </embedded>
                        <embedded>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-databind</artifactId>
                            <type>jar</type>
                            <target>/apps/sampleproject/application/install</target>
                        </embedded>
                    </embeddeds>
                </configuration>
            </plugin>

Avatar

Community Advisor

Hi @aaqibk92586681,

com.fasterxml.jackson.* family is available OOTB with instance/Felix console and many of the other OOTB OSGi bundles are making use of the same. 

Could you please confirm

  • If only your project bundle is in installed state (after the version upgrade) or any other OOTB bundle too
  • com.fasterxml.jackson.* related bundles are all in active state. 

You can find the details/cause logged in the error.log or in case if your instance is started using command prompt, you can find the related logs there as well. 

 

Avatar

Level 2

Hi @Vijayalakshmi_S 

I have exported com.fasterxml.jackson.*  in my project.

answering above mentioned point.

1)yes, only my project bundle is in installed state(after the version upgrade) and all other bundle is in active state.

2)All other bundles are in active state.