Hi, I am new in jboss and I am experimenting some problems when trying to connect with my postgres database. The postgres service is up, I can reach it with psql, I've also configured my jndi to point to the driver which is in the WEB-INF/class directory, and the jboss-web.xml and web.xml with the paths and references, then I tried to use it with an jsp script this way:
Context initCtx = new InitialContext();
DataSource dataSource=(javax.sql.DataSource)(initCtx.lookup("java:/postgresDS"));
Connection con = dataSource.getConnection();
Statement stm = con.createStatement();
and it didn't work it throws me an org.jboss.util.NestedSQLException and tells me this: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: org.postgresql.Driver, url: jdbc:postgresql://localhost/mydatabase);
My theory is that it is not founding the class, but when I connect with Class.forName(); method there's no error shown and I can make queries and updates without problem. I will really apreciate any help, Sorry for my english, i am spanish spoken :-).
Thanks in advance