How to disable use of graphic windows by objectDB

#1

Helo folks, i created a shell script to start objectDB as a service in my linux machine, but the problem is when it starts, show some popup windows and try to create a notification icon in my gnome's process bar. How can i disable that feature?

 

Regards,

LottaLava

#2

Try:

java -cp objectdb.jar com.objectdb.Server run -console
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

It worked! But now i can't shutdown the server using "stop", it keep running!

#4

Running the following in another console window should stop the server:

java -cp objectdb.jar com.objectdb.Server stop
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#5

No it didn't, the process is still running! Here is what i got from my console.

 

[root@GhostRider bin]# ./objectdb.sh start
/usr/bin/sudo -b -u javauser /usr/java/jdk/bin/java -server -Xms16M -Xmx256M -cp /opt/java-tools/objectdb-2.3.0_04/bin/objectdb.jar:/usr/java/jdk/lib/tools.jar:/usr/java/jdk/lib/dt.jar:. -Dobjectdb.home=/home/javauser/objectdb-database com.objectdb.Server -console start
[root@GhostRider bin]# ObjectDB Server started on port 6136.

 

#The server is running

[root@GhostRider bin]# ps -ax | grep javauser
4238 pts/1    Sl     0:00 /usr/java/jdk/bin/java -server -Xms16M -Xmx256M -cp /opt/java-tools/objectdb-2.3.0_04/bin/objectdb.jar:/usr/java/jdk/lib/tools.jar:/usr/java/jdk/lib/dt.jar:. -Dobjectdb.home=/home/javauser/objectdb-database com.objectdb.Server -console start

 

#Trying to stop

[root@GhostRider bin]# ./objectdb.sh stop
/usr/bin/sudo -b -u javauser /usr/java/jdk/bin/java -server -Xms16M -Xmx256M -cp /opt/java-tools/objectdb-2.3.0_04/bin/objectdb.jar:/usr/java/jdk/lib/tools.jar:/usr/java/jdk/lib/dt.jar:. -Dobjectdb.home=/home/javauser/objectdb-database com.objectdb.Server -console stop
[root@GhostRider bin]# [ObjectDB 2.3.0_04]
GhostRider: GhostRider: Name or service not known

No protocol specified

 

#The server is up and can't shutdown

[root@GhostRider bin]# ps -ax | grep javauser
4238 pts/1    Sl     0:00 /usr/java/jdk/bin/java -server -Xms16M -Xmx256M -cp /opt/java-tools/objectdb-2.3.0_04/bin/objectdb.jar:/usr/java/jdk/lib/tools.jar:/usr/java/jdk/lib/dt.jar:. -Dobjectdb.home=/home/javauser/objectdb-database com.objectdb.Server -console start

 

 

#6

"Name or Service not known" and "No protocol specified" are not ObjectDB errors.

Maybe it is something in the script. The following plain commands work:

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#7

Dude, i made same command line as you and it shows me the same thing.

 

[root@GhostRider bin]# java -cp objectdb.jar com.objectdb.Server -console stop
[ObjectDB 2.3.0_04]
GhostRider: GhostRider: Name or service not known

 

 

#8

Please check the log file for additional errors / exception stack trace.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#9

I've checked the log file, but has the same message.

 

[root@GhostRider bin]# cat ../log/odb20111024.log
------------------------------------------------------------------------------------------------------------------------

[2011-10-24 23:50:36 #1 server]
java.net.UnknownHostException: GhostRider: GhostRider: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
at com.objectdb.Server.sendSocketCommand(Server.java:242)
at com.objectdb.Server.runCommand(Server.java:223)
at com.objectdb.Server.run(Server.java:107)
at com.objectdb.Server.main(Server.java:66)
Caused by: java.net.UnknownHostException: GhostRider: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
at java.net.InetAddress.getLocalHost(InetAddress.java:1434)
... 4 more

------------------------------------------------------------------------------------------------------------------------

[2011-10-24 23:51:26 #1 server]
java.net.UnknownHostException: GhostRider: GhostRider: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
at com.objectdb.Server.sendSocketCommand(Server.java:242)
at com.objectdb.Server.runCommand(Server.java:223)
at com.objectdb.Server.run(Server.java:107)
at com.objectdb.Server.main(Server.java:66)
Caused by: java.net.UnknownHostException: GhostRider: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
at java.net.InetAddress.getLocalHost(InetAddress.java:1434)
... 4 more

------------------------------------------------------------------------------------------------------------------------

[2011-10-24 23:53:05 #1 server]
java.net.UnknownHostException: GhostRider: GhostRider: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
at com.objectdb.Server.sendSocketCommand(Server.java:242)
at com.objectdb.Server.runCommand(Server.java:223)
at com.objectdb.Server.run(Server.java:107)
at com.objectdb.Server.main(Server.java:66)
Caused by: java.net.UnknownHostException: GhostRider: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
at java.net.InetAddress.getLocalHost(InetAddress.java:1434)
... 4 more

[root@GhostRider bin]#

#10

OK. That's help.

The exception is thrown by the Java implementation of getLocalHost:

Socket socket = new Socket(InetAddress.getLocalHost(), port);

It seems to be a known issue in Linux.

Try the solution of the first answer at:

http://stackoverflow.com/questions/1881546/inetaddress-getlocalhost-throws-unknownhostexception

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#11

One thing, is there any way to specify a ip address, where is the server? And if to use always the getLocalHost(), why not to put "localhost" instead?

#12
  1. You cannot specify a host.
  2. getLocalHost() is used because localhost doesn't always work.
  3. Build 2.3.2_01 tries: getLocalHost() + "localhost" + "127.0.0.1", so hopefully it should solve the problem.
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#13

nice.


Post Reply

To post a reply and/or subscribe to update notifications - please login