pcapplication
asked on
Error when viewing crystal report
Hi,
I have some problems. I try to call crystal report viewer 10 from JSP, but I some errors occured:
exception
javax.servlet.ServletExcep tion: javax/servlet/ServletConte xt
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:253)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
root cause
java.lang.NoClassDefFoundE rror: javax/servlet/ServletConte xt
com.crystaldecisions.repor t.web.view er.Crystal ImageClean er.stop(Un known Source)
org.apache.jsp.viewReport_ jsp.jspDes troy(org.a pache.jsp. viewReport _jsp:37)
org.apache.jasper.runtime. HttpJspBas e.destroy( HttpJspBas e.java:89)
org.apache.jasper.servlet. JspServlet Wrapper.de stroy(JspS ervletWrap per.java:3 79)
org.apache.jasper.servlet. JspServlet Wrapper.ge tServlet(J spServletW rapper.jav a:134)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 08)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:295)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:245)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
FYI, I use tomcat 4.1.31
Please help me..
Thanks in advanced.
pcapplication
I have some problems. I try to call crystal report viewer 10 from JSP, but I some errors occured:
exception
javax.servlet.ServletExcep
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
java.lang.NoClassDefFoundE
com.crystaldecisions.repor
org.apache.jsp.viewReport_
org.apache.jasper.runtime.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
FYI, I use tomcat 4.1.31
Please help me..
Thanks in advanced.
pcapplication
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Make sure that you have a system variable called "CLASSPATH" as detailed here, http://www.moreservlets.com/Using-Tomcat-4.html#Set-CLASSPATH. You may also want to have a CATALINA_HOME variable also for Tomcat 4.1.x
ASKER
Hi bloodredsun,
Thx for your answer, but still have a problem
I do have set a CATALINA_HOME variable to C:\Program Files\Apache Group\Tomcat 4.1 and i do have servlet.jar in C:\Program Files\Apache Group\Tomcat 4.1\common\lib folder
should i include the servlet.jar in the classpath???
Thx a lot.
Thx for your answer, but still have a problem
I do have set a CATALINA_HOME variable to C:\Program Files\Apache Group\Tomcat 4.1 and i do have servlet.jar in C:\Program Files\Apache Group\Tomcat 4.1\common\lib folder
should i include the servlet.jar in the classpath???
Thx a lot.
>>should i include the servlet.jar in the classpath???
Yes. I always do. Actually I normally have a J2EE_HOME system variable that I add to the classpath.
>> i do have servlet.jar in C:\Program Files\Apache Group\Tomcat 4.1\common\lib folder
That means that Tomcat can see it but the webapp cannot. If CR requires something from that jar, it will not be able to see it there. As above, I suggest adding it to the classpath.
What about the Crystal Report viewer jars. Make sure you've imported them all including the ones from "C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib\ext ernal" and remember all the jars must be in the WEB-INF/lib not the WEB-INF/lib/ext.
NoClassDefFoundError is essentially the exception thrown when it can't find the jars (it would have been so much more informative if jakarta had wrapped that exception in a more informative one like RequiredJarNotFoundError!) , so that is all it is.
Yes. I always do. Actually I normally have a J2EE_HOME system variable that I add to the classpath.
>> i do have servlet.jar in C:\Program Files\Apache Group\Tomcat 4.1\common\lib folder
That means that Tomcat can see it but the webapp cannot. If CR requires something from that jar, it will not be able to see it there. As above, I suggest adding it to the classpath.
What about the Crystal Report viewer jars. Make sure you've imported them all including the ones from "C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib\ext
NoClassDefFoundError is essentially the exception thrown when it can't find the jars (it would have been so much more informative if jakarta had wrapped that exception in a more informative one like RequiredJarNotFoundError!)