Closed a4snet closed 10 years ago
Hi Frank,
are you running your app from Dart Editor or from command line? Which version of Dart SDK/DartEditor you are using?
Usually I hit this kind of error when Oracle Instant Client binaries are not found in the path. Note that if you use Dart Editor, then you need to have oci directories(similar to these two userprofile%\downloads\instantclient-basic-nt-12.1.0.1.0\instantclient_12_1\vc11;%userprofile%\downloads\instantclient-basic-nt-12.1.0.1.0\instantclient_12_1) in the shell that executes Dart Editor. Easiest would be to add them to System/User Environment Variables.
Alexander Aprelev.
One more point I just realized - you will need to have some form of MS Visual Studio 2012 runtime installed. Easiest would be to get redistributable package from http://www.microsoft.com/en-us/download/details.aspx?id=30679. I will update the notes.
Closed after adding instructions to install MS Visual Studio runtime binaries.
I have MS Visual Studio 2012 runtime installed, and I have included the Oracle Instant Client binaries in my path, but I get the same error, via Dart Editor, or on the command-line:
Cannot find extension library'package:oracledart/oracledart.dart': error: line 8 pos 1: library handler failed import 'dart-ext:oracledart_extension';
Regards, Ivo
Hi Ivo,
sorry about that and thank you for letting me know. I have put together simple occi C++ program that just connects to the database with given credentials. I hope you will be able to run it from the same command prompt you execute dart from to confirm that all occi oracle binaries are available. I put Windows binaries along with the source code and buildandrun.cmd to testocci folder(https://github.com/aam/oracledart/tree/master/testocci). If it works correctly you will see something like this:
F:>testocci.exe scott tiger (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=w8-32-12core)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED))) Connected. Test ok.
If it doesn't - let me know what it says. Hopefully it will help troubleshooting.
Thanks!
Thanks for your efforts Alexander.
When I run testocci with or without arguments I get the following error:
Unable to start the application (0xc000007b)
I have run this inside the folder of Oracle Instant Client, so that is not the problem.
I reinstalled Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) because I found some reports with this error, but the problem persists.
I also find : 32bit programs running on a 64 bit client, my system is Windows 8.1 64 bit, and I installed the 64 bit Oracle client.
I will search further.
Thanks,
Ivo
From: Alexander Aprelev [mailto:notifications@github.com] Sent: zondag 6 juli 2014 3:53 To: aam/oracledart Cc: ibalbaert Subject: Re: [oracledart] import 'dart-ext:oracledart_extension (Error) (#7)
Hi Ivo,
sorry about that and thank you for letting me know. I have put together simple occi C++ program that just connects to the database with given credentials. I hope you will be able to run it from the same command prompt you execute dart from to confirm that all occi oracle binaries are available. I put Windows binaries along with the source code and buildandrun.cmd to testocci folder(https://github.com/aam/oracledart/tree/master/testocci).
If it works correctly you will see something like this:
F:>testocci.exe scott tiger (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=w8-32-12core)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))
Connected. Test ok.
If it doesn't - let me know what it says. Hopefully it will help troubleshooting.
Thanks!
— Reply to this email directly or view it on GitHub https://github.com/aam/oracledart/issues/7#issuecomment-48100959 . https://github.com/notifications/beacon/963452__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMDIzMDc4OSwiZGF0YSI6eyJpZCI6MzAyMzkyMDV9fQ==--4aacae26a2849c4c689de769791651f903eb1d24.gif
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Ivo,
take a look at http://aprelevs.blogspot.com/2014/01/building-dart-extension-using.html. There I mentioned Oracle packages I had to install to get occi working. Have you tried compiling testocci in your environment? It would require you to install occi sdk, though.
Anyway, let me know how it goes.
Alexander Aprelev.
I realized that with more recent versions of Dart, windows dart.exe binary is proper x64 binary, so oracledart_extension.dll being 32-bit dll is not going to work with it anymore. You will be seeing this kind of errors:
C:>f:\g\dart-repo\dart\build\ReleaseX64\dart bin\otest.dart Cannot find extension library'package:oracledart/oracledart.dart': error: line 8 pos 1: library handler failed import 'dart-ext:oracledart_extension'; ^
while if you use 32-bit version of dart it is going to work fine:
C:\Users\alexander.APRELEV\dart\otest>f:\g\dart-repo\dart\build\Releaseia32\dart bin\otest.dart Hello, World! CLERK
I'm planning to build 64-bit version of oracledart_extension.dll.
I published 0.0.5 version of the package, which has both 32 and 64-bit versions of the windows dlls. By default 32-bit is "active". To activate 64-bit simply rename oracledart_extension_x64.dll to oracledart_extension.dll. Note that if you use 64-bit version of the extension you will need to use 64-bit version of Oracle Instant Client libraries. I tested with \instantclient-basic-windows.x64-12.1.0.1.0 and my path looks like this:
set path=%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1\vc11;%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1;%path%
Hope this helps!
Thank you very much Alexander, that did it!
I was able to connect and manipulate data in Oracle.
I have a section in my forthcoming 'Dart Cookbook' (to be published by Packt) which discusses oracledart.
Cheers,
Ivo
From: Alexander Aprelev [mailto:notifications@github.com] Sent: dinsdag 8 juli 2014 5:44 To: aam/oracledart Cc: ibalbaert Subject: Re: [oracledart] import 'dart-ext:oracledart_extension (Error) (#7)
I published 0.0.5 version of the package, which has both 32 and 64-bit versions of the windows dlls. By default 32-bit is "active". To activate 64-bit simply rename oracledart_extension_x64.dll to oracledart_extension.dll. Note that you will need to use 64-bit version of Oracle Instant Client libraries. I tested with \instantclient-basic-windows.x64-12.1.0.1.0 and my path looks like this:
set path=%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1\vc11;%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1;%path%
Hope this helps!
— Reply to this email directly or view it on GitHub https://github.com/aam/oracledart/issues/7#issuecomment-48269110 . https://github.com/notifications/beacon/963452__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMDQxMDI1NCwiZGF0YSI6eyJpZCI6MzAyMzkyMDV9fQ==--f0901f6ad7461c3eb2465754f8c2bc36c05233f4.gif
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Glad to hear that Ivo!
If you need more details around building extensions for the book, let me know - I will be happy to help. Good luck!
For me I kept getting issues with ORACLE XE x64 installed at Windows 7 x64, but things gone fine with me using ORACLE XE ia32 installed at Windows 7 x64. what I did is the below:
liked to share this with you, still hoping toget solution for installing ORACLE x64.
thanks
I like to add that in fresh installation of windows 64 bit, I faced the following:
For using OCCI 32 bit, I got error of 2 missing DLL file, this got solved by installing MS VC++ 2010 x86
For using OCCI 64 bit, I got an error 0xc000007d still looking for solution.
I've done what was written in the description. But i got this error.
Cannot find extension library'package:oracledart/oracledart.dart': error: line 8 pos 1: library handler failed import 'dart-ext:oracledart_extension'; ^ 'file:///C:/temp/oracledart/test/oracledart_test.dart': error: line 6 pos 1: library handler failed import 'package:oracledart/oracledart.dart';
Best
Frank