question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on reading console input: null, java.lang.NullPointerException on console.sh (never ends)

See original GitHub issue

whenever I start the orientdb-console command it would show unlimited lines of orientdb and no key could be pressed (except for ctrl+C for exit the program)

$ uname -a
Linux pc1 3.18.3-1-ArchLinux #1 SMP PREEMPT Fri Jan 16 21:08:54 UTC 2015 x86_64 GNU/Linux                                         

$ java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (Arch Linux build 7.u75_2.5.4-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

$ orientdb-console --help                                                                                     
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel                                                                                                                       

OrientDB console v.2.0.1 (build 0) www.orientechnologies.com                                                                     
Type 'help' to display all the supported commands.                                                                               
Installing extensions for GREMLIN language v.2.6.0      

$ ll `which orientdb-console`                                                                                 
lrwxrwxrwx 1 root root 28 2015.02.10 19:19 /usr/bin/orientdb-console -> /opt/orientdb/bin/console.sh*  

$ orientdb-console
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel

OrientDB console v.2.0.1 (build 0) www.orientechnologies.com
Type 'help' to display all the supported commands.
Installing extensions for GREMLIN language v.2.6.0

orientdb> 
orientdb> 
orientdb> 
orientdb> 
orientdb> 
orientdb> 
orientdb> 
orientdb> 
orientdb> 

^ infinite

after pressing ctrl+C, the shell (bash) would show another prompt on the same line when pressing enter, and any key won’t show when pressed.

orientdb>
^C
$ $ $ $ $ $

version tested: orientdb-community 2.0.1-1 from https://aur.archlinux.org/packages/orientdb-community/

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
timseriescommented, May 5, 2015

Seems to work now after granting all privileges to /bin/.orientdb_history

sudo chmod 777 .orientdb_history
0reactions
timseriescommented, May 5, 2015

Same error, using the community 2.0.6 AMI deployed in AWS:

orientdb> help
Error on reading console input: null
java.io.FileNotFoundException: .orientdb_history (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
    at java.io.FileWriter.<init>(FileWriter.java:90)
    at com.orientechnologies.common.console.TTYConsoleReader.writeHistory(TTYConsoleReader.java:314)
    at com.orientechnologies.common.console.TTYConsoleReader.readLine(TTYConsoleReader.java:288)
    at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:130)
    at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:62)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Console Input error java.lang.NullPointerException
Are you running your program from an ide as console.readLine returns null when used from an IDE. For more details refer to this....
Read more >
How to Fix and Avoid NullPointerException in Java - Rollbar
NullPointerException in Java occurs when a variable is accessed which is not pointing to any object and refers to nothing or null.
Read more >
NullReferenceException Class (System) - Microsoft Learn
This exception occurs if you assume that each element of the array must contain a non-null value, and the value of the array...
Read more >
Fix list for IBM WebSphere Application Server V8.5
IBM WebSphere Application Server provides periodic fixes for the base and Network Deployment editions of release V8.5. The following is a complete listing ......
Read more >
3. Resolved and Known Issues Red Hat JBoss Enterprise ...
Without the validation, the SecurityRealm was null, which lead to a ... BZ#1107869 - Web Console errors out and ends the jbossas process...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found