Re: @IdClass annotation for id field of type byte[]

2007-01-03 Thread Kevin Sutter
Marc, Supposedly, this problem is only happening on Oracle. It's working just fine with DB2 and Derby. This is a bit long, but here's the call stack for the problem... I have also attached the java files for the ManagedEntity, Guid, and Agent classes. 1500 TRACE [main] openjpa.MetaData -

Re: svn commit: r492225 - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-jdbc/src/main/resourc

2007-01-03 Thread Abe White
I don't agree with this implementation. It doesn't leave any room for customization through MappingDefaults, it ties the ClassMapping to the XMLSchemaParser (?!), and it's totally different than our mapping of indexes, foreign keys, and primary keys, the other supported constraint types.

Re: @IdClass annotation for id field of type byte[]

2007-01-03 Thread Marc Prud'hommeaux
Can you file a JIRA report for the time being? Nothing immediately suspicious jumps out at me in the stack trace, but I am still fairly confident that this has something to do with our special blob handling in Oracle. On Jan 3, 2007, at 10:14 AM, Kevin Sutter wrote: Marc, Supposedly,

Re: BrokerImpl using thread class loader?

2007-01-03 Thread Marc Prud'hommeaux
Dain- Note that in many cases, we track the thread's context class loader, but only use it as an auxiliary loader to check when searching for classes: typically, class loading will go happen via the Configuration's getClassResolverInstance(). That isn't to say that there aren't potential

Re: Should UserTransaction Work?

2007-01-03 Thread Michael Dick
Hi Don, On 1/1/07, Craig L Russell <[EMAIL PROTECTED]> wrote: Hi Don, The short answer is yes, UserTransaction is supposed to work. On Jan 1, 2007, at 11:52 AM, Don Brady wrote: > I cannot get UserTransaction to work. > > Nothing happens when I commit. Is the symptom that the commit succeed

Re: Should UserTransaction Work?

2007-01-03 Thread Kevin Sutter
Don, One clarification... On 1/1/07, Don Brady <[EMAIL PROTECTED]> wrote: This is under WebSphere 6.1. Are you attempting to use OpenJPA with standard WebSphere 6.1 (ala the DeveloperWorks article that Roland and I wrote -- http://www-128.ibm.com/developerworks/websphere/techjournal/0612_bar

Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
Hi all, I've been fighting for some time now with my OpenJPA configuration and just discovered why. It seems that you *either* consider the persistence.xml file *or* the map passed as parameter of Persistence.createEntityManagerFactory. If you look at PersistenceProductDerivation.load(String rsrc

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
I've been fighting for some time now with my OpenJPA configuration and just discovered why. It seems that you *either* consider the persistence.xml file *or* the map passed as parameter of Persistence.createEntityManagerFactory. If you look at PersistenceProductDerivation.load(String rsrc,

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
Sorry I've jumped too quickly to conclusions. The mistake was mine. However I'm trying to initialize OpenJPA programmatically using the following code: HashMap propMap = new HashMap(); propMap.put("openjpa.ManagedRuntime", new TxMgrProvider(_txMgr)); propMap.put("openjpa.Con

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
When execute, for each of the Map key I'm passing I'm getting: <4|false|0.9.6-incubating-SNAPSHOT> org.apache.openjpa.persistence.ArgumentException: Missing getter for property "ConnectionDriverName" in type "class org.apache.openjpa.persistence.EntityManagerImpl". Because you shouldn't be pass

Re: Configuration: either / or ?

2007-01-03 Thread Marc Prud'hommeaux
Matthieu- Can you send the complete stack trace? Also, I don't think this is the cause of the problem, but why are you specifying both ConnectionDriverName and ConnectionFactory? With ConnectionFactory specified, you shouldn't need to specify the ConnectionDriverName. On Jan 3, 2007, a

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
But if I don't provide openjpa.ConnectionDriverName the call to createEntityManager fails with an exception saying that ConnectionDriverName should be provided (coming from DataSourceFactory): <4|true|0.9.6-incubating-SNAPSHOT> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or Da

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
But if I don't provide openjpa.ConnectionDriverName the call to createEntityManager fails with an exception saying that ConnectionDriverName should be provided (coming from DataSourceFactory): You need to provide it to createEntityManagerFactory. Not to createEntityManager. You shouldn't

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
Right. Sorry about that. Even though my ConnectionDriverName is still not properly picked up: ERROR - ApplicationContext.log(675) | StandardWrapper.Throwable <4|true|0.9.6-incubating-SNAPSHOT> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specifi

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
My ultimate goal is to provide directly an instance of DataSource that OpenJPA would use instead of trying to lookup or create one. It seems that it's possible by setting ConnectionFactory to the datasource instance but OpenJPA fails before that if no ConnectionDriverName is specified. Abe is rig

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
I'm trying to debug why my properties don't get properly loaded. Now my code looks like: HashMap propMap = new HashMap(); propMap.put("openjpa.jdbc.DBDictionary", " org.apache.openjpa.jdbc.sql.DerbyDictionary"); propMap.put("openjpa.ManagedRuntime", new TxMgrProvider(_txMgr))

Re: Configuration: either / or ?

2007-01-03 Thread Marc Prud'hommeaux
If you enable verbose logging on all channels (by setting the property "openjpa.Log" to "DefaultLevel=TRACE"), then you should see all the properties being outputted. Note that "openjpa.ManagedRuntime" needs to be set to a plugin string or class name, not an actual object. That might be t

[jira] Updated: (OPENJPA-95) @IdClass annotation for id field type of byte[]

2007-01-03 Thread Kevin Sutter (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kevin Sutter updated OPENJPA-95: Attachment: ManagedElement.java Guid.java Agent.java > @IdClass ann

[jira] Created: (OPENJPA-95) @IdClass annotation for id field type of byte[]

2007-01-03 Thread Kevin Sutter (JIRA)
@IdClass annotation for id field type of byte[] --- Key: OPENJPA-95 URL: https://issues.apache.org/jira/browse/OPENJPA-95 Project: OpenJPA Issue Type: Bug Components: jdbc Enviro

Re: @IdClass annotation for id field of type byte[]

2007-01-03 Thread Kevin Sutter
Marc, Just opened OPENJPA-95 for this problem. Thanks, Kevin On 1/3/07, Marc Prud'hommeaux <[EMAIL PROTECTED]> wrote: Can you file a JIRA report for the time being? Nothing immediately suspicious jumps out at me in the stack trace, but I am still fairly confident that this has something to do

[jira] Commented: (OPENJPA-95) @IdClass annotation for id field type of byte[]

2007-01-03 Thread Kevin Sutter (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462082 ] Kevin Sutter commented on OPENJPA-95: - I just attached the three files (Agent, Guid, and ManagedElement) used to

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
I'm able to reproduce the ConnectionDriverName problem. I'll have more info in a bit. ___ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affi

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
Cool! I've tried to set openjpa.Log but like all other properties it doesn't get considered by the entity manager. It's just like my whole Map gets ignored. I'm also setting the DBDictionary but it also gets ignored as I get the dictionary auto-detection message... Something else I can do to debu

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
OK, the problem is that we're only paying attention to openjpa.* property keys with String values when you bootstrap through Persistence. I have no idea why, and I'll change it momentarily. But for now, you can work around the problem for your DataSource using the "javax.persistence.nonJt

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
OK, the problem is that we're only paying attention to openjpa.* property keys with String values when you bootstrap through Persistence. I have no idea why, and I'll change it momentarily. Actually I now see why, and I might not be able to fix it before I leave work today. For anyone who

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
I'm still having the same problem (it can't find my ConnectionDriverName property). Now my code looks like: HashMap propMap = new HashMap(); propMap.put("openjpa.jdbc.DBDictionary", " org.apache.openjpa.jdbc.sql.DerbyDictionary"); propMap.put("openjpa.ManagedRuntime", TxMgrPr

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
EntityManagerFactory emf = Persistence.createEntityManagerFactory ("ode-dao"); EntityManager em = emf.createEntityManager(propMap); Once again, you should be passing your props to createEntityManagerFactory, not createEntityManager. As I said, use the no-arg version of cre

Re: Configuration: either / or ?

2007-01-03 Thread Abe White
SVN revision 492368 no long ignores non-String values for openjpa.* keys in the Map passed to Persistence.createEntityManagerFactory. ___ Notice: This email message, together with any attachments, may contain information of B

Re: Configuration: either / or ?

2007-01-03 Thread Matthieu Riou
Sorry about that, I've been persistently reading your sentence the other way around: use createEntityManager instead of createEntityManagerFactory. I've finally got it in the right order, I guess I should get my eyes checked or something. Thanks for insisting though :) Now that I got it the right