If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > UnsatisfiedLinkError: SQLAllocEnv

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-04, 21:13
db2_learner99 db2_learner99 is offline
Registered User
 
Join Date: Nov 2003
Posts: 9
UnsatisfiedLinkError: SQLAllocEnv

Hi,

I am facing a problem with DB2 V7.2.3 Personal Edition. When I try to store an object, I get the following Exception:

java.lang.reflect.InvocationTargetException ....

caused by: java.lang.UnsatisfiedLinkError: SQLAllocEnv.
at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv ...

what does it mean and how can I solve it?

thx,
Dirk
Reply With Quote
  #2 (permalink)  
Old 01-10-04, 11:32
sanjum sanjum is offline
Registered User
 
Join Date: Jan 2004
Posts: 7
Unsatisfied Link error

Hi,

I am getting this error as soon as i try to load the driver. I am using DB2 8.1 that is installed on an NT4 SP6 system. Previously i did not have this problem with 7.1. I had to reinstall my OS and then once i configured DB2 and ran the java program to get connection, it failed with this error.

ava.lang.UnsatisfiedLinkError: SQLAllocEnv
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.ja va:228)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver. java:118)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at com.dc.elan.common.db.ConnectionManager.getConn(Co nnectionManager.java:82)
Reply With Quote
  #3 (permalink)  
Old 01-10-04, 12:12
sanjum sanjum is offline
Registered User
 
Join Date: Jan 2004
Posts: 7
Re: UnsatisfiedLinkError: SQLAllocEnv

Hi Dirk,

I did the following and the problem got solved.
1) I removed all the DSN configurations that had been done for the datasource to the database.
2) I was using the 7.1 version db2java.zip in my application and the latest version in my system was 8.1. Once I changed the application imports to reflect the 8.1 jar, the unsatisfied link error was gone.
3) Following this i got a "no suitable driver". Once i changed my url to JDBC:db2ample, it worked fine.

Hope this helps.

Regards,
Jumani


Quote:
Originally posted by db2_learner99
Hi,

I am facing a problem with DB2 V7.2.3 Personal Edition. When I try to store an object, I get the following Exception:

java.lang.reflect.InvocationTargetException ....

caused by: java.lang.UnsatisfiedLinkError: SQLAllocEnv.
at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv ...

what does it mean and how can I solve it?

thx,
Dirk
Reply With Quote
  #4 (permalink)  
Old 01-14-04, 13:39
db2_learner99 db2_learner99 is offline
Registered User
 
Join Date: Nov 2003
Posts: 9
Re: UnsatisfiedLinkError: SQLAllocEnv

Quote:
Originally posted by sanjum
Hi Dirk,

I did the following and the problem got solved.
1) I removed all the DSN configurations that had been done for the datasource to the database.
2) I was using the 7.1 version db2java.zip in my application and the latest version in my system was 8.1. Once I changed the application imports to reflect the 8.1 jar, the unsatisfied link error was gone.
3) Following this i got a "no suitable driver". Once i changed my url to JDBC:db2ample, it worked fine.

Hope this helps.

Regards,
Jumani
Hi Jumani,

in my case the problem caused the use of two different db2 driver. You always have to use the same driver on the app and db2 side. I had a newer one for my app and that caused the exception. After copy it to the db2, it works.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On