You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Michael Young (JIRA)" <ji...@apache.org> on 2006/03/22 02:39:00 UTC

[jira] Created: (JCR-367) Remove dependency on Xerces

Remove dependency on Xerces
---------------------------

         Key: JCR-367
         URL: http://issues.apache.org/jira/browse/JCR-367
     Project: Jackrabbit
        Type: Improvement
    Reporter: Michael Young


Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by Felix Meschberger <Fe...@day.com>.
Hi Jukka,

Alright then, so I will then test, my patch and submit it to JIRA on success.

Regards
Felix

On 6/28/06, Jukka Zitting <ju...@gmail.com> wrote:
> Hi,
>
> On 6/28/06, Felix Meschberger <fm...@gmail.com> wrote:
> > > > Use JAXP Transformer (yes it is part of the Java Runtime siince 1.4) for export
> > >
> > > We should be careful with especially namespaces being correctly transmitted
> > > through the Transformer interface. There are a few bug reports about the same
> > > issue earlier on.
> >
> > Do you have some concrete examples in mind ? Maybe those bugs are less
> > problematic than the Xerces inclusion.
>
> Sorry for not being too specific, I didn't have time to trace proper
> references. See the thread at [1] from a year ago. The problem was
> about StreamSource -> DomResult conversions, where namespace prefixes
> were lost unless the SAX parser's
> "http://xml.org/sax/features/namespace-prefixes" property was set. No
> that I think of it I don't believe that this will be a problem for
> JCR-367, since I think that Xerces is only used directly to serialize
> XML, not to parse it.
>
> [1] http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/1952
>
> BR,
>
> Jukka Zitting
>
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftsmanship, JCR consulting, and Java development
>

Re: [jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 6/28/06, Felix Meschberger <fm...@gmail.com> wrote:
> > > Use JAXP Transformer (yes it is part of the Java Runtime siince 1.4) for export
> >
> > We should be careful with especially namespaces being correctly transmitted
> > through the Transformer interface. There are a few bug reports about the same
> > issue earlier on.
>
> Do you have some concrete examples in mind ? Maybe those bugs are less
> problematic than the Xerces inclusion.

Sorry for not being too specific, I didn't have time to trace proper
references. See the thread at [1] from a year ago. The problem was
about StreamSource -> DomResult conversions, where namespace prefixes
were lost unless the SAX parser's
"http://xml.org/sax/features/namespace-prefixes" property was set. No
that I think of it I don't believe that this will be a problem for
JCR-367, since I think that Xerces is only used directly to serialize
XML, not to parse it.

[1] http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/1952

BR,

Jukka Zitting

-- 
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

Re: [jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Jukka,

Thanks for the comments. I am taking this to the list to not fill JIRA
and will post a summary to JIRA in the end.

> > Use JAXP Transformer (yes it is part of the Java Runtime siince 1.4) for export
>
> We should be careful with especially namespaces being correctly transmitted
> through the Transformer interface. There are a few bug reports about the same
> issue earlier on.

Do you have some concrete examples in mind ? Maybe those bugs are less
problematic than the Xerces inclusion.

Regards
Felix

[jira] Kommentiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418693 ] 

Felix Meschberger commented on JCR-367:
---------------------------------------

Replaced use of Xerces Serializer with JAXP Transform.

Fixed in Rev. 418357

Note: After applying this test, two JUnits fail:
   * org.apache.jackrabbit.core.XATest.testRemoveVersion() - this is unrelated to this issue, I assume
   * org.apache.jackrabbit.core.xml.DocumentViewTest.testMultiValue() - fails as is expected by looking at the
         DocViewSAXEventGenerator.leavingProperties method: multivalue properties are not exported at all.

Therefore, I assume these fixes seem to work. Time should tell.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Kommentiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418687 ] 

Felix Meschberger commented on JCR-367:
---------------------------------------

Added XMLChar class from JDK 1.4 to o.a.j.util and adapted references.

Fixed in Rev. 418356

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418621 ] 

Marcel Reutegger commented on JCR-367:
--------------------------------------

I agree with Jukka, the sooner we have this patch applied the better. Even though we might find out there are issues we cannot resolve and have to revert the patch, but this can be done by any commiter and is not tied to anyones vacation.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 1.0, 1.0.1, 0.9
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (JCR-367) Remove dependency on Xerces

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]
     
Stefan Guggisberg reopened JCR-367:
-----------------------------------

     Assign To: Jukka Zitting  (was: Felix Meschberger)

reopening issue because of failing junit testcases:

Testsuite: org.apache.jackrabbit.test.api.TestAll
Tests run: 584, Failures: 8, Errors: 24, Time elapsed: 31.155 sec

environment: w2k, sun jdk 1.4.2_03

assigning to jukka since felix is on vacation.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Jukka Zitting
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12444521 ] 
            
Jukka Zitting commented on JCR-367:
-----------------------------------

> I suggest reopening the issue.

You're correct. Since this issue is already closed, I opened a new issue, JCR-602, to track this.

> Remove dependency on Xerces
> ---------------------------
>
>                 Key: JCR-367
>                 URL: http://issues.apache.org/jira/browse/JCR-367
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xml
>    Affects Versions: 0.9, 1.0, 1.0.1
>            Reporter: Michael Young
>         Assigned To: Jukka Zitting
>             Fix For: 1.1
>
>         Attachments: No_Xerces_Patch.fm.20060627.patch, TEST-org.apache.jackrabbit.test.api.TestAll.txt
>
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Kommentiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418261 ] 

Felix Meschberger commented on JCR-367:
---------------------------------------

> did you test with jre 1.4. and jre 1.5?

Hmm, no, but as the new code relies on JAXP, which is part of the J2SE API since 1.4. I assume, this code is correct in both 1.4 and 1.5 I have to assume, right ? Correct me if I am wrong.

> (e.g. performance, memory consumption, different jre's) 

Performance ? Don't know whether Xerces Serializer is faster or slower than JAXP. Do I have to care in this special case of import and export, whether it takes 1 or 2 ms longer or not ?

Memory Consumption ? I assume removing and not using a library which has a file size of almost 1MB is a big plus in this regard, right ? But you are right, I did not crosscheck whether the serialization takes more or less memory. Is this kind of test a requirement for fixes ?

Different JREs ? As I said JAXP is part of the J2SE API and runtime hence I assume this to be working. I have to, as I have confidence in Sun - else I could not even use the java.lang.String class :-)

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418264 ] 

Stefan Guggisberg commented on JCR-367:
---------------------------------------

Comment by Felix Meschberger [28/Jun/06 03:23 PM]  
> Hmm, no, but as the new code relies on JAXP, which is part of the J2SE API since 1.4. I assume, this code is correct in both 1.4 and 1.5 I have to assume, right ? Correct me if I am wrong.

well, just a example: the public class org.apache.xml.utils.XMLChar is part of the 1.4 jre but it doesn't exist in jre 1.5.

> ... Is this kind of test a requirement for fixes ? 

it's IMO common sense to thoroughly test changes with significant potential impact on public api mehtods
and unknown side effects, especially if they replace time-tested code.

> ... as I have confidence in Sun - else I could not even use the java.lang.String class :-)

well then consider the XMLChar case above...

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418711 ] 

Jukka Zitting commented on JCR-367:
-----------------------------------

Felix:
> Added XMLChar class from JDK 1.4 to o.a.j.util and adapted references.

How about using the version from Xerces trunk (see http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/util/XMLChar.java?view=markup) instead? It's a bit more polished and is licensed using ASLv2. It should be functionally identical.

Unless anyone objects, I'll update the class.


> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Erledigt: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]
     
Felix Meschberger resolved JCR-367:
-----------------------------------

    Resolution: Fixed

Considering this issue fixed for the moment.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418630 ] 

Stefan Guggisberg commented on JCR-367:
---------------------------------------

Comment by Jukka Zitting [30/Jun/06 10:40 AM]  
> In short I share Stefan's concerns, but end up with the opposite conclusion on how to best handle them. :-)

thanks, jukka. that's fine with me. 


> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Aktualisiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]

Felix Meschberger updated JCR-367:
----------------------------------

    Attachment: No_Xerces_Patch.fm.20060627.patch

A patch which adds the XMLChar class to the util package and replaces the serializer with using JAXP Transform.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Roy T. Fielding (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418726 ] 

Roy T. Fielding commented on JCR-367:
-------------------------------------

It is not safe to use code from a JDK, even when that code comes from Apache originally.  Please replace it with the code from Xerces trunk.


> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12443775 ] 
            
Przemo Pakulski commented on JCR-367:
-------------------------------------

Jackrabbit-core is still dependent on Xerces directly during runtime, SessionImpl.importWorkspace, Workspacempl.importWorkspace methods contains folliwng lines :

            XMLReader parser =
                    XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");

It works in maven1 probably because maven1 itself needs xerces to run test goal.

I suggest reopening the issue.

> Remove dependency on Xerces
> ---------------------------
>
>                 Key: JCR-367
>                 URL: http://issues.apache.org/jira/browse/JCR-367
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xml
>    Affects Versions: 0.9, 1.0, 1.0.1
>            Reporter: Michael Young
>         Assigned To: Jukka Zitting
>             Fix For: 1.1
>
>         Attachments: No_Xerces_Patch.fm.20060627.patch, TEST-org.apache.jackrabbit.test.api.TestAll.txt
>
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418260 ] 

Stefan Guggisberg commented on JCR-367:
---------------------------------------

 Comment by Felix Meschberger [28/Jun/06 02:38 PM]
> I quickly tested a patch which I attach whether it works - and it seems it works.
>
> Any objections to me checking it in ?

did you test with jre 1.4. and jre 1.5?

the proposed change directly impacts 2 major api methods (javax.jcr.Session#export*View).
i'd be careful with such a change as the existing code does work is extensively tested over time.

i am not against the change but IMO more than just superficial testing is required
(e.g. performance, memory consumption, different jre's)



> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]
     
Jukka Zitting resolved JCR-367:
-------------------------------

    Resolution: Fixed

Unit test failures fixed in revision 418750.

SAX events for the xmlns:prefix="namespace" attributes are now sent explicitly, as if the "http://xml.org/sax/features/namespace-prefixes" property had been set on a SAX parser.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Jukka Zitting
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch, TEST-org.apache.jackrabbit.test.api.TestAll.txt
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JCR-367) Remove dependency on Xerces

Posted by "Roy T. Fielding (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]

Roy T. Fielding updated JCR-367:
--------------------------------

    Component: xml

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement
>   Components: xml
>     Reporter: Michael Young

>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418935 ] 

Stefan Guggisberg commented on JCR-367:
---------------------------------------

tested with svn rev 418710

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Jukka Zitting
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch, TEST-org.apache.jackrabbit.test.api.TestAll.txt
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Kommentiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418035 ] 

Felix Meschberger commented on JCR-367:
---------------------------------------

I ran into the same issue when working on trying to integrate with the Apache Felix (OSGi R4) as a bundle.

I tried to create a workaround, which I can solve like this:

   * Use JAXP Transformer (yes it is part of the Java Runtime siince 1.4) for export
   * Copy XMLChar to o.a.j.util. Yes, this is not the best of all solutions, but it removes the dependency and XMLChar is Apache, too.
   * Remains the o.a.j.c.nodetype.converter package which contains a XML Schema to node type converter. This is probably not a tool, which is run on a casual server implementation. Therefore, leaving the dependency there and documenting is probably ok. Better would probably be to take this out fo the core repository package, not sure, though.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young

>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Kommentiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418254 ] 

Felix Meschberger commented on JCR-367:
---------------------------------------

>  We should be careful with especially namespaces being correctly transmitted
> through the Transformer interface. There are a few bug reports about the same
> issue earlier on. 

It turned out that the issues mentioned were around parsing XML, which used the Transfomer interface. Here we are talking about serializing.

I quickly tested a patch which I attach whether it works - and it seems it works.

Any objections to me checking it in ?

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418439 ] 

Jukka Zitting commented on JCR-367:
-----------------------------------

Looks good to me.

The best way to get it tested in a wide number of different environments is to include the change in trunk. We can always revert it if it causes problems to someone.


> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Kommentiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418266 ] 

Felix Meschberger commented on JCR-367:
---------------------------------------

> well then consider the XMLChar case above...

Hmm, XMLChar is not part of the J2SE API AFAIK .. But: JAXP is in the javax.xml package, which is publicly defined, is part of the API and and and .... So we should not compare apples to pears here...

I agree that Sun has done a terrible job of first adding the org.apache stuff as is just to find out, that this poses more problems than are solved. In 1.5 those org.apache classes are "hidden" below the com.sun package to make clear they are used internally by the runtime.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JCR-367) Remove dependency on Xerces

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]

Stefan Guggisberg updated JCR-367:
----------------------------------

    Attachment: TEST-org.apache.jackrabbit.test.api.TestAll.txt

attaching test-report of failing test case

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Jukka Zitting
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch, TEST-org.apache.jackrabbit.test.api.TestAll.txt
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418041 ] 

Jukka Zitting commented on JCR-367:
-----------------------------------

> Use JAXP Transformer (yes it is part of the Java Runtime siince 1.4) for export

We should be careful with especially namespaces being correctly transmitted through the Transformer interface. There are a few bug reports about the same issue earlier on.

> Copy XMLChar to o.a.j.util. Yes, this is not the best of all solutions, but it removes the dependency and XMLChar is Apache, too.

Agreed. Not nice, but not too bad either.

> Remains the o.a.j.c.nodetype.converter package which contains a XML Schema to node type converter.
> This is probably not a tool, which is run on a casual server implementation. Therefore, leaving the dependency
> there and documenting is probably ok. Better would probably be to take this out fo the core repository package,
> not sure, though.

The XML Schema converter was included in core when I merged the CND support from contrib. It really should be outside the core unless we want to support direct XML Schema imports through registerNodeTypes().

I've also been thinking about replacing the converter with an XSL transformation. Any takers?


> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young

>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418940 ] 

Jukka Zitting commented on JCR-367:
-----------------------------------

Stefan:
> reopening issue because of failing junit testcases: 

OK, looks pretty much like the missing namespace problem I encountered earlier. I'll investigate.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Jukka Zitting
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch, TEST-org.apache.jackrabbit.test.api.TestAll.txt
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Zugewiesen: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]

Felix Meschberger reassigned JCR-367:
-------------------------------------

    Assign To: Felix Meschberger

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418769 ] 

Jukka Zitting commented on JCR-367:
-----------------------------------

> It is not safe to use code from a JDK, even when that code comes from Apache originally. Please replace it with the code from Xerces trunk. 

Replaced in revision 418445.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Kommentiert: (JCR-367) Remove dependency on Xerces

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-367?page=comments#action_12418469 ] 

Felix Meschberger commented on JCR-367:
---------------------------------------

Ok, I assign this issue to me. But I will commit the patch only after my vacations towards the end of July to not compromise in Jackrabbit case of having to fallback.

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JCR-367) Remove dependency on Xerces

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-367?page=all ]

Jukka Zitting updated JCR-367:
------------------------------

    Fix Version: 1.1
        Version: 0.9
                 1.0
                 1.0.1

I'd actually prefer to have this patch applied already now. The reason for waiting is the threat of possible JAXP incompatibilities, which can only reasonably be detected by wide enough testing. I'd like to have this change included in Jackrabbit 1.1; the longer it's in trunk before that, the more testing it receives.

In short I share Stefan's concerns, but end up with the opposite conclusion on how to best handle them. :-)

> Remove dependency on Xerces
> ---------------------------
>
>          Key: JCR-367
>          URL: http://issues.apache.org/jira/browse/JCR-367
>      Project: Jackrabbit
>         Type: Improvement

>   Components: xml
>     Versions: 0.9, 1.0, 1.0.1
>     Reporter: Michael Young
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: No_Xerces_Patch.fm.20060627.patch
>
> Classloaders in certain J2EE servers do not play well with the Xerces requirement

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira