Now I am making my pos software client - server based software. I am using java derby as the database. On the local host I am running the program successfully. But on the remote server I face an exception. First I tell you, how I am connecting to the remote server below:
I connect my laptop to my pc through LAN Cable. I am using my laptop as client and my desktop PC as Server. On my Server I run the following command to start the Derby Server:
C:\Program Files (x86)\Java\jdk1.7.0_79\db\lib> java -jar derbyrun.jar start server
Above mentioned command starts the derby server on my desktop computer.
I am using following driver and connection string on my client laptop:
// code for driver
String dbdriver = "org.apache.derby.jdbc.ClientDriver";
Class.forName(dbdriver).newInstance();
// connection string where "192.168.10.125" is ip address of my server PC and "139" is port number of //my server PC
con = DriverManager.getConnection("jdbc:derby://192.168.10.125:139/C:\\QuintexDB; create = true");
When I run the program, following Exception Occurres:
"java.sql.SQLNonTransientConnectionException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only 5 bytes. The connection has been terminated."
I am searching this problem on internet since last night but all in vane. I will be thank ful to you if you can guide me on this.