Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-unfriendly error message when main class not present #500

Open
hhuynh opened this issue Aug 9, 2017 · 5 comments
Open

User-unfriendly error message when main class not present #500

hhuynh opened this issue Aug 9, 2017 · 5 comments

Comments

@hhuynh
Copy link

hhuynh commented Aug 9, 2017

Failed to run provided example (Mac, node 6.11.2)

% ../../doppio -cp example example.App

Encountered error: TypeError: Cannot read property 'getLoader' of undefined
TypeError: Cannot read property 'getLoader' of undefined
at a.getLoader (/Volumes/Unix/workspace/doppio/src/threading.ts:709:49)
at a.throwNewException (/Volumes/Unix/workspace/doppio/src/threading.ts:1159:44)
at b.a.throwClassNotFoundException (/Volumes/Unix/workspace/doppio/src/ClassLoader.ts:341:12)
at a.cb (/Volumes/Unix/workspace/doppio/src/ClassLoader.ts:554:14)
at a.run (/Volumes/Unix/workspace/doppio/src/threading.ts:552:12)
at a.run (/Volumes/Unix/workspace/doppio/src/threading.ts:851:12)
at Immediate. (/Volumes/Unix/workspace/doppio/src/threadpool.ts:84:16)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)

@ttjordan
Copy link

ttjordan commented Aug 9, 2017

I have the same issue

@jvilk jvilk added the bug label Aug 9, 2017
@jvilk
Copy link
Member

jvilk commented Aug 10, 2017

I've confirmed and reproduced the issue! I'll take a look when I have time. Thanks for reporting.

@jvilk
Copy link
Member

jvilk commented Aug 10, 2017

Oof, this is an unfortunate non-error message.

You're actually specifying your classpath incorrectly! If you try:

java -cp docs/examples/example example.App

...notice that it doesn't work. Instead, you need to do:

java -cp docs/examples example.App

Thus, run the following command instead:

../../doppio -cp docs/examples example.App

With that said, this should really give you a better error message!

@jvilk jvilk changed the title Encountered error: TypeError: Cannot read property 'getLoader' of undefined User-unfriendly error message when main class not present Aug 10, 2017
@ttjordan
Copy link

Thank you a lot for a quick reply! It worked!

@hhuynh
Copy link
Author

hhuynh commented Aug 10, 2017

yes that was it. Though if you're inside the docs/examples folder, the correct command is:

%> ../../doppio -cp . example.App

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants