Error / Issue with OpenEJB 3.1.3 ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Error / Issue with OpenEJB 3.1.3 ?

Matthias Wessendorf-5
Hi,

I am seeing this error, when running OpenEJB 3.1.3 + OpenWebBeans +
OpenJPA (2.x and 1.x) in Tomcat 6.x:

org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
DataSource class name must be specified in the ConnectionDriverName
property.


the persistence.xml is like:
  <persistence-unit name="foobar" >
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
    <jta-data-source>java:openejb/Resource/My DataSource</jta-data-source>
    <non-jta-data-source>java:openejb/Resource/My
UnmanagedDataSource</non-jta-data-source>

    <class>net.wessendorf.User</class>

   <properties>
      <property name="openjpa.Log" value="DefaultLevel=TRACE" />
      <property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)" />
    </properties>
  </persistence-unit>
</persistence>


With an older version, like OpenEJB 3.1.2 I was never seeing that
error above.. and no, I never specified the
ConnectionDriverName with the above (non-)jta-data-source settings.

Am I missing some configuration, or is there an issue regarding this ?

Greetings,
Matthias



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
Reply | Threaded
Open this post in threaded view
|

Re: Error / Issue with OpenEJB 3.1.3 ?

Matthias Wessendorf-5
Btw. These data sources are inside openejb.xml

sent from my Android phone
On Oct 27, 2010 5:02 PM, "Matthias Wessendorf" <[hidden email]> wrote:

> Hi,
>
> I am seeing this error, when running OpenEJB 3.1.3 + OpenWebBeans +
> OpenJPA (2.x and 1.x) in Tomcat 6.x:
>
> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
> DataSource class name must be specified in the ConnectionDriverName
> property.
>
>
> the persistence.xml is like:
> <persistence-unit name="foobar" >
>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

> <jta-data-source>java:openejb/Resource/My DataSource</jta-data-source>
> <non-jta-data-source>java:openejb/Resource/My
> UnmanagedDataSource</non-jta-data-source>
>
> <class>net.wessendorf.User</class>
>
> <properties>
> <property name="openjpa.Log" value="DefaultLevel=TRACE" />
> <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)" />
> </properties>
> </persistence-unit>
> </persistence>
>
>
> With an older version, like OpenEJB 3.1.2 I was never seeing that
> error above.. and no, I never specified the
> ConnectionDriverName with the above (non-)jta-data-source settings.
>
> Am I missing some configuration, or is there an issue regarding this ?
>
> Greetings,
> Matthias
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
Reply | Threaded
Open this post in threaded view
|

Re: Error / Issue with OpenEJB 3.1.3 ?

dblevins
Administrator
In reply to this post by Matthias Wessendorf-5

On Oct 27, 2010, at 8:02 AM, Matthias Wessendorf wrote:

> Hi,
>
> I am seeing this error, when running OpenEJB 3.1.3 + OpenWebBeans +
> OpenJPA (2.x and 1.x) in Tomcat 6.x:
>
> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
> DataSource class name must be specified in the ConnectionDriverName
> property.
>
>
> the persistence.xml is like:
>  <persistence-unit name="foobar" >
>    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>    <jta-data-source>java:openejb/Resource/My DataSource</jta-data-source>
>    <non-jta-data-source>java:openejb/Resource/My
> UnmanagedDataSource</non-jta-data-source>
>
>    <class>net.wessendorf.User</class>
>
>   <properties>
>      <property name="openjpa.Log" value="DefaultLevel=TRACE" />
>      <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)" />
>    </properties>
>  </persistence-unit>
> </persistence>
>
>
> With an older version, like OpenEJB 3.1.2 I was never seeing that
> error above.. and no, I never specified the
> ConnectionDriverName with the above (non-)jta-data-source settings.
>
> Am I missing some configuration, or is there an issue regarding this ?

Not familiar with that error.  If you can post some log output and the stacktrace that might shed some light.


-David

Reply | Threaded
Open this post in threaded view
|

Re: Error / Issue with OpenEJB 3.1.3 ?

dblevins
Administrator

On Oct 27, 2010, at 10:34 AM, David Blevins wrote:

>
> On Oct 27, 2010, at 8:02 AM, Matthias Wessendorf wrote:
>
>> Hi,
>>
>> I am seeing this error, when running OpenEJB 3.1.3 + OpenWebBeans +
>> OpenJPA (2.x and 1.x) in Tomcat 6.x:
>>
>> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
>> DataSource class name must be specified in the ConnectionDriverName
>> property.
>>
>>
>> the persistence.xml is like:
>> <persistence-unit name="foobar" >
>>   <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>   <jta-data-source>java:openejb/Resource/My DataSource</jta-data-source>
>>   <non-jta-data-source>java:openejb/Resource/My
>> UnmanagedDataSource</non-jta-data-source>
>>
>>   <class>net.wessendorf.User</class>
>>
>>  <properties>
>>     <property name="openjpa.Log" value="DefaultLevel=TRACE" />
>>     <property name="openjpa.jdbc.SynchronizeMappings"
>> value="buildSchema(ForeignKeys=true)" />
>>   </properties>
>> </persistence-unit>
>> </persistence>
>>
>>
>> With an older version, like OpenEJB 3.1.2 I was never seeing that
>> error above.. and no, I never specified the
>> ConnectionDriverName with the above (non-)jta-data-source settings.
>>
>> Am I missing some configuration, or is there an issue regarding this ?
>
> Not familiar with that error.  If you can post some log output and the stacktrace that might shed some light.

FYI, this one is on the radar for 3.1.4.  Hopefully we can get to the bottom of it before we roll.

-David

Reply | Threaded
Open this post in threaded view
|

Re: Error / Issue with OpenEJB 3.1.3 ?

Matthias Wessendorf-5
Does that mean you noticed it as well ?

-M

On Fri, Oct 29, 2010 at 4:12 AM, David Blevins <[hidden email]> wrote:

>
> On Oct 27, 2010, at 10:34 AM, David Blevins wrote:
>
>>
>> On Oct 27, 2010, at 8:02 AM, Matthias Wessendorf wrote:
>>
>>> Hi,
>>>
>>> I am seeing this error, when running OpenEJB 3.1.3 + OpenWebBeans +
>>> OpenJPA (2.x and 1.x) in Tomcat 6.x:
>>>
>>> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
>>> DataSource class name must be specified in the ConnectionDriverName
>>> property.
>>>
>>>
>>> the persistence.xml is like:
>>> <persistence-unit name="foobar" >
>>>   <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>>   <jta-data-source>java:openejb/Resource/My DataSource</jta-data-source>
>>>   <non-jta-data-source>java:openejb/Resource/My
>>> UnmanagedDataSource</non-jta-data-source>
>>>
>>>   <class>net.wessendorf.User</class>
>>>
>>>  <properties>
>>>     <property name="openjpa.Log" value="DefaultLevel=TRACE" />
>>>     <property name="openjpa.jdbc.SynchronizeMappings"
>>> value="buildSchema(ForeignKeys=true)" />
>>>   </properties>
>>> </persistence-unit>
>>> </persistence>
>>>
>>>
>>> With an older version, like OpenEJB 3.1.2 I was never seeing that
>>> error above.. and no, I never specified the
>>> ConnectionDriverName with the above (non-)jta-data-source settings.
>>>
>>> Am I missing some configuration, or is there an issue regarding this ?
>>
>> Not familiar with that error.  If you can post some log output and the stacktrace that might shed some light.
>
> FYI, this one is on the radar for 3.1.4.  Hopefully we can get to the bottom of it before we roll.
>
> -David
>
>



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
Reply | Threaded
Open this post in threaded view
|

Re: Error / Issue with OpenEJB 3.1.3 ?

dblevins
Administrator

On Oct 28, 2010, at 11:14 PM, Matthias Wessendorf wrote:

> Does that mean you noticed it as well ?

No, more the head-scratching kind.  We don't add any connection properties to persistence units, though I have had the opposite thought that one of these days we should write code that removes them if the user mistakenly adds them -- OpenJPA will ignore the connections we give it and try to create its own, which is bad.

-David


>
> -M
>
> On Fri, Oct 29, 2010 at 4:12 AM, David Blevins <[hidden email]> wrote:
>>
>> On Oct 27, 2010, at 10:34 AM, David Blevins wrote:
>>
>>>
>>> On Oct 27, 2010, at 8:02 AM, Matthias Wessendorf wrote:
>>>
>>>> Hi,
>>>>
>>>> I am seeing this error, when running OpenEJB 3.1.3 + OpenWebBeans +
>>>> OpenJPA (2.x and 1.x) in Tomcat 6.x:
>>>>
>>>> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
>>>> DataSource class name must be specified in the ConnectionDriverName
>>>> property.
>>>>
>>>>
>>>> the persistence.xml is like:
>>>> <persistence-unit name="foobar" >
>>>>   <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>>>   <jta-data-source>java:openejb/Resource/My DataSource</jta-data-source>
>>>>   <non-jta-data-source>java:openejb/Resource/My
>>>> UnmanagedDataSource</non-jta-data-source>
>>>>
>>>>   <class>net.wessendorf.User</class>
>>>>
>>>>  <properties>
>>>>     <property name="openjpa.Log" value="DefaultLevel=TRACE" />
>>>>     <property name="openjpa.jdbc.SynchronizeMappings"
>>>> value="buildSchema(ForeignKeys=true)" />
>>>>   </properties>
>>>> </persistence-unit>
>>>> </persistence>
>>>>
>>>>
>>>> With an older version, like OpenEJB 3.1.2 I was never seeing that
>>>> error above.. and no, I never specified the
>>>> ConnectionDriverName with the above (non-)jta-data-source settings.
>>>>
>>>> Am I missing some configuration, or is there an issue regarding this ?
>>>
>>> Not familiar with that error.  If you can post some log output and the stacktrace that might shed some light.
>>
>> FYI, this one is on the radar for 3.1.4.  Hopefully we can get to the bottom of it before we roll.
>>
>> -David
>>
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Reply | Threaded
Open this post in threaded view
|

Re: Error / Issue with OpenEJB 3.1.3 ?

dblevins
Administrator

On Oct 29, 2010, at 6:38 PM, David Blevins wrote:

>
> On Oct 28, 2010, at 11:14 PM, Matthias Wessendorf wrote:
>
>> Does that mean you noticed it as well ?
>
> No, more the head-scratching kind.  We don't add any connection properties to persistence units, though I have had the opposite thought that one of these days we should write code that removes them if the user mistakenly adds them -- OpenJPA will ignore the connections we give it and try to create its own, which is bad.

Added a couple things to hopefully help flush this out.

  https://issues.apache.org/jira/browse/OPENEJB-1391
  Log final persistence unit properties on log4j.category.OpenEJB.startup DEBUG

  https://issues.apache.org/jira/browse/OPENEJB-1392
  Automatically remove 'openjpa.ConnectionDriverName' and related persistence unit properties

OpenJPA does also check for openjpa.Connection* properties in System.getProperties() so there's a chance the unwanted information is coming from there.  The items above won't check for that, but it should be easy to check for in the app itself.


-David


>> On Fri, Oct 29, 2010 at 4:12 AM, David Blevins <[hidden email]> wrote:
>>>
>>> On Oct 27, 2010, at 10:34 AM, David Blevins wrote:
>>>
>>>>
>>>> On Oct 27, 2010, at 8:02 AM, Matthias Wessendorf wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am seeing this error, when running OpenEJB 3.1.3 + OpenWebBeans +
>>>>> OpenJPA (2.x and 1.x) in Tomcat 6.x:
>>>>>
>>>>> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
>>>>> DataSource class name must be specified in the ConnectionDriverName
>>>>> property.
>>>>>
>>>>>
>>>>> the persistence.xml is like:
>>>>> <persistence-unit name="foobar" >
>>>>>  <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>>>>  <jta-data-source>java:openejb/Resource/My DataSource</jta-data-source>
>>>>>  <non-jta-data-source>java:openejb/Resource/My
>>>>> UnmanagedDataSource</non-jta-data-source>
>>>>>
>>>>>  <class>net.wessendorf.User</class>
>>>>>
>>>>> <properties>
>>>>>    <property name="openjpa.Log" value="DefaultLevel=TRACE" />
>>>>>    <property name="openjpa.jdbc.SynchronizeMappings"
>>>>> value="buildSchema(ForeignKeys=true)" />
>>>>>  </properties>
>>>>> </persistence-unit>
>>>>> </persistence>
>>>>>
>>>>>
>>>>> With an older version, like OpenEJB 3.1.2 I was never seeing that
>>>>> error above.. and no, I never specified the
>>>>> ConnectionDriverName with the above (non-)jta-data-source settings.
>>>>>
>>>>> Am I missing some configuration, or is there an issue regarding this ?
>>>>
>>>> Not familiar with that error.  If you can post some log output and the stacktrace that might shed some light.
>>>
>>> FYI, this one is on the radar for 3.1.4.  Hopefully we can get to the bottom of it before we roll.
>>>
>>> -David
>>>
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>