Sunday, July 1, 2007

Tour around Europe: Eclipse for Java EE

The Eclipse IDE for Java EE Developers is a simultaneous release of Eclipse Projects for Java Enterprise Edition.

This post is first in the series of screencasts about the Eclipse Europa release. It shows how to use the Eclipse IDE for Java EE Developers to create Java persistent entities from database tables.

MySQL database is used to demonstrate the Data Tools Platform and JBoss is used as a Java EE application server.


Using the Eclipse Data Tools Platform:(05:30):

Dali - Java Persistence Tools (03:10):

For basic installation instructions of the Eclipse IDE for Java EE Developers see tutorials from eclipse.org site.

For this tutorial we have used materials from:

  1. Dali JPA Tools
  2. Eclipse IDE for Java EE Developers

10 comments:

Siamak Sarmady said...

In Eclipse 3.3 when I try to add DTP features only the "Eclipse data tools platform 1.5" appears and there is no "Enabling features for DTP 1.5"!

Could you please comment?

Harry said...

I'm not sure about the update of MySQL related plugin. I can't see the option of Data Tools Platform for Enablment of MySQL and other databases. What can I do?

Siamak Sarmady said...

Ok, seems it has been fixed and I can see the DTP in updates and addons. It should have been from Eclipse update sites.

Ken said...

I was trying this. The only difference that I had in mind was using Oracle instead of MySQL. I was trying JBoss 4.2.

When I got to the point of adding the Java Persistence to the Project Facets, it was not there to add.

How do I can I make it a choice as a Project Facet? Do I have to install something?

Anonymous said...

Hi All,

I ran through the Whole EJB3 tutorial . Everything went pretty well until I tested the client. I got an error CustomerDAOBean not bound. I googled the internet and saw other people had the same problem. It is very frustrating because I spent about 3 days trying to figure out what is causing the not bound error, but no idea.
Your help is appreciated.

Thank you,

Khalil Houhou
khalil.houhou@yahoo.com

thescreencast.com said...

Bean not bound usually means that deployment failed. Take a look at the log file. Have you cofigured datasource?

Adam said...

About the bean not found exception: I found the reason for this.

In my case, at least, the jboss log had the following in its startup:
.
.
.
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:jar=demoJPA.jar,unitName=demoJPA
State: NOTYETINSTALLED
I Depend On:
jboss.jca:name=MySQLDS,service=DataSourceBinding
Depends On Me:
jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3

ObjectName: jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=demoJPA.jar,unitName=demoJPA

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

.
.
.
In these logs you'll see references to "MySQLDS". The problem is that in the myslq-jdbc2-service.xml and mysql-ds.xml files which are used to set MySQL as the datasource, the name is "MySqlDS" which isn't quite the same.

Once I changed the files to have the exact string "MySQLDS" instead of "MySqlDS", the errors in the log file went away and the test app ran fine.

Can someone tell us if it is correct to make this change or if the opposite change should have been made somewhere else? Does it matter? It seems to work.

Yang, Hui said...

When I started the JBoss, it says:

.
.
.
13:06:33,477 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:jar=demoJPA.jar,unitName=demoJPA
State: NOTYETINSTALLED
I Depend On:
jboss.jca:name=MySqlDS,service=DataSourceBinding
Depends On Me:
jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3

ObjectName: jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=demoJPA.jar,unitName=demoJPA

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



Unfortunately, I cannot paste the xml source file here, it says the Tag is not allowed, but I saw many webpages with those xml tags in the comments, isn't it?

I also changed the "MySqlDS" as adam said before, but it still didnot work.

Can anybody tell me the reason why it goes wrong? I tried 2 days but still cannot find out what is the problem... Thanks a lot if any suggestion.

Dmitry said...

hello,

I'm using eclipse 3.3.2 europe and when i try to update the dtp i have the error: required org.eclipse.emf (2.2.0) or later.

Can you help me?
dumitru.fcim@gmail.com

tskarthikeyan said...

Hello All,

I am using Eclipse Europa in my PC. i tried to create a database connection for Oracle. But it is giving "ping failed" error. i installed Oracle 10g in my pc.

please help me.

rgds
ts karthikeyan