Re: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread tbee
Marina Vatkina wrote: Do you have an orm.xml (or another mapping.xml file) that might override some information? Can it be that not all classes are on the classpath? Or can there be another persistence.xml or orm.xml on the classpath that can affect the results? As there are plenty

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread tbee
Patrick Linskey wrote: What's the OpenJPA version in question? openjpa-project-0.9.6-incubating-binary -- View this message in context: http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata-for-the-class-using-alias-tf3561516.html#a10174891 Sent from the open-jpa-dev mailing

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread Patrick Linskey
I think that there were some JIRA issues with aliases in 0.9.6. I thought that most of them had to do with orm.xml processing, but maybe some of them were more low-level than that. Could you try out the almost-final OpenJPA 0.9.7 bits instead? The candidate (currently being voted on) is at

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread tbee
Patrick Linskey wrote: Could you try out the almost-final OpenJPA 0.9.7 bits instead? The candidate (currently being voted on) is at http://people.apache.org/~mikedd/staging-repository/org/apache/openjpa/o penjpa-project/0.9.7-incubating/openjpa-project-0.9.7-incubating-binary. zip If

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread Patrick Linskey
What I'm wondering about: when running under Toplink there is an output alias defaults to . Is there something that Toplink assumes about this alias that actually should be configured and where OpenJPA has problems with? No... the alias should default to the short name of the class;

[jira] Created: (OPENJPA-228) Could not locate metadata for the class using alias

2007-04-25 Thread Tom (JIRA)
Could not locate metadata for the class using alias --- Key: OPENJPA-228 URL: https://issues.apache.org/jira/browse/OPENJPA-228 Project: OpenJPA Issue Type: Bug Affects Versions: 0.9.6,

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread tbee
Patrick Linskey wrote: I don't think that uploading to this mailing list works; the easiest thing to do is to create a JIRA issue and attach the jar / zip of the problem there. If you'd rather not create a JIRA account, you can send the code to pcl at apache dot org, and I'll attach it to

[jira] Commented: (OPENJPA-228) Could not locate metadata for the class using alias

2007-04-25 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491537 ] Patrick Linskey commented on OPENJPA-228: - I haven't run it yet, but a couple of things look suspicious:

Re: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread tbee
Marina Vatkina wrote: I don't see nl/reinders/bm/generated/... classes listed in persistence.xml. While the provider might find that a superclass is an entity, for a spec compliant application, you must list all of them. Ok... classnl.reinders.bm.Contract/class

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread Patrick Linskey
Oh, and don't worry about the lack of the DB. We can probably forward-generate a schema for Derby or somesuch that is good enough for the purposes of tracking down this problem. -Patrick -- Patrick Linskey BEA Systems, Inc. ___

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread tbee
Patrick Linskey wrote: Ok... the problem is that OpenJPA requires that you run the OpenJPA class enhancer over your classes (or run in a container environment such as an appserver or Spring, which can do class-load-time processing). The other problem is that the error message is really

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread Patrick Linskey
Could you elaborate? You should put the @IdClass annotation in the same class as the @Id fields are declared. So, in your example, in the @MappedSuperclass or @Entity. FYI, I just switched your classes back to using @MappedSuperclass -- the subtypes were specified to use single-table

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread Patrick Linskey
So, I got things working (well, to the point where the list.get(1) call failed since my db was empty). I had to do the following to your code to make things work: 1. changed back to @MappedSuperclass in generated dir 2. added all the superclasses to persistence.xml 3. commented out Zzzupdates

[jira] Closed: (OPENJPA-228) Could not locate metadata for the class using alias

2007-04-25 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey closed OPENJPA-228. --- Resolution: Fixed Persistent classes were not enhanced prior to use. Added a better error

[jira] Created: (OPENJPA-229) OpenJPA fails with MappedSuperclasses and Entities with the same short names

2007-04-25 Thread Patrick Linskey (JIRA)
OpenJPA fails with MappedSuperclasses and Entities with the same short names Key: OPENJPA-229 URL: https://issues.apache.org/jira/browse/OPENJPA-229 Project: OpenJPA

[jira] Updated: (OPENJPA-229) OpenJPA fails with MappedSuperclasses and Entities with the same short names

2007-04-25 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey updated OPENJPA-229: Component/s: kernel Fix Version/s: 0.9.8 Description: When

RE: Open JPA error-Could not locate metadata for the class using alias

2007-04-25 Thread tbee
Patrick Linskey wrote: So, I got things working This is good to hear! (And also that the @MappedSuperclass was the right way to go). I'm today not working on this project, so I'll work through the changes tomorrow first thing! -- View this message in context:

Re: Set query params without TX?

2007-04-25 Thread Dain Sundstrom
On Apr 24, 2007, at 10:35 PM, Patrick Linskey wrote: Yep -- you've gotta keep it open. If you want to support any JPA impl, you need to have an EM proxy (please please please make it a dynamic proxy that implements all the interfaces that the proxied thing implements). That code is from my

Re: Possible problem with ddl with only a jta-datasource and sequences

2007-04-25 Thread Craig L Russell
On Apr 24, 2007, at 11:38 AM, Marc Prud'hommeaux wrote: David- Does this seem like a reasonable explanation? That sounds right to me. Note that if we ever update OpenJPA to depend solely on the TransactionSynchronizationRegistry, then we won't be able to do things like suspending the

Re: Cascade question (ver 0.96)

2007-04-25 Thread Craig L Russell
I think maybe the issue is a simple usage issue. If you already have a persistent StoreType instance, and you store a reference to it in a new Store instance, then when you persist the Store, the StoreType instance is simply used to provide a foreign key in the database. And if you have

SQL ordering and foreign key constraints

2007-04-25 Thread Reece Garrett
Hello, I came accross a problem where my foreign key constraints were being violated because of the SQL insertion order during merge operations. I am aware that OpenJPA does not do any SQLre-orderingto avoid violatingforeign key constraints, however, it was trivial to make the needed

Re: Set query params without TX?

2007-04-25 Thread Dain Sundstrom
On Apr 25, 2007, at 10:22 AM, Patrick Linskey wrote: If I want to have generic code, how am I supposed to implement the createNamedQuery method? Do I leave the EM open forever? That doesn't seem right. So when am I supposed to close the EM? 1. Create an EM proxy. You've already got one, so

Re: Artifact names

2007-04-25 Thread Craig L Russell
+1 to all that. What JDO does is publish the non-maven artifacts to the dist/db directory (JDO is a db sub-project) and there is a script that allows us to use the mirrors to let folks get the binary or source download. And we publish the maven artifacts so that a user can just write a

Re: Artifact names

2007-04-25 Thread Marc Prud'hommeaux
Does anyone happen to know if there is a way to override the repository part of the distributionManagement section of the pom.xml? If we were able to do that, we could keep the individual jar artifacts deployed to the http://people.apache.org/repo/m2-snapshot-

RE: Possible problem with ddl with only a jta-datasource and sequences

2007-04-25 Thread Patrick Linskey
That's why we have two datasources for an EMF. One is the transactional datasource that gives you connections automatically enlisted in your transactional EM; the other gives you connections that are never enlisted and can be used for nontransactional queries, nontransactional sequences

Re: Possible problem with ddl with only a jta-datasource and sequences

2007-04-25 Thread Kevin Sutter
On 4/24/07, Patrick Linskey [EMAIL PROTECTED] wrote: Can you ask the websphere team to support a Callable also, so we can easily return a value or throw an exception from the task? Seems like for WAS's needs, just supporting Callable would be good enough, no? Unfortunately, I am just the

Re: Set query params without TX?

2007-04-25 Thread Dain Sundstrom
Is a query a one time use object? Meaning, I only get to call getResultList(), getSingleResult(), or executeUpdate() once and then I have to get a new instance. Also you stated: On Apr 24, 2007, at 10:35 PM, Patrick Linskey wrote: (please please please make it a dynamic proxy that

Re: Artifact names

2007-04-25 Thread Michael Dick
I've been overriding the deployment location for the staging directory. I thought I made the changes back to trunk, but I must have missed it, I just added it back in. The changes configure the deploy plugin to look for a deploy.altRepositoryvariable, if it's found we'll deploy to that location.

Re: More questions on runtime schema generation

2007-04-25 Thread David Jencks
On Apr 25, 2007, at 12:26 PM, Patrick Linskey wrote: However IIUC this dissects the system property java.class.path and only parses stuff on that. This might be reasonable for a command line tool (although I have some doubts) but it seems to me that for any other situation a scan of the

More questions on runtime schema generation

2007-04-25 Thread David Jencks
I'm working on modifications so that ddl can operate in a separate transaction on a connection from the jta ds and I would like to have a complete scan and enhancement as soon as possible when the EMF is first accessed. I have this working when the classes are listed explicitly in the

RE: More questions on runtime schema generation

2007-04-25 Thread Patrick Linskey
OpenJPA actually already has jar-scanning code. Try the following: openjpa.jdbc.SynchronizeMappings: buildSchema(files=path/to/file.jar;path/to/another-file.jar) You can also specify 'resources' or 'URLs'. These algorithms use org.apache.openjpa.lib.meta.ClassAnnotationMetaDataFilter, which

Re: ApacheCon Europe

2007-04-25 Thread robert burrell donkin
On 4/25/07, Patrick Linskey [EMAIL PROTECTED] wrote: Hey, Is anyone else going to be at ApacheCon next week? Marc Prud'hommeaux and I will both be there. cool :-) i'm there from saturday to saturday (see http://wiki.apache.org/apachecon/WhoArrivesWhen for more arrival times) if any

[jira] Updated: (OPENJPA-229) OpenJPA fails with MappedSuperclasses and Entities with the same short names

2007-04-25 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey updated OPENJPA-229: Attachment: OPENJPA-229.patch This fixes the problem by changing the enhancer to not

FW: [jira] Updated: (OPENJPA-229) OpenJPA fails with MappedSuperclasses and Entities with the same short names

2007-04-25 Thread Patrick Linskey
Any thoughts about this patch? It changes how @Embeddable and @MappedSuperclass classes are enhanced. -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain

FW: [jira] Updated: (OPENJPA-226) Change openjpa.DetachState 'fgs' setting to 'fetch-groups'

2007-04-25 Thread Patrick Linskey
Any thoughts about this patch? It changes a configuration API, making 'fgs' a deprecated option. -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain

Re: Artifact names

2007-04-25 Thread Craig L Russell
On Apr 25, 2007, at 11:25 AM, Marc Prud'hommeaux wrote: Does anyone happen to know if there is a way to override the repository part of the distributionManagement section of the pom.xml? If we were able to do that, we could keep the individual jar artifacts deployed to the

Re: Possible problem with ddl with only a jta-datasource and sequences

2007-04-25 Thread Craig L Russell
Hi Partick, On Apr 25, 2007, at 11:41 AM, Patrick Linskey wrote: That's why we have two datasources for an EMF. One is the transactional datasource that gives you connections automatically enlisted in your transactional EM; the other gives you connections that are never enlisted and can be

RE: Possible problem with ddl with only a jta-datasource and sequences

2007-04-25 Thread Patrick Linskey
If everyone has extra functionality why is it so hard to come to a common set of features? There's no intrinsic value in one app server giving access via Proprietary Interface 1 and another app server giving the same access via Proprietary Interface 2. I think that the issue at the time

Re: More questions on runtime schema generation

2007-04-25 Thread Craig L Russell
The general solution to this problem lies in a crisper definition of classloader domains in the app server. IIUC, each app server has its own policies in terms of where various components get loaded and when. I think we need to engage the server spec team on this, otherwise we will end up

RE: More questions on runtime schema generation

2007-04-25 Thread Patrick Linskey
Inside an appserver, there are parts of the PersistenceUnitInfo interface that are designed for the appserver to communicate jars to scan to the persistence provider. -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: