-
Notifications
You must be signed in to change notification settings - Fork 106
Fix NullPointerException error when launching WEKA with relative path… #96
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
Fix NullPointerException error when launching WEKA with relative path… #96
Conversation
… of weka.jar When launching weka with command such as "java -jar weka.jar", AutoWeka will raise NullPointerException because it cannot find weka.jar. The problem is that the function getAbsoluteClasspath in Util simply return "java.class.path" property (so the value could be a relative path as we give when launching WEKA). When the value of path is used to run AutoWeka tasks, they will not be able to find weka.jar due to the work directory of those tasks is in the other location (usually in /tmp/autowekaxxxxxxxxxx). I think it is also related to the removed dedicated weka.jar from AutoWeka in the release 2.6.3.
|
Thanks, but I'm still getting this error the NullPointerException when running from the commandline on Linux. What system did you test this on and how? |
I test it on Ubuntu 20.04 with openjdk 11.0.11. The process is:
With this patch, Auto-WEKA should be working well otherwise it will raise a NullPointerException. In the file autoweka.scenario in task folder in /tmp, we should see a variable like:
With this patch, there should be two paths of weka.jar for classpath (i.e. -cp), one is relative and the other is absolute path. |
|
I've tried what you've described with OpenJDK 11.0.13 and I'm getting a NullPointerException. |
Sorry, I haven't noticed that there are two NullPointerExeception related to AutoWeka. The one I want to fix with this PR could cause AutoWeka to be interrupted with release 2.6.3 after we click start. The backtrace looks like: The other NullPointerException should occur at loading dataset via "choose file..." button. It seems not affecting the process of AutoWeka. The backtrace is: |
|
I'm still getting the first exception when starting to run Auto-WEKA. |
Could you take look at the file "autoweka.scenario" in the folder /tmp/autowekaxxxxxxxxxxxx/Auto-WEKA. In the line of variable assignment for "algo", Could you see the absolute path of "weka.jar" for "-cp" option like: |
|
There's a relative path. |
I think the PR haven't been applied in your test. |
|
It definitely is. I checked out your fork of the repo and the branch with your modifications. I'm getting a relative path in the |
|
Could you overwrite "autoweka.jar" in the folder wekafiles/packages/Auto-WEKA with the one you rebuilt in the root of Auto-WEKA project. That's what I did to apply this change. |
|
Huh, that worked. Not sure why the package manager didn't do that. Thanks, merging. |
… of weka.jar
When launching weka with command such as "java -jar weka.jar", AutoWeka will raise NullPointerException because it cannot find weka.jar.
The problem is that the function getAbsoluteClasspath in Util simply return "java.class.path" property (so the value could be a relative path as we give when launching WEKA). When the value of path is used to run AutoWeka tasks, they will not be able to find weka.jar due to the work directory of those tasks is in the other location (usually in /tmp/autowekaxxxxxxxxxx). I think it is also related to the removed dedicated weka.jar from AutoWeka in the release 2.6.3.