Issue Details (XML | Word | Printable)

Key: GALAXY-46
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Dan Diephouse
Reporter: Andrew Perepelytsya
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Galaxy

Newer XML libs must be endorsed on a JDK level

Created: 24/Jan/08 05:38 PM   Updated: 05/Feb/08 03:50 PM
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.0-beta-2

Time Tracking:
Original Estimate: 1 day
Original Estimate - 1 day
Remaining Estimate: 1 day
Remaining Estimate - 1 day
Time Spent: Not Specified
Remaining Estimate - 1 day

Issue Links:
Related

Labels:
User impact: High


 Description  « Hide
Check the full log of the build: http://bamboo.muleforge.org/browse/GALAXY-FORGE-35/artifact , search for the ' ============= schemaFactory ' debug line. An internal Sun's parser (older xerces) is being used. This is failing now in the core module build as well from mvn command line

============= schemaFactory = com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl@121f653

In contrast, a successful build with endorsed xml-apis reports

============= schemaFactory = org.apache.xerces.jaxp.validation.XMLSchemaFactory@126ba64

And things work fine. See http://archive.galaxy.muleforge.org/dev/d075621f0801241254w188aca4dod40d788df3441215%40mail.gmail.com for discussion and detailed background.



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Andrew Perepelytsya added a comment - 24/Jan/08 05:47 PM
Just for the record, dropping the following jars in Java5/jre/lib/endorsed fixes it:

xalan-2.7.1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xml-serializer-2.7.1.jar

See a related MULE-2700 as well.

So, it becomes a distribution task: minimize user's setup (and don't curse sun too much in the process)
Carefully upgrade MuleForge's Bamboo environment - probably need a new JDK install with endorsed xml libs, otherwise many projects building on Java 5 may suddenly break.


Andrew Perepelytsya added a comment - 24/Jan/08 06:25 PM
Additionally, having older libraries dumps stacktraces like these in the build log (see http://bamboo.muleforge.org/browse/GALAXY-FORGE-36/artifact )

SEVERE: Could not process index mule.descriptor
24-Jan-2008 18:10:45 java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredElementNSImpl.compareDocumentPosition(Lorg/w3c/dom/Node;)S
24-Jan-2008 18:10:45 at net.sf.saxon.dom.NodeWrapper.compareOrder(NodeWrapper.java:298)
24-Jan-2008 18:10:45 at net.sf.saxon.sort.GlobalOrderComparer.compare(GlobalOrderComparer.java:35)
24-Jan-2008 18:10:45 at net.sf.saxon.sort.DocumentOrderIterator.compare(DocumentOrderIterator.java:53)
24-Jan-2008 18:10:45 at net.sf.saxon.sort.GenericSorter.quickSort1(GenericSorter.java:193)
24-Jan-2008 18:10:45 at net.sf.saxon.sort.GenericSorter.quickSort(GenericSorter.java:183)
24-Jan-2008 18:10:45 at net.sf.saxon.sort.DocumentOrderIterator.<init>(DocumentOrderIterator.java:34)

I do not see them with libraries properly endorsed, could also be that saxon needs an upgrade.


Dan Diephouse added a comment - 24/Jan/08 06:34 PM
I'm wondering if we can detect if xerces is there or not. I would rather not require that users have to install stuff in the endorsed directory to have it working. It will play to our favor if all that is required to run Galaxy is a one line command.

If Xerces is not there, we should print a big fat warning which says that WS-I schema validation won't work and then let them deal with it.


Andrew Perepelytsya added a comment - 24/Jan/08 06:38 PM
It's rather Xerces' version than xerces itself (if it's crimson, you are doomed). Older xerces versions will fail too. Something like you described is possible, I just need to look at currently available deployment options.

Dan Diephouse added a comment - 05/Feb/08 03:10 PM
Just did some research into using the JDK parser. We get this problem:

UndeclaredPrefix: Cannot resolve 'tns:sayHiRequest' as a QName: the prefix 'tns' is not declared. (Line 0)
cvc-attribute.3: The value 'tns:sayHiRequest' of attribute 'message' on element 'wsdl:input' is not valid with respect to its type, 'QName'. (Line 0)

When prefixes are undeclared.

Official sun bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6626853
JAXP patch which isn't in JDK 5 yet: http://fisheye5.cenqua.com/rdiff/jaxp-sources?csid=jaxp-1_3-j2se-5_0-branch:joehw:20071108172234&u&N

I looked at the source to try and figure out a workaround, but it looks pretty impossible.

This is fixed in JDK6. Endorsing the libs also works.


Dan Diephouse added a comment - 05/Feb/08 03:50 PM
I'm closing this as I made everything work by default. If Xerces isn't endorsed we spit out an error message, disable the appropriate rules, and move on.

Documented here for users: http://www.mulesource.org/display/GALAXY/Getting+Started

http://fisheye.muleforge.org/changelog/galaxy/?cs=356