facebook

No Persistent Classes Found for Query

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #229821 Reply

    rmauer
    Member

    I am using MyEclipse 3.8.3, Jboss 3.2.5 and hibernate. I develop on a workstation and after testing, deploy to our Microsoft IIS webserver that is also running Jboss 3.2.5. My workstation and the webserver both have the exact same ODBC DNS configuration for connection to a SQL Server using SQL authentication. I currently have MyEclipse web applications running on the webserver that pull data from the SQL server.

    One application quit working this week – giving “No Persistent Classes Found” error. My other applications that use the same database, but different tables still work. I tried writing a simple program to list data from the table and the same thing happens. I can run the simple program from MyEclipse, but not from the webserver. I get the same messages:

    12:02:57,953 INFO [SessionFactoryImpl] building session factory
    12:03:00,156 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no
    JNDI name configured
    12:03:49,875 INFO [TomcatDeployer] deploy, ctxPath=/drug, warUrl=file:/F:/jbos
    s-3.2.5/server/default/deploy/drug.war/
    12:03:54,421 INFO [ContextConfig] Missing application web.xml, using defaults o
    nly StandardEngine[jboss.web].StandardHost[localhost].StandardContext[/drug]
    12:05:47,828 INFO [TomcatDeployer] undeploy, ctxPath=/drug, warUrl=file:/F:/jb
    oss-3.2.5/server/default/deploy/drug.war/
    12:05:47,984 INFO [TomcatDeployer] deploy, ctxPath=/drug, warUrl=file:/F:/jbos
    s-3.2.5/server/default/deploy/drug.war/
    12:05:56,140 INFO [PropertyMessageResources] Initializing, config=’org.apache.s
    truts.action.ActionResources’, returnNull=true
    12:05:56,218 INFO [PropertyMessageResources] Initializing, config=’com.visn15.s
    truts.ApplicationResources’, returnNull=true
    12:07:36,375 WARN [QueryTranslator] no persistent classes found for query class
    : select Drugs from com.visn15.hibernate.Drugs Drugs where Drugs.genericname lik
    e ‘VIAGRA%’ or Drugs.commonname like ‘VIAGRA%’ or Drugs.vaclassdescription like
    ‘VIAGRA%’ or Drugs.vaclassnumber like ‘VIAGRA%’ order by Drugs.genericname
    12:07:36,406 WARN [JDBCExceptionReporter] SQL Warning: 5701, SQLState: 01000
    12:07:36,406 WARN [JDBCExceptionReporter] [Microsoft][ODBC SQL Server Driver][S
    QL Server]Changed database context to ‘Pharmacy’.
    12:07:36,406 WARN [JDBCExceptionReporter] SQL Warning: 5703, SQLState: 01000
    12:07:36,406 WARN [JDBCExceptionReporter] [Microsoft][ODBC SQL Server Driver][S
    QL Server]Changed language setting to us_english.

    Neither the table nor the program have been updated recently. I rebooted all the servers. Checked the table properties, etc.

    At this point I am at a complete loss and am looking for any suggestions.

    Thank You

    #229825 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev, this is not ME related.

    Additionally:

    12:03:00,156 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no
    JNDI name configured

    States that your JNDI data source does not exist, so I suggest you take a look at the JBoss configuration files and see if someone tampered with them.

    #229853 Reply

    rmauer
    Member

    I checked and all my applications whether I run them from MyEclipse on my workstation or from the webserver show ‘Not binding factory to JNDI, no JNDI configured’ and these run successfully. The application I am having problems with runs fine from my workstation under MyEclipse, but gives ‘No persistent classes found for query class…’ when ran from the webserver. The application was running fine on the webserver until Monday.

    #229859 Reply

    Riyad Kalla
    Member

    The application was running fine on the webserver until Monday.

    Try and duplicate your local server setup on the server and see if you can get it working.

    #231614 Reply

    pubpub
    Member

    hi rmauer

    I have the same problem you had.

    I’m using hibernate 2.1, jBoss3.2.5 and jdk 1.4.2

    At run time, I get the following message
    ‘No persistent classes found for query class…’
    while my mapping file seems ok

    Note, my others queries are Ok and work great !

    Did you find where it comes from ?

    #233111 Reply

    dika151
    Member

    Can somebody.. anybody.. please… post a solution to this “No Persistent Classes Found for Query”.. PLEASE

    #233112 Reply

    dika151
    Member

    I don’t know whether you guys have the exact same problem as mine.. coz in my case… my hibernate configuration file (hibernate.cfg.xml) somehow doesn’t work in my project.. instead, the other hibernate configuration file from my older project is still being used by my current project.

    so.. what i did was i manually deleted the other project .war folder from this path (C:\Program Files\Java\jboss-4.0.1\server\default\deploy) and it works fine.. coz right now my project is using the right hibernate configuration file.

    #233155 Reply

    pubpub
    Member

    right !!
    It’ s working.

    #242266 Reply

    tfbattag
    Member

    I had this same problem, and I realized that after creating a new class and mapping file, I had forgotten to add the mapping entry into the hibernate.cfg.xml file. Hope this helps.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: No Persistent Classes Found for Query

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in