GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes Exception thrown org.jboss.util.NestedSQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Exception thrown org.jboss.util.NestedSQLException" Watch "Exception thrown org.jboss.util.NestedSQLException" New topic
Author

Exception thrown org.jboss.util.NestedSQLException

aida haslinda
Ranch Hand

Joined: Jun 10, 2010
Posts: 36
hello everyone,
currently i try to use mySQL as JBOSS AS 4.0.5.GA datasource. (not replacing the hqlds.xml)

what i've created was:
/usr/jboss/jboss-4.0.5.GA/server/default/deploy/jdbcclient.war/client.jsp
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.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

You didn't post the interesting errors - perhaps they scrolled out of the window. Try increasing the buffer size (mine is set to 9000 lines). It is really the first error that is the most interesting.

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.


JBoss In Action
aida haslinda
Ranch Hand

Joined: Jun 10, 2010
Posts: 36
thanks peter.
these are the error that i think cause the problem

i hope you can help me out..thank you so much
aida haslinda
Ranch Hand

Joined: Jun 10, 2010
Posts: 36
when i type ip adddress/jdbcclient/client.jsp

the error as below appeared
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

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?
aida haslinda
Ranch Hand

Joined: Jun 10, 2010
Posts: 36
sorry for that peter.ok i'm running jboss as 4.0.5.GA and want to use mysql 5.1 as jboss database.
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:
2.standardjaws.xml

3. standardjbosscmp-jdbc.xml

4.login-config.xml

5. mysql-ds.xml in server/default/deploy
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://192.168.5.55:3306/JAVATEST</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>javatest</user-name>
<password>javatest</password>

and i create client.jsp in server/default/deploy/jdbcclient.war.


aida haslinda
Ranch Hand

Joined: Jun 10, 2010
Posts: 36

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.


<"name"> is the attribute in Javatest table inside the JAVATEST database.

thank you peter
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10145
    
165

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.



[My Blog] [JavaRanch Journal]
aida haslinda
Ranch Hand

Joined: Jun 10, 2010
Posts: 36
hi jaikiran
The error that you posted wasn't really because of that


i don't understand with the error. It is good if you could elaborate more.

thank you
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10145
    
165

This error:

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.
aida haslinda
Ranch Hand

Joined: Jun 10, 2010
Posts: 36
yeah..thank you so much Jaikiran
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception thrown org.jboss.util.NestedSQLException