- Jboss4.2 - Mysql5 2007-07-16 - By ysiraj
Back
This is a repost of "4.0.5 to 4.2.0 upgrade and JBossTS"... I'm kinda desperate on getting this resolved. My issue is exactly the same as reported by helgaw.. so i've copied his/her stuff to save time... ............................................................................... Currently I am getting
java.lang.IllegalArgumentException : object is not an instance of declaring class
while creating entity beans (ejb 2). Reads, updates and deletes seem to work fine.
I have not modifed the jbossjta-properties.xml file but I have moved all my -ds .xml files from
Code:
<local-tx-datasource>
to
Code:
<xa-datasource>
I would prefer that rather than sticking with the local transactions as that is more of a long term solution.
My ds file looks like this
Code:
<xa-datasource> <jndi-name>SystemDS</jndi-name> <xa-datasource-property name="URL">jdbc:mysql://myserver/mydb</xa-datasource -property> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa -datasource-class> <user-name>myusername</user-name> mypassword <type-mapping>mySQL</type-mapping> <min-pool-size>5</min-pool-size> <max-pool-size>20</max-pool-size>
<!-- Don't allow connections to hang out idle too long, never longer than what wait_timeout is set to on the server...A few minutes is usually okay here, it depends on your application and how much spikey load it will see -->
<idle-timeout-minutes>5</idle-timeout-minutes> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction -isolation>
<!-- trying to get XA to work --> <track-connection-by-tx>true</track-connection-by-tx> <no-tx-separate-pools/>
<!-- If you're using Connector/J 3.1.8 or newer, you can use our implementation of these to increase the robustness of the connection pool. --> <exception-sorter-class-name> com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter </exception-sorter-class-name> <valid-connection-checker-class-name> com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker </valid-connection-checker-class-name> </xa-datasource>
and I am using mysql-connector 5.0.3 (also tried 5.0.6)
There is no example of a mysql -ds file using xa provided in the docs\examples \jca directories.
Here is a log of what happens:
Code:
2007-06-12 13:19:05,637 DEBUG [org.jboss.ejb.plugins.cmp.jdbc .JDBCLoadEntityCommand.MobileStyleSheet s] Executing SQL: SELECT pageid, device, instance, stylesheet FROM mobilestylesheets WHERE (id=?) 2007-06-12 13:19:05,667 DEBUG [org.jboss.ejb.plugins.cmp.jdbc .JDBCLoadEntityCommand.MobileStyleSheet s] Executing SQL: SELECT pageid, device, instance, stylesheet FROM mobilestylesheets WHERE (id=?) 2007-06-12 13:19:05,697 DEBUG [org.jboss.ejb.plugins.cmp.jdbc .JDBCLoadEntityCommand.MobilePages] Exe cuting SQL: SELECT name, type, reference, owner, url, variant, created, pagetype, faceid FROM mobile pages WHERE (id=?) 2007-06-12 13:19:05,737 DEBUG [org.jboss.ejb.plugins.cmp.jdbc .JDBCLoadEntityCommand.MobilePages] Exe cuting SQL: SELECT name, type, reference, owner, url, variant, created, pagetype, faceid FROM mobile pages WHERE (id=?) 2007-06-12 13:19:05,777 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.keygen .JDBCMySQLCreateCommand.Visit] E xecuting SQL: INSERT INTO visits (ownerfaceid, page, pagetype, visitorfaceid, visitorip, visitorsess ion, timestamp, date, userAgent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) 2007-06-12 13:19:05,927 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalExcep tion in method: public abstract net.hexia.cia.oem.track.entity.Visit net.hexia .cia.oem.track.entity. VisitHome.create(net.hexia.cia.oem.track.entity.VisitVO) throws javax.ejb .CreateException, causedBy:
java.lang.IllegalArgumentException : object is not an instance of declaring class 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 (Method.java:585) at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand  (JDBCMySQLCreateComman d.java:116) at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand  (JDBCAbstractCreateCommand .java:321) at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand  (JDBCAbstractCreateCommand.java: 151) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager  (JDBCStoreManager.java:587) at org.jboss.ejb.plugins.CMPPersistenceManager  (CMPPersistenceManager.java:237) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor  .createEntity(CachedConnectionIn terceptor.java:225) at org.jboss.ejb.EntityContainer (EntityContainer.java:625) 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 (Method.java:585) at org.jboss.invocation.Invocation (Invocation.java:359) at org.jboss.ejb.EntityContainer $ContainerInterceptor.invokeHome (EntityContainer.java:1126) at org.jboss.ejb.plugins.AbstractInterceptor (AbstractInterceptor .java:105) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor  (EntitySynchronizationIntercept or.java:203) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor  (CachedConnectionInte rceptor.java:189) at org.jboss.ejb.plugins.AbstractInterceptor (AbstractInterceptor .java:105) at org.jboss.ejb.plugins.EntityInstanceInterceptor  (EntityInstanceInterceptor.java:136) at org.jboss.ejb.plugins.EntityLockInterceptor  (EntityLockInterceptor.java:76) at org.jboss.ejb.plugins.EntityCreationInterceptor  (EntityCreationInterceptor.java:45) at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome (CallValidationInterceptor.java:56) at org.jboss.ejb.plugins.AbstractTxInterceptor  (AbstractTxInterceptor.java:125) at org.jboss.ejb.plugins.TxInterceptorCMT (TxInterceptorCMT .java:350) at org.jboss.ejb.plugins.TxInterceptorCMT (TxInterceptorCMT.java:161) at org.jboss.ejb.plugins.SecurityInterceptor (SecurityInterceptor .java:145) at org.jboss.ejb.plugins.LogInterceptor (LogInterceptor.java:132) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor  (ProxyFactoryFinderInterceptor.jav a:107) at org.jboss.ejb.EntityContainer (EntityContainer.java:521) at org.jboss.ejb.Container (Container.java:981) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory  (BaseLocalProxyFactory.java:359) at org.jboss.ejb.plugins.local.LocalHomeProxy (LocalHomeProxy.java:133) at $Proxy565.create(Unknown Source)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4064438#4064438
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4064438 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|