You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Georg Filios <fi...@creative-tank.com> on 2004/06/24 21:09:15 UTC

Undeterministic Reflection Exception, Using EL, JSTL, and Torque Objects

Hi,

I do hope that I am here in the right group.
I have a unpleasent error, for which I havent found a solution on  
several days research.

Here is my Scenario:
I do have a bug i.e. an Exception which occurs ocassionally but not  
always.
Using Tomcat 5.0.24 and Servlet 2.4 I try to display a User-Object with
the <c:out tag.

The User-Object was generated with Torque, has different getters and  
setters.
The setters in my User-Object class are Torque generated. I have listed  
these setters below.
Only 3 of them have different parameters for the same Name - the  
setPrimaryKey setters,
which I cant unfortunately not change (since generated by Torque).

Sometimes, but not always, I get during the display with <c:out  
value="${User.userName}" />
a java.lang.NoClassDefFoundError Exception.

Any Ideas how to solve this and what might be the cause??

This is a bit annoying, since I I dont want to wrap all my Torque  
Classes.

Thanks,

Georg


Here is the exception:
2004-06-24 20:26:18 StandardWrapperValve[action]: Servlet.service() for  
servlet action threw exception
java.lang.NoClassDefFoundError
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav 
a:39)
	at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:314)
	at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
	at  
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluat 
orImpl.java:263)
	at  
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluat 
orImpl.java:190)
	at  
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContex 
tImpl.java:899)
	at  
org.apache.jsp.WEB_002dINF.jsp.app.security.manage.user_jsp._jspx_meth_c 
_out_0(user_jsp.java:338)





Here are the setters
setAccessCounterForSession    OUT=void   IN=int
setAccessCounter    OUT=void   IN=int
setCity    OUT=void   IN=java.lang.String
setConfirmedBool    OUT=void   IN=boolean
setConfirmed    OUT=void   IN=java.lang.String
setCountry    OUT=void   IN=java.lang.String
setCreateDate    OUT=void   IN=java.util.Date
setEmail    OUT=void   IN=java.lang.String
setFirstName    OUT=void   IN=java.lang.String
setId    OUT=void   IN=int
setLastAccessDate    OUT=void   IN=
setLastAccessDate    OUT=void   IN=java.util.Date
setLastLogin    OUT=void   IN=java.util.Date
setLastModified    OUT=void   IN=java.util.Date
setLastName    OUT=void   IN=java.lang.String
setLoggedIn    OUT=void   IN=boolean
setModified    OUT=void   IN=boolean
setName    OUT=void   IN=java.lang.String
setNew    OUT=void   IN=boolean
setPassword    OUT=void   IN=java.lang.String
setPhone    OUT=void   IN=java.lang.String
setPostCode    OUT=void   IN=java.lang.String
setPrimaryKey    OUT=void   IN=[Lorg.apache.torque.om.SimpleKey;
setPrimaryKey    OUT=void   IN=java.lang.String
setPrimaryKey    OUT=void   IN=org.apache.torque.om.ObjectKey
setStreet    OUT=void   IN=java.lang.String
setUserId    OUT=void   IN=int
setUserName    OUT=void   IN=java.lang.String


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Undeterministic Reflection Exception, Using EL, JSTL, and Torque Objects

Posted by Georg Filios <fi...@creative-tank.com>.
Hi Martin,

hmm, It was my guess from the last line of the Stacktrace (as I pasted  
it), that the root is in the CompiledJspPage:

 >	at  
org.apache.jsp.WEB_002dINF.jsp.app.security.manage.user_jsp._jspx_meth_c 
  _out_0(user_jsp.java:338)

Here is the Line 338 of user_jsp.java. As I understand this, that this  
is the cause where the User Object, which is stored
under the key "RequestUser" is evaluated.

 > _jspx_th_c_out_0.setValue((java.lang.Object)  
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
 >                                  "${RequestUser.userName}",  
java.lang.Object.class,
 >                                  (PageContext)_jspx_page_context,  
null, false));


Am 24.06.2004 um 21:29 schrieb Martin Cooper:

> Something doesn't jibe here. You are saying that the evaluation of  
> ${User.userName} is failing, but the stack trace you provide shows  
> ArraySuffix in the call stack. I can't see how that class could be  
> involved in evaluating the expression you give. Are you sure that is  
> the expression that's failing?
>
> --
> Martin Cooper
>
>
> On Thu, 24 Jun 2004, Georg Filios wrote:
>
>> Hi,
>>
>> I do hope that I am here in the right group.
>> I have a unpleasent error, for which I havent found a solution on  
>> several days research.
>>
>> Here is my Scenario:
>> I do have a bug i.e. an Exception which occurs ocassionally but not  
>> always.
>> Using Tomcat 5.0.24 and Servlet 2.4 I try to display a User-Object  
>> with
>> the <c:out tag.
>>
>> The User-Object was generated with Torque, has different getters and  
>> setters.
>> The setters in my User-Object class are Torque generated. I have  
>> listed these setters below.
>> Only 3 of them have different parameters for the same Name - the  
>> setPrimaryKey setters,
>> which I cant unfortunately not change (since generated by Torque).
>>
>> Sometimes, but not always, I get during the display with <c:out  
>> value="${User.userName}" />
>> a java.lang.NoClassDefFoundError Exception.
>>
>> Any Ideas how to solve this and what might be the cause??
>>
>> This is a bit annoying, since I I dont want to wrap all my Torque  
>> Classes.
>>
>> Thanks,
>>
>> Georg
>>
>>
>> Here is the exception:
>> 2004-06-24 20:26:18 StandardWrapperValve[action]: Servlet.service()  
>> for servlet action threw exception
>> java.lang.NoClassDefFoundError
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at  
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j 
>> ava:39)
>> 	at  
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess 
>> or Impl.java:25)
>> 	at java.lang.reflect.Method.invoke(Method.java:324)
>> 	at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:314)
>> 	at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
>> 	at  
>> org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvalu 
>> at orImpl.java:263)
>> 	at  
>> org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvalu 
>> at orImpl.java:190)
>> 	at  
>> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageCont 
>> ex tImpl.java:899)
>> 	at  
>> org.apache.jsp.WEB_002dINF.jsp.app.security.manage.user_jsp._jspx_meth 
>> _c _out_0(user_jsp.java:338)
>>
>>
>>
>>
>>
>> Here are the setters
>> setAccessCounterForSession    OUT=void   IN=int
>> setAccessCounter    OUT=void   IN=int
>> setCity    OUT=void   IN=java.lang.String
>> setConfirmedBool    OUT=void   IN=boolean
>> setConfirmed    OUT=void   IN=java.lang.String
>> setCountry    OUT=void   IN=java.lang.String
>> setCreateDate    OUT=void   IN=java.util.Date
>> setEmail    OUT=void   IN=java.lang.String
>> setFirstName    OUT=void   IN=java.lang.String
>> setId    OUT=void   IN=int
>> setLastAccessDate    OUT=void   IN=
>> setLastAccessDate    OUT=void   IN=java.util.Date
>> setLastLogin    OUT=void   IN=java.util.Date
>> setLastModified    OUT=void   IN=java.util.Date
>> setLastName    OUT=void   IN=java.lang.String
>> setLoggedIn    OUT=void   IN=boolean
>> setModified    OUT=void   IN=boolean
>> setName    OUT=void   IN=java.lang.String
>> setNew    OUT=void   IN=boolean
>> setPassword    OUT=void   IN=java.lang.String
>> setPhone    OUT=void   IN=java.lang.String
>> setPostCode    OUT=void   IN=java.lang.String
>> setPrimaryKey    OUT=void   IN=[Lorg.apache.torque.om.SimpleKey;
>> setPrimaryKey    OUT=void   IN=java.lang.String
>> setPrimaryKey    OUT=void   IN=org.apache.torque.om.ObjectKey
>> setStreet    OUT=void   IN=java.lang.String
>> setUserId    OUT=void   IN=int
>> setUserName    OUT=void   IN=java.lang.String
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
cheers,

georg

------------------------------------------------------------------------ 
-------------------------
Degerstrasse 24
40235 Düsseldorf

Tel Privat: +49 211 6182006
Tel Mobil: +49 160 94439860


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Undeterministic Reflection Exception, Using EL, JSTL, and Torque Objects

Posted by Martin Cooper <ma...@apache.org>.
Something doesn't jibe here. You are saying that the evaluation of 
${User.userName} is failing, but the stack trace you provide shows 
ArraySuffix in the call stack. I can't see how that class could be 
involved in evaluating the expression you give. Are you sure that is the 
expression that's failing?

--
Martin Cooper


On Thu, 24 Jun 2004, Georg Filios wrote:

> Hi,
>
> I do hope that I am here in the right group.
> I have a unpleasent error, for which I havent found a solution on several 
> days research.
>
> Here is my Scenario:
> I do have a bug i.e. an Exception which occurs ocassionally but not always.
> Using Tomcat 5.0.24 and Servlet 2.4 I try to display a User-Object with
> the <c:out tag.
>
> The User-Object was generated with Torque, has different getters and setters.
> The setters in my User-Object class are Torque generated. I have listed these 
> setters below.
> Only 3 of them have different parameters for the same Name - the 
> setPrimaryKey setters,
> which I cant unfortunately not change (since generated by Torque).
>
> Sometimes, but not always, I get during the display with <c:out 
> value="${User.userName}" />
> a java.lang.NoClassDefFoundError Exception.
>
> Any Ideas how to solve this and what might be the cause??
>
> This is a bit annoying, since I I dont want to wrap all my Torque Classes.
>
> Thanks,
>
> Georg
>
>
> Here is the exception:
> 2004-06-24 20:26:18 StandardWrapperValve[action]: Servlet.service() for 
> servlet action threw exception
> java.lang.NoClassDefFoundError
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
> Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:314)
> 	at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
> 	at 
> org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluat 
> orImpl.java:263)
> 	at 
> org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluat 
> orImpl.java:190)
> 	at 
> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContex 
> tImpl.java:899)
> 	at 
> org.apache.jsp.WEB_002dINF.jsp.app.security.manage.user_jsp._jspx_meth_c 
> _out_0(user_jsp.java:338)
>
>
>
>
>
> Here are the setters
> setAccessCounterForSession    OUT=void   IN=int
> setAccessCounter    OUT=void   IN=int
> setCity    OUT=void   IN=java.lang.String
> setConfirmedBool    OUT=void   IN=boolean
> setConfirmed    OUT=void   IN=java.lang.String
> setCountry    OUT=void   IN=java.lang.String
> setCreateDate    OUT=void   IN=java.util.Date
> setEmail    OUT=void   IN=java.lang.String
> setFirstName    OUT=void   IN=java.lang.String
> setId    OUT=void   IN=int
> setLastAccessDate    OUT=void   IN=
> setLastAccessDate    OUT=void   IN=java.util.Date
> setLastLogin    OUT=void   IN=java.util.Date
> setLastModified    OUT=void   IN=java.util.Date
> setLastName    OUT=void   IN=java.lang.String
> setLoggedIn    OUT=void   IN=boolean
> setModified    OUT=void   IN=boolean
> setName    OUT=void   IN=java.lang.String
> setNew    OUT=void   IN=boolean
> setPassword    OUT=void   IN=java.lang.String
> setPhone    OUT=void   IN=java.lang.String
> setPostCode    OUT=void   IN=java.lang.String
> setPrimaryKey    OUT=void   IN=[Lorg.apache.torque.om.SimpleKey;
> setPrimaryKey    OUT=void   IN=java.lang.String
> setPrimaryKey    OUT=void   IN=org.apache.torque.om.ObjectKey
> setStreet    OUT=void   IN=java.lang.String
> setUserId    OUT=void   IN=int
> setUserName    OUT=void   IN=java.lang.String
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org