Document Tree
Document Properties
Kbid
29963B
Last Modified
03-Jan-2024
Added to KB
04-Oct-2021
Public Access
Everyone
Status
Online
Doc Type
Support Articles
Product
ICM 7.10
Support Article - Identification of Missing Cartridge Dependencies

Introduction

Building cartridges directly in Intershop Studio may not detect missing dependencies in some cases which could lead to compilation errors. This document describes how to handle such cases to resolve missing dependencies.

References

Steps to Identify and Add Missing Dependencies

Identify Missing Class Dependencies

To identify missing dependencies in your project cartridge that are necessary to compile Java source files, execute a gradle build process for all cartridges in a separate shell/cmd.

<root-project>
./gradlew build -s

If there are any dependencies missing, the output will display an error, e.g. the message "cannot find symbol" or "cannot access <class>" identifies missing dependencies.

  • Example when compile group: 'com.intershop.business', name: 'bc_basket' is missing in the dependencies of the cartridge app_sf_responsive:

    Example Error 1
    /home/intershop1/intershop-cisetup-sources/projects/a_responsive/app_sf_responsive/src/main/java/com/intershop/application/responsive/pipelet/GetPaymentInstrumentByServiceID.java:8: error: cannot find symbol
    import com.intershop.component.basket.capi.BasketBO;
                                              ^
      symbol:   class BasketBO
      location: package com.intershop.component.basket.capi
    :inspired-b2x:generateDescriptorFileForIvyPublication
    1 error
    :app_sf_responsive:compileJava FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app_sf_responsive:compileJava'.
    > Compilation failed; see the compiler error output for details.
    
    * Try:
    Run with --info or --debug option to get more log output.
    
    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app_sf_responsive:compileJava'.
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    	at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    	at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
    	at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:47)
    	at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
    	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:103)
    	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
    	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:38)
    	at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:34)
    	at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
    	at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:157)
    	at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:139)
    	at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:93)
    	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:244)
    	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
    	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:231)
    	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    	... 14 more
  • Example when compile 'org.apache.tomcat:tomcat-jsp-api' is missing in the dependencies of a project cartridge:

    Example Error 2
    /home/intershop1/intershop-cisetup-sources/projects/a_responsive/my_cartridge/src/main/java/com/intershop/application/responsive/internal/configuration/MyClass.java:710: error: cannot access HttpJspPage
          LoopStack loopStack = AbstractTemplate.getTemplateExecutionConfig().getLoopStack();
                                                                             ^
    class file for javax.servlet.jsp.HttpJspPage not found 
  • Example when compile group: 'com.intershop', name: 'emf' is missing in the dependencies of a project cartridge:

    Example Error 3
    /home/intershop1/intershop-cisetup-sources/projects/a_responsive/my_cartridge/javasource/com/intershop/application/responsive/pipelet/MyClass.java:710: error: cannot access ResourceSetIdentifiable
                                    dict.put("PageletEntryPointID", pageletEntryPointPO.getId());
                                                                                       ^
    class file for com.intershop.beehive.emf.core.ResourceSetIdentifiable not found

The description of the subsequent steps is based on the example when compile group: 'com.intershop.business', name: 'bc_basket' is missing.

Find Related Java Packages

After the missing classes have been identified, the next step is to find the related Java packages where the classes are included in order to add this package to the cartridge dependencies list. Here, the Intershop Studio can be used.

The steps are:

  1. Open Intershop Studio.
    In the Package Manager workspace, enable the Link with Editor view.
  2. Navigate to the menu: Navigate | Open Type... (or use the shortcut CTRL + SHIFT + T).
  3. Enter the missing class name (e.g. "BasketBO") in the search field.
  4. Double click on the class.
  5. Check the related Java package in the Package Explorer workspace (e.g. bc_basket.jar).

Find the Group of the Java Package

Open the ivy.xml file in the server share directory and search for the Java package name.

Note

The name of the Java package equals the cartridge name in which the Java package is located (the .jar file is part of the cartridge lib folder).

Add the Missing Java Package Dependency

Add the missing Java package dependency to the cartridge build.gradle file.

Added Java package dependency
<root-project>/app_sf_responsive/build.gradle:
  ...
  dependencies {
    ...
    compile group: 'com.intershop.business', name: 'bc_basket'
    ...
  }
}
Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.