Hi All, We are using derby as database in our two different kind of applications. In the desktop application the design is when ever we open my application we have to start the Derby network server & while closing the application we have to close the derby database also. In another application we are running apache derby network server as a service. For some requirement we created the UDT (User defined type - typically a java class as a column type in our tables) in both the applications. In desktop application when we are opening & closing frequently we are getting the following error. *java.sql.SQLNonTransientConnectionException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only 0 bytes. The connection has been terminated.*
Once this error comes I am able to boot the database and access all other tables. but the table where I have a column type as custom ( my defined UDT) I am unable to run any queries like select, update, delete. From Squirrel I can access to this table but from JDBC api I am getting above error. I observed one interesting thing with my another application. In this application I have derby network server and two another applications are using same database. In this also we are using UDT as table columns & store procedure parameter types. In this case we are making all UDT java classes into one single jar and added into classpath of derby server project and in another two java applications. By chance if I modified some thing in UDT jar file and failed to update those java applications. At that point of time also all other queries will work, another store procedures will work. Only the store procedures using UDT as parameter will fail to work and get the same above mentioned error. As soon as I update the jar among all projects then the issue will solve. But in my desktop application I don't have this situation. Everything are available in one project. If we closing & opening the application frequently I am getting this issue. Once this comes means the database becomes corrupt. I have to regenerate the tables. Even I am using JVM shutdown hook to stop network server properly while closing my application. Please help me to solve this scenario. -- View this message in context: http://apache-database.10148.n7.nabble.com/Apache-Derby-Network-Server-Insufficient-data-while-reading-from-the-network-tp144053.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
