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: 1509
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: 1509
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: 1509
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: 1509
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.


Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 1 guest