You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Andi Abes <aa...@progress.com> on 2009/02/20 19:16:05 UTC

Oracle + Hibernate

Seems that Oracle 10g and the hibernate mapping for ODE are a bit at
odds:

 

9031 [ProcessStoreImpl-1] WARN org.hibernate.util.JDBCExceptionReporter
- SQL Error: 904, SQLState: 42000

9031 [ProcessStoreImpl-1] ERROR org.hibernate.util.JDBCExceptionReporter
- ORA-00904: "PROPERTIES0_"."PROPID": invalid identifier

 

 

Caused by: java.util.concurrent.ExecutionException:
org.hibernate.exception.SQLGrammarException: could not initialize a
collection: 

[org.apache.ode.store.hib.ProcessConfDaoImpl.properties_#{urn:bpel:BpelM
ock}BPELMock-2]

        at
java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)

 

 

This ode 1.2 with the following configuration:

ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactor
yImpl

org.hibernate.dialect.Dialect=org.hibernate.dialect.Oracle9Dialect

 

Any pointers?

 


Hibernate w/o JTA?

Posted by Andi Abes <aa...@progress.com>.
I'm trying to use ODE + Oracle in Tomcat.
It seems to be complaining about not having JTA available:

java.lang.AbstractMethodError:
org.apache.ode.daohib.HibernateTransactionManagerLookup.getTransactionId
entifier(Ljavax/transaction/Transaction;)Ljava/lang/Object;
        at
org.hibernate.context.JTASessionContext.currentSession(JTASessionContext
.java:104)
        at
org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryIm
pl.java:574)


Configuring Hibernate for JDBC transaction management doesn't sound
quite right though, since it will then use thread context to decide
session/transaction association...

Is that configuration supported for ODE/Hibernate - using JDBC based
transactions?

TIA,
A.

Re: Oracle + Hibernate

Posted by Milinda Pathirage <mi...@gmail.com>.
Also there are some issues with MS SQL Server. I have attached the correct
sql scripts(Hibernate).

Thanks,
Milinda

On Sat, Feb 21, 2009 at 3:37 AM, Rafal Rusin <ra...@gmail.com> wrote:

> I've got current version of scripts for Oracle + Hibernate for ODE1X.
> Here they are.
>
> Regards,
>
> 2009/2/20 Matthieu Riou <ma...@gmail.com>:
> > On Fri, Feb 20, 2009 at 10:48 AM, Andi Abes <aa...@progress.com> wrote:
> >
> >>
> >> Spoke too soon...
> >>
> >> 7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate -
> >> Unsuccessful: create table LARGE_DATA (ID number(19,0) not null,
> >> BIN_DATA blob(2G), INSERT_TIME time
> >> stamp, MLOCK number(10,0) not null, primary key (ID))
> >> 7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-00907:
> >> missing right parenthesis
> >>
> >>
> >> Is there an sql script to create the tables as Hibernate likes on
> >> oracle?
> >>
> >
> > There's one under dao-hibernate-db/target after a build. You only have to
> > change the blob declarations to make Oracle happy (just remove the (2G)
> part
> > IIRC). Problem is, there's no mapping type declaration that will work
> > correctly for all DBs...
> >
> > Matthieu
> >
> >
> >>
> >>
> >>
> >> > -----Original Message-----
> >> > From: Andi Abes [mailto:aabes@progress.com]
> >> > Sent: Friday, February 20, 2009 1:24 PM
> >> > To: user@ode.apache.org
> >> > Subject: RE: [LIKELY JUNK]Re: Oracle + Hibernate
> >> >
> >> > Yup. You're right.
> >> >
> >> > Adding
> >> > hibernate.hbm2ddl.auto = update
> >> >
> >> > to config resolved the issue.
> >> >
> >> > A.
> >> >
> >> > > -----Original Message-----
> >> > > From: Alex Boisvert [mailto:boisvert@intalio.com]
> >> > > Sent: Friday, February 20, 2009 1:21 PM
> >> > > To: user@ode.apache.org
> >> > > Subject: [LIKELY JUNK]Re: Oracle + Hibernate
> >> > >
> >> > > I'm guessing you used the database schema for JPA instead of the
> >> > Hibernate
> >> > > one.   They are different.
> >> > >
> >> > > alex
> >> > >
> >> > >
> >> > > On Fri, Feb 20, 2009 at 10:16 AM, Andi Abes <aa...@progress.com>
> >> > wrote:
> >> > >
> >> > > > Seems that Oracle 10g and the hibernate mapping for ODE are a bit
> >> at
> >> > > > odds:
> >> > > >
> >> > > >
> >> > > >
> >> > > > 9031 [ProcessStoreImpl-1] WARN
> >> > org.hibernate.util.JDBCExceptionReporter
> >> > > > - SQL Error: 904, SQLState: 42000
> >> > > >
> >> > > > 9031 [ProcessStoreImpl-1] ERROR
> >> > org.hibernate.util.JDBCExceptionReporter
> >> > > > - ORA-00904: "PROPERTIES0_"."PROPID": invalid identifier
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > Caused by: java.util.concurrent.ExecutionException:
> >> > > > org.hibernate.exception.SQLGrammarException: could not initialize
> >> a
> >> > > > collection:
> >> > > >
> >> > > >
> >> >
> >> [org.apache.ode.store.hib.ProcessConfDaoImpl.properties_#{urn:bpel:BpelM
> >> > > > ock}BPELMock-2]
> >> > > >
> >> > > >        at
> >> > > > java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > This ode 1.2 with the following configuration:
> >> > > >
> >> > > >
> >> >
> >> ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactor
> >> > > > yImpl
> >> > > >
> >> > > > org.hibernate.dialect.Dialect=org.hibernate.dialect.Oracle9Dialect
> >> > > >
> >> > > >
> >> > > >
> >> > > > Any pointers?
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >>
> >
>
>
>
> --
> Rafał Rusin
> www.mimuw.edu.pl/~rrusin <http://www.mimuw.edu.pl/%7Errusin>
>



-- 
http://mpathirage.com
http://wso2.org "Oxygen for Web Service Developers"
http://wsaxc.blogspot.com "Web Services With Axis2/C"

Re: Oracle + Hibernate

Posted by Rafal Rusin <ra...@gmail.com>.
I've got current version of scripts for Oracle + Hibernate for ODE1X.
Here they are.

Regards,

2009/2/20 Matthieu Riou <ma...@gmail.com>:
> On Fri, Feb 20, 2009 at 10:48 AM, Andi Abes <aa...@progress.com> wrote:
>
>>
>> Spoke too soon...
>>
>> 7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate -
>> Unsuccessful: create table LARGE_DATA (ID number(19,0) not null,
>> BIN_DATA blob(2G), INSERT_TIME time
>> stamp, MLOCK number(10,0) not null, primary key (ID))
>> 7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-00907:
>> missing right parenthesis
>>
>>
>> Is there an sql script to create the tables as Hibernate likes on
>> oracle?
>>
>
> There's one under dao-hibernate-db/target after a build. You only have to
> change the blob declarations to make Oracle happy (just remove the (2G) part
> IIRC). Problem is, there's no mapping type declaration that will work
> correctly for all DBs...
>
> Matthieu
>
>
>>
>>
>>
>> > -----Original Message-----
>> > From: Andi Abes [mailto:aabes@progress.com]
>> > Sent: Friday, February 20, 2009 1:24 PM
>> > To: user@ode.apache.org
>> > Subject: RE: [LIKELY JUNK]Re: Oracle + Hibernate
>> >
>> > Yup. You're right.
>> >
>> > Adding
>> > hibernate.hbm2ddl.auto = update
>> >
>> > to config resolved the issue.
>> >
>> > A.
>> >
>> > > -----Original Message-----
>> > > From: Alex Boisvert [mailto:boisvert@intalio.com]
>> > > Sent: Friday, February 20, 2009 1:21 PM
>> > > To: user@ode.apache.org
>> > > Subject: [LIKELY JUNK]Re: Oracle + Hibernate
>> > >
>> > > I'm guessing you used the database schema for JPA instead of the
>> > Hibernate
>> > > one.   They are different.
>> > >
>> > > alex
>> > >
>> > >
>> > > On Fri, Feb 20, 2009 at 10:16 AM, Andi Abes <aa...@progress.com>
>> > wrote:
>> > >
>> > > > Seems that Oracle 10g and the hibernate mapping for ODE are a bit
>> at
>> > > > odds:
>> > > >
>> > > >
>> > > >
>> > > > 9031 [ProcessStoreImpl-1] WARN
>> > org.hibernate.util.JDBCExceptionReporter
>> > > > - SQL Error: 904, SQLState: 42000
>> > > >
>> > > > 9031 [ProcessStoreImpl-1] ERROR
>> > org.hibernate.util.JDBCExceptionReporter
>> > > > - ORA-00904: "PROPERTIES0_"."PROPID": invalid identifier
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > Caused by: java.util.concurrent.ExecutionException:
>> > > > org.hibernate.exception.SQLGrammarException: could not initialize
>> a
>> > > > collection:
>> > > >
>> > > >
>> >
>> [org.apache.ode.store.hib.ProcessConfDaoImpl.properties_#{urn:bpel:BpelM
>> > > > ock}BPELMock-2]
>> > > >
>> > > >        at
>> > > > java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > This ode 1.2 with the following configuration:
>> > > >
>> > > >
>> >
>> ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactor
>> > > > yImpl
>> > > >
>> > > > org.hibernate.dialect.Dialect=org.hibernate.dialect.Oracle9Dialect
>> > > >
>> > > >
>> > > >
>> > > > Any pointers?
>> > > >
>> > > >
>> > > >
>> > > >
>>
>



-- 
Rafał Rusin
www.mimuw.edu.pl/~rrusin

Re: Oracle + Hibernate

Posted by Matthieu Riou <ma...@gmail.com>.
On Fri, Feb 20, 2009 at 10:48 AM, Andi Abes <aa...@progress.com> wrote:

>
> Spoke too soon...
>
> 7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate -
> Unsuccessful: create table LARGE_DATA (ID number(19,0) not null,
> BIN_DATA blob(2G), INSERT_TIME time
> stamp, MLOCK number(10,0) not null, primary key (ID))
> 7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-00907:
> missing right parenthesis
>
>
> Is there an sql script to create the tables as Hibernate likes on
> oracle?
>

There's one under dao-hibernate-db/target after a build. You only have to
change the blob declarations to make Oracle happy (just remove the (2G) part
IIRC). Problem is, there's no mapping type declaration that will work
correctly for all DBs...

Matthieu


>
>
>
> > -----Original Message-----
> > From: Andi Abes [mailto:aabes@progress.com]
> > Sent: Friday, February 20, 2009 1:24 PM
> > To: user@ode.apache.org
> > Subject: RE: [LIKELY JUNK]Re: Oracle + Hibernate
> >
> > Yup. You're right.
> >
> > Adding
> > hibernate.hbm2ddl.auto = update
> >
> > to config resolved the issue.
> >
> > A.
> >
> > > -----Original Message-----
> > > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > > Sent: Friday, February 20, 2009 1:21 PM
> > > To: user@ode.apache.org
> > > Subject: [LIKELY JUNK]Re: Oracle + Hibernate
> > >
> > > I'm guessing you used the database schema for JPA instead of the
> > Hibernate
> > > one.   They are different.
> > >
> > > alex
> > >
> > >
> > > On Fri, Feb 20, 2009 at 10:16 AM, Andi Abes <aa...@progress.com>
> > wrote:
> > >
> > > > Seems that Oracle 10g and the hibernate mapping for ODE are a bit
> at
> > > > odds:
> > > >
> > > >
> > > >
> > > > 9031 [ProcessStoreImpl-1] WARN
> > org.hibernate.util.JDBCExceptionReporter
> > > > - SQL Error: 904, SQLState: 42000
> > > >
> > > > 9031 [ProcessStoreImpl-1] ERROR
> > org.hibernate.util.JDBCExceptionReporter
> > > > - ORA-00904: "PROPERTIES0_"."PROPID": invalid identifier
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Caused by: java.util.concurrent.ExecutionException:
> > > > org.hibernate.exception.SQLGrammarException: could not initialize
> a
> > > > collection:
> > > >
> > > >
> >
> [org.apache.ode.store.hib.ProcessConfDaoImpl.properties_#{urn:bpel:BpelM
> > > > ock}BPELMock-2]
> > > >
> > > >        at
> > > > java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > This ode 1.2 with the following configuration:
> > > >
> > > >
> >
> ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactor
> > > > yImpl
> > > >
> > > > org.hibernate.dialect.Dialect=org.hibernate.dialect.Oracle9Dialect
> > > >
> > > >
> > > >
> > > > Any pointers?
> > > >
> > > >
> > > >
> > > >
>

Oracle + Hibernate

Posted by Andi Abes <aa...@progress.com>.
Spoke too soon...

7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate -
Unsuccessful: create table LARGE_DATA (ID number(19,0) not null,
BIN_DATA blob(2G), INSERT_TIME time
stamp, MLOCK number(10,0) not null, primary key (ID))
7141 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-00907:
missing right parenthesis


Is there an sql script to create the tables as Hibernate likes on
oracle?



> -----Original Message-----
> From: Andi Abes [mailto:aabes@progress.com]
> Sent: Friday, February 20, 2009 1:24 PM
> To: user@ode.apache.org
> Subject: RE: [LIKELY JUNK]Re: Oracle + Hibernate
> 
> Yup. You're right.
> 
> Adding
> hibernate.hbm2ddl.auto = update
> 
> to config resolved the issue.
> 
> A.
> 
> > -----Original Message-----
> > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > Sent: Friday, February 20, 2009 1:21 PM
> > To: user@ode.apache.org
> > Subject: [LIKELY JUNK]Re: Oracle + Hibernate
> >
> > I'm guessing you used the database schema for JPA instead of the
> Hibernate
> > one.   They are different.
> >
> > alex
> >
> >
> > On Fri, Feb 20, 2009 at 10:16 AM, Andi Abes <aa...@progress.com>
> wrote:
> >
> > > Seems that Oracle 10g and the hibernate mapping for ODE are a bit
at
> > > odds:
> > >
> > >
> > >
> > > 9031 [ProcessStoreImpl-1] WARN
> org.hibernate.util.JDBCExceptionReporter
> > > - SQL Error: 904, SQLState: 42000
> > >
> > > 9031 [ProcessStoreImpl-1] ERROR
> org.hibernate.util.JDBCExceptionReporter
> > > - ORA-00904: "PROPERTIES0_"."PROPID": invalid identifier
> > >
> > >
> > >
> > >
> > >
> > > Caused by: java.util.concurrent.ExecutionException:
> > > org.hibernate.exception.SQLGrammarException: could not initialize
a
> > > collection:
> > >
> > >
>
[org.apache.ode.store.hib.ProcessConfDaoImpl.properties_#{urn:bpel:BpelM
> > > ock}BPELMock-2]
> > >
> > >        at
> > > java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
> > >
> > >
> > >
> > >
> > >
> > > This ode 1.2 with the following configuration:
> > >
> > >
>
ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactor
> > > yImpl
> > >
> > > org.hibernate.dialect.Dialect=org.hibernate.dialect.Oracle9Dialect
> > >
> > >
> > >
> > > Any pointers?
> > >
> > >
> > >
> > >

RE: [LIKELY JUNK]Re: Oracle + Hibernate

Posted by Andi Abes <aa...@progress.com>.
Yup. You're right.

Adding 
hibernate.hbm2ddl.auto = update

to config resolved the issue.

A.

> -----Original Message-----
> From: Alex Boisvert [mailto:boisvert@intalio.com]
> Sent: Friday, February 20, 2009 1:21 PM
> To: user@ode.apache.org
> Subject: [LIKELY JUNK]Re: Oracle + Hibernate
> 
> I'm guessing you used the database schema for JPA instead of the
Hibernate
> one.   They are different.
> 
> alex
> 
> 
> On Fri, Feb 20, 2009 at 10:16 AM, Andi Abes <aa...@progress.com>
wrote:
> 
> > Seems that Oracle 10g and the hibernate mapping for ODE are a bit at
> > odds:
> >
> >
> >
> > 9031 [ProcessStoreImpl-1] WARN
org.hibernate.util.JDBCExceptionReporter
> > - SQL Error: 904, SQLState: 42000
> >
> > 9031 [ProcessStoreImpl-1] ERROR
org.hibernate.util.JDBCExceptionReporter
> > - ORA-00904: "PROPERTIES0_"."PROPID": invalid identifier
> >
> >
> >
> >
> >
> > Caused by: java.util.concurrent.ExecutionException:
> > org.hibernate.exception.SQLGrammarException: could not initialize a
> > collection:
> >
> >
[org.apache.ode.store.hib.ProcessConfDaoImpl.properties_#{urn:bpel:BpelM
> > ock}BPELMock-2]
> >
> >        at
> > java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
> >
> >
> >
> >
> >
> > This ode 1.2 with the following configuration:
> >
> >
ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactor
> > yImpl
> >
> > org.hibernate.dialect.Dialect=org.hibernate.dialect.Oracle9Dialect
> >
> >
> >
> > Any pointers?
> >
> >
> >
> >

Re: Oracle + Hibernate

Posted by Alex Boisvert <bo...@intalio.com>.
I'm guessing you used the database schema for JPA instead of the Hibernate
one.   They are different.

alex


On Fri, Feb 20, 2009 at 10:16 AM, Andi Abes <aa...@progress.com> wrote:

> Seems that Oracle 10g and the hibernate mapping for ODE are a bit at
> odds:
>
>
>
> 9031 [ProcessStoreImpl-1] WARN org.hibernate.util.JDBCExceptionReporter
> - SQL Error: 904, SQLState: 42000
>
> 9031 [ProcessStoreImpl-1] ERROR org.hibernate.util.JDBCExceptionReporter
> - ORA-00904: "PROPERTIES0_"."PROPID": invalid identifier
>
>
>
>
>
> Caused by: java.util.concurrent.ExecutionException:
> org.hibernate.exception.SQLGrammarException: could not initialize a
> collection:
>
> [org.apache.ode.store.hib.ProcessConfDaoImpl.properties_#{urn:bpel:BpelM
> ock}BPELMock-2]
>
>        at
> java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
>
>
>
>
>
> This ode 1.2 with the following configuration:
>
> ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactor
> yImpl
>
> org.hibernate.dialect.Dialect=org.hibernate.dialect.Oracle9Dialect
>
>
>
> Any pointers?
>
>
>
>