411 words

Running ObjectDB on a node that does not have internet connectivity

#1
2010-09-20 15:36

Upon initializing our ObjectDB database on a node that does not have a connection to the outside internet, we get the following exception. Any idea what would be causing this?

java.net.UnknownHostException: java.sun.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Unknown Source)
at com.objectdb.o.XMD.n(XMD.java:204)
at com.objectdb.o.XMD.m(XMD.java:179)
at com.objectdb.o.JML.g(JML.java:137)
at com.objectdb.o.JML.f(JML.java:108)
at com.objectdb.o.JML.e(JML.java:71)
at com.objectdb.o.SCM.q(SCM.java:178)
at com.objectdb.o.TYS.n(TYS.java:280)
at com.objectdb.o.TYM.S(TYM.java:458)
at com.objectdb.o.TYM.Q(TYM.java:408)
at com.objectdb.o.TYM.ab(TYM.java:690)
at com.objectdb.o.EXT.<init>(EXT.java:71)
at com.objectdb.jdo.PMImpl.getExtent(PMImpl.java:2059)
at peoiws5.track.server.ObjectDBTrackDatabase.openDatabase(ObjectDBTrackDatabase.java:142)

 

carr.onstott
carr.onstott's picture
Joined on 2010-06-16
User Post #4
#2
2010-09-20 16:01

The stack trace indicates that an attempt to access the JDO dtd file (in order to verify a package.jdo file) has failed.

You are probably using an old beta version, in which the dtd file is not available locally.

Please switch to the last 2.0 RC version, in which the dtd is accessed locally and no Internet connection is required.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #48
#3
2010-09-20 16:15

This was originally done using the Beta2_120 build.  I just tried it using the newest RC4 release and got the same thing (slightly different line numbers this time):

java.net.UnknownHostException: java.sun.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Unknown Source)
at com.objectdb.o.XMD.n(XMD.java:204)
at com.objectdb.o.XMD.m(XMD.java:179)
at com.objectdb.o.JML.g(JML.java:139)
at com.objectdb.o.JML.f(JML.java:108)
at com.objectdb.o.JML.e(JML.java:71)
at com.objectdb.o.SCM.q(SCM.java:178)
at com.objectdb.o.TYS.n(TYS.java:281)
at com.objectdb.o.TYM.Z(TYM.java:478)
at com.objectdb.o.TYM.X(TYM.java:428)
at com.objectdb.o.TYM.aj(TYM.java:727)
at com.objectdb.o.EXT.<init>(EXT.java:70)
at com.objectdb.jdo.PMImpl.getExtent(PMImpl.java:2059)

 

carr.onstott
carr.onstott's picture
Joined on 2010-06-16
User Post #5
#4
2010-09-20 16:30

The RC4 release does include a local dtd, but an attempt to access the Internet might still happen if the XML headers of the package.jdo files do not match the local dtd.

Try to set the headers of all your package.jdo files to:

<?xml version="1.0" encoding="UTF-8" ?>

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #49
#5
2010-09-20 16:57

The package.jdo files already begin with the line: <?xml version="1.0" encoding="UTF-8"?>

However, after double checking that line, I did find that they also contain the following:

<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">

Is this the culprit? Do I need to change it to something else?

carr.onstott
carr.onstott's picture
Joined on 2010-06-16
User Post #6
#6
2010-09-20 17:07

Yes, just remove that DOCTYPE declaration and it should work.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #50
#7
2010-09-20 17:09

That did the trick, thanks!

carr.onstott
carr.onstott's picture
Joined on 2010-06-16
User Post #7
#8
2014-12-03 15:34

I ran into a similar issue.

After rolling back from version 2.5.7_06 to 2.3.7_02 I got this error:

jdo.dtd (No such file or directory)

I was connected to the internet just fine at the time.

The advice to remove the DOCTYPE line worked for me too.

David

 

dmoshal
dmoshal's picture
Joined on 2010-05-22
User Post #100

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