I think I remember this being an issue with XSP … it required an SDK and not
just a Java Runtime as it needs to compile stuff at runtime.
Chris
Von: Modou DIA
Datum: Mittwoch, 25. Oktober 2023 um 11:35
An: dev@cocoon.apache.org
Betreff: "Fatal Error: Unable to locate package java.lang in classpath or
bootclasspath" when upgrading to Tomcat9
Hello Cocoon community,
I am encountering an issue while migrating from Tomcat7 to Tomcat9. I am
working with Cocoon 2.1.13 and Java11.
During the deployment process I don't have any problems. However when I try to
access the application, I got a white page and this StackTrace is generated
org.apache.cocoon.components.language.LanguageException: Error compiling
userinfos_xsp:
Line 0, column 0:
Fatal Error: Unable to locate package java.lang in classpath or bootclasspath
at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:227)
at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:174)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.loadProgram(ProgramGeneratorImpl.java:410)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:290)
at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:170)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:386)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:717)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:511)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.prepareInternal(AbstractProcessingPipeline.java:525)
at
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:342)
...
In the class
org.apache.cocoon.components.language.programming.java.JavaLangugae I have
checked the method compile and this error suggests a problem with the classpath
or bootclasspath configuration. I have tried the following steps to address the
issue without success:
- Checked and verified the Java installation and the "JAVA_HOME" environment
variable. It is important to note that the installation works well with Tomcat7
and Java11
- Examined and updated the Cocoon configuration files, such as "cocoon.xconf,"
to ensure proper classpath settings. The parameter compiler is configured to
work with org.apache.cocoon.components.language.programming.java.Javac
Despite these efforts, the issue persists. I suspect there might be an
underlying compatibility issue or misconfiguration that I am overlooking.
If anyone has encountered a similar issue or has insights into resolving this
problem, I would greatly appreciate your guidance and suggestions.
Additionally, any general tips for configuring Cocoon with Apache Tomcat 9
would be highly appreciated.
Thank you in advance for your support and assistance.
Best regards,
--
+
| Modou Dia,
| AJLSM
| E-mail : m...@ajlsm.com
| Tel : +33 (0)5 57 14 25 24
+