Announcement Announcement Module
Collapse
No announcement yet.
AbstractXmlFlowExecutionTests failing on java.lang.LinkageError (using maven) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AbstractXmlFlowExecutionTests failing on java.lang.LinkageError (using maven)

    I am trying to run unit tests from the command line using maven. Both tests that I have written and the tests examples provided in the 1.0-EA package always fail with the same error:

    Testsuite: com.portal.flows.ContextSearchFlowTest
    Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.25 sec

    Testcase: testStartFlow(com.portal.flows.ContextSearchFlowTe st): Caused an ERROR
    loader constraints violated when linking org/w3c/dom/Node class
    java.lang.LinkageError: loader constraints violated when linking org/w3c/dom/Node class
    at org.springframework.util.xml.DomUtils.getChildElem entsByTagName(DomUtils.java:54)
    at org.springframework.webflow.builder.XmlFlowBuilder .initLocalFlowArtifactFactoryRegistry(XmlFlowBuild er.java:427)
    at org.springframework.webflow.builder.XmlFlowBuilder .parseFlow(XmlFlowBuilder.java:413)
    at org.springframework.webflow.builder.XmlFlowBuilder .init(XmlFlowBuilder.java:355)
    at org.springframework.webflow.builder.FlowAssembler. assembleFlow(FlowAssembler.java:110)
    at org.springframework.webflow.test.AbstractExternali zedFlowExecutionTests.getFlow(AbstractExternalized FlowExecutionTests.java:67)
    at org.springframework.webflow.test.AbstractFlowExecu tionTests.createFlowExecution(AbstractFlowExecutio nTests.java:162)
    at org.springframework.webflow.test.AbstractFlowExecu tionTests.startFlow(AbstractFlowExecutionTests.jav a:151)
    at org.springframework.webflow.test.AbstractFlowExecu tionTests.startFlow(AbstractFlowExecutionTests.jav a:90)
    at com.portal.flows.ContextSearchFlowTest.testStartFl ow(ContextSearchFlowTest.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at org.apache.commons.jelly.tags.ant.AntTag.doTag(Ant Tag.java:185)
    at org.apache.commons.jelly.impl.TagScript.run(TagScr ipt.java:279)
    at org.apache.commons.jelly.impl.ScriptBlock.run(Scri ptBlock.java:135)
    at org.apache.commons.jelly.TagSupport.invokeBody(Tag Support.java:233)
    at org.apache.commons.jelly.tags.core.IfTag.doTag(IfT ag.java:88)
    at org.apache.commons.jelly.impl.TagScript.run(TagScr ipt.java:279)
    at org.apache.commons.jelly.impl.ScriptBlock.run(Scri ptBlock.java:135)
    at org.apache.maven.jelly.tags.werkz.MavenGoalTag.run BodyTag(MavenGoalTag.java:79)
    at org.apache.maven.jelly.tags.werkz.MavenGoalTag$Mav enGoalAction.performAction(MavenGoalTag.java:110)
    at com.werken.werkz.Goal.fire(Goal.java:639)
    at com.werken.werkz.Goal.attain(Goal.java:575)
    at com.werken.werkz.Goal.attainPrecursors(Goal.java:4 88)
    at com.werken.werkz.Goal.attain(Goal.java:573)
    at org.apache.maven.plugin.PluginManager.attainGoals( PluginManager.java:671)
    at org.apache.maven.MavenSession.attainGoals(MavenSes sion.java:263)
    at org.apache.maven.cli.App.doMain(App.java:488)
    at org.apache.maven.cli.App.main(App.java:1239)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at com.werken.forehead.Forehead.run(Forehead.java:551 )
    at com.werken.forehead.Forehead.main(Forehead.java:58 1)

    Could this be a maven related issue?
    Any ideas?

    Thanks,

    Attel

  • #2
    The error is Ant/Maven related, researching I found the solution at: http://jira.codehaus.org/browse/DROOLS-197

    "LinkageErrors are common with Ant/Maven when the code under test requires different versions of the XML libraries than the ones used by Ant/Maven themselves. The only solution is to set "fork=true""

    So the solution is to set "maven.junit.fork=true" in the project.properties file.

    Comment

    Working...
    X