Re: iBatis 6x slower, what am I overlooking?

2009-03-24 Thread Jeff P

Let me first say THANK YOU. I've been puzzling with iBatis, and while I
don't mind finding stuff out for myself, the effort you made for my question
was very kind of you and beyond what I would've expected.

I've ran your version and can confirm that ibatis and JDBC are practically
just as fast. With the 100,000 select test, the finishing time is usually 1
- 1,5 second in advantage of JDBC. Im guessing this is normal. It's an
overhead of 0.010 - 0.015ms per query. (On my dedicated SQL Server its even
below 1 second, with 100,000 selects, meaning ~0.005 ms).

Did you know by the way, that there is a big performance difference when
using a connector? Using MySQL Connector/j 5.1.17 makes iBatis run twice as
slow, while 5.1.16 gives me near identical results. 

To answer two points
 
 * Not sure why you're using such an odd query for the benchmark.
 * Not sure why you're using an empty database for the benchmark. 

My database holds track of values that can be updated by a client. Whenever
a value is updated, the last_sync column is updated with current_timestamp.
When a client connects it will run the query every 5 seconds to see if there
are updates. I won't get into too much detail, why we're not pushing updates
from the server rather than a request-reply model, but as it is, this is the
situation.

To sum it up, the client will run a 
Select count(*) from table where last_sync = (now-5seconds) and  now. 
and do stuff when the count is greater than 0

The reason why i've used a fixed date was because I am benching the exact
same query with 
Super Smack (http://jeremy.zawodny.com/mysql/super-smack/). You can edit the
select-key.smack file and replace the executed query with your own. Now
comes my problem, when I run the query i've used with JDBC and iBatis test,
Super Smack tells me it gets executed ~50,000-~80,000 times per second (!)
while, running it with JDBC/iBatis no more than 10,000 are executed per
second. The test I wrote should simulate Super smack. What super smack does
is open a connection, execute the queries in a loop and then close the
connection. I have no idea where this delay is coming from but I am
suspecting the MySQL Connector.

What comes to mind first is ofcourse, the database settings. However, since
supersmack uses the same database and table as the Java app, that makes no
sense at all. To take doubt away I've tweaked the DB, used indexes where
needed and made sure there are no slow queries. (Slow log and explain). The
tweaking gave me a boost but still Supersmack stays a factor 5-10 faster.
JDBC/Ibatis improved, but so did Supersmack.

I've checked MySQL administrator (GUI) and monitored the sql threads. It
appears that when running the java app, the threads sleep often while
stresstesting. This is not the case when running supersmack. Does the MySQL
connector use something that slows traffic down to the server? Or is it a
setting I've missed? The fact that the problem occurs with JDBC as well as
iBatis probably means it isn't iBatis related. However, I do hope this might
ring a bell.

Also, the empty table was a mistake, I should've added a few inserts. My
bad.

Again, thanks for the effort!






Clinton Begin wrote:
 
 A few things
 
   * You were sharing the connection and the statement in the JDBC
 tests.  But in the iBATIS tests you were outside of a
 session/transaction scope.  So to make it fair, you either need to
 open/close the connection and create/close the statement each time.
   * You were using Statement vs. iBATIS' PreparedStatement
   * You were too creative with the timings... you should not attempt
 to sum up a bunch of individual times when benchmarking -- the OS
 isn't that accurate.  So you should just time the entire execution of
 all of the iterations.
   * You should code your tests carefully, it will help clear up a lot
 of things that are hard to see when code is hacked out.  Use
 interfaces and a common timer class to make things clear.
   * Not sure why you're using such an odd query for the benchmark.
   * Not sure why you're using an empty database for the benchmark.
 
 There were a couple of other things unrelated to the benchmarking.
 You don't have to use individual CDATA sections for   and  in the
 SQL.  Just wrap the whole statement unless you're using Dynamic SQL,
 in which case you can block out just the conditional, or use lt; gt;
 
 That's all I can remember. :-)
 
 Here's an updated test that scopes the iBATIS calls in a
 session/transaction and both the JDBC and iBATIS versions execute
 100,000 iterations around 16 seconds on my crappy HP laptop.  :-)
 
 http://clintonbegin.com/downloads/jdbc_ibatis_benchmark_0.3.zip
 
 I think you'll find that even if there are a few places where iBATIS
 is slower, it's not slow enough to worry about.   We're talking
 milliseconds usually.
 
 Cheers,
 Clinton
 
 On Sun, Mar 22, 2009 at 8:13 PM, Jeff P killingd...@hotmail.com wrote:

 I was in the process of stresstesting my app and found out that my 

signer information does not match signer...

2009-03-24 Thread Jeremy Cowgar

Hello,

I am getting an error when trying to use lazy loading. The root cause 
seems to be this exception:


signer information does not match signer information of other classes in 
the same package


Does anyone have an idea how I can fix this problem or what is actually 
wrong? Below is the entire exception.


Thanks,

Jeremy

Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  
--- The error occurred in com/advancedpricing/model/MbrFile.xml. 
--- The error occurred while applying a result map. 
--- Check the MbrFile.MbrFileResult. 
--- Check the result mapping for the 'uploadedBy' property. 
--- Cause: net.sf.cglib.core.CodeGenerationException: 
java.lang.reflect.InvocationTargetException--null
   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
   at 
com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
   at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
   at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
   at 
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
   at 
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
   at 
com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(ResultLoader.java:70)
   at 
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:137)

   ... 41 more
Caused by: net.sf.cglib.core.CodeGenerationException: 
java.lang.reflect.InvocationTargetException--null
   at 
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)

   at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
   at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
   at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:663)
   at 
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadResult(EnhancedLazyResultLoader.java:111)
   at 
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader.loadResult(EnhancedLazyResultLoader.java:62)
   at 
com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(ResultLoader.java:51)
   at 
com.ibatis.sqlmap.engine.mapping.result.ResultMap.getNestedSelectMappingValue(ResultMap.java:510)
   at 
com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:341)
   at 
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)
   at 
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
   at 
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)

   ... 49 more
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:597)
   at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
   at 
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)

   ... 62 more
Caused by: java.lang.SecurityException: class 
com.advancedpricing.model.User$$EnhancerByCGLIB$$3dfb4502's signer 
information does not match signer information of other classes in the 
same package

   at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
   at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
   ... 67 more
Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
   at $java.util.List$$EnhancerByCGLIB$$3d64e829.size(generated)
   at 
com.advancedpricing.dragon.gui.ClaimAttachedFilesPanel$FileTableModel.getRowCount(ClaimAttachedFilesPanel.java:79)
   at com.jidesoft.grid.TableModelWrapperImpl.getRowCount(Unknown 
Source)
   at 
com.jidesoft.grid.DefaultTableModelWrapper.getRowCount(Unknown Source)
   at com.jidesoft.grid.TableModelWrapperImpl.getRowCount(Unknown 
Source)
   at 
com.jidesoft.grid.DefaultTableModelWrapper.getRowCount(Unknown Source)

   at javax.swing.JTable.getRowCount(JTable.java:2640)
   at 
javax.swing.plaf.basic.BasicTableUI.createTableSize(BasicTableUI.java:1649)
   at 

Re: signer information does not match signer...

2009-03-24 Thread Larry Meadors
Sounds like you have some sort of security policy in place, maybe?

Google gives me about 9000 pages for signer information does not
match signer information of other classes in the same package.

I'd start there. :-)

Larry

On Tue, Mar 24, 2009 at 9:47 AM, Jeremy Cowgar jer...@cowgar.com wrote:
 Hello,

 I am getting an error when trying to use lazy loading. The root cause seems
 to be this exception:

 signer information does not match signer information of other classes in the
 same package

 Does anyone have an idea how I can fix this problem or what is actually
 wrong? Below is the entire exception.

 Thanks,

 Jeremy

 Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  --- The
 error occurred in com/advancedpricing/model/MbrFile.xml. --- The error
 occurred while applying a result map. --- Check the MbrFile.MbrFileResult.
 --- Check the result mapping for the 'uploadedBy' property. --- Cause:
 net.sf.cglib.core.CodeGenerationException:
 java.lang.reflect.InvocationTargetException--null
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
       at
 com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(ResultLoader.java:70)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:137)
       ... 41 more
 Caused by: net.sf.cglib.core.CodeGenerationException:
 java.lang.reflect.InvocationTargetException--null
       at
 net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
       at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
       at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:663)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadResult(EnhancedLazyResultLoader.java:111)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader.loadResult(EnhancedLazyResultLoader.java:62)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(ResultLoader.java:51)
       at
 com.ibatis.sqlmap.engine.mapping.result.ResultMap.getNestedSelectMappingValue(ResultMap.java:510)
       at
 com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:341)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
       ... 49 more
 Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
       at
 net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
       ... 62 more
 Caused by: java.lang.SecurityException: class
 com.advancedpricing.model.User$$EnhancerByCGLIB$$3dfb4502's signer
 information does not match signer information of other classes in the same
 package
       at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
       at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
       ... 67 more
 Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
       at $java.util.List$$EnhancerByCGLIB$$3d64e829.size(generated)
       at
 com.advancedpricing.dragon.gui.ClaimAttachedFilesPanel$FileTableModel.getRowCount(ClaimAttachedFilesPanel.java:79)
       at com.jidesoft.grid.TableModelWrapperImpl.getRowCount(Unknown Source)
       at com.jidesoft.grid.DefaultTableModelWrapper.getRowCount(Unknown
 Source)
       at com.jidesoft.grid.TableModelWrapperImpl.getRowCount(Unknown Source)
       

Re: signer information does not match signer...

2009-03-24 Thread Jeremy Cowgar
It's really confusing as the this problem just started. The application 
is already deployed to many users and has been for a few months now. 
Now, when making a change to it, this starts happening. The change was 
unrelated, actually a fix in spelling of a dialog box. An SVN diff shows 
that nothing to do with model classes or mapping classes have changed. I 
was hoping that someone else has run across this problem before because 
even with the 9000 pages (which I searched for before sending an email) 
it seems to be a needle in a haystack as related to here.


Jeremy

Larry Meadors wrote:

Sounds like you have some sort of security policy in place, maybe?

Google gives me about 9000 pages for signer information does not
match signer information of other classes in the same package.

I'd start there. :-)

Larry

On Tue, Mar 24, 2009 at 9:47 AM, Jeremy Cowgar jer...@cowgar.com wrote:
  

Hello,

I am getting an error when trying to use lazy loading. The root cause seems
to be this exception:

signer information does not match signer information of other classes in the
same package

Does anyone have an idea how I can fix this problem or what is actually
wrong? Below is the entire exception.

Thanks,

Jeremy

Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  --- The
error occurred in com/advancedpricing/model/MbrFile.xml. --- The error
occurred while applying a result map. --- Check the MbrFile.MbrFileResult.
--- Check the result mapping for the 'uploadedBy' property. --- Cause:
net.sf.cglib.core.CodeGenerationException:
java.lang.reflect.InvocationTargetException--null
  at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
  at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
  at
com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
  at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
  at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
  at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
  at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
  at
com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(ResultLoader.java:70)
  at
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:137)
  ... 41 more
Caused by: net.sf.cglib.core.CodeGenerationException:
java.lang.reflect.InvocationTargetException--null
  at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
  at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
  at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:663)
  at
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadResult(EnhancedLazyResultLoader.java:111)
  at
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader.loadResult(EnhancedLazyResultLoader.java:62)
  at
com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(ResultLoader.java:51)
  at
com.ibatis.sqlmap.engine.mapping.result.ResultMap.getNestedSelectMappingValue(ResultMap.java:510)
  at
com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:341)
  at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)
  at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
  at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
  at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
  at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
  ... 49 more
Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
  at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
  ... 62 more
Caused by: java.lang.SecurityException: class
com.advancedpricing.model.User$$EnhancerByCGLIB$$3dfb4502's signer
information does not match signer information of other classes in the same
package
  at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
  at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

Re: signer information does not match signer...

2009-03-24 Thread Jeremy Cowgar
I have to sign the .jar files that I develop because they are launched 
via webstart. It seems that the classes (in the same package) that 
iBatis is creating are not signed, therefore I am getting this error.


Does anyone know how to correct this problem?

Jeremy


Jeremy Cowgar wrote:

Hello,

I am getting an error when trying to use lazy loading. The root cause 
seems to be this exception:


signer information does not match signer information of other classes 
in the same package


Does anyone have an idea how I can fix this problem or what is 
actually wrong? Below is the entire exception.


Thanks,

Jeremy

Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  --- 
The error occurred in com/advancedpricing/model/MbrFile.xml. --- The 
error occurred while applying a result map. --- Check the 
MbrFile.MbrFileResult. --- Check the result mapping for the 
'uploadedBy' property. --- Cause: 
net.sf.cglib.core.CodeGenerationException: 
java.lang.reflect.InvocationTargetException--null
   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204) 

   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139) 

   at 
com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97) 

   at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567) 

   at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541) 

   at 
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118) 

   at 
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94) 

   at 
com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(ResultLoader.java:70) 

   at 
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:137) 


   ... 41 more
Caused by: net.sf.cglib.core.CodeGenerationException: 
java.lang.reflect.InvocationTargetException--null
   at 
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237) 


   at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
   at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
   at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:663)
   at 
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadResult(EnhancedLazyResultLoader.java:111) 

   at 
com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader.loadResult(EnhancedLazyResultLoader.java:62) 

   at 
com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(ResultLoader.java:51) 

   at 
com.ibatis.sqlmap.engine.mapping.result.ResultMap.getNestedSelectMappingValue(ResultMap.java:510) 

   at 
com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:341) 

   at 
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384) 

   at 
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300) 

   at 
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189) 

   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221) 

   at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189) 


   ... 49 more
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


   at java.lang.reflect.Method.invoke(Method.java:597)
   at 
net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
   at 
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219) 


   ... 62 more
Caused by: java.lang.SecurityException: class 
com.advancedpricing.model.User$$EnhancerByCGLIB$$3dfb4502's signer 
information does not match signer information of other classes in the 
same package

   at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
   at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
   ... 67 more
Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
   at $java.util.List$$EnhancerByCGLIB$$3d64e829.size(generated)
   at 
com.advancedpricing.dragon.gui.ClaimAttachedFilesPanel$FileTableModel.getRowCount(ClaimAttachedFilesPanel.java:79) 

   at com.jidesoft.grid.TableModelWrapperImpl.getRowCount(Unknown 
Source)
   at 
com.jidesoft.grid.DefaultTableModelWrapper.getRowCount(Unknown Source)
   at 

Re: signer information does not match signer...

2009-03-24 Thread Larry Meadors
Hm, it's using cglib to do this, so I'd start looking there - sorry, I
don't mean to be obtuse, I just don't have an answer for you. :-/

The quick fix is to turn off lazy loading...

Larry


On Tue, Mar 24, 2009 at 1:59 PM, Jeremy Cowgar jer...@cowgar.com wrote:
 I have to sign the .jar files that I develop because they are launched via
 webstart. It seems that the classes (in the same package) that iBatis is
 creating are not signed, therefore I am getting this error.

 Does anyone know how to correct this problem?

 Jeremy


 Jeremy Cowgar wrote:

 Hello,

 I am getting an error when trying to use lazy loading. The root cause
 seems to be this exception:

 signer information does not match signer information of other classes in
 the same package

 Does anyone have an idea how I can fix this problem or what is actually
 wrong? Below is the entire exception.

 Thanks,

 Jeremy

 Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  --- The
 error occurred in com/advancedpricing/model/MbrFile.xml. --- The error
 occurred while applying a result map. --- Check the MbrFile.MbrFileResult.
 --- Check the result mapping for the 'uploadedBy' property. --- Cause:
 net.sf.cglib.core.CodeGenerationException:
 java.lang.reflect.InvocationTargetException--null
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
       at
 com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(ResultLoader.java:70)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:137)
       ... 41 more
 Caused by: net.sf.cglib.core.CodeGenerationException:
 java.lang.reflect.InvocationTargetException--null
       at
 net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
       at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
       at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:663)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadResult(EnhancedLazyResultLoader.java:111)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader.loadResult(EnhancedLazyResultLoader.java:62)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(ResultLoader.java:51)
       at
 com.ibatis.sqlmap.engine.mapping.result.ResultMap.getNestedSelectMappingValue(ResultMap.java:510)
       at
 com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:341)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
       ... 49 more
 Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
       at
 net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
       ... 62 more
 Caused by: java.lang.SecurityException: class
 com.advancedpricing.model.User$$EnhancerByCGLIB$$3dfb4502's signer
 information does not match signer information of other classes in the same
 package
       at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
       at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
       ... 67 more
 Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
       at $java.util.List$$EnhancerByCGLIB$$3d64e829.size(generated)
       at
 

Re: signer information does not match signer...

2009-03-24 Thread Jeff Butler
Here's a link to a Hibernate forum thread with the same problem.  I
don't work with signed jars so this is a bit beyond me, but this does
at least claim to have an answer.

http://forum.hibernate.org/viewtopic.php?t=946925start=0

Jeff Butler


On Tue, Mar 24, 2009 at 2:59 PM, Jeremy Cowgar jer...@cowgar.com wrote:
 I have to sign the .jar files that I develop because they are launched via
 webstart. It seems that the classes (in the same package) that iBatis is
 creating are not signed, therefore I am getting this error.

 Does anyone know how to correct this problem?

 Jeremy


 Jeremy Cowgar wrote:

 Hello,

 I am getting an error when trying to use lazy loading. The root cause
 seems to be this exception:

 signer information does not match signer information of other classes in
 the same package

 Does anyone have an idea how I can fix this problem or what is actually
 wrong? Below is the entire exception.

 Thanks,

 Jeremy

 Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  --- The
 error occurred in com/advancedpricing/model/MbrFile.xml. --- The error
 occurred while applying a result map. --- Check the MbrFile.MbrFileResult.
 --- Check the result mapping for the 'uploadedBy' property. --- Cause:
 net.sf.cglib.core.CodeGenerationException:
 java.lang.reflect.InvocationTargetException--null
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
       at
 com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
       at
 com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(ResultLoader.java:70)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:137)
       ... 41 more
 Caused by: net.sf.cglib.core.CodeGenerationException:
 java.lang.reflect.InvocationTargetException--null
       at
 net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
       at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
       at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:663)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadResult(EnhancedLazyResultLoader.java:111)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader.loadResult(EnhancedLazyResultLoader.java:62)
       at
 com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(ResultLoader.java:51)
       at
 com.ibatis.sqlmap.engine.mapping.result.ResultMap.getNestedSelectMappingValue(ResultMap.java:510)
       at
 com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:341)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
       at
 com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
       at
 com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
       ... 49 more
 Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
       at
 net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
       ... 62 more
 Caused by: java.lang.SecurityException: class
 com.advancedpricing.model.User$$EnhancerByCGLIB$$3dfb4502's signer
 information does not match signer information of other classes in the same
 package
       at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
       at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
       ... 67 more
 Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
       at $java.util.List$$EnhancerByCGLIB$$3d64e829.size(generated)
       at
 

Re: signer information does not match signer...

2009-03-24 Thread Jeremy Cowgar

Jeff Butler wrote:

Here's a link to a Hibernate forum thread with the same problem.  I
don't work with signed jars so this is a bit beyond me, but this does
at least claim to have an answer.

http://forum.hibernate.org/viewtopic.php?t=946925start=0
  


Jeff,

Thank you that looks like exactly what I need. I'm not at a place I can 
try it right now, but first thing in the morning I'll give it a go and 
report back so we can have the result in iBatis's mailing list archives 
as well.


Jeremy



Re: iBatis 6x slower, what am I overlooking?

2009-03-24 Thread Jeff P

Also, a detail that might be of interest is the following:

Supersmack allows the user to specify the amount of connections. When I
configure 1 user to stresstest, the queries per second are arround 50K. When
I configure 2 users to stresstest, the queries per second go to 70-80K. This
is logical, since It's a dual-core server.

However, when I start the custom stresstest, it goes to 10K queries per
second. When I start another instance (thus having the test run twice) the
queries per second stay on 10K! 

Again, this looks like some kind of database setting.. but how would that
explain that supersmack runs perfectly?
-- 
View this message in context: 
http://www.nabble.com/iBatis-6x-slower%2C-what-am-I-overlooking--tp22653299p22691110.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.



IbatorConfig.xml and properties

2009-03-24 Thread Ivan Bojer
Hi folks 2 quick questions if someone can offer resolution:

1. How do I specify properties tag in IBatis? I don't want to use
absolute paths because of the con't integration systemsit might
not be possible though...

2. Can I use system properties in ibatorConfig.xml?? (e.g.
classPathEntry location=${base}/...

Cheerios!