Befor testing connection make sure derby is running
If you want to check derby is running
perform all steps of B(title is Create your first JPA POJO) .2
Ngai Chee Weng
Greenhorn
Joined: Aug 23, 2010
Posts: 10
posted
0
@Jan Cumps: thanks for the welcome.
@mahesh shinde: actually, it is Step 3 d but it is in section B...thanks for pointing that out because i miss the section A...i will try it out tomorrow.
Ngai Chee Weng
Greenhorn
Joined: Aug 23, 2010
Posts: 10
posted
0
Ya, I think I miss out some step at section A, step 4. After I follow all the steps, when I click "Test Connection", I got this error message,
Messages
The test connection operation failed for data source Order DS on server server1 at node xxxx with the following exception: java.lang.IllegalArgumentException: undefined variable: DERBY_JDBC_DRIVER_PATH. View JVM logs for further details.
Ngai Chee Weng wrote:Ya, I think I miss out some step at section A, step 4. After I follow all the steps, when I click "Test Connection", I got this error message,
Messages
The test connection operation failed for data source Order DS on server server1 at node xxxx with the following exception: java.lang.IllegalArgumentException: undefined variable: DERBY_JDBC_DRIVER_PATH. View JVM logs for further details.
Anyone can explain this error message?
You need to add DERBY_JDBC_DRIVER_PATH pointing at your derby client jar in "Environment -> WebSphere Variables" - you can see that it is been used i h (fig 22)
@Rene Larsen: Thanks. I went to "Environment -> WebSphere Variables" and I have environment WebSphere variable "DERBY_JDBC_DRIVER_PATH" and the value is ${WAS_INSTALL_ROOT}/derby/lib
and my derbyclient.jar is located at C:\Program Files\IBM\WebSphere\AppServer1\derby\lib\
I also tried to replace ${WAS_INSTALL_ROOT}/derby/lib with C:\Program Files\IBM\WebSphere\AppServer1\derby\lib\
but I still got the same error.
Ngai Chee Weng
Greenhorn
Joined: Aug 23, 2010
Posts: 10
posted
0
Sorry, I created new data source at the wrong scope. After I created it at the right scope, following the tutorial, when I click "Test Connection", I got this error message:
The test connection operation failed for data source Order DS on server server1 at node xxxxxx with the following exception: java.sql.SQLException: java.net.ConnectException : Error opening socket to server localhost on port 1527 with message : Connection refused: connectDSRA0010E: SQL State = null, Error Code = -4,499. View JVM logs for further details.
Port 1527 is allowed to pass through your firewall (I think the windows firewall ??)
Ngai Chee Weng
Greenhorn
Joined: Aug 23, 2010
Posts: 10
posted
0
Thanks Rene.
After I run startNetworkServer.bat, the previous error message is not more. But now is another error message,
The test connection operation failed for data source Order DS on server server1 at node xxxxxxx with the following exception: java.sql.SQLException: The application server rejected establishment of the connection. An attempt was made to access a database, JPATEST, which was not found.DSRA0010E: SQL State = 08004, Error Code = -4,499. View JVM logs for further details.
Did you type the correct DB name when you created your datasource (see tutorial, step 4.g) ??
Ngai Chee Weng
Greenhorn
Joined: Aug 23, 2010
Posts: 10
posted
0
Yes I put in the correct database name.
Ngai Chee Weng
Greenhorn
Joined: Aug 23, 2010
Posts: 10
posted
0
I open up IBM WebSphere Application Server Toolkit and open up Database Explorer. At "Derby Sample Connection [Derby 10.1], I saw only SAMPLE database and didn't see JPATEST database there. Is this JPATEST database a default database or I need to download to load this database seperately?