• 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

No Persistent classes found for Query Class

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends,

I am deploying an J2EE application which uses Hibernate as ORM on Oracle 10g Application Server (10.1.3 OC4J).

Application gets deployed successfully, however when i request for initial pages through browser, queries do not fetch any data,from the logs it is seen that SQL queries failed to fetch records from Oracle 10g database.

One of the log message is:
No Persistent classes found for Query Class

same application works fine & gives expected results on Tomcat 5.0.28

Does anybody have idea to resolve this problem?

Thanks in advance,
Shriniwas
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your hibernate configuration? It appears not to find any mapped classes.

Mark
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,

We do have .hbm.xml configuration files in one of the jars & it is placed under "OC4J_HOME\applib" folder(Global library for OC4J) & it is also present under application's \WEB-INF\lib folder.

Actually it should read these config files from jar placed under \WEB-INF\lib or any other jar for that matter from \WEB-INF\lib, whereas during deployment we faced few errors & those were resolved when we place all application specific jar files under OC4J_HOME\applib folder.

Just curious to know why it is not recognizing the jar files under \WEB-INF\lib.

Thanks,
Shriniwas
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually the .hbm.xml files are in the exact same directory as where the source code is. Not in a lib directory.

Mark
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I re-read, they might still be within the same dir as the mapped classes.

My question is before it becomes a jar file. Where are the mapped classes.

Here is an example

c:
...\myapp\src\hibernate.cfg.xml
...\myapp\src\com\mycompany\model\AMappedObject.java
...\myapp\src\com\mycompany\model\AMappedObject.hbm.xml

In the hibernate.cfg.xml would be entries pointing to each hbm.xml with
com\mycompany\model\AMappedObject.hbm.xml

Mark
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,

Thanks for a reply.
Actually i have the same dir structure.

Surprisingly, OC4J didn't read any JAR file for that matter from WEB-INF\lib. We understood this as when we do not keep a JAR file under applib folder it gives an error during deployment.

Any help in this regard is highly appreciated.

Thanks again,
Shriniwas
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic