Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Louis LaBrunda

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Richard Sargent
Administrator
On Wednesday, April 9, 2014 3:12:37 PM UTC-7, Louis LaBrunda wrote:
Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.


126 refers to a DLL load error. There was another thread a few months ago about how to find out which DLL didn't load, using different Windows calls. (If you're not using Windows, that will be problematic.)

The DLL is either the one needed for the PlatformFunction in question of something it needs to load. So, it could be the absence of the DLLs in your runtime directory, the absence of the directory from the path, or something like that.


I hope your dinner was good!
 

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

jtuchel
In reply to this post by Louis LaBrunda
Lou,

OS Error 126 means an external lib cannot be found. You should check what Richard suggests. Another possible cause: did you deploy with an ini file o'from 8.0.3 which misses the stanza whith lib name mappings?

I think it is quite unlikely that it's a packaging problem.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

jtuchel
In reply to this post by Louis LaBrunda
Lou,

I remember getting into troubles with SqlAllocEvent on Linux. The funny thing was that I somehow found out VA assumed I was using an ANCIENT version of ODBC, because in current versions, another API call should be used. The thing even felt stranger because i was using the db2 cli driver.  

I am desperately trying to remember how exactly the issue was solved. It was an envirenment issue, some libs missing on my Linux box or such.

So do you see this on windows or Linux?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Michael LaMantia
In reply to this post by Louis LaBrunda


On Wednesday, April 9, 2014 6:12:37 PM UTC-4, Louis LaBrunda wrote:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


Check to make sure that your .ini file for your packaged image includes the [PlatformLibrary Name Mappings] section.  Check your abt.ini file for the appropriate values to put in this section, as I have found that in packaging, they are not automatically put into the ini file.

Mike

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Louis LaBrunda

Hi Everybody,

Thank you all for the posts and very fast response.  After dinner on Wednesday (it wasn't bad Richard - thanks) and before I got back to my computer Thursday morning, I concluded it may be a missing DLL but I had included everything Instantiations supplies in their server zip, so didn't quite make sense.

Joachim hinted at the answer but I wasn't quite sure what he meant.  I tried what Mike suggested and that did the trick.

Thank you all again.

Lou


On Thursday, April 10, 2014 3:54:40 PM UTC-4, Michael LaMantia wrote:



On Wednesday, April 9, 2014 6:12:37 PM UTC-4, Louis LaBrunda wrote:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


Check to make sure that your .ini file for your packaged image includes the [PlatformLibrary Name Mappings] section.  Check your abt.ini file for the appropriate values to put in this section, as I have found that in packaging, they are not automatically put into the ini file.

Mike

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

jtuchel
Hi Lou,

so we've learned that we need to take a look at the ini file provided with new versions ;-) 
I made the plan to always use an ini from the dev image with a new version and modify that instead of using the old ini for a new runtime.

Joachim

Am Freitag, 11. April 2014 15:35:26 UTC+2 schrieb Louis LaBrunda:

Hi Everybody,

Thank you all for the posts and very fast response.  After dinner on Wednesday (it wasn't bad Richard - thanks) and before I got back to my computer Thursday morning, I concluded it may be a missing DLL but I had included everything Instantiations supplies in their server zip, so didn't quite make sense.

Joachim hinted at the answer but I wasn't quite sure what he meant.  I tried what Mike suggested and that did the trick.

Thank you all again.

Lou


On Thursday, April 10, 2014 3:54:40 PM UTC-4, Michael LaMantia wrote:



On Wednesday, April 9, 2014 6:12:37 PM UTC-4, Louis LaBrunda wrote:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


Check to make sure that your .ini file for your packaged image includes the [PlatformLibrary Name Mappings] section.  Check your abt.ini file for the appropriate values to put in this section, as I have found that in packaging, they are not automatically put into the ini file.

Mike

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Mariana Matos
In reply to this post by Louis LaBrunda
Hi, I'm reviving this thread because I have a similar problem.

I'm trying to migrate from an older version of Smalltalk (trying to get rid of a deprecated VA6) and I'm getting this error:

Walkback: Primitive failed calling 'DB2CliLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

The application indeed uses a DB2 database and fails when it first attempts to connect to it. At first there was no ini file in the runtime directory and I got this error, so I copied one and renamed it accordingly to match the package name.

This ini file already had the following under the PlatformLibrary Name Mappings section:
DB2CliLibraryName=db2cli

But still I get the same error as before.

I checked and there is a file named db2cli.dll under the DB2 bin directory (which is part of the PATH environment variable, so it's not like DB2 is incorrectly installed or something).

Also, when I run the application using a VA6 built runtime in the same machine (without an ini file), this issue does not happen.

I have also tried changing the ini to use db2cli64, since the machine I'm trying to run this on is 64 bits, but apparently the executable runs as 32 bits, so that didn't solve it, it just led to a similar dll issue with OS error193.

Anyway, I'm really stuck here and I've been pushing to migrate to newer VA versions for a really long time. I'd hate to have to continue working on VA6 because of this. Any ideas will be greatly appreciated!

Thanks,

Mariana

El miércoles, 9 de abril de 2014, 19:12:37 (UTC-3), Louis LaBrunda escribió:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Louis LaBrunda
Hi Mariana,

Do you have these four lines in your .ini file:

DB2CliLibraryName=db2cli
DB2PrecompilerServices=db2aprep
DB2RuntimeServices=db2app
DB2RuntimeServicesMessages=db2agapi

Somewhere between version 6 and version 8.6.3 Instantiations removed direct references to .ini file names from the image (and maybe other places) and now links them up via the .ini file.  Since things work with your version 6, I think we can assume the needed files are present and that the problem lies in finding them.  So the .ini files seems like the place to look.  If you have those four lines or add them and still have problems, post back and we will see what else we can come up with.

Lou



On Wednesday, May 17, 2017 at 8:56:56 AM UTC-4, Mariana Matos wrote:
Hi, I'm reviving this thread because I have a similar problem.

I'm trying to migrate from an older version of Smalltalk (trying to get rid of a deprecated VA6) and I'm getting this error:

Walkback: Primitive failed calling 'DB2CliLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

The application indeed uses a DB2 database and fails when it first attempts to connect to it. At first there was no ini file in the runtime directory and I got this error, so I copied one and renamed it accordingly to match the package name.

This ini file already had the following under the PlatformLibrary Name Mappings section:
DB2CliLibraryName=db2cli

But still I get the same error as before.

I checked and there is a file named db2cli.dll under the DB2 bin directory (which is part of the PATH environment variable, so it's not like DB2 is incorrectly installed or something).

Also, when I run the application using a VA6 built runtime in the same machine (without an ini file), this issue does not happen.

I have also tried changing the ini to use db2cli64, since the machine I'm trying to run this on is 64 bits, but apparently the executable runs as 32 bits, so that didn't solve it, it just led to a similar dll issue with OS error193.

Anyway, I'm really stuck here and I've been pushing to migrate to newer VA versions for a really long time. I'd hate to have to continue working on VA6 because of this. Any ideas will be greatly appreciated!

Thanks,

Mariana

El miércoles, 9 de abril de 2014, 19:12:37 (UTC-3), Louis LaBrunda escribió:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Mariana Matos
Yes, I have those 4 lines in the .ini file.

And since I tried changing it to use the 64 bit version (which failed for different reasons), I was able to confirm that it was being picked up.

El miércoles, 17 de mayo de 2017, 10:35:10 (UTC-3), Louis LaBrunda escribió:
Hi Mariana,

Do you have these four lines in your .ini file:

DB2CliLibraryName=db2cli
DB2PrecompilerServices=db2aprep
DB2RuntimeServices=db2app
DB2RuntimeServicesMessages=db2agapi

Somewhere between version 6 and version 8.6.3 Instantiations removed direct references to .ini file names from the image (and maybe other places) and now links them up via the .ini file.  Since things work with your version 6, I think we can assume the needed files are present and that the problem lies in finding them.  So the .ini files seems like the place to look.  If you have those four lines or add them and still have problems, post back and we will see what else we can come up with.

Lou



On Wednesday, May 17, 2017 at 8:56:56 AM UTC-4, Mariana Matos wrote:
Hi, I'm reviving this thread because I have a similar problem.

I'm trying to migrate from an older version of Smalltalk (trying to get rid of a deprecated VA6) and I'm getting this error:

Walkback: Primitive failed calling 'DB2CliLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

The application indeed uses a DB2 database and fails when it first attempts to connect to it. At first there was no ini file in the runtime directory and I got this error, so I copied one and renamed it accordingly to match the package name.

This ini file already had the following under the PlatformLibrary Name Mappings section:
DB2CliLibraryName=db2cli

But still I get the same error as before.

I checked and there is a file named db2cli.dll under the DB2 bin directory (which is part of the PATH environment variable, so it's not like DB2 is incorrectly installed or something).

Also, when I run the application using a VA6 built runtime in the same machine (without an ini file), this issue does not happen.

I have also tried changing the ini to use db2cli64, since the machine I'm trying to run this on is 64 bits, but apparently the executable runs as 32 bits, so that didn't solve it, it just led to a similar dll issue with OS error193.

Anyway, I'm really stuck here and I've been pushing to migrate to newer VA versions for a really long time. I'd hate to have to continue working on VA6 because of this. Any ideas will be greatly appreciated!

Thanks,

Mariana

El miércoles, 9 de abril de 2014, 19:12:37 (UTC-3), Louis LaBrunda escribió:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Louis LaBrunda
Hi Mariana,

My next guess would be that one or more of these DLLs; db2cli.dll, db2aprep.dll, db2app.dll and db2agapi.dll aren't being found.  Can you try coping them to the same folder and the executable.  If things work then, they are in the wrong place of there is a problem with a path setup.

Lou



On Wednesday, May 17, 2017 at 12:27:13 PM UTC-4, Mariana Matos wrote:
Yes, I have those 4 lines in the .ini file.

And since I tried changing it to use the 64 bit version (which failed for different reasons), I was able to confirm that it was being picked up.

El miércoles, 17 de mayo de 2017, 10:35:10 (UTC-3), Louis LaBrunda escribió:
Hi Mariana,

Do you have these four lines in your .ini file:

DB2CliLibraryName=db2cli
DB2PrecompilerServices=db2aprep
DB2RuntimeServices=db2app
DB2RuntimeServicesMessages=db2agapi

Somewhere between version 6 and version 8.6.3 Instantiations removed direct references to .ini file names from the image (and maybe other places) and now links them up via the .ini file.  Since things work with your version 6, I think we can assume the needed files are present and that the problem lies in finding them.  So the .ini files seems like the place to look.  If you have those four lines or add them and still have problems, post back and we will see what else we can come up with.

Lou



On Wednesday, May 17, 2017 at 8:56:56 AM UTC-4, Mariana Matos wrote:
Hi, I'm reviving this thread because I have a similar problem.

I'm trying to migrate from an older version of Smalltalk (trying to get rid of a deprecated VA6) and I'm getting this error:

Walkback: Primitive failed calling 'DB2CliLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

The application indeed uses a DB2 database and fails when it first attempts to connect to it. At first there was no ini file in the runtime directory and I got this error, so I copied one and renamed it accordingly to match the package name.

This ini file already had the following under the PlatformLibrary Name Mappings section:
DB2CliLibraryName=db2cli

But still I get the same error as before.

I checked and there is a file named db2cli.dll under the DB2 bin directory (which is part of the PATH environment variable, so it's not like DB2 is incorrectly installed or something).

Also, when I run the application using a VA6 built runtime in the same machine (without an ini file), this issue does not happen.

I have also tried changing the ini to use db2cli64, since the machine I'm trying to run this on is 64 bits, but apparently the executable runs as 32 bits, so that didn't solve it, it just led to a similar dll issue with OS error193.

Anyway, I'm really stuck here and I've been pushing to migrate to newer VA versions for a really long time. I'd hate to have to continue working on VA6 because of this. Any ideas will be greatly appreciated!

Thanks,

Mariana

El miércoles, 9 de abril de 2014, 19:12:37 (UTC-3), Louis LaBrunda escribió:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Santiago Cardoso Geller-3
In reply to this post by Mariana Matos
Hello Mariana. Here we have the same error after migration from VAST 6.0.4 to VA Smalltalk 8.6.3.

I didn't take the time to analyze how the library name is initialized from the .ini file, but you can try to replace method AbtIbmCliDatabaseManager class>>#libraryName with the following:

libraryName
"Answer the logical name for the library."

^ 'db2cli' "$NON-NLS$"

and do the reduce again. This will work just for windows. Is not the final solution, but is a point to start the analysis.
In VAST 6.0.4 the libraryName is resolved starting from AbtDatabaseManager class>>#selectLibraryName: 

I couldn't see how the name is initialized from abt.ini, since there's no other reference to string 'DB2CliLibraryName' in the image. I will continue look for that.

Regards,
Santiago



2017-05-17 13:27 GMT-03:00 Mariana Matos <[hidden email]>:
Yes, I have those 4 lines in the .ini file.

And since I tried changing it to use the 64 bit version (which failed for different reasons), I was able to confirm that it was being picked up.


El miércoles, 17 de mayo de 2017, 10:35:10 (UTC-3), Louis LaBrunda escribió:
Hi Mariana,

Do you have these four lines in your .ini file:

DB2CliLibraryName=db2cli
DB2PrecompilerServices=db2aprep
DB2RuntimeServices=db2app
DB2RuntimeServicesMessages=db2agapi

Somewhere between version 6 and version 8.6.3 Instantiations removed direct references to .ini file names from the image (and maybe other places) and now links them up via the .ini file.  Since things work with your version 6, I think we can assume the needed files are present and that the problem lies in finding them.  So the .ini files seems like the place to look.  If you have those four lines or add them and still have problems, post back and we will see what else we can come up with.

Lou



On Wednesday, May 17, 2017 at 8:56:56 AM UTC-4, Mariana Matos wrote:
Hi, I'm reviving this thread because I have a similar problem.

I'm trying to migrate from an older version of Smalltalk (trying to get rid of a deprecated VA6) and I'm getting this error:

Walkback: Primitive failed calling 'DB2CliLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

The application indeed uses a DB2 database and fails when it first attempts to connect to it. At first there was no ini file in the runtime directory and I got this error, so I copied one and renamed it accordingly to match the package name.

This ini file already had the following under the PlatformLibrary Name Mappings section:
DB2CliLibraryName=db2cli

But still I get the same error as before.

I checked and there is a file named db2cli.dll under the DB2 bin directory (which is part of the PATH environment variable, so it's not like DB2 is incorrectly installed or something).

Also, when I run the application using a VA6 built runtime in the same machine (without an ini file), this issue does not happen.

I have also tried changing the ini to use db2cli64, since the machine I'm trying to run this on is 64 bits, but apparently the executable runs as 32 bits, so that didn't solve it, it just led to a similar dll issue with OS error193.

Anyway, I'm really stuck here and I've been pushing to migrate to newer VA versions for a really long time. I'd hate to have to continue working on VA6 because of this. Any ideas will be greatly appreciated!

Thanks,

Mariana

El miércoles, 9 de abril de 2014, 19:12:37 (UTC-3), Louis LaBrunda escribió:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

Mariana Matos
After copying dlls back and forth with no luck I realized this morning that the problem was hiding at plain sight... the ini file was actually incorrectly named, since the extension was not shown the files was named wwace11.ini.ini instead of wwace11.ini.

I corrected it and the application launched ok at last!

Thanks all for the replies!

El miércoles, 17 de mayo de 2017, 15:16:55 (UTC-3), Santiago Cardoso Geller escribió:
Hello Mariana. Here we have the same error after migration from VAST 6.0.4 to VA Smalltalk 8.6.3.

I didn't take the time to analyze how the library name is initialized from the .ini file, but you can try to replace method AbtIbmCliDatabaseManager class>>#libraryName with the following:

libraryName
"Answer the logical name for the library."

^ 'db2cli' "$NON-NLS$"

and do the reduce again. This will work just for windows. Is not the final solution, but is a point to start the analysis.
In VAST 6.0.4 the libraryName is resolved starting from AbtDatabaseManager class>>#selectLibraryName: 

I couldn't see how the name is initialized from abt.ini, since there's no other reference to string 'DB2CliLibraryName' in the image. I will continue look for that.

Regards,
Santiago



2017-05-17 13:27 GMT-03:00 Mariana Matos <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="l7kM7I6tCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mmat...@...>:
Yes, I have those 4 lines in the .ini file.

And since I tried changing it to use the 64 bit version (which failed for different reasons), I was able to confirm that it was being picked up.


El miércoles, 17 de mayo de 2017, 10:35:10 (UTC-3), Louis LaBrunda escribió:
Hi Mariana,

Do you have these four lines in your .ini file:

DB2CliLibraryName=db2cli
DB2PrecompilerServices=db2aprep
DB2RuntimeServices=db2app
DB2RuntimeServicesMessages=db2agapi

Somewhere between version 6 and version 8.6.3 Instantiations removed direct references to .ini file names from the image (and maybe other places) and now links them up via the .ini file.  Since things work with your version 6, I think we can assume the needed files are present and that the problem lies in finding them.  So the .ini files seems like the place to look.  If you have those four lines or add them and still have problems, post back and we will see what else we can come up with.

Lou



On Wednesday, May 17, 2017 at 8:56:56 AM UTC-4, Mariana Matos wrote:
Hi, I'm reviving this thread because I have a similar problem.

I'm trying to migrate from an older version of Smalltalk (trying to get rid of a deprecated VA6) and I'm getting this error:

Walkback: Primitive failed calling 'DB2CliLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

The application indeed uses a DB2 database and fails when it first attempts to connect to it. At first there was no ini file in the runtime directory and I got this error, so I copied one and renamed it accordingly to match the package name.

This ini file already had the following under the PlatformLibrary Name Mappings section:
DB2CliLibraryName=db2cli

But still I get the same error as before.

I checked and there is a file named db2cli.dll under the DB2 bin directory (which is part of the PATH environment variable, so it's not like DB2 is incorrectly installed or something).

Also, when I run the application using a VA6 built runtime in the same machine (without an ini file), this issue does not happen.

I have also tried changing the ini to use db2cli64, since the machine I'm trying to run this on is 64 bits, but apparently the executable runs as 32 bits, so that didn't solve it, it just led to a similar dll issue with OS error193.

Anyway, I'm really stuck here and I've been pushing to migrate to newer VA versions for a really long time. I'd hate to have to continue working on VA6 because of this. Any ideas will be greatly appreciated!

Thanks,

Mariana

El miércoles, 9 de abril de 2014, 19:12:37 (UTC-3), Louis LaBrunda escribió:

Hi,

I have a GUI program that I'm upgrading from V8.0.3 to V8.6.  It runs okay in the development environment but has this error:

Runtime error: Primitive failed calling 'ODBCLibraryName':SQLAllocEnv from PlatformFunction>>#callWithArguments: due to OS error126

at runtime.  I expect a packaging problem but it's late and time for dinner.  I'm hoping someone will post an idea by the time I get back here tomorrow.

Lou


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="l7kM7I6tCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">va-smalltalk...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="l7kM7I6tCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">va-sma...@....
Visit this group at <a href="https://groups.google.com/group/va-smalltalk" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/va-smalltalk&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/va-smalltalk&#39;;return true;">https://groups.google.com/group/va-smalltalk.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.