You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eric Everman <ev...@precedadesign.com> on 2004/11/08 20:34:25 UTC

Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Has anyone been able to use the contrib:Table component under Oracle's
OC4J app server?

OC4J uses Oracle's XML parser, which seems to choke on the
TablePages.jwc specification.  I'd love to use a different parser, but
Oracle explicitely  does not support 3rd party parsers and OC4J seems to
be overriding any attempt to specify another parser for the application
level.

I really may be stuck here - has anyone gotten this to work???  A simple
test case is to simply copy the example out of the contrib:Table
component reference and run it under OC4J.  Is everyone getting XML
parse errors???

Thanks for your help,
Eric Everman


(Typical errors pasted below)

classloader:/org/apache/tapestry/contrib/table/components/ 
TablePages.jwc<Line 41, Column 26>: XML-0139: (Error) ID value  
'informal' is not unique.

columnNumber:  	26
lineNumber: 	41
systemId:  
	classloader:/org/apache/tapestry/contrib/table/components/TablePages.jwc
Stack Trace:

*oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:226)
*oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:162)
*oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingPars 
er.java:276)
*oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
*org.apache.commons.digester.Digester.parse(Digester.java:1548)
*org.apache.tapestry.parse.SpecificationParser.parse(SpecificationParser. 
java:642)
*org.apache.tapestry.parse.SpecificationParser.parseComponentSpecificatio 
n(SpecificationParser.java:601)
*org.apache.tapestry.engine.DefaultSpecificationSource.parseSpecification 
(DefaultSpecificationSource.java:163)
*org.apache.tapestry.engine.DefaultSpecificationSource.getComponentSpecif 
ication(DefaultSpecificationSource.java:275)
*org.apache.tapestry.engine.Namespace.locateComponentSpecification(Namesp 
ace.java:286)

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: R: R: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Marcus Brito <mb...@gmail.com>.
> Ok, but what if you use the same component (that has subcomponents) two time
> in a single page?

Wait... the subcomponents are specified in a separate document (the
component specification), right? Unless Tapestry "merges" the two
documents before parsing them, this shouldn't cause any problems with
a parser. I must admit I'm baffled now -- time to go read some source
code...

-- Marcus Brito

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


R: R: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Luca De Petrillo <lu...@websiteitalia.com>.
<mb...@gmail.com> wrote:
> ... which is the correct behaviour, according to the specification.
> Elements declared with type "ID" are supposed to be *globally* unique,
> irregardless of nesting depth. This is required so
> Document.getElementById() always return a single node, at most.

Ok, but what if you use the same component (that has subcomponents) two time
in a single page?

AFAIC, Tapestry automatically take care of such situation, appending a
sequenced number to each duplicated id in the page scope (this work for
iterated components and sub-components, but not for root component in the
page), so, the problem is the DTD that should be fixed...
 
-----Messaggio originale-----
Da: Marcus Brito [mailto:mbrito@gmail.com] 
Inviato: Tuesday, November 09, 2004 2:16 PM
A: Tapestry users
Oggetto: Re: R: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML
parsing errors)

On Tue, 9 Nov 2004 09:17:32 +0100, Luca De Petrillo
<lu...@websiteitalia.com> wrote:
> I've the same problem.
> Seem that Oracle's XML parser enforce uniqueness of id also for
> SubComponents, so, if you have more than one component in the same page
that
> use some sub component with a specified id, you get an error:


-- Marcus Brito <mb...@gmail.com.>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: R: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Marcus Brito <mb...@gmail.com>.
On Tue, 9 Nov 2004 09:17:32 +0100, Luca De Petrillo
<lu...@websiteitalia.com> wrote:
> I've the same problem.
> Seem that Oracle's XML parser enforce uniqueness of id also for
> SubComponents, so, if you have more than one component in the same page that
> use some sub component with a specified id, you get an error:

... which is the correct behaviour, according to the specification.
Elements declared with type "ID" are supposed to be *globally* unique,
irregardless of nesting depth. This is required so
Document.getElementById() always return a single node, at most.

-- Marcus Brito <mb...@gmail.com.>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


R: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Luca De Petrillo <lu...@websiteitalia.com>.
I've the same problem.
Seem that Oracle's XML parser enforce uniqueness of id also for
SubComponents, so, if you have more than one component in the same page that
use some sub component with a specified id, you get an error:

Page
|
+-Comp(id: A)
| \-SubComp(id: test)
|
\-Comp(id: B)
  \-SubComp(id: test)
                ^---- ERROR

Also if this should work.

The only way that I've found, is to enforce OC4J to uses Xerces XML Parser,
adding to the JVM the parameter
"-Xbootclasspath/a:l:/xerces-2_6_2/resolver.jar;l:/xerces-2_6_2/xercesImpl.j
ar;l:/xerces-2_6_2/xml-apis.jar", where you must specify the full classpath
of jars ^^.

Take care the Oracle doesn't support this solution to override XML Parser of
OC4J, and they don't provide a way to do this (also if I've found this
solution on oracle site: go to
"http://www.oracle.com/technology/tech/java/oc4j/904/collateral/OC4J-FAQ-904
.html" and search for "XML parser"), and that I've used this method only for
development (JDeveloper use and embedded OC4J server to run WebApps).

BYE!

Luca De Petrillo

-----Messaggio originale-----
Da: Eric Everman [mailto:everman@precedadesign.com]
Inviato: marted� 9 novembre 2004 1.37
A: Tapestry users; Dave Smith
Oggetto: Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML
parsing errors)

Quoting Dave Smith <di...@gmail.com>:
> It looks like this XML parser is (correctly) enforcing the
> uniqueness
> of XML ids. You should be able to circumvent this problem by going
> through this page and ensuring that there are no two id=""
> attributes
> that are the same.
>

Unfortunately, the file *is* valid and contains no duplicate id
attributes, so its not such a simple fix.  As a precaution, I validated
the TablePages.jwc in XMLSpy.  Its well formed and valid.

Anyone with OC4J experience, please chime in!


Thanks,
Eric Everman


Note:  XML file that Oracle's XML parser chokes on is pasted below:

<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2004 The Apache Software Foundation

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!DOCTYPE component-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<component-specification
class="org.apache.tapestry.contrib.table.components.TablePages"
	allow-body="no" allow-informal-parameters="yes">

	<description>
        A low level Table component that renders the pages in the table.
        This component must be wrapped by TableView.
	</description>

	<parameter name="pagesDisplayed"
		type="int"
		required="no"
		direction="auto"
    	default-value="7">
		<description>
            Determines the maximum number of pages to be displayed in
the page list
            when the table has more than one page.
        </description>
    </parameter>

	<component id="informal" type="Any"
inherit-informal-parameters="yes"/>

	<component id="condCurrent" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
	</component>

	<component id="condOther" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
		<static-binding name="invert">true</static-binding>
	</component>

	<component id="iterPage" type="Foreach">
		<binding name="source" expression="pageList"/>
		<binding name="value" expression="displayPage"/>
	</component>

	<component id="insertCurrentPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="insertOtherPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="linkPage" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="displayPageContext"/>
	</component>

	<component id="linkFirst" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="firstPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkBack" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="backPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkFwd" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="fwdPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>

	<component id="linkLast" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="lastPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>

</component-specification>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.orgI've
the same problem.
Seem that Oracle's XML parser enforce uniqueness of id also for Embedding
components, so, if you have more than one component in the same page that
use some sub component with a specified id, you get an error:

Page
|
+-Comp(id: A)
| \-SubComp(id: test)
|
\-Comp(id: B)
  \-SubComp(id: test)
                ^---- ERROR

Also if this should work.

The only way that I've found, is to enforce OC4J to uses Xerces XML Parser,
adding to the JVM the parameter
"-Xbootclasspath/a:l:/xerces-2_6_2/resolver.jar;l:/xerces-2_6_2/xercesImpl.j
ar;l:/xerces-2_6_2/xml-apis.jar", where you must specify the full classpath
of jars ^^.

Take care the Oracle doesn't support this solution to override XML Parser of
OC4J, and they don't provide a way to do this (also if I've found this
solution on oracle site: go to
"http://www.oracle.com/technology/tech/java/oc4j/904/collateral/OC4J-FAQ-904
.html" and search for "XML parser"), and that I've used this method only for
development (JDeveloper use and embedded OC4J server to run WebApps).

BYE!

Luca De Petrillo

-----Messaggio originale-----
Da: Eric Everman [mailto:everman@precedadesign.com]
Inviato: marted� 9 novembre 2004 1.37
A: Tapestry users; Dave Smith
Oggetto: Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML
parsing errors)

Quoting Dave Smith <di...@gmail.com>:
> It looks like this XML parser is (correctly) enforcing the
> uniqueness
> of XML ids. You should be able to circumvent this problem by going
> through this page and ensuring that there are no two id=""
> attributes
> that are the same.
>

Unfortunately, the file *is* valid and contains no duplicate id
attributes, so its not such a simple fix.  As a precaution, I validated
the TablePages.jwc in XMLSpy.  Its well formed and valid.

Anyone with OC4J experience, please chime in!


Thanks,
Eric Everman


Note:  XML file that Oracle's XML parser chokes on is pasted below:

<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2004 The Apache Software Foundation

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!DOCTYPE component-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<component-specification
class="org.apache.tapestry.contrib.table.components.TablePages"
	allow-body="no" allow-informal-parameters="yes">

	<description>
        A low level Table component that renders the pages in the table.
        This component must be wrapped by TableView.
	</description>

	<parameter name="pagesDisplayed"
		type="int"
		required="no"
		direction="auto"
    	default-value="7">
		<description>
            Determines the maximum number of pages to be displayed in
the page list
            when the table has more than one page.
        </description>
    </parameter>

	<component id="informal" type="Any"
inherit-informal-parameters="yes"/>

	<component id="condCurrent" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
	</component>

	<component id="condOther" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
		<static-binding name="invert">true</static-binding>
	</component>

	<component id="iterPage" type="Foreach">
		<binding name="source" expression="pageList"/>
		<binding name="value" expression="displayPage"/>
	</component>

	<component id="insertCurrentPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="insertOtherPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="linkPage" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="displayPageContext"/>
	</component>

	<component id="linkFirst" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="firstPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkBack" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="backPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkFwd" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="fwdPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>

	<component id="linkLast" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="lastPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>

</component-specification>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

Luca De Petrillo

-----Messaggio originale-----
Da: Eric Everman [mailto:everman@precedadesign.com]
Inviato: marted� 9 novembre 2004 1.37
A: Tapestry users; Dave Smith
Oggetto: Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML
parsing errors)

Quoting Dave Smith <di...@gmail.com>:
> It looks like this XML parser is (correctly) enforcing the
> uniqueness
> of XML ids. You should be able to circumvent this problem by going
> through this page and ensuring that there are no two id=""
> attributes
> that are the same.
>

Unfortunately, the file *is* valid and contains no duplicate id
attributes, so its not such a simple fix.  As a precaution, I validated
the TablePages.jwc in XMLSpy.  Its well formed and valid.

Anyone with OC4J experience, please chime in!


Thanks,
Eric Everman


Note:  XML file that Oracle's XML parser chokes on is pasted below:

<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2004 The Apache Software Foundation

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!DOCTYPE component-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<component-specification
class="org.apache.tapestry.contrib.table.components.TablePages"
	allow-body="no" allow-informal-parameters="yes">

	<description>
        A low level Table component that renders the pages in the table.
        This component must be wrapped by TableView.
	</description>

	<parameter name="pagesDisplayed"
		type="int"
		required="no"
		direction="auto"
    	default-value="7">
		<description>
            Determines the maximum number of pages to be displayed in
the page list
            when the table has more than one page.
        </description>
    </parameter>

	<component id="informal" type="Any"
inherit-informal-parameters="yes"/>

	<component id="condCurrent" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
	</component>

	<component id="condOther" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
		<static-binding name="invert">true</static-binding>
	</component>

	<component id="iterPage" type="Foreach">
		<binding name="source" expression="pageList"/>
		<binding name="value" expression="displayPage"/>
	</component>

	<component id="insertCurrentPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="insertOtherPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="linkPage" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="displayPageContext"/>
	</component>

	<component id="linkFirst" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="firstPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkBack" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="backPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkFwd" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="fwdPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>

	<component id="linkLast" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="lastPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>

</component-specification>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Eric Everman <ev...@precedadesign.com>.
Quoting Dave Smith <di...@gmail.com>:
> It looks like this XML parser is (correctly) enforcing the
> uniqueness
> of XML ids. You should be able to circumvent this problem by going
> through this page and ensuring that there are no two id=""
> attributes
> that are the same.
> 

Unfortunately, the file *is* valid and contains no duplicate id
attributes, so its not such a simple fix.  As a precaution, I validated
the TablePages.jwc in XMLSpy.  Its well formed and valid.

Anyone with OC4J experience, please chime in!


Thanks,
Eric Everman


Note:  XML file that Oracle's XML parser chokes on is pasted below:

<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2004 The Apache Software Foundation
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!DOCTYPE component-specification PUBLIC 
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
	
<component-specification
class="org.apache.tapestry.contrib.table.components.TablePages" 
	allow-body="no" allow-informal-parameters="yes">
	
	<description>
        A low level Table component that renders the pages in the table. 
        This component must be wrapped by TableView. 
	</description>
  
	<parameter name="pagesDisplayed" 
		type="int" 
		required="no"
		direction="auto"
    	default-value="7">
		<description>
            Determines the maximum number of pages to be displayed in
the page list 
            when the table has more than one page. 
        </description>
    </parameter>

	<component id="informal" type="Any" inherit-informal-parameters="yes"/>
  
	<component id="condCurrent" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
	</component>
  
	<component id="condOther" type="Conditional">
		<binding name="condition" expression="condCurrent"/>
		<static-binding name="invert">true</static-binding>
	</component>
  
	<component id="iterPage" type="Foreach">
		<binding name="source" expression="pageList"/>
		<binding name="value" expression="displayPage"/>
	</component>

	<component id="insertCurrentPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="insertOtherPage" type="Insert">
	    <binding name="value" expression="displayPage"/>
	</component>

	<component id="linkPage" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="displayPageContext"/>
	</component>

	<component id="linkFirst" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="firstPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkBack" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="backPageContext"/>
	    <binding name="disabled" expression="!condBack"/>
	</component>

	<component id="linkFwd" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="fwdPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>
	
	<component id="linkLast" type="DirectLink">
	    <binding name="listener" expression="listeners.changePage"/>
	    <binding name="parameters" expression="lastPageContext"/>
	    <binding name="disabled" expression="!condFwd"/>
	</component>
	
</component-specification>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Dave Smith <di...@gmail.com>.
My wild guess... :)

It looks like this XML parser is (correctly) enforcing the uniqueness
of XML ids. You should be able to circumvent this problem by going
through this page and ensuring that there are no two id="" attributes
that are the same.

Hope that helps...

D.


On Mon,  8 Nov 2004 11:34:25 -0800, Eric Everman
<ev...@precedadesign.com> wrote:
> Has anyone been able to use the contrib:Table component under Oracle's
> OC4J app server?
> 
> OC4J uses Oracle's XML parser, which seems to choke on the
> TablePages.jwc specification.  I'd love to use a different parser, but
> Oracle explicitely  does not support 3rd party parsers and OC4J seems to
> be overriding any attempt to specify another parser for the application
> level.
> 
> I really may be stuck here - has anyone gotten this to work???  A simple
> test case is to simply copy the example out of the contrib:Table
> component reference and run it under OC4J.  Is everyone getting XML
> parse errors???
> 
> Thanks for your help,
> Eric Everman
> 
> (Typical errors pasted below)
> 
> classloader:/org/apache/tapestry/contrib/table/components/
> TablePages.jwc<Line 41, Column 26>: XML-0139: (Error) ID value
> 'informal' is not unique.
> 
> columnNumber:   26
> lineNumber:     41
> systemId:
>         classloader:/org/apache/tapestry/contrib/table/components/TablePages.jwc
> Stack Trace:
> 
> *oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:226)
> *oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:162)
> *oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingPars
> er.java:276)
> *oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
> *org.apache.commons.digester.Digester.parse(Digester.java:1548)
> *org.apache.tapestry.parse.SpecificationParser.parse(SpecificationParser.
> java:642)
> *org.apache.tapestry.parse.SpecificationParser.parseComponentSpecificatio
> n(SpecificationParser.java:601)
> *org.apache.tapestry.engine.DefaultSpecificationSource.parseSpecification
> (DefaultSpecificationSource.java:163)
> *org.apache.tapestry.engine.DefaultSpecificationSource.getComponentSpecif
> ication(DefaultSpecificationSource.java:275)
> *org.apache.tapestry.engine.Namespace.locateComponentSpecification(Namesp
> ace.java:286)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by phillip rhodes <rh...@yahoo.com>.
The IDE does appear to be passing the -D flag.

However, what this -D parameter is doing is
instructing the JVM to use this class as a  factory
whenever a parser is obtained via JAXP.  DO you have a
recent copy of xalan/xerces in your classpath?  If you
don't, the jaxp parse *may* still be returning the
default broken implementation.


--- Eric Everman <ev...@precedadesign.com> wrote:

> OK, I tried this via JDev by adding this to the
> startup of the OC4J  
> embedded instance (via a project property) and I
> still have the same  
> problem.  Is it possible this works for OC4J
> standalone but not for the  
> embedded instance in JDev?  Here is what JDev spits
> out as it starts  
> OC4J:
> 
> 
> 
> ==============================
> [Starting OC4J using the following ports: HTTP=1024,
> RMI=23891,  
> JMS=9227.]
> 
> D:\Program
> Files\jdev_9052\jdev\system9.0.5.2.1618\oc4j-config>
> D:\Program Files\jdev_9052\jdk\bin\javaw.exe -client
>  
> -Doracle.home=D:\Program Files\jdev_9052 -classpath
> D:\Program  
> Files\jdev_9052\j2ee\home\oc4j.jar;D:\Program  
> Files\jdev_9052\jdev\lib\jdev-oc4j.jar -Xverify:none
>  
> -Ddisable.checkForUpdate=true  
> -Dorg.apache.tapestry.disable-caching=true  
>
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.Tran
> 
> sformerFactoryImpl  
>
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleL
> 
> og
>
-Dorg.apache.commons.logging.simplelog.defaultlog=debug
>  
> -Doracle.j2ee.dont.use.memory.archive=true  
> -Doracle.j2ee.http.socket.timeout=500
> -Doracle.dms.sensors=NONE  
> -Doc4j.jms.usePersistenceLockFiles=false
> com.evermind.server.OC4JServer  
> -config D:\Program  
>
Files\jdev_9052\jdev\system9.0.5.2.1618\oc4j-config\server.xml
> [waiting for the server to complete its
> initialization...]
> 
> Ready message received from Oc4jNotifier.
> 
> Embedded OC4J startup time: 2443 ms.
> ==============================
> 
> --ee
> 
> 
> 
> On 10 Nov 2004, at 20:46, phillip rhodes wrote:
> 
> > This works for oc4j 9.0.3
> >
> > Put this in the startup script for your oc4j
> instance:
> >
> >
>
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.Tra
> 
> > nsformerFactoryImpl
> >
> >
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Eric Everman <ev...@precedadesign.com>.
OK, I tried this via JDev by adding this to the startup of the OC4J  
embedded instance (via a project property) and I still have the same  
problem.  Is it possible this works for OC4J standalone but not for the  
embedded instance in JDev?  Here is what JDev spits out as it starts  
OC4J:



==============================
[Starting OC4J using the following ports: HTTP=1024, RMI=23891,  
JMS=9227.]

D:\Program Files\jdev_9052\jdev\system9.0.5.2.1618\oc4j-config>
D:\Program Files\jdev_9052\jdk\bin\javaw.exe -client  
-Doracle.home=D:\Program Files\jdev_9052 -classpath D:\Program  
Files\jdev_9052\j2ee\home\oc4j.jar;D:\Program  
Files\jdev_9052\jdev\lib\jdev-oc4j.jar -Xverify:none  
-Ddisable.checkForUpdate=true  
-Dorg.apache.tapestry.disable-caching=true  
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.Tran 
sformerFactoryImpl  
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleL 
og -Dorg.apache.commons.logging.simplelog.defaultlog=debug  
-Doracle.j2ee.dont.use.memory.archive=true  
-Doracle.j2ee.http.socket.timeout=500 -Doracle.dms.sensors=NONE  
-Doc4j.jms.usePersistenceLockFiles=false com.evermind.server.OC4JServer  
-config D:\Program  
Files\jdev_9052\jdev\system9.0.5.2.1618\oc4j-config\server.xml
[waiting for the server to complete its initialization...]

Ready message received from Oc4jNotifier.

Embedded OC4J startup time: 2443 ms.
==============================

--ee



On 10 Nov 2004, at 20:46, phillip rhodes wrote:

> This works for oc4j 9.0.3
>
> Put this in the startup script for your oc4j instance:
>
> -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.Tra 
> nsformerFactoryImpl
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by phillip rhodes <rh...@yahoo.com>.
This works for oc4j 9.0.3

Put this in the startup script for your oc4j instance:

-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl





--- Eric Everman <ev...@precedadesign.com> wrote:

> Thanks to everyone who replied on this.  I *did*
> find a way to get this  
> fixed, so I'm going to give a complete summery here
> in case anyone else  
> needs it.
> 
> 
> The problem:
> Oracle's OC4J application server (Oracle Containers
> 4 Java) includes an  
> XML parser that is broken.  Specifically, it chokes
> on the  
> contrib:Table component, giving this error:
> TablePages.jwc<Line 41, Column 26>: XML-0139:
> (Error) ID value  
> 'informal' is not unique.
> 
> The file is actually perfectly valid XML and has no
> duplicate  
> id="informal" anywhere in the document (even
> sub-elements).  Oracle  
> does not support the use of 3rd party XML parsers,
> so in a production  
> environment this is big trouble.
> 
> The good news is that Oracle has a new version of
> their XML parser out  
> that seems to fix the issue (Oracle XDK 10.1.0.2 or
> greater).  The bad  
> news is that the new parser does not seem to come
> with the current OC4J  
> production release (9.0.4).  The new XML parser
> *does* come bundled  
> with their pre-production OC4J (version 10.0.3) and
> Tapestry  
> deployments to that OC4J version do work.  So, right
> now you have two  
> options if you must use OC4J:
> 
> Option 1:  Deploy to OC4J 10.0.3.  Note that this is
> pre-production and  
> is only available standalone.  Thus, it does not run
> under grid control  
> or Enterprise Manager.  This may work for some
> people - in our case it  
> probably will.
> 
> Option 2:  Modify your OC4J 9.0.4 to use the new XML
> parsers.  I HAVE  
> NOT TRIED THIS, but it seems likely that it may
> work.  See my notes  
> about JDeveloper integration for hints as to how
> this might be done.
> 
> 
> If you are interested in testing your applications
> in Jdeveloper 10G,  
> you need to get JDev's embedded OC4J instance to use
> the new XML  
> parser.  I had many failed attempts at this.  If you
> curious, here is  
> what didn't work.  I tried adding Xerces to the
> classpath and  
> specifying Xerces as the XML parser at start-up, but
> this did not work  
> for some reason and Oracle's XML parser was still
> used.  In another  
> attempt, I updated the XML parser libraries that
> come with JDev to the  
> current XSK version (10.1.0.2 for Windows), however,
> this did not work  
> because JDeveloper and the embedded OC4J instance
> share the same XML  
> libraries and JDeveloper seems to have a dependancy
> on the specific  
> version that ships with it - I couldn't get JDev to
> start after making  
> this change.  A final failed attempt was to install
> the standalone OC4J  
> 10.0.3 and tell Jdev to use it as its embedded
> server:  this completely  
> failed because the new OC4J version uses a different
> config file  
> structure so JDev was completely lost trying to
> read/write  
> configurations.
> 
> What did work:  I created a separate OC4J standalone
> installation of  
> the same version that comes with JDev (OC4J 9.0.3). 
> In that separate  
> installation I was able to update the XML parser to
> the latest version  
> with no problems.  Specifically, I updated these
> files with the files I  
> downloaded from Oracles XDK 10.1.0.2 :
> <root of OC4J install>/lib/xmlparserv2.jar
> <root of OC4J install>/lib/xsqlserializers.jar
> 
> Then I told JDev to use the separate OC4J install as
> its embedded  
> server by going to Tools | Embedded OC4J | Globa| |
> OC4J Installation  
> to Use...
> 
> Life was good with JDev after making that change. 
> You may need to tell  
> JDev to refresh the datasources, but there is a
> button to do this in  
> the Embedded preference panel.  Also, I had trouble
> with the bc4j  
> application that seems to be deployed by default in
> the standalone  
> install.  To fix this, I simply removed the bc4j
> application from the  
> server.xml file
> (jdev/systemxxx/oc4j-config/server.xml).
> 
> Best of luck to anyone else dealing with this.  If
> anyone finds this  
> information incomplete or incorrect, please post a
> correction so that  
> others don't have to deal with this.
> 
> Best Wishes,
> Eric Everman
> 
> 
> 
> 
> 
> On 8 Nov 2004, at 13:34, Eric Everman wrote:
> 
> > Has anyone been able to use the contrib:Table
> component under Oracle's
> > OC4J app server?
> >
> > OC4J uses Oracle's XML parser, which seems to
> choke on the
> > TablePages.jwc specification.  I'd love to use a
> different parser, but
> > Oracle explicitely  does not support 3rd party
> parsers and OC4J seems  
> > to
> > be overriding any attempt to specify another
> parser for the application
> > level.
> >
> > I really may be stuck here - has anyone gotten
> this to work???  A  
> > simple
> > test case is to simply copy the example out of the
> contrib:Table
> > component reference and run it under OC4J.  Is
> everyone getting XML
> > parse errors???
> >
> > Thanks for your help,
> > Eric Everman
> >
> >
> > (Typical errors pasted below)
> >
> >
>
classloader:/org/apache/tapestry/contrib/table/components/
> > TablePages.jwc<Line 41, Column 26>: XML-0139:
> (Error) ID value
> > 'informal' is not unique.
> >
> > columnNumber:  	26
> > lineNumber: 	41
> > systemId:
> > 
>
classloader:/org/apache/tapestry/contrib/table/components/
> 
> > TablePages.jwc
> > Stack Trace:
> >
> >
>
*oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:226)
> >
>
*oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:162)
> >
>
*oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingPa
> 
> > rs
> > er.java:276)
> >
>
*oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
> >
>
*org.apache.commons.digester.Digester.parse(Digester.java:1548)
> >
>
*org.apache.tapestry.parse.SpecificationParser.parse(SpecificationParse
> 
> > r.
> > java:642)
> >
>
*org.apache.tapestry.parse.SpecificationParser.parseComponentSpecificat
> 
> > io
> > n(SpecificationParser.java:601)
> 
=== message truncated ===


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help! Tapestry on Oracle's OC4J (contrib:Table causes XML parsing errors)

Posted by Eric Everman <ev...@precedadesign.com>.
Thanks to everyone who replied on this.  I *did* find a way to get this  
fixed, so I'm going to give a complete summery here in case anyone else  
needs it.


The problem:
Oracle's OC4J application server (Oracle Containers 4 Java) includes an  
XML parser that is broken.  Specifically, it chokes on the  
contrib:Table component, giving this error:
TablePages.jwc<Line 41, Column 26>: XML-0139: (Error) ID value  
'informal' is not unique.

The file is actually perfectly valid XML and has no duplicate  
id="informal" anywhere in the document (even sub-elements).  Oracle  
does not support the use of 3rd party XML parsers, so in a production  
environment this is big trouble.

The good news is that Oracle has a new version of their XML parser out  
that seems to fix the issue (Oracle XDK 10.1.0.2 or greater).  The bad  
news is that the new parser does not seem to come with the current OC4J  
production release (9.0.4).  The new XML parser *does* come bundled  
with their pre-production OC4J (version 10.0.3) and Tapestry  
deployments to that OC4J version do work.  So, right now you have two  
options if you must use OC4J:

Option 1:  Deploy to OC4J 10.0.3.  Note that this is pre-production and  
is only available standalone.  Thus, it does not run under grid control  
or Enterprise Manager.  This may work for some people - in our case it  
probably will.

Option 2:  Modify your OC4J 9.0.4 to use the new XML parsers.  I HAVE  
NOT TRIED THIS, but it seems likely that it may work.  See my notes  
about JDeveloper integration for hints as to how this might be done.


If you are interested in testing your applications in Jdeveloper 10G,  
you need to get JDev's embedded OC4J instance to use the new XML  
parser.  I had many failed attempts at this.  If you curious, here is  
what didn't work.  I tried adding Xerces to the classpath and  
specifying Xerces as the XML parser at start-up, but this did not work  
for some reason and Oracle's XML parser was still used.  In another  
attempt, I updated the XML parser libraries that come with JDev to the  
current XSK version (10.1.0.2 for Windows), however, this did not work  
because JDeveloper and the embedded OC4J instance share the same XML  
libraries and JDeveloper seems to have a dependancy on the specific  
version that ships with it - I couldn't get JDev to start after making  
this change.  A final failed attempt was to install the standalone OC4J  
10.0.3 and tell Jdev to use it as its embedded server:  this completely  
failed because the new OC4J version uses a different config file  
structure so JDev was completely lost trying to read/write  
configurations.

What did work:  I created a separate OC4J standalone installation of  
the same version that comes with JDev (OC4J 9.0.3).  In that separate  
installation I was able to update the XML parser to the latest version  
with no problems.  Specifically, I updated these files with the files I  
downloaded from Oracles XDK 10.1.0.2 :
<root of OC4J install>/lib/xmlparserv2.jar
<root of OC4J install>/lib/xsqlserializers.jar

Then I told JDev to use the separate OC4J install as its embedded  
server by going to Tools | Embedded OC4J | Globa| | OC4J Installation  
to Use...

Life was good with JDev after making that change.  You may need to tell  
JDev to refresh the datasources, but there is a button to do this in  
the Embedded preference panel.  Also, I had trouble with the bc4j  
application that seems to be deployed by default in the standalone  
install.  To fix this, I simply removed the bc4j application from the  
server.xml file (jdev/systemxxx/oc4j-config/server.xml).

Best of luck to anyone else dealing with this.  If anyone finds this  
information incomplete or incorrect, please post a correction so that  
others don't have to deal with this.

Best Wishes,
Eric Everman





On 8 Nov 2004, at 13:34, Eric Everman wrote:

> Has anyone been able to use the contrib:Table component under Oracle's
> OC4J app server?
>
> OC4J uses Oracle's XML parser, which seems to choke on the
> TablePages.jwc specification.  I'd love to use a different parser, but
> Oracle explicitely  does not support 3rd party parsers and OC4J seems  
> to
> be overriding any attempt to specify another parser for the application
> level.
>
> I really may be stuck here - has anyone gotten this to work???  A  
> simple
> test case is to simply copy the example out of the contrib:Table
> component reference and run it under OC4J.  Is everyone getting XML
> parse errors???
>
> Thanks for your help,
> Eric Everman
>
>
> (Typical errors pasted below)
>
> classloader:/org/apache/tapestry/contrib/table/components/
> TablePages.jwc<Line 41, Column 26>: XML-0139: (Error) ID value
> 'informal' is not unique.
>
> columnNumber:  	26
> lineNumber: 	41
> systemId:
> 	classloader:/org/apache/tapestry/contrib/table/components/ 
> TablePages.jwc
> Stack Trace:
>
> *oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:226)
> *oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:162)
> *oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingPa 
> rs
> er.java:276)
> *oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
> *org.apache.commons.digester.Digester.parse(Digester.java:1548)
> *org.apache.tapestry.parse.SpecificationParser.parse(SpecificationParse 
> r.
> java:642)
> *org.apache.tapestry.parse.SpecificationParser.parseComponentSpecificat 
> io
> n(SpecificationParser.java:601)
> *org.apache.tapestry.engine.DefaultSpecificationSource.parseSpecificati 
> on
> (DefaultSpecificationSource.java:163)
> *org.apache.tapestry.engine.DefaultSpecificationSource.getComponentSpec 
> if
> ication(DefaultSpecificationSource.java:275)
> *org.apache.tapestry.engine.Namespace.locateComponentSpecification(Name 
> sp
> ace.java:286)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org