Ashish Sathaye

Greenhorn
+ Follow
since Jul 05, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ashish Sathaye

Hello,
Not sure if this is right path of posting problem we are facing in jackrabbit repository movement.

We are moving our application that uses jackrabbit repository from one server to another. The database and schema for jackrabbit remains the same.

when we move application and start the server we start gettings errors like below:

[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR org.apache.jackrabbit.core.fs.db.OracleFileSystem - failed to open output stream to file: /meta/rep.properties
java.io.IOException: No such file or directory
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at org.apache.jackrabbit.util.TransientFileFactory.createTransientFile(TransientFileFactoryjava:122)
at org.apache.jackrabbit.core.fs.db.OracleFileSystem.getOutputStream(OracleFileSystem.java:360)
at org.apache.jackrabbit.core.fs.BasedFileSystem.getOutputStream(BasedFileSystem.java:135)
at org.apache.jackrabbit.core.fs.FileSystemResource.getOutputStream(FileSystemResource.java174)
at org.apache.jackrabbit.core.RepositoryImpl.storeRepProps(RepositoryImpl.java:1289)
at org.apache.jackrabbit.core.RepositoryImpl.loadRepProps(RepositoryImpl.java:1269)
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:627)
at org.apache.jackrabbit.jca.JCARepositoryManager$Reference.create(JCARepositoryManager.jav:178)

We tried moving the entire jackrabbit content directory from source server to new server but this also did not work.

The reference to /meta/rep.properties was found in the Oracle table REPOFS_FSENTRY table.

So to get the application deployed we had to delete everything in the file system and drop these database tables. When the system came up it recreated the database tables as expected. This of course creates a clean and EMPTY document repository so this is unacceptable.

Any solution??

Regards,
Ashish
Oh yes you can. We have overcome this problem of multiple databases. Indeed you can use as many DB as you want. But i am still wondering why hibernate would use user name and password from one factory into other for authentication. Also it used user name and password for authentication of app server managed datasource. Hence i posted it here.

-Ashish
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?
Hi Devashree,
I had two databases. One was oracle and other was mysql. Anyways that problem is resolved. Thanks for post on topic. I am creating new topic now :) . Hoping to get reply on that one also :D
I am new to hibernate and facing this new problem i am unaware of.
I have hibernate.properties file that contains all the information related to MySQL JDBC connectivity.
Then I have another properties file that contains following information:

hibernate.connection.datasource=TESTDS
hibernate.show_sql=true
hibernate.connection.provider_class=net.sf.hibernate.connection.C3P0ConnectionProvider
hibernate.c3p0.acquireIncrement=5
hibernate.c3p0.idleConnectionTestPeriod=1200
hibernate.c3p0.maxPoolSize=100
hibernate.c3p0.maxStatements=0
hibernate.c3p0.minPoolSize=1
hibernate.c3p0.initialPoolSize=20

I am creating a SessionFactory as given below:

Configuration cfg = new Configuration();
Properties properties = new Properties();
try {
properties.load(new FileInputStream("Sample.hibernate.properties"));
} catch (IOException e) {

}
cfg = cfg.setProperties(properties);
cfg = cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.Oracle9Dialect");
cfg = cfg.addResource("com/sungard/cs/aata/root/pojo/Root.hbm.xml");
cfg = cfg.addResource("com/sungard/cs/aata/tlog/pojo/Tlog.hbm.xml");
SessionFactory sf = cfg.buildSessionFactory();
HibernateTemplate sample = this.createHibernateTemplate(sf);

When i start server i get warning "java.lang.UnsupportedOperationException: The user must supply a JDBC connection".

Can someone help me know what is the solution to this exception?

Thanks in advance,
Ashish