-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate2.1.2 + struts + sun one application server 7?
PostPosted: Wed Mar 03, 2004 6:14 am 
Beginner
Beginner

Joined: Fri Jan 23, 2004 5:08 am
Posts: 21
Hi guys! im deploying my web application in sun one application server. i configure the connection pool and jdbc resources in the admin module.
then in the hibernate.hbm.xml i use :

<property name="connection.datasource">java:comp/env/jdbc/eon</property>

this hibernate.hbm.xml is being loaded in my SQLManager class

...........................
public class SQLManager {

private static final String CONFIGFILE = "/hbm/hibernate.hbm.xml";
private String _configFilePath = null;
private static SQLManager _manager = null;
private SessionFactory _factory = null;
private DataSource _datasource = null;
private Configuration configuration = null;
private boolean isStandAlone = false;

private SQLManager() {

}

public void init() {
URL configFileURL = null;
try {

configFileURL = SQLManager.class.getResource(
(_configFilePath==null)?CONFIGFILE:_configFilePath);
configuration = new Configuration().configure(configFileURL);

_factory = configuration.buildSessionFactory();
Util.getLogger(this)
.debug("open connection "+_factory.openSession().isConnected());
} catch (HibernateException he) {
he.printStackTrace();
}
}

....................................

but as the server loads up, im getting this error:

----- Root Cause -----
java.lang.ExceptionInInitializerError
at net.sf.hibernate.cfg.Configuration.<init>(Configuration.java:86)
at com.eon.common.SQLManager.init(SQLManager.java:51)
at com.eon.common.HibernatePlugIn.init(HibernatePlugIn.java:57)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServle
t.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)

..................................


any help?

thanks.

raymond


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 12:46 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Check the logs

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.