struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Orme <to...@genome.med.harvard.edu>
Subject Struts 2/JSON/Hibernate/c3p0/Oracle issue
Date Mon, 14 Dec 2009 20:45:28 GMT
Hello,

    I just recently switched to c3p0 and it fixed some other issues I 
was having with dbcp, but another has arisen.
    It seems to be a combination of using the c3p0 data source along 
with the JSON plugin. Here's my (slightly shortened) stacktrace:

Caused by: org.apache.struts2.json.JSONException: 
org.apache.struts2.json.JSONException: 
org.apache.struts2.json.JSONException: 
java.lang.reflect.InvocationTargetException
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:243)
at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:165)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:131)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:329)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:228)
... 91 more
Caused by: org.apache.struts2.json.JSONException: 
org.apache.struts2.json.JSONException: 
java.lang.reflect.InvocationTargetException
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:243)
at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:165)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:131)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:329)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:228)
... 95 more
Caused by: org.apache.struts2.json.JSONException: 
java.lang.reflect.InvocationTargetException
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:243)
at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:165)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:131)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:329)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:228)
... 99 more
Caused by: java.lang.reflect.InvocationTargetException
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:597)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:227)
... 103 more
Caused by: java.sql.SQLException: Unsupported feature: getCursorName
at 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.BaseResultSet.getCursorName(BaseResultSet.java:37)
at 
com.mchange.v2.c3p0.impl.NewProxyResultSet.getCursorName(NewProxyResultSet.java:545) 

... 108 more

I'm runing c3p0-0.9.1.2, struts 2.1.8.1 and its corresponding json 
plugin, Oracle 10, and Hibernate 3.3.1.GA

Heres my datasource in spring. Just using the defaults:

    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <property name="driverClass" value="${database.driver}" />
        <property name="jdbcUrl" value="${database.connectionString}" />
        <property name="user" value="${database.username}" />
        <property name="password" value="${database.password}" />
    </bean>

Should note that other pages seem to work fine and lazy load as well. 
Just this json action is giving me problems. If you need more info let 
me know.

Thanks!
-Tim

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


Mime
View raw message