-->
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: Problem with Oracle connection
PostPosted: Wed Jun 14, 2006 10:36 am 
Newbie

Joined: Wed Jun 14, 2006 10:31 am
Posts: 6
Hi all...
I've a problem connecting with a oracle 8 database...
can you write the basic connections strings to connect to database??

thanks

_________________
www.rbr-online.net


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 2:39 pm 
Newbie

Joined: Tue Jun 06, 2006 7:33 pm
Posts: 11
Actual I use Spring-hibernate to configure my data source. But without Spring I think the parameters aren't different (see above...)

Quote:
Spring Hibernate configuration

Code:

<bean id="oracleDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
      <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
      <property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:databaseName"/>
      <property name="username" value="myusername"/>
      <property name="password" value="mypassword"/>
</bean>


Quote:
Only Hibernate without a Data Source Server


Code:
      <property name="connection.url">jdbc:oracle:thin:@127.0.0.1:1521:mydataBaseName</property>
      <property name="connection.username">myusername</property>
      <property name="connection.password">mypassword</property>
      <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
      <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
   


Quote:
Data Source from Weblogic Server


Code:
<!--   
   <property name="connection.datasource">MY_DATA_SOURCE_SERVER</property>
   <property name="jndi.url">t3://127.0.0.1:7901</property>
   <property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
   <property name="connection.username">usernameServer</property>
   <property name="connection.password">passwordServer</property>
   <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
[/code]

Don't forget to add the Oracle Driver Library on the classpath, like classes12.jar


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 16, 2006 4:42 am 
Newbie

Joined: Wed Jun 14, 2006 10:31 am
Posts: 6
solved, here my code:
Code:
            myKeys["hibernate.connection.driver_class"] = "NHibernate.Driver.OracleClientDriver";
            myKeys["hibernate.connection.provider"] = "NHibernate.Connection.DriverConnectionProvider";
            myKeys["hibernate.connection.connection_string"] = "Data Source=ORCL_SERVER01;User Id=system;Password=manager;Integrated Security=no;";
            myKeys["hibernate.default_schema"] = "OUTLN";
            myKeys["hibernate.dialect"] = "NHibernate.Dialect.OracleDialect";

_________________
www.rbr-online.net


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.