Advertisement

05.28.2008 at 07:38AM PDT, ID: 23438189
[x]
Attachment Details

EJB 3.0 Tutorial Problems: How do I get it to work? [Code attached]

Asked by Tim83 in Enterprise Java Beans (EJB), Java Programming Language, J2EE

Tags: Java

Hi,
I am attempting to run an example EJB application from "Pro EJB 3 - Java Persistence API" but without success.

The error message I am currently getting is:
-----------------------------------------------------------------------------------------------------------------
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:jar=EJB.jar,unitName=EmployeeService
  State: NOTYETINSTALLED
  I Depend On:
    jboss.jca:name=jdbc/EmployeeDS,service=DataSourceBinding
  Depends On Me:
    jboss.j2ee:jar=EJB.jar,name=EmployeeServiceBean,service=EJB3

ObjectName: jboss.j2ee:jar=EJB.jar,name=EmployeeServiceBean,service=EJB3
  State: NOTYETINSTALLED
  I Depend On:
    persistence.units:jar=EJB.jar,unitName=EmployeeService

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:name=jdbc/EmployeeDS,service=DataSourceBinding
  State: NOTYETINSTALLED
  Depends On Me:
    persistence.units:jar=EJB.jar,unitName=EmployeeService
-----------------------------------------------------------------------------------------------------------------

The file structure of the application is:
 + EJB [Project name]
 ---+src
 --- ---+examples.models
 --- --- ---+Employee.java
 --- --- ---+EmployeeService.java
 --- --- ---+EmployeeServiceBean.java
 --- --- ---+EmployeeServlet.java
 --- ---+META-INF
 --- --- ---+MANIFEST.MF
 --- --- ---+persistence.xml
 ---+JRE System Library
 ---+Java EE 5 Libraries

I think the problem is that I have not defined EmployeeDS as specified in the persistence.xml file however I'm not sure where this would go.  Also from looking around on Google for well over an hour I'm guessing I'm missing a jboss-ds.xml file?

Please can someone point out the mistakes and perhaps suggest the easiest way I can test the servlet when deploying with either JBoss or Glassfish.

Thanks in advance.
Start Free Trial
Attachments:
 
Simple Entity Bean
 
 
Business Interface
 
 
Stateless Session Bean implementing EmployeeService
 
 
Web servlet
 
 
XML Configuration
 
 
Loading Advertisement...
 
[+][-]05.28.2008 at 07:59AM PDT, ID: 21661007

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 10:24AM PDT, ID: 21662374

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 11:41AM PDT, ID: 21663061

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 12:03PM PDT, ID: 21663260

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 12:32PM PDT, ID: 21663551

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 12:35PM PDT, ID: 21663567

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 01:08PM PDT, ID: 21663877

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 03:46PM PDT, ID: 21664947

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Enterprise Java Beans (EJB), Java Programming Language, J2EE
Tags: Java
Sign Up Now!
Solution Provided By: brunoguimaraes
Participating Experts: 1
Solution Grade: B
 
 
[+][-]06.03.2008 at 03:43AM PDT, ID: 21698953

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628