You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "timm.f" <ti...@bdb-systems.de> on 2006/05/05 14:14:21 UTC

JasperExeption

Hello,

I'm getting a strange error while trying to generate a PDF from an XML-File,
that is to be generated by an JSP-File. I cannot identify what the problem
is, since there is no helpful error message:

ServletException while executing JSPEngine

org.apache.cocoon.ProcessingException: ServletException while executing
JSPEngine: org.apache.jasper.JasperException: 3 >= 1

The last part of the stacktrace reads:

at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) 
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) 
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) 
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
	at
org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(JSPEngineImpl.java:109) 
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
	at java.lang.reflect.Method.invoke(Method.java:324) 
	at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:182) 
	at $Proxy2.executeJSP(Unknown Source) 
	at
org.apache.cocoon.generation.JSPGenerator.generate(JSPGenerator.java:119) 
[....]

I cannot  find any hint about that either in newsgroups, Google or in this
group.
Can anyone give me a hint where I could start searching for the problem ?

Regards
Timm

--
View this message in context: http://www.nabble.com/JasperExeption-t1563543.html#a4246066
Sent from the Cocoon - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: JasperExeption

Posted by Simone Gianni <s....@thebug.it>.
Hi Timm,
yep, unfortunately there is already a lot of code around which instead
of rethrowing the exception, or wrapping it in a somehow cascading
exception, simply throw a new exception using the message of the
original exception. In my experience, a message "null" means a null
pointer exception happened, a message " 3 <= 1" means an
ArrayIndexOutOfBounds, a message "Index: 2, Size: 1" means a collection
index out of bound, the name of a class means either a class cast
exception or a class not found exception.

Anyway, if you are using an IDE, you can put a breakpoint on the line
where the non-cascading exception is being rethrown, and from there look
at the real exception, the one on which the code is simply calling
e.getMessage() without giving any other intresting information. Or even
modify the throw to use a cascading exception and send the patch to the
authors of Jasper :)

Simone

timm.f wrote:

>Hi Simone,
>
>thank you for your answer. You are right, that it is a problem with the
>JSP-Page. The database schema from which the JSP gets its data has been
>changed and I didn't know this. If it had been a cascading exception message
>it would have been easier to analyze.
>
>Thank you.
>Timm
>
>--
>View this message in context: http://www.nabble.com/JasperExeption-t1563543.html#a4247786
>Sent from the Cocoon - Users forum at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>
-- 
Simone Gianni

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: JasperExeption

Posted by "timm.f" <ti...@bdb-systems.de>.
Hi Simone,

thank you for your answer. You are right, that it is a problem with the
JSP-Page. The database schema from which the JSP gets its data has been
changed and I didn't know this. If it had been a cascading exception message
it would have been easier to analyze.

Thank you.
Timm

--
View this message in context: http://www.nabble.com/JasperExeption-t1563543.html#a4247786
Sent from the Cocoon - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: JasperExeption

Posted by Simone Gianni <s....@thebug.it>.
Hi Timm,
it seems like an exception is thrown inside the JSP, but the exception
is catched at a certain point and rethrown in a non cascading way (for
example, throw new JasperException(realException.getMessage()) ). Are
you sure the JSP alone works (like placing it in a simple tomcat
context)? An exception message like 3 >= 1 probably is simply a
ArrayIndexOutOfBoundsException thrown by a Vector which contains a
single element and you are trying to access the element number 3.

Hope this helps,
Simone


timm.f wrote:

>Hello,
>
>I'm getting a strange error while trying to generate a PDF from an XML-File,
>that is to be generated by an JSP-File. I cannot identify what the problem
>is, since there is no helpful error message:
>
>ServletException while executing JSPEngine
>
>org.apache.cocoon.ProcessingException: ServletException while executing
>JSPEngine: org.apache.jasper.JasperException: 3 >= 1
>
>The last part of the stacktrace reads:
>
>at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) 
>	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) 
>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) 
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
>	at
>org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(JSPEngineImpl.java:109) 
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
>	at java.lang.reflect.Method.invoke(Method.java:324) 
>	at
>org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:182) 
>	at $Proxy2.executeJSP(Unknown Source) 
>	at
>org.apache.cocoon.generation.JSPGenerator.generate(JSPGenerator.java:119) 
>[....]
>
>I cannot  find any hint about that either in newsgroups, Google or in this
>group.
>Can anyone give me a hint where I could start searching for the problem ?
>
>Regards
>Timm
>
>--
>View this message in context: http://www.nabble.com/JasperExeption-t1563543.html#a4246066
>Sent from the Cocoon - Users forum at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>
-- 
Simone Gianni

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org