I was working on some stuff to transfer data from sqlite database to mysql using some latest tools like Hibernate. Being little new to hibernate I was learning stuff and moving forward...One point of time I reach to a point to successfully grab the data from sqlite database and keep it ready for processing....I kept testing my code time by time till I reach to previous point..and I got a satisfaction that code is ready to be deployed on Server.
We are having some 3-4 machins for various purpose, with some running Monta Vista Linux (a very old copy) and some others with Ubuntu 10.x and Java version is 1.6.0_21 and 1.6.0_20 respectively. I was using sqlite-jdbc-3.7.2.jar driver.
Now when I run it on Monta Vista - It ends of with Fatal Error and JVM crash, on the other side it runs perfectly fine. I spent around 5-6 hours to resolve the problem.
Initially I could not get wats wrong and kept on debugging thinking that Java/JRE version makes it crash or something or OS or something else....was totally clueless...
Slowly I started writing and independent program of various part whatever I was doing as a whole bunch (it a boring task...but need to do it for debug) and then I reached to a point where I can conclude that its a problem with the sqlite jdbc driver which makes call to native libraries on Monta Vista and system not able to respond in correct manner so is the reason JVM crashes..
I got solution from: http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC
It clearly says that I has issue with Old linux kernal and one should run the program with following command or property set. I works like a charm..
Anyways nice lesson....
We are having some 3-4 machins for various purpose, with some running Monta Vista Linux (a very old copy) and some others with Ubuntu 10.x and Java version is 1.6.0_21 and 1.6.0_20 respectively. I was using sqlite-jdbc-3.7.2.jar driver.
Now when I run it on Monta Vista - It ends of with Fatal Error and JVM crash, on the other side it runs perfectly fine. I spent around 5-6 hours to resolve the problem.
Initially I could not get wats wrong and kept on debugging thinking that Java/JRE version makes it crash or something or OS or something else....was totally clueless...
Slowly I started writing and independent program of various part whatever I was doing as a whole bunch (it a boring task...but need to do it for debug) and then I reached to a point where I can conclude that its a problem with the sqlite jdbc driver which makes call to native libraries on Monta Vista and system not able to respond in correct manner so is the reason JVM crashes..
I got solution from: http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC
It clearly says that I has issue with Old linux kernal and one should run the program with following command or property set. I works like a charm..
javac mytestprog.java
java -Dsqlite.purejava=true mytestprogorSystem.setProperty("sqlite.purejava", "true");Anyways nice lesson....
No comments:
Post a Comment