currently i try to use mySQL as JBOSS AS 4.0.5.GA datasource. (not replacing the hqlds.xml)
what i've created was:
all configuration file in in server/default/conf which are login.xml, standardjaws.xml,standardjbosscmp-jdbc.xml
the connector is in server/default/lib/mysql-connector-java-5.1.13-bin.jar.
the output in the terminal is like this:
And when i start up the browser at ip.ip.ip.ip:8080/jdbcclient/client.jsp, these error appeared
Exception thrown org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.))
i really appreciate if you guys could help me with this.
Thank You very Much.
Also, there is this error:
java.net.BindException: Address already in use:8080
This means that some other application has port 8080 open. Either stop that app first, or change the port used by JBoss AS.
these are the error that i think cause the problem
No, they are not. You are posting the deployment report that gets printed after deployment fails. Much earlier in the console log there will be a stack trace that gives the real error. You have to find the very first exception stack trace that shows up in the console log - that is the important one.
And of course you will get a HTTP 500 error - did you do anything about the failure to bind to port 8080?
Please don't just post errors!!! Tell us what you changed since the last time you posted, and especially tell us if you made any of the changes or addressed any of the problems that were pointed out to you. Otherwise how are we supposed to know what you did?
i follow the steps in http://onjava.com/pub/a/onjava/2004/02/25/jbossjdbc.html for MySQL Database Configuration. Therefore
1. mysql-connector-java-5.1.13-bin.jar in server/default/lib.
Add the codes as belows in server/default/conf:
5. mysql-ds.xml in server/default/deploy
and i create client.jsp in server/default/deploy/jdbcclient.war.
saujana ikhma wrote:
hello everyone. The error appear because previously i didn't add the correct attributes.
In client.jsp, "name" must be the attribute in the mysql table Javatest.
The error that you posted wasn't really because of that. There was a different issue in your jsp which appears to be fixed in the latest one you posted. Also you have been adding new errors in each of your posts to this thread which makes it really difficult to track. But anyway, none of this is JBoss specific and glad to know you got it working.
An error occurred at line: 4 in the jsp file: /client.jsp
Generated servlet error:
Syntax error on token ":", delete this token
was because of this code in your earlier jsp:
Note that you weren't enclosing java:MySqlDS in double quotes.