EJB3 problem with Jboss datasource??

I am new to EJB3 and am trying to run through the tutorial from http://www.laliluna.de/ejb-3-tutorial-jboss.html. I don't think my datasource is getting set up correctly. Here is the error from the Jboss server on start up.

13:38:01,717 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:jar=FirstEJB3Tutorial Ant.jar,unitName=FirstEjb3Tutorial
  I Depend On:
  Depends On Me:
    jboss.j2ee:jar=FirstEJB3Tutorial Ant.jar,name=BookTestBean,service=EJB3

ObjectName: jboss.j2ee:jar=FirstEJB3Tutorial Ant.jar,name=BookTestBean,service=EJB3
  I Depend On:
    persistence.units:jar=FirstEJB3Tutorial Ant.jar,unitName=FirstEjb3Tutorial

ObjectName: jboss.jca:name=ejb3ProjectDS,service=DataSourceBinding
  Depends On Me:
    persistence.units:jar=FirstEJB3Tutorial Ant.jar,unitName=FirstEjb3Tutorial

13:38:02,092 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-
13:38:02,170 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-
13:38:02,185 INFO  [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 54s:735ms

I think the datasource is set up ok? This is from earlier in the output -

13:37:59,967 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=ejb3ExampleDS' to JNDI name 'java:ejb3ExampleDS'

Here is my mysql-ds.xml from the C:\jboss-4.2.2.GA\server\default\deploy directory

<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
<!--  Datasource config for MySQL using 3.0.9 available from:

    <!-- should only be used on drivers after 3.22.1 with "ping" support
    <!-- sql to call when connection is created
    <new-connection-sql>some arbitrary sql</new-connection-sql>
    <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>

    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->

I have tried both
for the <connection-url> syntax and same error with both.

Also here is my persistence.xml file --

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
      <persistence-unit name="FirstEjb3Tutorial" transaction-type="JTA">

Is it the datasource causing the error??
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you have this error due to names incompatibility.

On your mysql-ds.xml you name your datasource ejb3ExampleDS (it is a name between <jndi-name> elements)
but in persistence.xml you refer to it as ejb3ProjectDS.

But this names should be identical.
I suggest that you change it on mysql-ds.xml to ejb3ProjectDS.
So it should be:
in mysql-ds.xml

better restart your jboss server too.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
amjavaAuthor Commented:
Very nice. Thank you. It works great now. Finally my first EJB3! I really appreciate it ramazanyich.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.