cancel
Showing results for 
Search instead for 
Did you mean: 

Ant initialize command fails with fix-pack 2205.12

frnk83
Explorer
0 Kudos
563

We are currently having issues on applying fix-pack 2205.12 following this procedure:

https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/75d4c3895cb346008545900bffe851ce/6a48ca972...

The version installed in our environments is 2205.4 and it's showing next errors when running ant initialize in terminal:

[yjavac] Compiling 3 source files to C:\hybris\hybris\bin\modules\npm-ancillary\npmancillary\classes
[yjavac] C:\hybris\hybris\bin\modules\npm-ancillary\npmancillary\src\de\hybris\constants\NpmancillaryConstants.java:19: error: cannot find symbol
[yjavac] public final class NpmancillaryConstants extends GeneratedNpmancillaryConstants
[yjavac] ^
[yjavac] symbol: class GeneratedNpmancillaryConstants
[yjavac] C:\hybris\hybris\bin\modules\npm-ancillary\npmancillary\src\de\hybris\jalo\NpmancillaryManager.java:30: error: cannot find symbol
[yjavac] public class NpmancillaryManager extends GeneratedNpmancillaryManager
[yjavac] ^
[yjavac] symbol: class GeneratedNpmancillaryManager
[yjavac] 2 errors

BUILD FAILED
c:\hybris\hybris\bin\platform\build.xml:13: The following error occurred while executing this line:
C:\hybris\hybris\bin\platform\resources\ant\compiling.xml:95: The following error occurred while executing this line:
C:\hybris\hybris\bin\platform\resources\ant\compiling.xml:153: The following error occurred while executing this line:
c:\hybris\hybris\bin\platform\resources\ant\util.xml:13: The following error occurred while executing this line:
C:\hybris\hybris\bin\platform\resources\ant\compiling.xml:160: The following error occurred while executing this line:
C:\hybris\hybris\bin\platform\resources\ant\compiling.xml:333: The following error occurred while executing this line:
C:\hybris\hybris\bin\platform\resources\ant\compiling.xml:538: The following error occurred while executing this line:
C:\hybris\hybris\bin\platform\resources\ant\compiling.xml:589: The following error occurred while executing this line:
c:\hybris\hybris\bin\platform\resources\ant\util.xml:94: Compile failed; see the compiler error output for details.

Does anyone know if there are any missing steps?

Thank you in Advance,

Accepted Solutions (0)

Answers (1)

Answers (1)

adambadura
Participant

If ant clean does not help then you can try to enable debug logging for code generation since it seems that this is the issue here:

First create file build-log4j.properties in platform dir with the following contents:

# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=INFO, A1

log4j.logger.de.hybris.bootstrap.codegenerator.CodeGenerator=DEBUG

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Then set ANT_OPTS:

export ANT_OPTS="-Dlog4j.configuration=file:<PATH TO HYBRIS PLATFORM DIR>/build-log4j.properties"

Then call ant clean initialize and look for lines containing de.hybris.bootstrap.codegenerator.CodeGenerator and npmancillary in the logs. It should be something like this:

[ycodegenerator] 2553 [main] DEBUG de.hybris.bootstrap.codegenerator.CodeGenerator  - /hybris/bin/modules/npm-ancillary/npmancillary/gensrc/de/hybris/constants/GeneratedNpmancillaryConstants.java DOES NOT exists!
[ycodegenerator] 2566 [main] DEBUG de.hybris.bootstrap.codegenerator.CodeGenerator  - /hybris/bin/modules/npm-ancillary/npmancillary/src/de/hybris/constants/NpmancillaryConstants.java exists!
[ycodegenerator] 2567 [main] DEBUG de.hybris.bootstrap.codegenerator.CodeGenerator  - /hybris/bin/modules/npm-ancillary/npmancillary/gensrc/de/hybris/jalo/GeneratedNpmancillaryManager.java DOES NOT exists!
[ycodegenerator] 2569 [main] DEBUG de.hybris.bootstrap.codegenerator.CodeGenerator  - /hybris/bin/modules/npm-ancillary/npmancillary/src/de/hybris/jalo/NpmancillaryManager.java exists!
If it doesn't look similar then log messages should help to resolve the issue.
frnk83
Explorer

Thank you for your response adambadu.

It seems that at the end the issue was my VPN connection which was blocking the ant clean all command to download some packages. Either way I added the options to ANT_OPTS and ran ant clean with success after dropping from VPN.