This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss + JPA + Hibernate + MySql

 
Iori Yagami Oroche
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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:

 
Iori Yagami Oroche
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic