[JCA/JBoss] - No suitable driver found for java:PostgresDS
by chewbacca
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
18 years, 5 months
[JBoss Seam] - Successfully created message
by jamesjmp
hi,
With a seam-gened app, whenever you create something it displays a facesmessage with text "Successfully created"
I do not want it to be displayed in any case. I have read that to prevent a seam-gened message to be displayed you just have to assign an empty value in the language properties file. For instance in my messages_en.properties there was a
| org.jboss.seam.loginSuccessful=Welcome, #0
|
I have changed it, and now it is
| org.jboss.seam.loginSuccessful=
|
so now, after logging the welcome message is not showed. But, I do not find any Successfully created entry in the default seam-gened message_en.properties.
Up to now I have found a solution by overriding getCreatedMessage this way
| @Override
| public String getCreatedMessage()
| {
| log.info("getCreatedMessage!!!!");
| return "";
| }
|
This works, but I would like to avoid overriding in all my Home classes.
Where is the Successfully created message defined? is tehre any way to assign an empty value?
thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107702#4107702
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107702
18 years, 5 months