2 Replies Latest reply on Apr 16, 2013 8:30 AM by aslak

    HibernateSpatial + Arquillian woes

    smysnk

      Hi,

       

      I just started writing some of my first Arquillian tests and everything is going great.. until I tried integrating HibernateSpatial into my project.  Just by adding in two two artifacts into my project it causes Arquillian to choke.  What is interesting is this project compiles fine otherwise.  I only encounter this problem when running the tests.

       

      --

       

      Repro steps:

       

       

      Adding the following two dependencies into (jboss-javaee6-webapp quickstart) pom.xml,.

       

        
      <dependencies>
      ...
        <dependency>
                                    <groupId>org.hibernate</groupId>
                                    <artifactId>hibernate-spatial</artifactId>
        <version>4.0-M1</version>
        </dependency>
      
        <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
                                    <version>8.4-701.jdbc3</version>
        </dependency>
      ...
      
      </dependencies>
      
      
      
       <!-- add repositories for JTS and Hibernate Spatial and Hibernate (JBoss) -->
       <repositories>
        <repository>
                                    <id>OSGEO GeoTools repo</id>
                                    <url>http://download.osgeo.org/webdav/geotools</url>
        </repository>
        <repository>
                                    <id>Hibernate Spatial repo</id>
                                    <url>http://www.hibernatespatial.org/repository</url>
        </repository>
       </repositories>
      
      
      
      

       

      then trying to run the previously working Arquillian sample tests, I get this exception:

       

      java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor

                at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:160)

                at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:111)

                at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)

                at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: java.lang.reflect.InvocationTargetException

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:156)

                ... 10 more

      Caused by: java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.setXmlStandalone(Z)V

                at org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomDescriptorExporterImpl.to(XmlDomDescriptorExporterImpl.java:62)

                at org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorExporterImpl.to(NodeDescriptorExporterImpl.java:55)

                at org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorExporterImpl.to(NodeDescriptorExporterImpl.java:30)

                at org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomDescriptorExporter.to(XmlDomDescriptorExporter.java:51)

                at org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomDescriptorExporter.to(XmlDomDescriptorExporter.java:34)

                at org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase.exportTo(NodeDescriptorImplBase.java:55)

                at org.jboss.shrinkwrap.descriptor.spi.DescriptorImplBase.exportAsString(DescriptorImplBase.java:84)

                at org.jboss.arquillian.config.impl.extension.ConfigurationSysPropResolver.resolveSystemProperties(ConfigurationSysPropResolver.java:54)

                at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:62)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:261)

                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:56)

                ... 15 more

       

       

      Any help on this would be greatly appreciated!

       

      Thanks,

       

      Josh