2 Replies Latest reply on Feb 24, 2014 10:10 PM by flaviomattos86

    Unable to parse META-INF/validation.xml

    flaviomattos86 Newbie

      Hi guys.. I have been struggling with arquillian for a while and I could not find a solution for my problem. The same file I generate with arquillian is deployable in a conventional glassfish.. When I have try to run a test I get the following exception:

       

      [code]

      -------------------------------------------------------

      T E S T S

      -------------------------------------------------------

      Running com.hw2.eao.asteriskintegration.AsteriskManagerBeanTest

      Feb 24, 2014 10:28:50 AM com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 onReady

      INFO: Grizzly Framework 1.9.50 started in: 20ms - bound to [0.0.0.0:7676]

      Feb 24, 2014 10:28:50 AM com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 onReady

      INFO: Grizzly Framework 1.9.50 started in: 44ms - bound to [0.0.0.0:8080]

      Feb 24, 2014 10:28:50 AM com.sun.enterprise.web.WebContainer createHttpListener

      INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]

      Feb 24, 2014 10:28:50 AM com.sun.enterprise.web.WebContainer configureHost

      SEVERE: WEB0355: network-listener [http-listener-2] referenced by virtual server [server] does not exist

      Feb 24, 2014 10:28:50 AM com.sun.enterprise.web.WebContainer createHosts

      INFO: WEB0171: Created virtual server [server]

      Feb 24, 2014 10:28:50 AM com.sun.enterprise.web.WebContainer configureHost

      SEVERE: WEB0355: network-listener [admin-listener] referenced by virtual server [__asadmin] does not exist

      Feb 24, 2014 10:28:50 AM com.sun.enterprise.web.WebContainer createHosts

      INFO: WEB0171: Created virtual server [__asadmin]

      Feb 24, 2014 10:28:51 AM com.sun.enterprise.web.WebContainer loadSystemDefaultWebModules

      INFO: WEB0172: Virtual server [server] loaded default web module []

      Feb 24, 2014 10:28:51 AM com.sun.enterprise.v3.services.impl.WebContainerStarter startWebContainer

      INFO: core.start_container_done

      Feb 24, 2014 10:28:51 AM com.sun.enterprise.v3.server.AppServerStartup run

      INFO: GlassFish Server Open Source Edition 3.1.2.2 (java_re) startup time : Embedded (581ms), startup services(1,589ms), total(2,170ms)

      log4j:WARN No appenders could be found for logger (org.jboss.logging).

      log4j:WARN Please initialize the log4j system properly.

      log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

      Feb 24, 2014 10:28:55 AM org.glassfish.deployment.admin.DeployCommand execute

      SEVERE: HV000100: Unable to parse META-INF/validation.xml.

      javax.validation.ValidationException: HV000100: Unable to parse META-INF/validation.xml.

        at org.hibernate.validator.internal.xml.ValidationXmlParser.getValidationConfig(ValidationXmlParser.java:204)

        at org.hibernate.validator.internal.xml.ValidationXmlParser.parseValidationXml(ValidationXmlParser.java:59)

        at org.hibernate.validator.internal.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:287)

        at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:174)

        at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111)

        at org.jvnet.hk2.config.WriteableView.<init>(WriteableView.java:112)

        at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:214)

        at org.jvnet.hk2.config.Transaction.enroll(Transaction.java:165)

        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareAppConfigChanges(ApplicationLifecycle.java:1056)

        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:383)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)

        at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)

        at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)

        at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:202)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)

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

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

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

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

        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.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)

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

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

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

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

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

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

        at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)

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

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

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

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

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

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

        at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)

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

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

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

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

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

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

        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.EventImpl.fire(EventImpl.java:67)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)

        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)

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

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

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

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

        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.EventImpl.fire(EventImpl.java:67)

        at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)

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

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

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

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

        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.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)

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

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

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

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

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

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

        at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)

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

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

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

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

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

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

        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.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)

        at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)

        at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

        at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

        at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)

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

        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)

        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)

        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)

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

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

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

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

        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)

        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)

        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)

        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)

        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)

      Caused by: javax.xml.bind.JAXBException

      - with linked exception:

      [java.lang.ClassNotFoundException: com/sun/xml/bind/v2/ContextFactory]

        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:227)

        at javax.xml.bind.ContextFinder.find(ContextFinder.java:432)

        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)

        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)

        at org.hibernate.validator.internal.xml.ValidationXmlParser.getValidationConfig(ValidationXmlParser.java:196)

        ... 111 more

      Caused by: java.lang.ClassNotFoundException: com/sun/xml/bind/v2/ContextFactory

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:190)

        at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:561)

        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:225)

        ... 115 more

       

       

      PlainTextActionReporterFAILUREApplication csr-app-ear-1.0-SNAPSHOT is not deployed on this target [server]Tests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 6.811 sec <<< FAILURE!

      Feb 24, 2014 10:28:56 AM com.sun.enterprise.v3.server.AppServerStartup stop

      INFO: Shutdown procedure finished

      Feb 24, 2014 10:28:56 AM AppServerStartup run

      INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting

      [/code]

       

      I have tried to do what is suggested [ARQ-525] Tests fails when META-INF/validation.xml exist - JBoss Issue Tracker and https://java.net/jira/browse/GLASSFISH-17381 and it has not worked.

       

      Here is my pom.xml where I have the endorsed jar..

       

      [code]

      <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-dependency-plugin</artifactId>

                      <executions>

                          <execution>

                              <id>copy endorsed dependencies</id>

                              <phase>validate</phase>

                              <goals>

                                  <goal>copy</goal>

                              </goals>

                              <configuration>

                                  <outputDirectory>${endorsed.dir}</outputDirectory>

                                  <silent>true</silent>

                                  <artifactItems>

                                      <artifactItem>

                                          <groupId>com.sun.xml.bind</groupId>

                                          <artifactId>jaxb-osgi</artifactId>

                                          <version>2.2.5</version>

                                          <type>jar</type>

                                      </artifactItem>

                                      <artifactItem>

                                          <groupId>org.glassfish</groupId>

                                          <artifactId>javax.annotation</artifactId>

                                          <version>3.1</version>

                                          <type>jar</type>

                                      </artifactItem>

                                      <artifactItem>

                                          <groupId>javax.xml.bind</groupId>

                                          <artifactId>jaxb-api</artifactId>

                                          <version>2.2.5</version>

                                          <type>jar</type>

                                      </artifactItem>

                                      <artifactItem>

                                          <groupId>javax.xml.ws</groupId>

                                          <artifactId>jaxws-api</artifactId>

                                          <version>2.2.5</version>

                                          <type>jar</type>

                                      </artifactItem>

                                      <artifactItem>

                                          <groupId>com.sun.xml.bind</groupId>

                                          <artifactId>jaxb-impl</artifactId>

                                          <version>2.2.5</version>

                                          <type>jar</type>

                                      </artifactItem>

                                      <artifactItem>

                                          <groupId>javax.xml.parsers</groupId>

                                          <artifactId>jaxp-api</artifactId>

                                          <version>1.4.5</version>

                                          <type>jar</type>

                                      </artifactItem>

                                  </artifactItems>

                              </configuration>

                          </execution>

                      </executions>

                  </plugin>

      [/code]

       

      I am using

      arquillian-glassfish-embedded-3.1 version 1.0.0.CR3 and arquillian-bom 1.1.2.Final

       

      Thanks a lot