- This topic has 9 replies, 3 voices, and was last updated 19 years, 2 months ago by Alejandro Rico.
-
AuthorPosts
-
jdsrinivasMemberHi ,
I need to develop a project(JDStrore) that includes the following techologies
1.Struts(Version 1.1)
2.EJB(Mostly Stateless Session Beans J2EE 1.3 Compalint)
3.Hibernate(Version 2.1)I walked through Different Quick Start Projects(Struts,Hibernate,EJB,Enterprise) seperately all of them are running fine except one small problem.I have few queries abt my project i.e. JDStore
1.which project i need to create??(Struts,Hibernate,EJB,Enterprise ..???) using eclipse
2.If it is Enterprisea.to which module i need to add Struts Capabilities?
b.to which module i need to add Hibernate Capabilities?
c.Can i add both Struts&Hibernate Capabilities to both EJB and Web Modules?3.Are there any other precautions i need to take…
Thanks In Advance
Srini
jdsrinivasMemberI mean to say which one among these Java Project,Web project,EJB Project or Enterprise Application Project ..
Thanks
Srini
maheshbangaloreMemberHi Srini,
I think you were able to create and run hibernate application. Did you face the problem
with validation of MyEclipse generated *.hbm.xml files for Hibernate 3.0?I am able to create hibernate.cfg.xml, connect to oracle using database profile etc. When
I try to generate *.hbm.xml after selecting any table from oracle, the generated
*.hbm.xml has validation problems. The following is one of the generated *.hbm.file.————————————————————————————————–
<?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” ><!– DO NOT EDIT: This is a generated file that is synchronized –>
<!– by MyEclipse Hibernate tool integration. –>
<!– Created Thu Aug 25 10:46:45 EDT 2005 –>
<hibernate-mapping package=”com.acs.vector”><class name=”TestDelete” table=”TEST_DELETE”>
<property name=”deviceNo” column=”DEVICE_NO” type=”java.lang.Long” />
<property name=”statusDate” column=”STATUS_DATE” type=”java.util.Date” />
</class></hibernate-mapping>
————————————————————————————————
I turned off xml validation and tried to create Session using SessionManager, while Adding Hibernate Capabalities. I see the following error
org.hibernate.MappingException: Error reading resource: com/acs/vector/TestDelete.hbm.xml
Any help appreciated.
Thanks
maheshbangaloreMemberI am able to fix org.hibernate.MappingException: Error reading resource problem. This happens, when we generate *.hbm.xml without proper primary keys for tables in database.
Alejandro RicoMemberHello jdsrinivas,
The Struts/Hibernate can not be projects per se; they are capabilitiers that you can add to a project.
Then if you are planning to use Struts; that means that you have a Web-App.
Therefore the type of aapplication should be an Enterprise Application (Web-App + EJBs). That should be your kind of project.
Then you can add to your project Hibernate capabilities and Struts Capabilities.
Saludos
jdsrinivasMemberThanks Saludos
//Then you can add to your project Hibernate capabilities and Struts Capabilities.
Do i need to add Hibernate capabilities to Enterprise project or EJB Module
Do i need to add Struts capabilities to Enterprise project or Web Module
Because EJB and Web Modules are part of Enterprise project
Srinivas
Alejandro RicoMemberHello jdsrinivas;
Saludos means *greetings* 🙂 but in Spanish. Im in Mexico.
About where you need to ad those capabilities….. Its where you need them!
If your EJB will use Hibernate, then add Hibernate capabilities to your EJB project.Struts only apply for your Web Project; then you should add it to your Web Project.
Anyway, MyEclipse will show you what capabilities are valid for each project.
Saludos
ARico
jdsrinivasMemberHi Mahesh,
Iam using hibernate 2.1 with my eclipse 3.8.4 ..every thing worked fine for my using hibernate..
jdsrinivasMemberSaludos to you arico,
1.I created Enterprise project
2.added Hibernate capabilities to EJB Module and Struts Capabilities to WEB Module
3.Able to work with Hibernate Sessions successfully
4.I didn’t included any EJB’s in EJB Module.
5.I created .ear out of this project and and tried to deploy in websphere AS
I got this problems
a.The EAR file could be corrupt and/or incomplete.
b.AppDeploymentException: [] com.ibm.etools.archive.exception.NoModuleFileException: A file does not exist for module element having uri: DCSEProjectEJB.jar
Is that because i dont have EJBs in the EJB Module? or any other problem?
Thanks
Srini
Alejandro RicoMemberHello jdsrinivas,
The message says that your EAR does not contain your EJB Module.
The EAR should contain a JAR with your EJB Module.If you EJB Module haves or does not have a EJB is not relevant (for this issue).
This is a descriptor issue; and your descriptor (ear descriptor) tells your AppServer that an EJB Module (JAR) is present; and it is not finding it.
Saludos
-
AuthorPosts