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

Exception in thread "main" java.lang.NullPointerException #15

Open
arnavbhartiya opened this issue Feb 5, 2016 · 4 comments
Open

Exception in thread "main" java.lang.NullPointerException #15

arnavbhartiya opened this issue Feb 5, 2016 · 4 comments
Assignees

Comments

@arnavbhartiya
Copy link

No description provided.

@docteau docteau added the bug label Feb 21, 2016
@docteau docteau self-assigned this Feb 21, 2016
@docteau
Copy link
Member

docteau commented Feb 21, 2016

Hi,

Thank you for reporting this. There is indeed an issue with a null pointer exception when no output is specified. In order to avoid this, either use the -protobuf or -db option (see http://siis.cse.psu.edu/ic3/installation.html for how to use these options). This should be fixed for the next version.

Thanks,
Damien

@arnavbhartiya
Copy link
Author

Hey Damien @docteau ,
Thanks for the reply. That worked !
I was wondering if there is a documentation or an example analysis on how to interpret the result which I got in the database.
Excuse me for the naivety.

Thanks,
Arnav

@feibabeibei
Copy link

Hello
java -jar ic3-0.2.0-full.jar -apkormanifest 1.apk -input outputp/retargeted/1 -cp android.jar -db cc.properties
cc.properties should how to write?
question follow as:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1137)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:356)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2504)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2541)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2323)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:832)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at edu.psu.cse.siis.ic3.db.Table.connect(Table.java:153)
at edu.psu.cse.siis.ic3.db.Table.getConnection(Table.java:69)
at edu.psu.cse.siis.ic3.db.ApplicationTable.find(ApplicationTable.java:55)
at edu.psu.cse.siis.ic3.db.ApplicationTable.insert(ApplicationTable.java:29)
at edu.psu.cse.siis.ic3.db.SQLConnection.insert(SQLConnection.java:79)
at edu.psu.cse.siis.ic3.manifest.ManifestPullParser.writeToDb(ManifestPullParser.java:267)
at edu.psu.cse.siis.ic3.Ic3Analysis.initializeAnalysis(Ic3Analysis.java:130)
at edu.psu.cse.siis.ic3.Ic3Analysis.initializeAnalysis(Ic3Analysis.java:65)
at edu.psu.cse.siis.coal.Analysis.performAnalysis(Analysis.java:66)
at edu.psu.cse.siis.ic3.Main.main(Main.java:14)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.(Socket.java:425)
at java.net.Socket.(Socket.java:241)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:306)
... 24 more
Exception in thread "main" java.lang.NullPointerException
at edu.psu.cse.siis.ic3.db.ApplicationTable.find(ApplicationTable.java:55)
at edu.psu.cse.siis.ic3.db.ApplicationTable.insert(ApplicationTable.java:29)
at edu.psu.cse.siis.ic3.db.SQLConnection.insert(SQLConnection.java:79)
at edu.psu.cse.siis.ic3.manifest.ManifestPullParser.writeToDb(ManifestPullParser.java:267)
at edu.psu.cse.siis.ic3.Ic3Analysis.initializeAnalysis(Ic3Analysis.java:130)
at edu.psu.cse.siis.ic3.Ic3Analysis.initializeAnalysis(Ic3Analysis.java:65)
at edu.psu.cse.siis.coal.Analysis.performAnalysis(Analysis.java:66)
at edu.psu.cse.siis.ic3.Main.main(Main.java:14)

@docteau
Copy link
Member

docteau commented May 4, 2016

Hi,

For cc.properties, please follow the template from https://github.com/siis/ic3/blob/master/src/main/resources/db/cc.properties.template. You need to specify your MySQL user name and password. Note that the user you specify should have the proper permissions to perform SELECT and INSERT queries.

Regards,
Damien

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