[JBoss Getting Started Documentation] - Re: PersistenceUnit error
by murilo_fla
Hi There.
I was with this same problem, and after many hours, I found out what was wrong, at least, in my case.
In my case this error ocurred because the EJB jar file was not very fine. I am creating the jar file using the ant "jar" task, and I was inserting the META-INF subdirectory using the "zipfileset" task. Althought I was able to open the jar file and see the META-INF inside it, I got some warnings about it in the Linux command line zip command.
When I changed the "zipfileset" for the "fileset" task, the problem desapeared. See my ant tasks:
before:
after (with the conf files properly moved):
I know this case is very specific, but maybe you should check your JAR file's META-INF integrity.
Remembering that in my case it was not very clear that it had inconsistency, because graphical Zip programs could read it nicely.
Cheers
Murilo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987108#3987108
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987108
19Â years, 7Â months
[JCA/JBoss] - Re: Class Cast Exception when connecting to DataSource--JBos
by russray
Weston:
You are absolutely 100% right, but somehow I think you knew that--- :-)
The -ds.xml was incorrect. There is not such property as a URL or Port for that matter. I knew I was jumping to conclusions almost immediately as I hit the submit button.
Here the the new -ds.xml
| <datasources>
| <xa-datasource>
| <jndi-name>jdbc/pidbdev</jndi-name>
| <track-connection-by-tx/>
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-datasource-class>
| <xa-datasource-property name="ServerName">me_server</xa-datasource-property>
| <xa-datasource-property name="DatabaseName">me_db</xa-datasource-property>
| <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
| <xa-datasource-property name="User">p1</xa-datasource-property>
| <xa-datasource-property name="Password">p1</xa-datasource-property>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <metadata>
| <type-mapping>MS SQLSERVER2000</type-mapping>
| </metadata>
| <check-valid-connection-sql>SELECT * FROM invalidate</check-valid-connection-sql>
| </xa-datasource>
| </datasources>
|
I am getting into the database and things are working! Thank you for being so gracious!!!!!
I have the logging set to TRACE hoping I spot anything that would tell me I don't have the server setup properly. I am getting this WARNING. I am not sure what it means in SQL Server.
| 15:14:16,269 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=rray-wxp/1, BranchQual=, localId=1] errorCode=XAER_RMERR
| javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_commit (40000000) returns -4
| at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
|
Would you have any thoughts on this area?
Thanks so much on this.......I am so new to JBoss; I would have been here alot longer had I not been coached to *READ* the documentation throughly. :-)
Russ
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987106#3987106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987106
19Â years, 7Â months