Unable to load driver

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: roger, imaqine, 99jonathan

matejdro
Novice
Posts: 54
Joined: Wed Mar 14, 2012 9:10 am

Unable to load driver

Postby matejdro » Tue Apr 03, 2012 5:49 pm

What did I screw up here?

Code: Select all

leJOS NXJ> Error: Failed to load USB comms driver.
leJOS NXJ> Caused by lejos.pc.comm.NXTCommException: Cannot load NXTComm driver
leJOS NXJ>    at lejos.pc.comm.NXTCommFactory.newNXTCommInstance(NXTCommFactory.java:110)
leJOS NXJ> Caused by lejos.internal.jni.JNIException: cannot load library C:\Program Files (x86)\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll, architecture windows/x86
leJOS NXJ>    at lejos.internal.jni.JNILoader.loadLibrary(JNILoader.java:121)
leJOS NXJ> Caused by java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll: Can't find dependent libraries
leJOS NXJ>    at java.lang.ClassLoader$NativeLibrary.load(Native Method)


It gives that error at eclipse and bat files.

Using 32bit eclipse, 32bit JDK, latest lego driver. I can see NXT in device manager under "LEGO Devices".

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Re: Unable to load driver

Postby skoehler » Tue Apr 03, 2012 7:24 pm

Lego Driver isn't installed properly. Please reinstall Fantom Driver 1.1.3 found here:
http://mindstorms.lego.com/en-us/suppor ... river.aspx

Even though you say that it is already installed, the message "C:\Program Files (x86)\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll: Can't find dependent libraries" suggest that the Fantom driver isn't installed proberly. Most likely, the fantom.dll (without a j) is not found. If reinstallting the Fantom drivers doesn't help, use the Dependency Walker, open jfantom.dll with it and post a screenshot:
http://www.dependencywalker.com/

Which version of Windows are you using?

matejdro
Novice
Posts: 54
Joined: Wed Mar 14, 2012 9:10 am

Re: Unable to load driver

Postby matejdro » Tue Apr 03, 2012 7:36 pm

Image

Windows 7 x64

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Re: Unable to load driver

Postby skoehler » Tue Apr 03, 2012 8:01 pm

I think MSVCR71.dll is the DLL that's missing. On 32 Bit Windows 7 it should reside in c:\windows\system32 and on Windows 64Bit it should reside in c:\windows\syswow64.
Try to find a copy of that file on your system and try copying it to c:\windows\syswow64. I was unable to find an official installer my microsoft. Only dubious sources on the net.

matejdro
Novice
Posts: 54
Joined: Wed Mar 14, 2012 9:10 am

Re: Unable to load driver

Postby matejdro » Wed Apr 04, 2012 8:50 am

It worked. Thanks!

McPlayHD
New User
Posts: 3
Joined: Thu Mar 12, 2015 7:27 pm

Re: Unable to load driver

Postby McPlayHD » Thu Mar 12, 2015 7:32 pm

I know, that this thread is really old. But I have exactly the same problem. Just at mine, the MSVCR71.dll is in the C:\Windows\SysWOW64 directory. What are I making wrong? It outprints

Code: Select all

Linking ...
Program has been linked successfully
Uploading ...
leJOS NXJ> Error: Failed to load USB comms driver.
leJOS NXJ> Caused by lejos.pc.comm.NXTCommException: Cannot load NXTComm driver
leJOS NXJ>    at lejos.pc.comm.NXTCommFactory.newNXTCommInstance(NXTCommFactory.java:110)
leJOS NXJ> Caused by lejos.internal.jni.JNIException: library jfantom.dll was not found in C:\Program Files (x86)\leJOS NXJ\lib\pc\native, architecture windows/x86_64
leJOS NXJ>    at lejos.internal.jni.JNILoader.loadLibrary(JNILoader.java:127)
leJOS NXJ> Searching for any NXT using Bluetooth inquiry
Native Library intelbth_x64 not available
Native Library bluecove_x64 not available
leJOS NXJ> Error: Search failed.
leJOS NXJ> Caused by lejos.pc.comm.NXTCommException: Bluetooth stack not detected
leJOS NXJ>    at lejos.pc.comm.NXTCommBluecove.search(NXTCommBluecove.java:54)
leJOS NXJ> Caused by javax.bluetooth.BluetoothStateException: BlueCove libraries not available
leJOS NXJ>    at com.intel.bluetooth.BlueCoveImpl.createDetectorOnWindows(BlueCoveImpl.java:896)
leJOS NXJ> Failed to find any NXTs
leJOS NXJ> Failed to connect to any NXT
No NXT found - is it switched on and plugged in (for USB)?
uploading the program failed with exit status 1

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Re: Unable to load driver

Postby skoehler » Thu Mar 12, 2015 7:37 pm

No, you don't have the same problem. You're trying to use use lejos nxj with 64 bit java, which is not supported.

McPlayHD
New User
Posts: 3
Joined: Thu Mar 12, 2015 7:27 pm

Re: Unable to load driver

Postby McPlayHD » Thu Mar 12, 2015 7:38 pm

Huh... And how can I fix that?

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Re: Unable to load driver

Postby skoehler » Thu Mar 12, 2015 8:13 pm

Download and install Java 32 Bit. If you're using Eclipse, make sure you're using Eclipse 32 bit for everything leJOS NXJ.

McPlayHD
New User
Posts: 3
Joined: Thu Mar 12, 2015 7:27 pm

Re: Unable to load driver

Postby McPlayHD » Thu Mar 12, 2015 8:30 pm

Thank you so much...
I've got the NXT now for 5 Jears and in this time I've learned to program Java. I hope, now all will go great.

songchecker99
New User
Posts: 4
Joined: Sat Mar 28, 2015 1:17 pm

Re: Unable to load driver

Postby songchecker99 » Sat Mar 28, 2015 1:35 pm

Hey there, I have a Problem with using LeJOS too. When I start the flash utility and try to flash my NXT i get the following error.
" Bad news: An error has occurred
lejos.pc.comm.NXTCommException: Cannot load NXTComm driver"
and it says

Code: Select all

Building firmware image.
VM file: C:\Program Files (x86)\leJOS NXJ\bin\lejos_nxt_rom.bin
Menu file: C:\Program Files (x86)\leJOS NXJ\bin\StartUpText.bin
Magic string found at offset 0x40
VM size: 55888 bytes.
Menu size: 47740 bytes.
Total image size 103804/104448 bytes.
Building filesystem image.
Locating device in firmware update mode.


Im using Windows 7 64 bit.

The second problem is,when I try to run a LeJOS Project in Eclipse I get the following error:

Code: Select all

Linking ...
Program has been linked successfully
Uploading ...
leJOS NXJ> Error: Failed to load USB comms driver.
leJOS NXJ> Caused by lejos.pc.comm.NXTCommException: Cannot load NXTComm driver
leJOS NXJ>    at lejos.pc.comm.NXTCommFactory.newNXTCommInstance(NXTCommFactory.java:110)
leJOS NXJ> Caused by lejos.internal.jni.JNIException: cannot load library C:\Program Files (x86)\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll, architecture windows/x86
leJOS NXJ>    at lejos.internal.jni.JNILoader.loadLibrary(JNILoader.java:121)
leJOS NXJ> Caused by java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll: Eine DLL-Initialisierungsroutine ist fehlgeschlagen
leJOS NXJ>    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
leJOS NXJ> Searching for any NXT using Bluetooth inquiry
leJOS NXJ> Error: Search failed.
leJOS NXJ> Caused by lejos.pc.comm.NXTCommException: Bluetooth stack not detected
leJOS NXJ>    at lejos.pc.comm.NXTCommBluecove.search(NXTCommBluecove.java:54)
leJOS NXJ> Caused by javax.bluetooth.BluetoothStateException: BluetoothStack not detected
leJOS NXJ>    at com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:476)
leJOS NXJ> Failed to find any NXTs
leJOS NXJ> Failed to connect to any NXT
No NXT found - is it switched on and plugged in (for USB)?
uploading the program failed with exit status 1


I actually dont know what do to, its my first NXT Project and we have to do it for school, would be nice if someone could help:)

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Re: Unable to load driver

Postby skoehler » Sat Mar 28, 2015 1:49 pm

Do you have installed the Fantom driver?

songchecker99
New User
Posts: 4
Joined: Sat Mar 28, 2015 1:17 pm

Re: Unable to load driver

Postby songchecker99 » Sat Mar 28, 2015 3:53 pm

Yes, I have installed the 64 bit Fantom Driver from the offical page

skoehler
leJOS Team Member
Posts: 1538
Joined: Thu Oct 30, 2008 4:54 pm

Re: Unable to load driver

Postby skoehler » Sat Mar 28, 2015 4:08 pm

songchecker99 wrote:Yes, I have installed the 64 bit Fantom Driver from the offical page

Hmm, I know that the official download is broken. So, if I may ask, how did you install it?
See here for more information: viewtopic.php?f=7&t=6741

Also, could you download the dependency walker and open the jfantom.dll that comes with leJOS? Then please post a screenshot like the one above.

songchecker99
New User
Posts: 4
Joined: Sat Mar 28, 2015 1:17 pm

Re: Unable to load driver

Postby songchecker99 » Sat Mar 28, 2015 4:25 pm

Well, i just downloaded it and clicked through the installation guide. It said it is installed completly and when i plug in the NXT, my Computer downloads the Driver and recognizes the NXT. I guess just the leJOS Flash utility and Eclipse cant find it.

If you cant see the picture,here is the link: https://plus.google.com/u/0/11483690680 ... 7725998894


Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 1 guest