Hi,
I have problem running Hibernate in my application using RMI. the hibernate.cfg.xml always not found, i'm sure to put the file in my class path. looks like it have a problem in RMISecurityManager.
[b]Hibernate version:[/b] 3.0.5
[b]Full stack trace of any exception that occurs:[/b]
runserver:
[java] 0 [main] INFO cfg.Environment - Hibernate 3.0.5
[java] 0 [main] INFO cfg.Environment - hibernate.properties not found
[java] 0 [main] WARN cfg.Environment - could not copy system properties, s
ystem properties will be ignored
[java] 16 [main] INFO cfg.Environment - using CGLIB reflection optimizer
[java] 16 [main] INFO cfg.Environment - using JDK 1.4 java.sql.Timestamp h
andling
[java] 110 [main] INFO cfg.Configuration - configuring from resource: /hib
ernate.cfg.xml
[java] 110 [main] INFO cfg.Configuration - Configuration resource: /hibern
ate.cfg.xml
[java] 110 [main] WARN cfg.Configuration - /hibernate.cfg.xml not found
[java] Exception in thread "main" org.hibernate.HibernateException: /hibern
ate.cfg.xml not found
[java] at org.hibernate.cfg.Configuration.getConfigurationInputStream(C
onfiguration.java:1087)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:
1111)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:
1098)
[java] at com.menaraintermedia.BolaTangkasLogicImpl.initialize(Unknown
Source)
[java] at com.menaraintermedia.BolaTangkasLogicImpl.<init>(Unknown Sour
ce)
[java] at com.menaraintermedia.BolaTangkasLogicImpl.main(Unknown Source
)
On my main :
try
{
System.setSecurityManager(new RMISecurityManager());
Testing tes = new Testing();
Naming.rebind("TESTING-SERVER" , tes);
System.out.println("Server waiting.....");
}
catch (java.net.MalformedURLException me)
{
System.out.println("Malformed URL: " + me.toString());
}
catch (RemoteException re)
{
re.printStackTrace();
}
in Testing constructor i build configuration :
factory = new Configuration().configure().buildSessionFactory();
Any body have an idea ?
Thank you
|