Skip to main content



      Home
Home » Newcomers » Newcomers » J2EE 1st installation & EJB tutorial
J2EE 1st installation & EJB tutorial [message #115919] Wed, 09 November 2005 14:34
Eclipse UserFriend
Originally posted by: eclipse.yorkhouse.freeserve.co.uk

I’m new to J2EE. I’ve been on a development course at Sun and now I’m
trying to get my own development environment together for the first time.
I’ve installed the products listed below and then tried to follow the
Eclipse tutorial “WTP Tutorials - Building a Simple EJB Application”

However, I’m not getting all the code auto-generated that I should and I
have an error reported.


=====================
I’ve had a few hiccups that I’ve stumbled through such as:
1. Configuring Sun Application Server as the target server
2. Not knowing that I have to be on-line when I build the EBJ for the
first time to reach files such as
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd (I’m doing this at home
with dial-up.)


I’m also unsure whether I’m selecting form options correctly when creating
the EJB since the forms in the version of Eclipse downloaded do not match
the tutorial. I’m too much of a novice at the moment to know what some of
the options mean.

Can anyone please help spot what I’ve done wrong?

Steping through the tutorial
Installing JBOSS…

I think I follow steps on installation OK, allowing for the fact that I’m
using Sun Application Server not JBOSS.

Products installed….

Eclipse v3.1.1
Sun JRE V1.4.2
Sun JDK V1.4.2
Sun application server PE 8.1 2005Q4
XDocLet 1.2.3
Web tools platform

Installation involved either unzipping or running a supplied installation
tool for each of the above and following the configuration instructions in
the tutorial. I’ve not manually modified any environment variables. But I
do know that simple Java programs developed under Eclipse are fine.

Creating EJB…

1. Instruction Select File -> New -> Other. Select EJB -> J2EE EJB Module
and click Next
2. Actual: Select File -> New -> Other. Select EJB -> EJB Project and
click Next


3. Instructions say don’t add module to EAR. But if I leave this unticked
I can’t select “Create an EJB Client JAR to hold…” Also the module name
specification is on the next screen along with a field for the URI. I
leave these values to default.

4. During the building I’m asked to accept a Sun licence.
5. Eclipse does not prompt me to switch to a J2EE perspective as the
tutorial says I would be.
6. The resulting project includes one error.
cvc-complex-type.2.4.a: Invalid content was found starting with element
'ejb-client-jar'. One of '{"http://java.sun.com/xml/ns/j2ee":display-name,
"http://java.sun.com/xml/ns/j2ee":icon,
"http://java.sun.com/xml/ns/j2ee":enterprise-beans}' is
expected. ejb-jar.xml ZooBeans/ejbModule/META-INF line 5 November 7, 2005
8:50:46 PM 0
7. The resulting projects are not displayed with the structure illustrated
in the tutorial. I assume this doesn’t matter and is as a result of using
a newer version of the Eclipse tool.


8. If I plough on regardless to create a session bean, I get outline code
generated for EJBProjects/ZooBeans/ejbModule/com.zoo/TigerBean.java.
However, I get no code generated for the session bean.
Previous Topic:java delete-history recap?
Next Topic:Closing Project
Goto Forum:
  


Current Time: Tue Jul 22 15:39:30 EDT 2025

Powered by FUDForum. Page generated in 0.07364 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top