persistence@glassfish.java.net

RE: How to display Toplink's generated query?

From: gcsaba2 <gcsaba2_at_freemail.hu>
Date: Fri, 7 Mar 2008 16:12:59 -0800 (PST)

Gordon Yorke-2 wrote:
>
> TopLink can work without a persistence.xml file but if a persistence.xml
> file exists then the application is probably attempting to use it. Does
> your application successfully get a EMF for PU "ipost" ? Is there a
> datasource "blabla"?
Yes there is a datasource which is specified in persistence.xml. I'm not
sure what it means to "get an EMF for a PU" :)


The persistence.xml file should actually be in a META-INF directory at the
root of the deployment packaging. It will not be found from a directory
called "desc".
The file was not in META-INF, so then I manually moved it there and
redeployed the application, but there were no results. I checked if maybe
it's writing to some file... and according to log4j.properties, it first
attempts to write to console, and if it fails it writes to a file... I was
getting an exception that the log file cannot be written, so I enabled
permission to the log file... now there is no more error message, but the
log files aren't created. Probably because the log messages go out to the
console.


Are you sure the application is successfully deploying? Is it using JPA or
native TopLink APIs. Is there a sessions.xml file or a TopLink project
class that is being used?
There is no sessions.xml file, at least searching all the project's
directories and subdirectories doesn't return any results. As far as I know
the application is using TopLink through JPA... built into OC4J... I'm
really not sure what's going on, and the guy that knew quit 5 months ago so
there's no one to ask :)
But still, like I said, the persistence.xml was placed into the EAR file, I
deployed it, the EAR got unpacked and now persistence.xml can be found in
oc4j's subdirectory... but there are no results, I still can't see any
queries.

I can post the entire oc4j startup log if you want, maybe it'll help :)


Csaba
-- 
View this message in context: http://www.nabble.com/How-to-display-Toplink%27s-generated-query--tp15892878p15909237.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.