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

Java Example Fails (NullPointerException) #136

Open
acbart opened this issue Nov 7, 2017 · 1 comment
Open

Java Example Fails (NullPointerException) #136

acbart opened this issue Nov 7, 2017 · 1 comment
Assignees
Labels

Comments

@acbart
Copy link
Contributor

acbart commented Nov 7, 2017

Example dataset: Airlines (https://think.cs.vt.edu/corgis/java/airlines/airlines.html)

When you compile and run this ExampleClass.java program described on that page (attached here), it compiles fine, but I get blown away with runtime exceptions of the form:

Could not convert the response to a Airport; a field was missing.
java.lang.NullPointerException
	at corgis.airlines.domain.Airport.<init>(Unknown Source)
	at corgis.airlines.domain.Airline.<init>(Unknown Source)
	at corgis.airlines.AirlinesLibrary.getReports(Unknown Source)
	at ExampleClass.main(ExampleClass.java:10)

ExampleClass:

import corgis.airlines.AirlinesLibrary;
import corgis.airlines.domain.*;
import java.util.ArrayList;

public class ExampleClass {
    public static void main(String[] args) {
        // Get access to the library
        AirlinesLibrary airlinesLibrary = new AirlinesLibrary();
        // Access data inside the library
        ArrayList<Airline> list_of_airline = airlinesLibrary.getReports(false);
    }
}
@acbart acbart self-assigned this Nov 7, 2017
@acbart acbart added the bug label Nov 7, 2017
@acbart
Copy link
Contributor Author

acbart commented Nov 7, 2017

Latest commits fixes this, but revealed that a few other libraries might be having issues (most of which are data errors in the library). Those should be fixed in the spring when we do our next sprint (tracked in #67).

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

No branches or pull requests

1 participant