Error message seems pretty self-explanatory. You are calling a method
that is not yet implemented. I see the following statement on the
PgJDBC project page http://jdbc.postgresql.org/download.html:
"JDK 1.6 - JDBC4. Support for JDBC4 methods is limited. The driver
builds, but the several of the new methods are stubbed out."
Looks like you encountered one of the ones that is stubbed out.
--
Guy Rouillier
> "JDK 1.6 - JDBC4. Support for JDBC4 methods is limited. The driver
> builds, but the several of the new methods are stubbed out."
>
> Looks like you encountered one of the ones that is stubbed out.
Thank you for the answer Guy!
For JDK1.6, postgresql8.3, struts2, mybatis3, do you know how to fix
this problem?
Would "JDBC3 Postgresql Driver, Version 9.0-801" fixed the problem?
Thank you,
--
Lu Ying
In spring-config.xml:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
I think JDBC4 does not support DBCP?
Do you suggest other spring dataSource that is support by MyBatis please?
In mybatis doc, it does not provide dataSource types/choices that users
can use.
Only specify "<bean id="sqlSessionFactory"
class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
</bean>" is not good enough.
I would like to know the adv/disadvantages of
<bean id="dataSource" class="1, 2.3...">
It is exactly, id="dataSource" caused the problem I think.
Any suggestions?
Thank you,
Lu Ying
I got "java.lang.NoClassDefFoundError:
net/sf/cglib/proxy/MethodInterceptor" Error!
. Spring3.05
. mybatis-spring-1.0.0-RC3
. Struts2
. mybatis3
Could someone help please?
Thank you,
--
Lu Ying
java.lang.NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor at
java.lang.ClassLoader.defineClass1(Native Method) at
java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at
java.lang.ClassLoader.defineClass(ClassLoader.java:616) at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2527)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1010)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1483)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at
org.apache.ibatis.executor.loader.ResultObjectProxy.createProxy(ResultObjectProxy.java:22)
at
org.apache.ibatis.executor.resultset.FastResultSetHandler.createResultObject(FastResultSetHandler.java:288)
at
org.apache.ibatis.executor.resultset.FastResultSetHandler.getRowValue(FastResultSetHandler.java:188)
at
org.apache.ibatis.executor.resultset.FastResultSetHandler.handleRowValues(FastResultSetHandler.java:145)
at
org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:121)
at
org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:98)
at
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:40)
at
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
at
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41) at
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:216)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:95)
at
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72) at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:75)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:69)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:40)
at Source) at Source) ... 69 more Caused by:
java.lang.ClassNotFoundException: net.sf.cglib.proxy.MethodInterceptor
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
... 94 more
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.1_3</version>
</dependency>
Hope this helps!
Zai jihan,
Simo
http://people.apache.org/~simonetripodi/
http://www.99soft.org/
> please make suce the cglib.jar is in the classpath, it should fix that
> issue; if you're using apache maven, add the following dependency:
>
> <dependency>
> <groupId>cglib</groupId>
> <artifactId>cglib</artifactId>
> <version>2.1_3</version>
> </dependency>
I added cglib.jar and asm.jar. It seems that fixes the problem.
Thank you!
Lu Ying
Well, the site says to use the JDBC4 driver if you are using JDK 1.6.
Does the message you identify cause your app to fail? That message
sounds like it is just informational; failure to set the query timeout
should not be a critical failure.
If this issue does stop your app from working, I'd suggest asking for
help on the PostgreSQL forums. This would be a driver issue and really
outside of domain of MyBatis.
--
Guy Rouillier
A question about <foreach> tag.
JAVA code: String[] check_array_values
xml code:
<if test="check_array_values != null and check_array_values.length>0 ">
columnX::VARCHAR IN
<foreach item="item" index="index" collection="check_array_values"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
I always got an error! Could someone tell me where I put wrong please?
. Does collection accept String[]?
. item = "item" is just a free name right?
Any grammar wrong?
Thank you,
Lu Ying
Would someone please provide some sample code that causes this error? I
do not encounter it running the mybatis_contact_manager sample.
--
Guy Rouillier
What driver are you using? I'm at 8.4-701 (according to maven).
Larry
On Tue, Dec 28, 2010 at 8:38 AM, Andrew Qiu <andrewh...@gmail.com> wrote:
There's not really much we can do with mybatis to deal with this any better.
It's a driver issue, so changing the framework because a driver throws
an exception (inappropriately, IMO) seems like a bad idea.
Larry