sudhansu goyal

Greenhorn
+ Follow
since Nov 28, 2007
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 sudhansu goyal

Directory Structure is as following---

innvy
#--#src (main folder containg all the things)
------com.innvy.home.register (package)
>----------------------public (folder)
>----------------------register.gwt.xml
------com.innvy.home.register.client (package)
>----------------------register.java
>----------------------registerService.java
>----------------------registerServiceAsync.java
------com.innvy.home.register.server (package)
>----------------------registerServiceImpl.java
------com.visualbuilder.hibernate (package)
>----------------------User.java
>----------------------User.hbm.xml
------com.visualbuilder.hibernate.client (package)
>----------------------Manager.java
------hibernate.cfg.xml (file)
------web.xml (filr)
Hibernate_library (Library for hibernate)
Mysql_Library (Library for mysql dbms)
Jre_system_library (Library for jdk)
Gwt library (Library for gwt designer)
this is my User.hbm.xml

///////////



<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping>

<class name="com.visualbuilder.hibernate.User" table="details" >
<id name="User_Name" type="java.lang.String" column="User_Name" >
</id>
<property name="Password" type="java.lang.String" column="Password" length="45" />

</class>

</hibernate-mapping>

///////////

this file ismapping a table details having two columns User_Name and Password both are of type varchar and User_Name is primary key of the database...
my directory structure is as following----

innvu is the GWT project name that a make on eclipse 3.2

innvy
src (folder)
com.innvy.home.register (package)
public (folder)
register.gwt.xml
com.innvy.home.register.client (package)
register.java
registerService.java
registerServiceAsync.java
com.innvy.home.register.server (package)
registerServiceImpl.java
com.visualbuilder.hibernate (package)
User.java
User.hbm.xml
com.visualbuilder.hibernate.client (package)
Manager.java

hibernate.cfg.xml
web.xml
Hibernate_library (Library for hibernate)
Mysql_Library (Library for mysql dbms)
Jre_system_library (Library for jdk)
Gwt library (Library for gwt designer)

i am mapping the User entity in User.java and User.hbm.xml..
the error that i told you was coming when i dont add mysql mibrary in my project..
but when i add it also in my project the error is coming

//////////////////////////////////////

[ERROR] Failure to load module 'com.innvy.home.register.register'
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.kind()I
at com.google.gwt.dev.jdt.TypeOracleBuilder.isInterface(TypeOracleBuilder.java:481)
at com.google.gwt.dev.jdt.TypeOracleBuilder.processType(TypeOracleBuilder.java:531)
at com.google.gwt.dev.jdt.TypeOracleBuilder.access$000(TypeOracleBuilder.java:93)
at com.google.gwt.dev.jdt.TypeOracleBuilder$2.visit(TypeOracleBuilder.java:410)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1007)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:305)
at com.google.gwt.dev.jdt.TypeOracleBuilder.build(TypeOracleBuilder.java:395)
at com.google.gwt.dev.cfg.ModuleDef.getTypeOracle(ModuleDef.java:294)
at com.google.gwt.dev.cfg.ModuleDef.refresh(ModuleDef.java:359)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:86)


//////////////////////////////////////

i want to implement GWT RPC and simultaneously want to access database at server side(registerServiceImpl.java) using hibernate.. i think now a make clear almost of my project.. if somebody could help me the i will be thankful to him..
No there is only single exception that a written previously...
i have used try catch on the code written above session etc..
i think it is due to because server does not find hibernate library at its end
Hello Everybody,
i am making a web application which is based on GWT instantiation.. at server end i want to use hibernate for accessing database but when i run it on eclipse 3.2 having GWT instantiation plug in(after writing all the code of client side and server side including use of hibernate)it is giving this error

Error is org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml

which comes for these lines in the server side code


SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
Session session =sessionFactory.openSession();
Manager manager = new Manager(session);
user=manager.searchUser(username);

where user is object of database entity and manager is the class which access the database ...

my hibernate.cfg.xml is as following

///////////////////////////////

<?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="connection.url">
jdbc:mysql://localhost:3306/test
</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="connection.username">
root
</property>
<property name="connection.password">
dexter
</property>
<!-- Set AutoCommit to true -->
<property name="connection.autocommit">
true
</property>
<!-- SQL Dialect to use. Dialects are database specific -->
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<!-- Mapping files -->
<mapping resource="com/visualbuilder/hibernate/User.hbm.xml" />
</session-factory>
</hibernate-configuration>

///////////////////////////////

what i think that when i run this as GWT application on eclipse 3.2 it is giving this error due to absence of hibernate lib at server end i am not so clear...
if somebody will help me i will be thankful to him...
please reply soonn....