-->
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: New to Hibernate
PostPosted: Mon Dec 06, 2010 11:00 am 
Newbie

Joined: Mon Dec 06, 2010 10:50 am
Posts: 1
I am facing problem with session the Error Message Is :

org.hibernate.SessionException: Error! Please, check your JDBC/JDNI Configurations and Database Server avaliability.
Could not open or put a Hibernate Session in ValueStack: Could not parse mapping document from resource .

The code is : I have a hibernate Configuaration file and struts.xml file....
hibernate configuaration is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:sqlserver://localhost:1290;databaseName=GIS_SCREEN_DB</property>
<property name="hibernate.connection.username">sa</property>
<property name="connection.password">miracle</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">create</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<mapping class="com.mss.domain.User" file="" jar="" package="" resource=""/>
<mapping class="com.mss.domain.MsTpMain" package="com.mss.domain"/>
<mapping resource="hibernate.hbm.xml"/>
</session-factory>
</hibernate-configuration>


struts.Xml is:

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
<package name="default" extends="hibernate-default">
<action name="addUser" method="add" class="com.mss.web.UserAction">
<result name="success" type="redirect">listUser</result>
</action>
<action name="listUser" method="list" class="com.mss.web.UserAction">
<result name="success">/register.jsp</result>
</action>
<action name="addMsTpNew" >
<result name="success">/addtp.jsp</result>
</action>
<action name="addMsTp" method="addMsTpMain" class="com.mss.web.MsTpAction">
<result name="success">/addtp.jsp</result>
</action>

</package>
</struts>


i properly added every thing still i am getting problems..


Top
 Profile  
 
 Post subject: Re: New to Hibernate
PostPosted: Mon Dec 06, 2010 4:44 pm 
Newbie

Joined: Mon May 21, 2007 3:36 am
Posts: 16
Your hibernate configuration references a mapping file hibernate.hbm.xml.
Is this correct and if yes, is this file available/correct?

By the way: We're using the jTDS JDBC driver (http://jtds.sourceforge.net/) instead of the original Microsoft SQL Server JDBC driver as we've experienced several severe bugs and performance issues with the original one.

_________________
Mario.


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.