Enchanting fails to run: cannot find EnchantingBridge

This is the place to ask question about Enchanting, talk about your Enchanting projects or simply find out more about Enchanting on the NXT.

Moderator: clintonb

ggrinton
New User
Posts: 4
Joined: Wed Oct 29, 2014 10:05 am

Enchanting fails to run: cannot find EnchantingBridge

Postby ggrinton » Sat Dec 20, 2014 10:10 am

Good evening.

A couple of months ago I logged an issue with the latest version 0.2.4.3 (See http://www.lejos.org/forum/viewtopic.php?f=16&t=7365). I never got it resolved, but pressure of the end of year meant I have not been back to it recently. Now I have a chance to do so, I am seeing a different problem.

Running Enchanting.exe appears to do nothing. However, seeing a batch file that looks as though it is intended to give more information, I have tried running verbose_enchanting.windows.bat.

This generates the following log:

Code: Select all

C:\Program Files (x86)\Enchanting>"C:\Program Files (x86)\Enchanting\verbose_enchanting.windows.bat"

C:\Program Files (x86)\Enchanting>REM starts enchanting

C:\Program Files (x86)\Enchanting>pushd .

C:\Program Files (x86)\Enchanting>REM be sure we are in the batch file's directory

C:\Program Files (x86)\Enchanting>cd "C:\Program Files (x86)\Enchanting\verbose_enchanting.windows.bat"\..\

C:\Program Files (x86)\Enchanting>cd BackEnd

C:\Program Files (x86)\Enchanting\BackEnd>call run.bat start /wait ..\FrontEnd\EnchantingFE.exe -- [ignored]
JAVA_HOME=C:\Program Files (x86)\Enchanting\ThirdParty\openjdk
FANTOM_HOME=C:\VXIPNP\WinNT\Bin\NiViUsb.dll
Found all dependencies.
Error: Could not find or load main class EnchantingBridge
C:\Program Files (x86)\Enchanting>

I can see that EnchantingBridge.java and EnchantingBridge.class both exist in the \backend directory.

I have tried totally removing Enchanting and doing a fresh install - same problem.
I also tried installing to a directory path with no spaces in case that was an issue - same problem.

Any suggestions about this one, please?

Thanks.
Geoffrey

clintonb
Active User
Posts: 138
Joined: Fri May 28, 2010 1:44 am
Location: Cardston, Alberta, Canada
Contact:

Re: Enchanting fails to run: cannot find EnchantingBridge

Postby clintonb » Thu Jan 22, 2015 2:28 pm

Thanks for providing the verbose output.

I'm afraid I've got very little idea what is going on here.

Did Enchanting run for you previously, on the same computer?

Does the Browse Files command, in the same folder as Enchanting, work for you?

I don't know if it'd make any difference, but are you running software for the EV3 on the computer?

Cheers,
Clinton Blackmore

ggrinton
New User
Posts: 4
Joined: Wed Oct 29, 2014 10:05 am

Re: Enchanting fails to run: cannot find EnchantingBridge

Postby ggrinton » Thu Jan 22, 2015 10:41 pm

Hi Clinton.

Yes, Enchanting did run previously on this computer. I'm afraid I can't identify what change may have caused the problem. I am regularly applying Microsoft updates, so change is almost constant.

Yes, the Browse Files command works fine. It connects to the NXT and lists the files correctly. Here is what happens:

Code: Select all

C:\Program Files (x86)\Enchanting>"C:\Program Files (x86)\Enchanting\Browse Files.bat

C:\Program Files (x86)\Enchanting>REM starts enchanting

C:\Program Files (x86)\Enchanting>pushd .

C:\Program Files (x86)\Enchanting>REM be sure we are in the batch file's directory

C:\Program Files (x86)\Enchanting>cd "C:\Program Files (x86)\Enchanting\Browse Files.bat\..\

C:\Program Files (x86)\Enchanting>cd BackEnd

C:\Program Files (x86)\Enchanting\BackEnd>call set_env.bat
JAVA_HOME=C:\Program Files (x86)\Enchanting\ThirdParty\openjdk
FANTOM_HOME=C:\VXIPNP\WinNT\Bin\NiViUsb.dll
Found all dependencies.
BlueCove version 2.1.0 on winsock
BlueCove stack shutdown completed
C:\Program Files (x86)\Enchanting\BackEnd>


And yes, I do have the "LEGO MINDSTORMS EV3 Home Edition" installed on the computer. I don't have an EV3, but have been interested to look at the software and to try it (very briefly) on my NXT. I cannot be sure, but I think it was there and running when Enchanting was running previously.

I'll try removing all the 'echo off' type commands from the scripts and see if I can track down anything more explicit.

Regards,
Geoffrey

ggrinton
New User
Posts: 4
Joined: Wed Oct 29, 2014 10:05 am

Re: Enchanting fails to run: cannot find EnchantingBridge

Postby ggrinton » Fri Jan 23, 2015 11:22 am

Further update....

Clinton,

I did enable tracing of all the batch commands, and found (as I guess you expected) that the error occurs right at the end of the process, in nxjpc.bat, at the point where java is invoked.

I looked at the various environment variables that I think are involved. Coming from a point of almost total ignorance about java, I thought it a bit strange that the value to which bootclasspath expanded did not include "C:\Program Files (x86)\Enchanting\BackEnd", which is where the EnchantingBridge files are located. At a venture, I added that to the bootclasspath parameter in the command in nxjpc as follows:

Code: Select all

"%JAVA%" -Dnxj.home="%NXJ_HOME%" -Xbootclasspath/a:"C:\Program Files (x86)\Enchanting\BackEnd;%NXJ_CP_PC%" %*


Well, I don't know exactly what bootclasspath is, or if this is the proper way to do it, but that does resolve the problem, and Enchanting now starts!

Here is the last bit of the trace (note that my NXT does not currently have the microcode flashed for lejos):

Code: Select all

C:\Program Files (x86)\Enchanting\BackEnd>"C:\Program Files (x86)\Enchanting\Thi
rdParty\openjdk\bin\java.exe" -Dnxj.home="C:\Program Files (x86)\Enchanting\Thir
dParty\lejos_nxj\bin\\.." -Xbootclasspath/a:"C:\Program Files (x86)\Enchanting\B
ackEnd;C:\Program Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\charting.ja
r;C:\Program Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\jtools.jar;C:\Pr
ogram Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\pccomm.jar;C:\Program F
iles (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\pctools.jar;C:\Program Files (
x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\3rdparty\bcel.jar;C:\Program Files (
x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\3rdparty\bluecove-gpl.jar;C:\Program
 Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\3rdparty\bluecove.jar;C:\Pro
gram Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\3rdparty\commons-cli.jar
;C:\Program Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\3rdparty\jcommon.
jar;C:\Program Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\3rdparty\jfree
chart.jar;C:\Program Files (x86)\Enchanting\ThirdParty\lejos_nxj\lib\pc\3rdparty
\stax-api-1.0.1.jar" EnchantingBridge start /wait ..\FrontEnd\EnchantingFE.exe -
- [ignored]
Enchanting Messenger is attempting to (re-)connect.
Running Scratch Messenger is attempting to (re-)connect.
Adding "cmd /c" to Windows command
NXT Messenger is attempting to (re-)connect.
Command = { "cmd" "/c" "start" "/wait" "..\FrontEnd\EnchantingFE.exe" "--" "[ign
ored]" }
Enchanting Messenger is listening for messages.
Trying to connect to NXT
Trying to connect to NXT
Trying to connect to NXT
Trying to connect to NXT
Enchanting Messenger is attempting to (re-)connect.            <=== Exit from Enchanting at this point

Enchanting Front End has quit; Back End is exiting.

C:\Program Files (x86)\Enchanting\BackEnd>popd
C:\Program Files (x86)\Enchanting\BackEnd>


I guess the "Enchanting.exe" program invokes these same command files, as that now works as well.

I'll leave it to the experts to puzzle out the whys and wherefores!
Thanks again for the reply, and for the prod to do some more investigation for myself :)

Regards,
Geoffrey

clintonb
Active User
Posts: 138
Joined: Fri May 28, 2010 1:44 am
Location: Cardston, Alberta, Canada
Contact:

Re: Enchanting fails to run: cannot find EnchantingBridge

Postby clintonb » Fri Jan 23, 2015 6:11 pm

Hooray!

I'm so glad to hear that.

(I wonder what changed. Ah well).

Cheers,
Clinton Blackmore


Return to “Enchanting Questions and Projects”

Who is online

Users browsing this forum: No registered users and 1 guest