openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: SAP MaxDB not supported?
Date Thu, 28 Oct 2010 15:08:45 GMT
Minor clarification. OpenJPA does not include any support for MaxDB,
regardless of whether you're generating tables or reading / updating data.

That doesn't mean that it won't work, but you are off the beaten path.

OpenJPA uses different DBDictionary classes for each database (these are
similar to Hibernate's Dialect classes). If you do not specify one in your
persistence.xml file OpenJPA will take it's best guess based on the url
(among other things).

My guess (and I think Rick was heading in this direction too) is that in the
non-working case OpenJPA chose the DB2Dictionary which is not compatible
with MaxDB. Take a look at the logs in your working environment and you
should see something like this :
3597  mdr-pu  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc. . . "

It probably won't be the DB2Dictionary from Rick's email. You can set this
in persistence.xml by using the
openjpa.jdbc.DBDictionary property name, with a value set to the class that
you want to use.

As a short term workaround setting the DBDictionary to whatever you have in
the working environments should work for you. For medium term, you'll
probably want to write your own DBDictionary for MaxDB (start by ext



On Thu, Oct 28, 2010 at 9:27 AM, Rick Curtis <curtisr7@gmail.com> wrote:

> Are you sure that your application configuration is the same between the
> working and non-working installation? You are using the DB2Dictionary[1],
> and we are trying to validate that your DB is a supported version(which
> it's
> not).
>
> Can you post the contents of your persistence.xml file?
>
> [1] org.apache.openjpa.jdbc.sql.DB2Dictionary
>
> Thanks,
> Rick
>
> On Thu, Oct 28, 2010 at 8:58 AM, joe <fischauto333@yahoo.de> wrote:
>
> > Hi,
> >
> > i use OpenJPA(1.2.1) with OpenEJB(3.1.2).
> > I know OpenJPA does not support automatic table creation from entities
> for
> > SAP MaxDB. So i create the tables manually before using JPA.
> > Using JPA for reading/manipulating table content works here perfectly
> even
> > for SAP MaxDB many times.
> > But yesterday i had one installation where it doesn't work.
> > When calling an EJB this installation produces the stack trace at the end
> > of this email.
> >
> > Why does the EJB call works normally but not this time?
> > For another installation, same versions of OpenJPA, OpenEJB, and SAP
> MaxDB,
> > everything works fine.
> >
> >
> > The database product "SAP DB", version "KERNEL    7.6.03   BUILD
> > 015-123-173-107" is not officially supported.
> >                at
> >
> org.apache.openjpa.jdbc.sql.DB2Dictionary.connectedConfiguration(DB2Dictionary.java:278)
> >                at
> >
> org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary(DBDictionaryFactory.java:158)
> >                at
> >
> org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary(DBDictionaryFactory.java:99)
> >                at
> >
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:562)
> >                at
> >
> org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1265)
> >                at
> >
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:505)
> >                at
> >
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:430)
> >                at
> > org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:103)
> >                at
> >
> org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)
> >                at
> > org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
> >                at
> >
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:863)
> >                at
> >
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:854)
> >                at
> >
> org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:638)
> >                at
> >
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:183)
> >                at
> >
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
> >                at
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
> >                at
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:56)
> >                at
> >
> org.apache.openejb.persistence.JtaEntityManagerRegistry.getEntityManager(JtaEntityManagerRegistry.java:105)
> >                at
> >
> org.apache.openejb.persistence.JtaEntityManager.getEntityManager(JtaEntityManager.java:61)
> >                at
> >
> org.apache.openejb.persistence.JtaEntityManager.createQuery(JtaEntityManager.java:173)
> > ...
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message