ejc: org.xml.sax.SAXException

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ejc: org.xml.sax.SAXException

Ted Lum
I'm trying to use the maven-ejc-plugin, but it keeps throwing
org.xml.sax.SAXException no matter what I try:

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
default of goal org.milyn:maven-ejc-plugin:1.5.2:generate failed: Error
parsing EDI Mapping Model [...]
         at
org.milyn.edisax.model.EdifactModel.getEdimap(EdifactModel.java:144)
         at
org.milyn.edisax.util.EDIUtils.loadXMLMappingModel(EDIUtils.java:151)
         at
org.milyn.edisax.util.EDIUtils.loadMappingModels(EDIUtils.java:120)
         at org.milyn.ejc.EJCExecutor.execute(EJCExecutor.java:60)
         at org.milyn.ejc.maven.EJCMojo.execute(EJCMojo.java:101)
         at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
         ... 20 more
Caused by: org.xml.sax.SAXException: Failed to locate XSD resource
'/META-INF/schema/cbpedi-message-mapping-1.0.xsd' on classpath.
Namespace: 'http://www.MyCompany.com/schema/cbpedi-message-mapping-1.0.xsd'.
         at
org.milyn.xml.XsdDOMValidator.getNamespaceSource(XsdDOMValidator.java:155)
         at org.milyn.xml.XsdDOMValidator.<init>(XsdDOMValidator.java:79)
         at
org.milyn.edisax.model.EDIConfigDigester.digestEDIConfig(EDIConfigDigester.java:147)
         at
org.milyn.edisax.model.EDIConfigDigester.digestEDIConfig(EDIConfigDigester.java:143)
         at
org.milyn.edisax.model.EdifactModel.parseSequence(EdifactModel.java:195)
         at
org.milyn.edisax.model.EdifactModel.getEdimap(EdifactModel.java:142)
         ... 25 more

The plugin is configured like so:

             <plugin>
                 <groupId>org.milyn</groupId>
<artifactId>maven-ejc-plugin</artifactId>
                 <version>1.5.2</version>
                 <configuration>
<ediMappingFile>cbpedi-to-xml-mapping.xml</ediMappingFile>
<packageName>com.MyCompany.routerTest.model</packageName>
                 </configuration>
                 <executions>
<execution><goals><goal>generate</goal></goals></execution>
                 </executions>
             </plugin>

The mapping refers to the schema like so:

<?xml version="1.0" encoding="UTF-8"?>
<medi:edimap
xmlns:medi="http://www.MyCompany.com/schema/cbpedi-message-mapping-1.0.xsd">
.
.
.

...but I've also tried:

<?xml version="1.0" encoding="UTF-8"?>
<medi:edimap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:medi="http://www.MyCompany.com/schema/cbpedi-message-mapping-1.0.xsd"
xsi:schemaLocation="http://www.MyCompany.com/schema/cbpedi-message-mapping-1.0.xsd 
file:///C:/Users/tlum/git/cbpedi/cbpedi/src/main/resources/META-INF/schema/cbpedi-message-mapping-1.0.xsd">
.
.
.

When I build the component - a custom parser - it passes test schema
validation test which is virtually the same thing using EDIConfigDigester.

I've added the .xsd to the Eclipse XML catalog. But I've now run out of
ideas. I assume the problem is the environment in which the plugin is
running and it's view of the project, but I'm clearly not understanding
the environment context in which it's operating or how to feed it a
reference to the schema it can't locate... or there is a bug and I'm
beating my head on the desk for no good reason.

Can someone offer some some insight on this?

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email