• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JBoss + JPA + Hibernate + MySql

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic