445 words

How to disable use of graphic windows by objectDB

#1
2011-10-24 03:05

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

LottaLava
LottaLava's picture
Joined on 2011-10-24
User Post #1
#2
2011-10-24 19:59

Try:

java -cp objectdb.jar com.objectdb.Server run -console
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #670
#3
2011-10-25 01:00

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

LottaLava
LottaLava's picture
Joined on 2011-10-24
User Post #2
#4
2011-10-25 01:17

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)
support
support's picture
Joined on 2010-05-03
User Post #672
#5
2011-10-25 01:20

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

 

 

LottaLava
LottaLava's picture
Joined on 2011-10-24
User Post #3
#6
2011-10-25 01:34

"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)
support
support's picture
Joined on 2010-05-03
User Post #673
#7
2011-10-25 01:46

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

 

 

LottaLava
LottaLava's picture
Joined on 2011-10-24
User Post #4
#8
2011-10-25 01:59

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

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #674
#9
2011-10-25 02:16

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]#

LottaLava
LottaLava's picture
Joined on 2011-10-24
User Post #5
#10
2011-10-25 02:29

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)
support
support's picture
Joined on 2010-05-03
User Post #675
#11
2011-10-25 12:42

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?

LottaLava
LottaLava's picture
Joined on 2011-10-24
User Post #6
#12
2011-10-26 00:24
  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)
support
support's picture
Joined on 2010-05-03
User Post #678
#13
2011-10-26 02:49

nice.

LottaLava
LottaLava's picture
Joined on 2011-10-24
User Post #7

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel