-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: OC4J and Hibernate experience?
PostPosted: Tue Aug 17, 2004 9:04 am 
Newbie

Joined: Fri Mar 12, 2004 10:02 am
Posts: 16
I'm trying to find out if the Oracle OC4J and Hibernate work together. We want to use a session bean facade for our Java object model. The model should be persisted by Hibernate. The transactions should be handled by the application server.
Has somebody used such a setup?
What are your experience with other application servers and this setup?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 3:29 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I've never used OC4J but I don't think there will be any problem.
It is a fairly common architecture on hibernate projects.

You may have to write a net.sf.hibernate.transaction.TransactionManager for OC4J, but is is usually not a big deal

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 10, 2004 2:58 am 
Newbie

Joined: Fri Sep 10, 2004 2:47 am
Posts: 1
Location: Austin, TX, USA
I'm having trouble getting Hibernate to work with the emulated datasource and connections provided by Oracle 9iAS v9.0.3. I've got a data-source.xml that contains this within the <data-sources> tag:

Code:
  <data-source
   name="SQLServerDB"
   class="com.evermind.sql.DriverManagerDataSource"
   location="jdbc/core/3PC-DS"
   xa-location="jdbc/xa/3PC-DS"
   ejb-location="jdbc/3PC-DS"
   connection-driver="com.inet.tds.TdsDriver"
   username="XXXXX"
   password="XXXXX"
   url="jdbc:inetdae7:3pc-db1?database=3pc"
  >
    <description>Datasource used by 3pc</description>
  </data-source>


Which works fine for querying the database. However, when I try to do something that does a 'save' of an object I always get an AbstractMethodError like so:

Code:
java.lang.AbstractMethodError: com.evermind.sql.OrionCMTConnection.prepareStatement(Ljava/lang/String;I)Ljava/sql/PreparedStatement;
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at net.sf.hibernate.util.GetGeneratedKeysHelper.prepareStatement(GetGeneratedKeysHelper.java:39)
        at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:246)
        at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)
        at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:525)
        at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:432)
        at net.sf.hibernate.impl.ScheduledIdentityInsertion.execute(ScheduledIdentityInsertion.java:29)
        at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:932)
        at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)
        at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)


I'd really like to get Hibernate working with the Oracle 9iAS data sources so that we can ask our users to create just one virtual server datasource and all our EARs/WARs simply look that up rather than having to edit some file within the classpath to point it to the right DB.

Has anyone managed to get this configuration working?[/code]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.