Running ObjectDB on a node that does not have internet connectivity

#1

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)

 

#2

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

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)

 

#4

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

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?

#6

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

ObjectDB Support
#7

That did the trick, thanks!

#8

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

 

Reply