-->
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.  [ 1 post ] 
Author Message
 Post subject: invalid datasource authentication
PostPosted: Tue Jul 13, 2010 2:04 am 
Newbie

Joined: Mon Jul 05, 2010 8:11 am
Posts: 2
I am using 2 databases.
One is mysql and c3p0 datasource is created for it in hibernate.properties file. The contents of properties file are pasted below:

hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.username=root
hibernate.connection.password=ENC(7Ba39G6WIPTVKJ1wpe8nSg==)
hibernate.connection.url=jdbc:mysql://localhost:3306/xyz?autoreconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false


Another is oracle and a datasource is created for it in weblogic. Configuration for using this datasource is in separate configuration file abc.configuration.xml file. I am creating a separate session factory using this configuration file when server starts up. The file is like this.

<hibernate-configuration>
<session-factory>
<property name="connection.datasource">ABC0DS</property>
<property name="show_sql">true</property>
<property name="default_schema">SD01</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="jndi.url">t3://localhost:7001</property>
<property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
</session-factory>
</hibernate-configuration>

In the process of initializing this session factory hibernate is somehow using user name and password defined in hibernate.properties file and ofcourse the authentication fails. Session factory does not get created.

Can anyone tell me why this may be happening?


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

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.