i have downloaded the latest stable version of jboss application server (4.2.1.GA Stable 90 MB 2007-07-16)

After that i have build a small webapplication which contains a ServletContextListener.

Now i want to lookup the DefaultDS in the "contextInitialized"-Method of my ServletContextListener, but i allways get a "NameNotBoundException". I tried a lot of JNDI-Names ("java:DefaultDS" "java:/DefaultDS" "java:comp/env/jdbc/DefaultDS")

I dont make any changes on the jboss configuration! During the startup i get this information:

After that i have build a small webapplication which contains a ServletContextListener.

Now i want to lookup the DefaultDS in the "contextInitialized"-Method of my ServletContextListener

Instead of looking it up from the ServletContextListener, try looking it up from a servlet/jsp and see if that works. That might give us a clue as to whether the ServletContextListener is being called even before the datasource is bound to the JNDI tree