Hello all,

  First of all, this is my first post and I would like to thank anyone that has 
interest in helping me. That's the way communities grown.

Below follows my development environment configuration:

* Java 6 Update 3;
* JBoss 4.2.2 GA;
* PostgreSQL 8.2;

I am trying to run a very simple example in order to check if I correctly 
configured a PostgreSQL datasource, but I'm receiving an error message:

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get 
connection, DataSource invalid: "java.sql.SQLException: No suitable driver 
found for java:PostgresDS"

I have done the following steps in order to configure the PostgreSQL datasource:

1. Included a postgres-ds.xml in the [JBOSS_HOME]/server/default/deploy 
directory, with the follwing content:


  <local-tx-datasource>
    <jndi-name>PostgresDS</jndi-name>
    <connection-url>jdbc:postgresql://localhost:5432/jboss</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>jboss</user-name>
    jboss
        <!-- sql to call when connection is created.  Can be anything, select 1 
is valid for PostgreSQL
        <new-connection-sql>select 1</new-connection-sql>
        -->

        <!-- sql to call on an existing pooled connection when it is obtained 
from pool.  Can be anything, select 1 is valid for PostgreSQL
        <check-valid-connection-sql>select 1</check-valid-connection-sql>
        -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
      
         <type-mapping>PostgreSQL 8.0</type-mapping>
      
  </local-tx-datasource>



2. Included the postgresql-8.2-506.jdbc4.jar file in the 
[JBOSS_HOME]/server/default/lib directory.

3. Create the needed database (jboss) and the needed username and password 
combination (jboss/jboss).

I am trying to connect to the PostgresSQL database with the following line of 
code inside a JSP page:

<sql:setDataSource dataSource="java:PostgresDS" />

I have already changed the dataSource propertu value to "PostgresDS", 
"java:/PostgresDS", and received the same error.

Please, any help is appreciated!

Thank you for reading,

André

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107706#4107706

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107706

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to