Bug 99652 - XML-Parsing Errors during creation of oc4j-server-entry
XML-Parsing Errors during creation of oc4j-server-entry
Status: STARTED
Product: serverplugins
Classification: Unclassified
Component: OC4J
5.x
PC Linux
: P3 (vote)
: TBD
Assigned To: Michal Mocnak
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-02 09:36 UTC by irockel
Modified: 2007-04-02 12:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
server.xml (888 bytes, text/xml)
2007-04-02 11:13 UTC, irockel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description irockel 2007-04-02 09:36:05 UTC
The following exceptions occurs during creation of oc4j-server-entry:

INFORMATIONAL *********** Exception occurred ************ at 4:34 PM on Mar 
30, 2007
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 
Invalid byte 1 of 1-byte UTF-8 sequence.
        at 
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:674)
        at 
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:547)
        at 
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)
        at 
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XMLEntityScanner.java:1242)
        at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanComment(XMLScanner.java:756)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanComment(XMLDTDScannerImpl.java:825)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl.java:1976)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTDScannerImpl.java:320)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1177)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1068)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:988)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at 
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
        at 
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
[catch] at 
org.netbeans.modules.j2ee.oc4j.util.OC4JPluginUtils.getPathForElement(OC4JPluginUtils.java:291)
        at 
org.netbeans.modules.j2ee.oc4j.util.OC4JPluginUtils.getHttpPort(OC4JPluginUtils.java:126)

according to source-code of plugin, plugin tries to parse the "server.xml", 
doing a file server.xml shows: server.xml: XML 1.0 document text. Several 
tries with different encoding (ISO-8859-1 and UTF-8) always resulted in the 
same exception. The server.xml works fine with the oc4j itself.
Comment 1 Michal Mocnak 2007-04-02 10:36:52 UTC
Could you please attach your server.xml ? I haven't met this problem yet.
Comment 2 irockel 2007-04-02 11:13:28 UTC
Created attachment 40252 [details]
server.xml
Comment 3 irockel 2007-04-02 11:16:13 UTC
I've attached the server.xml. Btw. I'm running netbeans with JDK1.6. But for 
stand-alone oc4j (from cmdline) I'm using 1.4.2. Maybe there's a difference in 
the parsers.
Comment 4 Michal Mocnak 2007-04-02 12:21:12 UTC
Actually this is the problem with validation of your server.xml file. See this
log from validation.

XML validation started.

Checking file:/home/marigan/downloads/server.xml...
Invalid byte 1 of 1-byte UTF-8 sequence. [66]
http://www.oracle.com/technology/ias/dtds/application-server-9_04.dtd
XML checking finished.

And just for clariifcation. You are using oc4j v 9x ... plugin supports oc4j 10x
... actually there is no check in the wizard ... i'll implement it soon (Issue
99671)
Comment 5 irockel 2007-04-02 12:26:30 UTC
Hmm,

my oc4j reports:

07/04/02 13:21:22 Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2) initialized

so it is a 10g

so I just need to remove the DOCTYPE line? Ahh, checked, yes removed the line 
and now it works, thanks! Btw. its in all server.xml I've seen so far. (Though 
I didn't check 10.1.3.x app server, they changed a lot of stuff in this 
release).
Comment 6 Michal Mocnak 2007-04-02 12:40:07 UTC
Great ... actually it's strange cause i don't have this validation problems 

10.1.3.x is checked and functional with plugin ... i'll make some changes in
server.xml validation to prevent these issues.
Comment 7 Petr Blaha 2007-04-02 12:45:42 UTC
This is strange. I downloaded the latest OC4J 10g and there is the server.xml
with correct doctype. However, your attached server.xml has defined 9.04 doctype:

<!DOCTYPE application-server PUBLIC "-//Oracle//DTD OC4J Application-server
9.04//EN" "http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd">

I guess that there should be:

<application-server  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/application-server-10_1.xsd"
 
.............

Where did you downloaded your OC4J installation or did you some changes in
server.xml?
Comment 8 irockel 2007-04-02 12:59:44 UTC
It isn't a recent oc4j as oracle did some nasty changes in 10.1.3 which 
prevents our app (at least at the momment) from running in this release, it is 
a 10.1.2. Maybe the server.xml in this release has a bug using an old dtd. I 
got the tarball from a company's server but it should be unmodified (although 
I can't say that for sure).



By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo