We have a Windows 64 bit machine, where we initially set up a .NET Content Deployer and we deployed there aspx generated from CMS Tridion (DWT & Razor), and the environment is working. Now, we need to move to Java, so I did the following steps:
- on the CMS side I set up a new publication target with JSP target
- on the existing CD Windows machine, I set up on Tomcat the cd_upload application, so I was able to deploy JSP's
- I set up a web application on Eclipse where I deploy the JSP's, and I'm running it on Tomcat
So the JSP files are deploying and I can access them through the Tomcat server. The problem is for the JSP's that have component links, in that case I get the error below:
message: /all-offers.jsp (line: 50, column: 2) Unable to load tag handler class "com.tridion.web.jsp.tag.ComponentLinkHandler" for tag "tridion:ComponentLink"
description: The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /all-offers.jsp (line: 50, column: 2) Unable to load tag handler class "com.tridion.web.jsp.tag.ComponentLinkHandler" for tag "tridion:ComponentLink"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1226)
org.apache.jasper.compiler.Parser.parseElementsScriptless(Parser.java:1501)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1667)
org.apache.jasper.compiler.Parser.parseJspBody(Parser.java:1618)
org.apache.jasper.compiler.Parser.parseJspAttributeAndBody(Parser.java:1029)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1000)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1274)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1452)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
What I tried:
in WEB_INF/lib I added cd_tags.tld file
in the JSP I set on the header:
<%@taglib uri="/WEB-INF/lib/cd_tags.tld" prefix="tridion" %>
in the JSP, the generated tags look like:
<tridion:ComponentLink pageURI="tcm:10-565-64" componentURI="tcm:10-320" templateURI="tcm:0-0-0" addAnchor="false" linkText="<i class="icon-chevron-right"></i>see more details" linkAttributes=" class='uppercase'" textOnFail="true"/>
in the Java build path I included the jar files from the software distribution:
cd_ambient.jar
,cd_broker.jar
,cd_cache.jar
,cd_core.jar
,cd_datalayer.jar
,cd_dynamic.jar
,cd_linking.jar
,cd_model.jar
,cd_tcdl.jar
,cd_wai.jar
on the
cd_tags.tld
file I see the warning:The tag handler class for "ComponentLink" (com.tridion.web.jsp.tag.ComponentLinkHandler) was not found on the Java Build Path.
So it looks like that class above is not found in the CLASSPATH.
I tried with both Java 6 and Java 7 JDK's and I get the same error.
So can you give me some pointers where I could check?
java.lang.NoClassDefFoundError: Could not initialize class com.tridion.web.jsp.tag.ComponentLinkHandler
. I have Tridion 2013 and Java 7