Running HelloWorld fails

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

Moderators: 99jonathan, roger, imaqine

Running HelloWorld fails

Postby Paddre » Thu Apr 10, 2014 2:51 pm

Hi there,

I am totally new to lejos development and wanted to start with the HelloWorld program of the lejos tutorial (http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/FirstProgram.htm).
Everything compiles fine, but when uploading the program to my NXT brick, I get the following errors:

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:\Programme\leJOSNXJ\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:\Programme\leJOSNXJ\lib\pc\native\windows\x86\jfantom.dll: Eine DLL-Initialisierungsroutine ist fehlgeschlagen
leJOS NXJ>      at java.lang.ClassLoader$NativeLibrary.load(Native Method)


The second last line means something like:
Code: Select all
A DLL installation routine failed


Here is my configuration:
OS: Windows 7, 64 Bit
Driver: RobotC (http://www.robotc.net/download/nxt/) 64 Bit, I tried the Fantom driver as well, but there was no difference
Java Version: 8, 32 Bit
JDK Version: 1.8.0, 32 Bit
Lejos Version: 0.9.1, with installer. Trying the manual way does not change anything either

I really hope you can help me, I have no clue what else I can do :(

Regards,
Patrick
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Re: Running HelloWorld fails

Postby skoehler » Thu Apr 10, 2014 10:42 pm

I have never seen this error before. It is totally new to me. It sounds, like the fantom driver is not installed properly or something like that.
Could you try with Java 7 just to make sure that Java 8 isn't causing us any trouble?
skoehler
leJOS Team Member
 
Posts: 1422
Joined: Thu Oct 30, 2008 4:54 pm

Re: Running HelloWorld fails

Postby Paddre » Sat Apr 12, 2014 12:52 pm

Hi.
I uninstalled and reinstalled everything, using the NXJ Sources. I set the system variables and installed jre7 and jdk 1.7.0_51 (both 32 Bit). Also I installed the Fantom driver provides by Lego, instead of the robotC driver.
Then I tried to compile, link and upload the program again and received the folloging output (the parts between " << " and " >> " are manual translations from German to English ;-) ):
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: <<An installation routine failed>>
leJOS NXJ>      at java.lang.ClassLoader$NativeLibrary.load(Native Method)BlueCove version 2.1.0 on winsock
leJOS NXJ> Error: Exception connecting to NXT.
leJOS NXJ> Caused by lejos.pc.comm.NXTCommException: Open of DDI3 failed.
leJOS NXJ>      at lejos.pc.comm.NXTCommBluecove.open(NXTCommBluecove.java:136)
leJOS NXJ> Caused by javax.bluetooth.BluetoothConnectionException: Connection timeout; [10060] << A connection attemp failed because the counter part did not answer correctly after a while, or the connection was faulty because the connected host did not react >>
leJOS NXJ>      at com.intel.bluetooth.BluetoothStackMicrosoft.connect(Native Method)
leJOS NXJ> Failed to connect to any NXT
No NXT found - is it switched on and plugged in (for USB)?
BlueCove stack shutdown completed


These are a few more messages than before, but the first ones are similar to those I posted before. So nothing really changed :-/

Any ideas? I am starting to become desperate :O

Edit: Just tried the same on the laptop of my mother. I got exactly the same errors

Edit2: Is makes no difference if I have plugged in the brick or not. I get the same errors. (Drivers have been installed properly and the device is listet as "Lego Device" in "Device Manager")
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Re: Running HelloWorld fails

Postby Paddre » Sat Apr 12, 2014 2:04 pm

I suspect, that I have to install the 32 Bit NXT Driver. I tried to install 32 Bit Versions too, but the fantom driver installation fails (missing LegoMindstormsNXTdriver64Supp.msi) and so does the robotC 32 Bit installation (empty installation, nothing is being installed). Both installers seem to be errorful.
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Re: Running HelloWorld fails

Postby skoehler » Sat Apr 12, 2014 6:12 pm

Paddre wrote:I suspect, that I have to install the 32 Bit NXT Driver. I tried to install 32 Bit Versions too, but the fantom driver installation fails (missing LegoMindstormsNXTdriver64Supp.msi) and so does the robotC 32 Bit installation (empty installation, nothing is being installed). Both installers seem to be errorful.

Whether you have to install a 32Bit driver or a 64Bit driver depends ONLY on whether you're using Windows 32Bit or Windows 64Bit.
It is known that the official driver download is broken (missing LegoMindstormsNXTdriver64Supp.msi) but the RobotC driver download has been known to work.
skoehler
leJOS Team Member
 
Posts: 1422
Joined: Thu Oct 30, 2008 4:54 pm

Re: Running HelloWorld fails

Postby Paddre » Sat Apr 12, 2014 6:32 pm

OK. But what else could be the problem?
I tried it on the workstation of my father as well. Same problem...
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Re: Running HelloWorld fails

Postby gloomyandy » Sat Apr 12, 2014 7:16 pm

Are all of these systems 64bit by any chance?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Running HelloWorld fails

Postby Paddre » Sat Apr 12, 2014 9:07 pm

Each system runs Windows 7 64 Bit
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Re: Running HelloWorld fails

Postby gloomyandy » Sat Apr 12, 2014 9:48 pm

I wonder if they have finally switched the driver to be a true 64bit one with a 64bit API? If so you may have to try and locate and old fantom driver for 64bit windows.

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Running HelloWorld fails

Postby Paddre » Sat Apr 12, 2014 9:55 pm

But when I install leJOS 32 after the 64Bit driver, there are the same errors :-\
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Re: Running HelloWorld fails

Postby skoehler » Sat Apr 12, 2014 9:55 pm

gloomyandy wrote:I wonder if they have finally switched the driver to be a true 64bit one with a 64bit API? If so you may have to try and locate and old fantom driver for 64bit windows.

No no - the fantom.dll is still 32bit only, also in version 1.20 (the latest available).
skoehler
leJOS Team Member
 
Posts: 1422
Joined: Thu Oct 30, 2008 4:54 pm

Re: Running HelloWorld fails

Postby Paddre » Sat Apr 12, 2014 10:00 pm

So what exactly am I supposed to do?
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Re: Running HelloWorld fails

Postby gloomyandy » Sat Apr 12, 2014 10:04 pm

I've told you what I would do, try and find an older version of the driver. I know that worked on Windows 7 64bit. I have no idea why the new driver is not working and unfortunately don't have the time to investigate at the moment.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Running HelloWorld fails

Postby gloomyandy » Sat Apr 12, 2014 10:21 pm

When you install leJOS did you flash the leJOS firmware? Did that work? If so what have you changed since then?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Running HelloWorld fails

Postby Paddre » Sat Apr 12, 2014 11:09 pm

I got an already flashed brick to work with.
The firmware version is 0.85 (java). Could that be the problem?
Paddre
New User
 
Posts: 12
Joined: Thu Apr 10, 2014 2:36 pm

Next

Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron
more stuff