| 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
Saloon Keeper
Joined: Jul 20, 2005
Posts: 6720
|
|
<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
|
 |
 |
|
|
subject: JBoss + JPA + Hibernate + MySql
|
|
|