Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- Jboss4.2 - Mysql5

- 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 Source code of 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 Source code of 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 Source code of java.lang.reflect.Method(Method.java:585)
  at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand Source code of org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand
(JDBCMySQLCreateComman
d.java:116)
  at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand Source code of org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
(JDBCAbstractCreateCommand
.java:321)
  at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand Source code of org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
(JDBCAbstractCreateCommand.java:
151)
  at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager Source code of org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
(JDBCStoreManager.java:587)
  at org.jboss.ejb.plugins.CMPPersistenceManager Source code of org.jboss.ejb.plugins.CMPPersistenceManager
(CMPPersistenceManager.java:237)
  at org.jboss.resource.connectionmanager.CachedConnectionInterceptor Source code of org.jboss.resource.connectionmanager.CachedConnectionInterceptor
.createEntity(CachedConnectionIn
terceptor.java:225)
  at org.jboss.ejb.EntityContainer Source code of 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 Source code of java.lang.reflect.Method(Method.java:585)
  at org.jboss.invocation.Invocation Source code of org.jboss.invocation.Invocation(Invocation.java:359)
  at org.jboss.ejb.EntityContainer Source code of org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome
(EntityContainer.java:1126)
  at org.jboss.ejb.plugins.AbstractInterceptor Source code of org.jboss.ejb.plugins.AbstractInterceptor(AbstractInterceptor
.java:105)
  at org.jboss.ejb.plugins.EntitySynchronizationInterceptor Source code of org.jboss.ejb.plugins.EntitySynchronizationInterceptor
(EntitySynchronizationIntercept
or.java:203)
  at org.jboss.resource.connectionmanager.CachedConnectionInterceptor Source code of org.jboss.resource.connectionmanager.CachedConnectionInterceptor
(CachedConnectionInte
rceptor.java:189)
  at org.jboss.ejb.plugins.AbstractInterceptor Source code of org.jboss.ejb.plugins.AbstractInterceptor(AbstractInterceptor
.java:105)
  at org.jboss.ejb.plugins.EntityInstanceInterceptor Source code of org.jboss.ejb.plugins.EntityInstanceInterceptor
(EntityInstanceInterceptor.java:136)
  at org.jboss.ejb.plugins.EntityLockInterceptor Source code of org.jboss.ejb.plugins.EntityLockInterceptor
(EntityLockInterceptor.java:76)
  at org.jboss.ejb.plugins.EntityCreationInterceptor Source code of org.jboss.ejb.plugins.EntityCreationInterceptor
(EntityCreationInterceptor.java:45)
  at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome
(CallValidationInterceptor.java:56)
  at org.jboss.ejb.plugins.AbstractTxInterceptor Source code of org.jboss.ejb.plugins.AbstractTxInterceptor
(AbstractTxInterceptor.java:125)
  at org.jboss.ejb.plugins.TxInterceptorCMT Source code of org.jboss.ejb.plugins.TxInterceptorCMT(TxInterceptorCMT
.java:350)
  at org.jboss.ejb.plugins.TxInterceptorCMT Source code of org.jboss.ejb.plugins.TxInterceptorCMT(TxInterceptorCMT.java:161)
  at org.jboss.ejb.plugins.SecurityInterceptor Source code of org.jboss.ejb.plugins.SecurityInterceptor(SecurityInterceptor
.java:145)
  at org.jboss.ejb.plugins.LogInterceptor Source code of org.jboss.ejb.plugins.LogInterceptor(LogInterceptor.java:132)
  at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor Source code of org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
(ProxyFactoryFinderInterceptor.jav
a:107)
  at org.jboss.ejb.EntityContainer Source code of org.jboss.ejb.EntityContainer(EntityContainer.java:521)
  at org.jboss.ejb.Container Source code of org.jboss.ejb.Container(Container.java:981)
  at org.jboss.ejb.plugins.local.BaseLocalProxyFactory Source code of org.jboss.ejb.plugins.local.BaseLocalProxyFactory
(BaseLocalProxyFactory.java:359)
  at org.jboss.ejb.plugins.local.LocalHomeProxy Source code of 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

©2008 junlu.com - Jax Systems, LLC, U.S.A.