1

I'm trying to write a small program for CRUD operations against an old Pervasive 9 database, but as soon as I try to get a connection with Drivermanager.getConnection it throws

"java.io.IOException: LNA session closed"

I've read THAT post but copy/paste on that code didn't help me. Could be it configuration on that Pervasive 9 machine? Is it JDBC10 driver that won't play nice with older versions? Or.. is it me being stupid? (everything is always possible)

Regards

Community
  • 1
  • 1
elwis
  • 1,395
  • 2
  • 20
  • 34

2 Answers2

2

According to Pervasive, using a newer client to an older engine is not recommended. This is documented at http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=getstart/installprep.02.6.html#149125.
That doesn't mean it won't work but there's no guarantee. There are reports of the Btrieve interface working properly but the relational (SQL, ODBC, JDBC) side fails more often mainly because it changes between major versions where the Btrieve side stays the same. I would suggest using the v9 client (and JDBC driver) or upgrading the server to v10.

mirtheil
  • 8,952
  • 1
  • 30
  • 29
  • Hello and thanks for answering. Upgrading is not an alternative unfortunately, I did try with version 9 JDBC but then I got an error about 32 bit DLL on a 64 bit machine – elwis Nov 07 '14 at 07:11
  • Btw, does the client really matter when using JDBC? I tried developing it on the server using "localhost" but still the same error – elwis Nov 07 '14 at 11:29
  • The Pervasive JDBC driver is the client in this case. The JDBC driver talks to the engine using the Pervasive LNA protocol, even locally on the server. It's this protocol that has changed. The engine can talk to old client but not newer ones. What were the exact errors when you used the v9 driver? – mirtheil Nov 07 '14 at 12:41
  • The "old" JDBC gives me this "Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\PVSW\bin\pvjdbc2.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform". Guess I'll need 32 bit java then – elwis Nov 10 '14 at 07:40
0

@elwis your trouble it's the conecction with the database. I recommend you, make a connection using a reverse ssh tunnel against the machine where you have the database first with port by default of pervasive. Something like: ssh user@yourmachine -L 15831:192.1X.X0.X80:1583

Then, using the tool can generate the connection DBeaver to see and do what you need. That works for me. Good luck.