Got unexpected exception while analyzing:java.lang.NoClassDefFoundError in AEM version 6.4.0

Avatar

Avatar

jadhavni3

Avatar

jadhavni3

jadhavni3

08-10-2020

Hi,

I'm getting below error while installing command as "mvn clean install -PautoInstallAll" to integrate Magento with AEM.


[ERROR] Bundle com.acme.cif:acme-store.core:bundle:0.0.1-SNAPSHOT : Got unexpected exception while analyzing:java.lang.NoClassDefFoundError: com/day/cq/search/impl/util/InvalidDateException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethod(Class.java:2128)
at org.apache.felix.scrplugin.helper.Validator.getMethod(Validator.java:597)
at org.apache.felix.scrplugin.helper.Validator.getMethod(Validator.java:226)
at org.apache.felix.scrplugin.helper.Validator.findLifecycleMethod(Validator.java:246)
at org.apache.felix.scrplugin.SCRDescriptorGenerator.createComponent(SCRDescriptorGenerator.java:437)
at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:161)
at org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin.analyzeJar(SCRDescriptorBndPlugin.java:178)
at aQute.bnd.osgi.Analyzer.doPlugins(Analyzer.java:928)
at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:247)
at aQute.bnd.osgi.Builder.analyze(Builder.java:439)
at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:958)
at aQute.bnd.osgi.Builder.build(Builder.java:123)
at org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:948)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:450)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:371)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.lang.ClassNotFoundException: com.day.cq.search.impl.util.InvalidDateException
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 39 more

[ERROR] Error(s) found in bundle configuration
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for acme-store 0.0.1-SNAPSHOT:
[INFO]
[INFO] acme-store ......................................... SUCCESS [ 1.774 s]
[INFO] Acme Store - Core .................................. FAILURE [ 37.638 s]
[INFO] Acme Store - UI apps ............................... SKIPPED
[INFO] Acme Store - UI content ............................ SKIPPED
[INFO] Acme Store - Sample Content ........................ SKIPPED
[INFO] Acme Store - All-in-one package .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46.067 s
[INFO] Finished at: 2020-10-08T16:12:20+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:5.1.1:bundle (default-bundle) on project acme-store.core: Error(s) found in bundle configuration -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :acme-store.core


Please suggest.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

27-10-2020

Hi @jadhavni3 

Try changing uber-jar version from 6.5 to 6.4

 

    <artifactId>uber-jar</artifactId>

    <version>6.4.0</version>

 

AG

Answers (4)

Answers (4)

Avatar

Avatar

Sandeep6

Avatar

Sandeep6

Sandeep6

09-10-2020

Hi @jadhavni3 ,

 

Try to build your project using "mvn clean install".

If build is success is using above command, no issue in your project.

You have to make ensure that the dependency com.day.cq.search is available in AEM.

Go to /system/console/depfinder and search for com.day.cq.search and see which bundle exports it. You can then update you dependency accordingly.

 

Please follow below link for more information.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/noclassdeffounderror-in-ae... 

 

Regards,

Sandeep.

jadhavni3

Hi @Sandeep6,

I have tried it with command "mvn clean install" but getting same error. Also I have updated same dependency in parent POM.xml file which is got from /system/console/depfinder console.

 

If I comment below plugin code in parent POM.xml this command works fine(mvn clean install) but when I add this plugin I'm getting error.

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-DocURL>
http://sling.apache.org/site/sling-api.html
</Bundle-DocURL>
<Export-Package>
org.apache.sling.api;version=2.1,
org.apache.sling.api.adapter;version=2.2,
org.apache.sling.api.auth;version=1.0,
org.apache.sling.api.request;version=2.1,
org.apache.sling.api.resource;version=2.1,
org.apache.sling.api.scripting;version=2.1,
org.apache.sling.api.servlets;version=2.1,
org.apache.sling.api.wrappers;version=2.1,
org.apache.sling.api.wrappers.impl;version=2.1,
com.adobe.granite.ui.components;version=1.19,
com.adobe.granite.ui.components.ds;version=1.3,
com.day.cq.search;version=1.3,
com.day.cq.search.impl.builder;version=1.3,
com.day.cq.search.impl.util;version=1.3,
com.adobe.granite.ui.components.impl;version=1.19,
com.day.cq.search.eval;version=1.3,
com.fasterxml.jackson.core;version=2.9,
com.fasterxml.jackson.core.type;version=2.9,
com.fasterxml.jackson.databind;version=2.9,
org.apache.commons.io;version=2.6,
org.apache.sling.api.resource;version=2.11,
org.eclipse.jetty.util;version=9.4,
org.apache.sling.spi.resource.provider;version=1.2

</Export-Package>
Require explicit version of the servlet API
<Import-Package>
javax.servlet.*;version=2.4,*
</Import-Package>com.day.cq.search.impl.util.*
<Private-Package>
</Private-Package>
</instructions>
</configuration>
</plugin>

 

Please suggest.

 

Thank you.

jadhavni3_0-1602239752328.png

 

Sandeep6

Hi @jadhavni3 ,

 

Please use below maven plugin and try again.

 

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<scmCommentPrefix>[maven-scm] :</scmCommentPrefix>
<preparationGoals>clean install</preparationGoals>
<goals>install</goals>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>

 

Regards,

Sandeep.

 

jadhavni3
Hi @Sandeep6, We have added already this.
jadhavni3

Hi Hi @Sandeep6,

Please find the complete parent POM.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2019 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme.cif</groupId>
<artifactId>acme-store</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<description>Acme Store</description>

<modules>
<module>all</module>
<module>core</module>
<module>ui.apps</module>
<module>ui.content</module>
<module>samplecontent</module>
</modules>

<properties>
<aem.host>localhost</aem.host>
<aem.port>4502</aem.port>
<aem.publish.host>localhost</aem.publish.host>
<aem.publish.port>4503</aem.publish.port>
<sling.user>admin</sling.user>
<sling.password>admin</sling.password>
<vault.user>admin</vault.user>
<vault.password>admin</vault.password>
<core.wcm.components.version>2.7.0</core.wcm.components.version>
<core.cif.components.version>1.0.0</core.cif.components.version>
<cif.connector.version>1.0.0</cif.connector.version>
<graphql.client.version>1.5.0</graphql.client.version>
<magento.graphql.version>5.1.0-magento234</magento.graphql.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<build>
<plugins>
<!-- Maven Release Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<scmCommentPrefix>[maven-scm] :</scmCommentPrefix>
<preparationGoals>clean install</preparationGoals>
<goals>install</goals>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<!-- Maven Source Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<inherited>true</inherited>
</plugin>
<!-- Maven Jar Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<!-- Maven Enforcer Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.3.9,)</version>
</requireMavenVersion>
<requireJavaVersion>
<message>Project must be compiled
with Java 8 or higher</message>
<version>1.8.0</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Maven IntelliJ IDEA Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<jdkLevel>1.8</jdkLevel>
<linkModules>true</linkModules>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<!-- Maven Eclipse Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.10</version>
<configuration>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- Maven Clean Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- Maven Resources Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
</plugin>
<!-- Maven Installer Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<!-- Maven Surefire Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
<!-- Maven Failsafe Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<!-- Maven Deploy Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- Apache Sling Plugin -->
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<slingUrl>http://${aem.host}:${aem.port}/system/console</slingUrl>
<deploymentMethod>WebConsole</deploymentMethod>
</configuration>
</plugin>
<!-- HTL Maven Plugin -->
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>htl-maven-plugin</artifactId>
<version>1.0.6</version>
<configuration>
<failOnWarnings>true</failOnWarnings>
</configuration>
<executions>
<execution>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Jackrabbit FileVault Package Plugin -->
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<version>1.0.3</version>
<configuration>
<filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
</configuration>
</plugin>
<!-- Content Package Plugin -->
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>1.0.2</version>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
<failOnError>true</failOnError>
<userId>${vault.user}</userId>
<password>${vault.password}</password>
</configuration>
</plugin>
<!-- Apache Felix Bundle Plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.1.0</version>
<inherited>true</inherited>
</plugin>
<!-- Maven Enforcer Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
</plugin>
<!-- Maven Dependency Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- Build Helper Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse
m2e settings only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<versionRange>
[2.2,)
</versionRange>
<goals>
<goal>copy-dependencies</goal>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
build-helper-maven-plugin
</artifactId>
<versionRange>
[1.5,)
</versionRange>
<goals>
<goal>
reserve-network-port
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>

<!-- Create the bundle of the Sling API -->
<!-- <plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-DocURL>
http://sling.apache.org/site/sling-api.html
</Bundle-DocURL>
<Export-Package>
org.apache.sling.api;version=2.1,
org.apache.sling.api.adapter;version=2.2,
org.apache.sling.api.auth;version=1.0,
org.apache.sling.api.request;version=2.1,
org.apache.sling.api.resource;version=2.1,
org.apache.sling.api.scripting;version=2.1,
org.apache.sling.api.servlets;version=2.1,
org.apache.sling.api.wrappers;version=2.1,
org.apache.sling.api.wrappers.impl;version=2.1,
com.adobe.granite.ui.components;version=1.19,
com.adobe.granite.ui.components.ds;version=1.3,
com.day.cq.search;version=1.3,
com.day.cq.search.impl.builder;version=1.3,
com.day.cq.search.impl.util;version=1.3,
com.adobe.granite.ui.components.impl;version=1.19,
com.day.cq.search.eval;version=1.3,
com.fasterxml.jackson.core;version=2.9,
com.fasterxml.jackson.core.type;version=2.9,
com.fasterxml.jackson.databind;version=2.9,
org.apache.commons.io;version=2.6,
org.apache.sling.api.resource;version=2.11,
org.eclipse.jetty.util;version=9.4,
org.apache.sling.spi.resource.provider;version=1.2

</Export-Package>
Require explicit version of the servlet API
<Import-Package>
javax.servlet.*;version=2.4,*
</Import-Package>com.day.cq.search.impl.util.*
<Private-Package>
</Private-Package>
</instructions>
</configuration>
</plugin> -->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<scmCommentPrefix>[maven-scm] :</scmCommentPrefix>
<preparationGoals>clean install</preparationGoals>
<goals>install</goals>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>

</plugins>
</pluginManagement>
</build>

<profiles>
<!-- ====================================================== -->
<!-- A D O B E P U B L I C P R O F I L E -->
<!-- ====================================================== -->
<profile>
<id>adobe-public</id>

<activation>
<activeByDefault>true</activeByDefault>
</activation>

<properties>
<releaseRepository-Id>adobe-public-releases</releaseRepository-Id>
<releaseRepository-Name>Adobe Public Releases</releaseRepository-Name>
<releaseRepository-URL>https://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL>
</properties>

<repositories>
<repository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>https://repo.adobe.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>https://repo.adobe.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>

<!-- Development profile: install only the bundle -->
<profile>
<id>autoInstallBundle</id>
<!--
To enable this feature for a bundle, the maven-sling-plugin
(without configuration) needs to be included:

<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
</plugin>
-->
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
<executions>
<execution>
<id>install-bundle</id>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>

<profile>
<id>autoInstallPackage</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<executions>
<execution>
<id>create-package</id>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<executions>
<execution>
<id>install-package</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>

<profile>
<id>autoInstallPackagePublish</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<executions>
<execution>
<id>create-package</id>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<executions>
<execution>
<id>install-package-publish</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>http://${aem.publish.host}:${aem.publish.port}/crx/packmgr/service.jsp</targetURL>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>

</profiles>


<!-- ====================================================================== -->
<!-- D E P E N D E N C I E S -->
<!-- ====================================================================== -->
<dependencyManagement>
<dependencies>
<!-- OSGi Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.annotation</artifactId>
<version>6.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>provided</scope>
</dependency>
<!-- Logging Dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
<scope>provided</scope>
</dependency>
<!-- Adobe AEM Dependencies -->
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.5.0</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.all</artifactId>
<type>zip</type>
<version>${core.wcm.components.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
<type>jar</type>
<version>${core.wcm.components.version}</version>
</dependency>

<!-- Adobe CIF Dependencies -->
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>core-cif-components-all</artifactId>
<type>zip</type>
<version>${core.cif.components.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>core-cif-components-core</artifactId>
<version>${core.cif.components.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>graphql-client</artifactId>
<version>${graphql.client.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>magento-graphql</artifactId>
<version>${magento.graphql.version}</version>
</dependency>

<!-- CIF Connector dependencies -->
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>cif-connector-graphql</artifactId>
<version>${cif.connector.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>cif-virtual-catalog</artifactId>
<version>${cif.connector.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>cif-connector-content</artifactId>
<type>zip</type>
<version>${cif.connector.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>cif-virtual-catalog-content</artifactId>
<type>zip</type>
<version>${cif.connector.version}</version>
</dependency>

<!-- Apache Sling Dependencies -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.models.api</artifactId>
<version>1.3.6</version>
<scope>provided</scope>
</dependency>
<!-- Servlet API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<!-- JCR -->
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<!-- Taglibs -->
<dependency>
<groupId>com.day.cq.wcm</groupId>
<artifactId>cq-wcm-taglib</artifactId>
<version>5.7.4</version>
<scope>provided</scope>
</dependency>

<!-- Testing -->
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.4.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.25.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>2.25.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit-addons</groupId>
<artifactId>junit-addons</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
<version>2.4.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>uk.org.lidalia</groupId>
<artifactId>slf4j-test</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.sling/org.apache.sling.api -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<version>2.18.4</version>
<scope>test</scope>
</dependency>

<dependency>
<artifactId>cq-search</artifactId>
<version>5.11.2</version>
<groupId>com.day.cq</groupId>
<scope>provided</scope>
</dependency>


</dependencies>
</dependencyManagement>

</project>

Please suggest what we are missing ? 


Thank you.

Avatar

Avatar

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

24-10-2020

Hi @jadhavni3 

Check and make sure Adobe CQ Search QueryBuilder (com.day.cq.cq-search) version 5.11.2 bundle is available and active. NoClassDefFoundError is a run time error, as it mentioned scope as provided for cq-search bundle. Maven will ignore InvalidDateException class at compile time. We should make sure that the provided jar/bundle with version is available at runtime.

<dependency>
    <groupId>com.day.cq</groupId>
    <artifactId>cq-search</artifactId>
   <version>5.11.2</version>
    <scope>provided</scope>
</dependency>

AG

Avatar

Avatar

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

24-10-2020

Hi @jadhavni3 

Check and make sure Adobe CQ Search QueryBuilder (com.day.cq.cq-search) version 5.11.2 bundle is available and active. NoClassDefFoundError is a run time error, as it mentioned scope as provided for cq-search bundle. Maven will ignore InvalidDateException class at compile time. We should make sure that the provided jar/bundle with version is available at runtime.

<dependency>
    <groupId>com.day.cq</groupId>
    <artifactId>cq-search</artifactId>
   <version>5.11.2</version>
    <scope>provided</scope>
</dependency>

AG

Avatar

Avatar

Sandeep6

Avatar

Sandeep6

Sandeep6

09-10-2020

Hi @jadhavni3 , 

 

I can see that in your pom.xml one org.apache.felix plugins is there. please explain me why you are adding another one.