aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss + JPA + Hibernate + MySql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss + JPA + Hibernate + MySql" Watch "JBoss + JPA + Hibernate + MySql" New topic
Author

JBoss + JPA + Hibernate + MySql

Iori Yagami Oroche
Greenhorn

Joined: Nov 13, 2011
Posts: 2
Hi, I'm trying to deploy a JBoss AS 5.0 web application but I think I have some problems with using JPA persistence.
Here's my persistence.xml file :



I put a "mysql-ds.xml" file in the deploy folder as a datasource :



and finally, a MySql connector in the "/JBoss_Dest/server/default/lib" folder.

I got this error :



any help? I think it's a quite simple
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10213
    
166

<jta-data-source>MysqlDS</jta-data-source>


I see 2 issues in that value in persistence.xml:

1) MysqlDS should be MySqlDS (because that's what you have set in the -ds.xml). It is case sensitive.
2) By default the datasource is bound to java: namespace, so your jta-data-source element should be:



[My Blog] [JavaRanch Journal]
Iori Yagami Oroche
Greenhorn

Joined: Nov 13, 2011
Posts: 2
thank you Jaikiran Pai, in fact, I should use a <non-jta-data-source> too.
If you have any document about how the namespaces that could be used and in which cases... it would be helpful, just in case..
Nick Carag
Greenhorn

Joined: Dec 08, 2010
Posts: 13
I'm sorry for using your post, but I have your same configuration (even if I'm using Spring 3.0.5) and I didn't succeed to make it work with jboss 5/6. I have resolved the datasource's problem but now it's like there are two autodetections of the annotated entities classes. In the first the entities are found and bounded, in the second not so any queries failed for entity "not mapped". Do you have a similar problem?

Sorry again and thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss + JPA + Hibernate + MySql