views:

56

answers:

2

I have been trying to get to run a simple example project with JBoss Seam in Eclipse 3.5. So far unsuccessfully.

What i did:

  • I set up a MySQL server that i can connect to using eclipse's data tools.
  • I installed Tomcat 6.0 and set it up as a server in eclipse
  • I installed the "JBossAS Tools" v2.2.0 plugin
  • I created a new Seam Project using the plugin.

But i keep getting

javax.naming.NameNotFoundException: HelloWorldSeamProjektDatasource not bound

I have been reading a lot of forums and playing around with the web.xml, server.xml, context.xml and HelloWorldSeamProjekt-ds.xml.

My guess is that the JNDI setup of my database resource is broken. I tried a bunch of different approaches like a global resource, different names (comp/env/) but nothing worked.

All the tutorials i found use different (and mostly outdated) combinations of Seam, Tomcat and Eclipse.

I'm getting frustrated.

Can someone please point me to a simple setup to get me started?

A: 

Can you post your HelloWorldSeamProjekt-ds.xml? Also are there any signs of thrown exceptions the server log, when trying to initialize the datasource (before the NameNotFoundExceptions).

vstoyanov
This should have been posted as a comment instead
Shervin
No other exceptions. The NameNotfoundException is the cause of the only exception cascade in my logs. And quite frankly, i don't want to debug my first test. I just want to get started.
Stroboskop
+3  A: 

What you should do instead is use seam-gen to generate your eclipse project. This will do it right.

You can see how you can get started using seam-gen here

Shervin
@Shervin Good, Shervin (+1) Just as additional comment, here goes output generated by seam-gen: **Eclipse Users: Add the project into Eclipse using File > New > Project and select General > Project (not Java Project)**
Arthur Ronald F D Garcia
That helped somewhat as i at least got the created project to run in JBoss. What didn't help though is that seam-gen and the Seam Tools use completely different structures, files and deployment methods. And instead of reducing the number of required xml files, Seam is so far doubling it.
Stroboskop
There are lots of the xml files and other files you can delete. They are mainly there to support other environments and files that are needed
Shervin