Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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
 
grapes are vegan food pellets. Eat this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic