• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why doe I have to list classes in persistence.xml?

 
Siegfried Heintze
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a console mode JPA java program that won't run unless I list the classes in META-INFO/persistence.xml like this:


However, I have a Spring MVC Servlet that does not require the classes to be listed:


I'd prefer to not have to list my classes in my console mode program. How can I modify my console mode program to not require my classes be listed like my Spring MVC Servlet?

Thanks,
Siegfried
 
Sumit Suresh Rao
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think that would be possible

looking at the defition in schema of persistence. xml you wld get the following


ref : http://openjpa.apache.org/builds/2.2.1/apache-openjpa/docs/jpa_overview_persistence.html

may be someone else can better enlighten us
 
Siegfried Heintze
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried a simple ROO Spring MVC/JPA project (that generates persistence.xml) and it does not include the list of classes in the persistence.xml either. And that code works for both Oracle and MSSQL. It is a Spring MVC servlet, however.
Hmmm.... Could console mode vs. web apps have have anything to do with it?

On the one hand I don't think it should.
On the other hand, something in spring is probably doing it. Something that I'm calling in my servlet that I'm not doing in my console mode application. Hmmm... Both apps are pretty simple.

I wonder if I can cajole ROO into making a console mode application?

Anyone have any other ideas?
Thanks
siegfried
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic