iBator EqualsHashCodePlugin: NullPointerExceptions in equal method

2009-03-25 Thread Benjamin Klatt
Hey all, we found an issue about the equal method. Imagine you have a data object - |Product| - |id | |name | |desc | - And generate the java classes as well as the equal methods (id = Integer, namedesc = String). The Code Product p1 = new Product();

AW: iBator EqualsHashCodePlugin: NullPointerExceptions in equal method

2009-03-25 Thread Benjamin Klatt
Hi all, sorry, i missed to post another modification on the plugin. But may be this is a question on how you expect your equals() method to work. We assume that a test like this: Product p3 = new Product(); Product p4 = new Product(); assertTrue(Empty products should be

[no subject]

2009-03-25 Thread Daniel Sánchez Gómez
Hi, I have a problem with open cursors using Ibatis in an Oracle data base. When I open a transaction with a lot of querys and before the transaction ends, an exception appears: “Too many cursors are open”. What can I do to resolve this problem? Is there any instruction to close cursors

Re:

2009-03-25 Thread Nicholoz Koka Kiknadze
Found this: http://www.nabble.com/Statement-Caching-Question-td20437084.html Hope it helps GL 2009/3/25 Daniel Sánchez Gómez dsanc...@satec.es Hi, I have a problem with open cursors using Ibatis in an Oracle data base. When I open a transaction with a lot of querys and before the

Re: ibatis can use proxool connection pool?

2009-03-25 Thread Nicholoz Koka Kiknadze
I think you can use any DataSource (including ProxoolDataSource). Just use full class name in your transactionManager's dataSource element and IMO it should work. On Mon, Mar 23, 2009 at 3:39 AM, Mike.G hyli...@gmail.com wrote: Hi, everyone, ibatis can use proxool connection pool? how?

Re: ibatis can use proxool connection pool?

2009-03-25 Thread Mike.G
Hi, thanks for you response. could you give some example configurations? thanks Mike.G 2009/3/25 Nicholoz Koka Kiknadze kikna...@gmail.com: I think you can use any DataSource (including ProxoolDataSource). Just use full class name in your transactionManager's  dataSource element and IMO it

Re: ibatis can use proxool connection pool?

2009-03-25 Thread Nicholoz Koka Kiknadze
Sorry, I have not used iBatis without spring for ages. As for Spring/iBatis I just checked replacing my datasource in applicationContext.xml with bean id=dataSource class=org.logicalcobwebs.proxool.ProxoolDataSource destroy-method=close property

Re: iBator EqualsHashCodePlugin: NullPointerExceptions in equal method

2009-03-25 Thread Jeff Butler
Nice catch - thanks! I fixed the error and added some tests to verify. All is available in SVN now and will be in the next release. Jeff Butler On Wed, Mar 25, 2009 at 6:46 AM, Benjamin Klatt benja...@bar54.de wrote: Hi all, sorry, i missed to post another modification on the plugin. But

Inserting null value in ibatis

2009-03-25 Thread Sekar, Sowmya
Hi, I am trying to insert null value for a column and it throws the following exception Cause: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 0. Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL:

Re: Inserting null value in ibatis

2009-03-25 Thread Nicholoz Koka Kiknadze
In the manual we read: The *jdbcType* element is used to specify the JDBC type of the parameter. The value must be one of the types listed in java.sql.Types (VARCHAR, INTEGER, etc.) Generally the *jdbcType* element is needed if there is a possibility that the value could be NULL, or to specify

iBatis+xStream

2009-03-25 Thread AlexElba
Hello, I am using iBatis to select data from db and after serialize it to xml using xStream. During serialization I am getting unnecessary stuff public class Office{ private String name; private Employee employee; .. getters/setters ... } public class Employee { private ListGroup groups; ..

Re: iBatis+xStream

2009-03-25 Thread AlexElba
BTW the file contains this for each group Groups class=dynamic-proxy interfaceset/interface handler class=com.ibatis.sqlmap.engine.mapping.result.loader.LazyResultLoader client delegate lazyLoadingEnabledtrue/lazyLoadingEnabled

RE: iBatis+xStream

2009-03-25 Thread Chris Lamey
Try turning off the lazy loading (it uses the cglib bytecode instrumentation): lazyLoadingEnabledfalse/lazyLoadingEnabled Cheers, topher -Original Message- From: AlexElba [mailto:ramal...@yahoo.com] Sent: Wed 3/25/2009 3:35 PM To: user-java@ibatis.apache.org Subject: Re: iBatis+xStream

Re: iBatis+xStream

2009-03-25 Thread Clinton Begin
If you don't want to turn off lazy loading, then this is more of an XStream question. iBATIS proxies are no different from any other proxy, so you'll need to deal with it at the XStream level (or unwrap it manually beforehand). Clinton On Wed, Mar 25, 2009 at 3:35 PM, AlexElba

Re: iBatis+xStream

2009-03-25 Thread Christopher Lamey
On 3/25/09 3:35 PM, AlexElba ramal...@yahoo.com wrote: The problem is this lists must be lazy. I don't want to make them not lazy Whups! Didn't see this before. If you need lazy loading, then you'll have to write custom stuff in xstream to filter out the proxies. Cheers, topher

Re: iBatis+xStream

2009-03-25 Thread Eric T. Blue
I ran into this problem a couple years ago. It had something to do with the way XStream serialized the properties (not using getters/setters, but accessing the properties directly). I personally like XStream a lot, but because of this limitation we ended up using Betwixt instead. There might be