7 Replies Latest reply: May 10, 2012 9:46 AM by Gabriel Ozeas RSS

Strange exception when using yml and Arq Persistence

Gabriel Ozeas Newbie

Hi folks,

 

I'm having trouble when using Arquillian Persistence Extension and YML.

 

I create this class

 

@Entity
public class User {
          @Id @GeneratedValue
          private Long id;
          private String name;
          private String email;
          private String password;

 

And this YML, users.yml:

 

user:
          - id: 1
            name: "Gabriel"
            email: "gabriel.ozeas1.gmail.com"
            password: "[null]"

 

With this test:

 

 

@RunWith(Arquillian.class)
@Cleanup(phase = TestExecutionPhase.AFTER)
public class ReservationPersistenceIT {
          @Deployment
          public static JavaArchive createPackage() throws Exception {
                    return ShrinkWrap.create(JavaArchive.class, "hotel-domain.jar")
                                        .addPackage(Reservation.class.getPackage())
                                        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
                                        .addAsManifestResource("test-persistence.xml", "persistence.xml");
          }

          @Test
          @UsingDataSet("datasets/users.yml")
          public void addReservation() throws Exception {

          }
}

 

And i'm having this exception, problem because i did a invalid yml. But the exception class in yml parser is not serializable, so i cant ready it in the eclipse ide.

 

 

 

java.lang.IllegalStateException: Error launching test com.gabrielozeas.ReservationPersistenceIT public void com.gabrielozeas.ReservationPersistenceIT.addReservation() throws java.lang.Exception
          at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:122)
          at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120)
          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:616)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          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.execution.ClientTestExecuter.execute(ClientTestExecuter.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:616)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          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.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
          at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
          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:616)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
          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:616)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
          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:616)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
          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:616)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          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.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
          at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)
          at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)
          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$5.evaluate(Arquillian.java:240)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
          at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)
          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.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.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.yaml.snakeyaml.error.Mark
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
          at org.jboss.arquillian.test.spi.ExceptionProxy.readExternal(ExceptionProxy.java:177)
          at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1809)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1768)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
          at org.jboss.arquillian.test.spi.ExceptionProxy.readExternal(ExceptionProxy.java:172)
          at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1809)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1768)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1963)
          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1887)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
          at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:214)
          at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:140)
          at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:118)
          ... 75 more
Caused by: java.io.NotSerializableException: org.yaml.snakeyaml.error.Mark
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
          at org.jboss.arquillian.test.spi.ExceptionProxy.writeExternal(ExceptionProxy.java:227)
          at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1443)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1414)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
          at org.jboss.arquillian.test.spi.ExceptionProxy.writeExternal(ExceptionProxy.java:210)
          at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1443)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1414)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
          at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.writeObject(ServletTestRunner.java:229)
          at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:163)
          at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)
          at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
          at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1562)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:286)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
          at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
          at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:345)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:172)
          at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:162)
          at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:160)
          at org.glassfish.grizzly.filterchain.ExecutorResolver$3.execute(ExecutorResolver.java:95)
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:444)
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:364)
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:290)
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:133)
          at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:76)
          at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:63)
          at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:823)
          at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
          at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:116)
          at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$000(WorkerThreadIOStrategy.java:55)
          at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$1.run(WorkerThreadIOStrategy.java:98)
          at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:508)
          at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:488)
          at java.lang.Thread.run(Thread.java:636)

 

Thanks for the help.

  • 1. Re: Strange exception when using yml and Arq Persistence
    Bartosz Majsak Master

    Hi Gabriel,

     

    it looks to me that it's more Arquillian problem that persistence extension itself. Might be related to this issue https://issues.jboss.org/browse/ARQ-846

  • 3. Re: Strange exception when using yml and Arq Persistence
    Gabriel Ozeas Newbie

    Just to report, when using YML i get that exception, when using JSON i get the exception below. And when using XML, it works =)

     

    Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.io.BufferedInputStream

              at java.io.ObjectInputStream.readObject0(Unknown Source)

              at java.io.ObjectInputStream.readObject(Unknown Source)

              at org.jboss.arquillian.test.spi.ExceptionProxy.readExternal(ExceptionProxy.java:177)

              at java.io.ObjectInputStream.readExternalData(Unknown Source)

              at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)

              at java.io.ObjectInputStream.readObject0(Unknown Source)

              at java.io.ObjectInputStream.readObject(Unknown Source)

              at org.jboss.arquillian.test.spi.ExceptionProxy.readExternal(ExceptionProxy.java:172)

              at java.io.ObjectInputStream.readExternalData(Unknown Source)

              at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)

              at java.io.ObjectInputStream.readObject0(Unknown Source)

              at java.io.ObjectInputStream.readObject(Unknown Source)

              at org.jboss.arquillian.test.spi.ExceptionProxy.readExternal(ExceptionProxy.java:172)

              at java.io.ObjectInputStream.readExternalData(Unknown Source)

              at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)

              at java.io.ObjectInputStream.readObject0(Unknown Source)

              at java.io.ObjectInputStream.defaultReadFields(Unknown Source)

              at java.io.ObjectInputStream.readSerialData(Unknown Source)

              at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)

              at java.io.ObjectInputStream.readObject0(Unknown Source)

              at java.io.ObjectInputStream.readObject(Unknown Source)

              at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:214)

              at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:140)

              at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:118)

              ... 75 more

    Caused by: java.io.NotSerializableException: java.io.BufferedInputStream

              at java.io.ObjectOutputStream.writeObject0(Unknown Source)

              at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

              at java.io.ObjectOutputStream.writeSerialData(Unknown Source)

              at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

              at java.io.ObjectOutputStream.writeObject0(Unknown Source)

              at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

              at java.io.ObjectOutputStream.writeSerialData(Unknown Source)

              at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

              at java.io.ObjectOutputStream.writeObject0(Unknown Source)

              at java.io.ObjectOutputStream.writeObject(Unknown Source)

              at org.jboss.arquillian.test.spi.ExceptionProxy.writeExternal(ExceptionProxy.java:227)

              at java.io.ObjectOutputStream.writeExternalData(Unknown Source)

              at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

              at java.io.ObjectOutputStream.writeObject0(Unknown Source)

              at java.io.ObjectOutputStream.writeObject(Unknown Source)

              at org.jboss.arquillian.test.spi.ExceptionProxy.writeExternal(ExceptionProxy.java:210)

              at java.io.ObjectOutputStream.writeExternalData(Unknown Source)

              at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

              at java.io.ObjectOutputStream.writeObject0(Unknown Source)

              at java.io.ObjectOutputStream.writeObject(Unknown Source)

              at org.jboss.arquillian.test.spi.ExceptionProxy.writeExternal(ExceptionProxy.java:210)

              at java.io.ObjectOutputStream.writeExternalData(Unknown Source)

              at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

              at java.io.ObjectOutputStream.writeObject0(Unknown Source)

              at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

              at java.io.ObjectOutputStream.writeSerialData(Unknown Source)

              at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

              at java.io.ObjectOutputStream.writeObject0(Unknown Source)

              at java.io.ObjectOutputStream.writeObject(Unknown Source)

              at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.writeObject(ServletTestRunner.java:229)

              at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:163)

              at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)

              at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

              at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1562)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:286)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)

              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)

              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)

              at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)

              at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)

              at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:345)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)

              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:172)

              at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:162)

              at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:160)

              at org.glassfish.grizzly.filterchain.ExecutorResolver$3.execute(ExecutorResolver.java:95)

              at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:444)

              at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:364)

              at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:290)

              at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:133)

              at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:76)

              at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:63)

              at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:823)

              at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)

              at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:116)

              at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$000(WorkerThreadIOStrategy.java:55)

              at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$1.run(WorkerThreadIOStrategy.java:98)

              at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:508)

              at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:488)

              at java.lang.Thread.run(Unknown Source)

  • 4. Re: Strange exception when using yml and Arq Persistence
    Bartosz Majsak Master

    Could you share all datasets so I can have a look and try to reproduce in APE tests?

  • 5. Re: Strange exception when using yml and Arq Persistence
    Gabriel Ozeas Newbie

    Here is an example.

    I'm facing another problem, when i create domain classes that as associations, and persist they in the test, when the test finish and will execute the cleaning as specified in @Cleanup(phase = TestExecutionPhase.AFTER), it throws an constraint violetion. It tries to exclude a table that has a foreign key in another table. =\

    But this is another problem, i think for another post.

  • 6. Re: Strange exception when using yml and Arq Persistence
    Bartosz Majsak Master

    Which DB are you using? Maybe you can simply turn off constraints integrity checks for tests?

  • 7. Re: Strange exception when using yml and Arq Persistence
    Gabriel Ozeas Newbie

    It's Derby, like Arquillian Glassfish Embedded tutorials

     

    <resources>

              <jdbc-resource pool-name="ArquillianEmbeddedDerbyPool"

                        jndi-name="jdbc/arquillian" />

              <jdbc-connection-pool name="ArquillianEmbeddedDerbyPool"

                        res-type="javax.sql.DataSource" datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource"

                        is-isolation-level-guaranteed="false">

                        <property name="databaseName" value="target/databases/derby" />

                        <property name="createDatabase" value="create" />

              </jdbc-connection-pool>

    </resources>