This discussion is archived
1 Reply Latest reply: Aug 1, 2012 12:59 PM by bkazar RSS

Using GML3g.fromNodeToGeometry in a weblogic app

945840 Newbie
Currently Being Moderated
Hi all,

I have a webservice app running in Weblogic 10.3.3 (as per customer requirements) that receives an xml message containing a GML part. I want to persist this using Eclipselink.

What I want is simple:
1- marshal the GML part into a String
2- use oracle's GML3g.fromNodeToGeometry (from sdoutil) to convert this string into a JGeometry object
3- Persist this using Eclipselink

1 and 3 appear to work, Eclipselink has mapping for SDO_GEOMETRY to JGeometry. I can get a org.w3c.dom.Node from the GML fragment, but the call to fromNodeToGeometry fails:
SEVERE: oracle/xml/parser/v2/XMLElement
java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLElement
at oracle.spatial.util.GML3g.getSRIDFromNode(GML3g.java:191)

I think I understand this; as sdoutl.jar and sdoapi.jar are added to Weblogic's classpath during startup, they are using a different classloader than the app and cannot find the XMLElement. So I tried to also add xmlparserv2.jar to weblogic's classpath but the same error message appears when I add it to the end of the classpath and a broken Weblogic when I insert to early in the classpath. So it appears there is a conflict between xmlparserv2 and weblogic, but apparently GML3g requires this specific XML parser.

I can ofcourse program the logic myself and am fairly confident that that will work, but I'd rather let a library perform this task.

If anybody has a solution or different way of converting GML into JGeometry, I'd be very gratefull.

Regards,

Arjan

Edited by: loermansa on Jun 26, 2012 3:43 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points