[JBoss JIRA] (ARQ-1294) Caught exception in beforeCompletion()
by Marco Cella (JIRA)
[ https://issues.jboss.org/browse/ARQ-1294?page=com.atlassian.jira.plugin.s... ]
Marco Cella updated ARQ-1294:
-----------------------------
Fix Version/s: persistence_1.0.0.Alpha5
> Caught exception in beforeCompletion()
> --------------------------------------
>
> Key: ARQ-1294
> URL: https://issues.jboss.org/browse/ARQ-1294
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha5
> Environment: Oracle Glassfish Server 3.1.2
> MySQL 5.1
> Hibernate 3.5.6-Final
> Ubuntu 11.10 64 bit
> Apache Maven 3.0.3
> Java version 1.6.0_26
> Reporter: Marco Cella
> Assignee: Bartosz Majsak
> Fix For: persistence_1.0.0.Alpha5
>
> Attachments: ArquillianTestMySQL1.tar.gz
>
>
> A test method try to merge an entity object Not null field with a null value.
> Use attached Maven project (see README file for environment configuration)
> Server log shows the following exception:
> {code:xml}
> [#|2013-02-13T10:36:31.064+0100|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-2;|WEB0671: Loading application [ArquillianTestArchive] at [/ArquillianTestArchive]|#]
> [#|2013-02-13T10:36:31.102+0100|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=19;_ThreadName=Thread-2;|ArquillianTestArchive was successfully deployed in 2,022 milliseconds.|#]
> [#|2013-02-13T10:36:32.116+0100|WARNING|glassfish3.1.2|javax.enterprise.resource.jta.com.sun.enterprise.transaction|_ThreadID=20;_ThreadName=Thread-2;|DTX5014: Caught exception in beforeCompletion() callback:
> javax.persistence.PersistenceException: javax.validation.ConstraintViolationException: validation failed for classes [it.arquilliantest.jpa.entity.Action] during update time for groups [javax.validation.groups.Default, ]
> at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:1071)
> at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:435)
> at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:855)
> at com.sun.enterprise.transaction.UserTransactionImpl.commit(UserTransactionImpl.java:208)
> at org.jboss.arquillian.persistence.core.transaction.TestTransactionWrapper.afterTest(TestTransactionWrapper.java:70)
> 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: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.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> 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: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: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: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: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: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.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.persistence.core.lifecycle.TransactionHandler.endTransactionAfterTest(TransactionHandler.java:54)
> 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: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.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> 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: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: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: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: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:90)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.persistence.dbunit.DBUnitPersistenceTestLifecycleHandler.closeConnection(DBUnitPersistenceTestLifecycleHandler.java:113)
> 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:90)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.persistence.core.lifecycle.ErrorCollectorHandler.collectErrors(ErrorCollectorHandler.java:46)
> 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: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.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.persistence.core.lifecycle.PersistenceTestTrigger.afterTest(PersistenceTestTrigger.java:113)
> 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: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.testenricher.cdi.CreationalContextDestroyer.destory(CreationalContextDestroyer.java:44)
> 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: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: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: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: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: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: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: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.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103)
> at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:245)
> 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.junit.runner.JUnitCore.run(JUnitCore.java:157)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
> at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160)
> 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:668)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
> at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
> at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
> at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
> at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
> at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
> at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
> at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
> at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.validation.ConstraintViolationException: validation failed for classes [it.arquilliantest.jpa.entity.Action] during update time for groups [javax.validation.groups.Default, ]
> at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:132)
> at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreUpdate(BeanValidationEventListener.java:79)
> at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:236)
> at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:87)
> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179)
> at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
> at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
> at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:1057)
> ... 170 more
> |#]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (ARQ-1340) Drone webdriver is not created during @BeforeClass
by Alex Okrushko (JIRA)
Alex Okrushko created ARQ-1340:
----------------------------------
Summary: Drone webdriver is not created during @BeforeClass
Key: ARQ-1340
URL: https://issues.jboss.org/browse/ARQ-1340
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Drone
Affects Versions: 1.0.3.Final
Environment: Arquillian JUnit Container 1.0.3.Final
Arquillian Graphene Webdriver 2.0.0.Alpha3
Arquillian Drone dependencies and Selenium dependencies 1.1.1.Final
Arquillian Core dependencies 1.0.3.Final
junit 4.8.1
jdk 1.6
Reporter: Alex Okrushko
Assignee: Karel Piwko
Priority: Minor
Fix For: 1.0.4.Final
Drone webdriver is not created during @BeforeClass, however *is created during @Before or if called by GrapheneContext.getProxy()*
The following does NOT work:
{code:java}
@RunWith(Arquillian.class)
public class TestDroneLogin {
@Drone
private static WebDriver driver;
@BeforeClass
public static void setup(){
//GrapheneContext.getProxy().navigate().to("http://google.com");
driver.navigate().to("http://google.com");
}
@Test
public void testInput(){
driver.findElement(By.cssSelector("input#gbqfq"));
}
}
{code}
However, if I use {{GrapheneContext.getProxy()}} instead of {{driver}}, everything works as expected:
{code:java}
@BeforeClass
public static void setup(){
GrapheneContext.getProxy().navigate().to("http://google.com");
}
{code}
ALSO, if {{@Before}} is used then Drone webdriver is created as expected, so this problem is specific to {{@BeforeClass}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (ARQGRA-273) Provide utilty method in Graphene class to find element
by Jan Papousek (JIRA)
Jan Papousek created ARQGRA-273:
-----------------------------------
Summary: Provide utilty method in Graphene class to find element
Key: ARQGRA-273
URL: https://issues.jboss.org/browse/ARQGRA-273
Project: Arquillian Graphene
Issue Type: Feature Request
Reporter: Jan Papousek
Graphene injects web element instances to page objects and page fragments which can handle stale element exception. Sometimes one needs to find element manually via WebDriver#findElement(...). It would be nice to provide a method in Graphene API for finding elements returning instances protected to stale element exceptions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (ARQ-1131) Improve DBUnit database connection handling
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1131?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak edited comment on ARQ-1131 at 3/6/13 11:40 AM:
--------------------------------------------------------------
It turned out that this approach [is not recommended by DBUnit guys|http://www.dbunit.org/faq.html#performance] as it can have performance penalty. Ideally the connection should span the whole test class lifecycle, but this won't be possible until we have [ARQ-350|https://issues.jboss.org/browse/ARQ-350] in place. Therefore current approach, where we open connection before and after test is not any different than the original one implemented in APE. Leaving it like this for the moment.
was (Author: bmajsak):
It turned out that this approach is not recommended by DBUnit guys as it can have performance penalty. Ideally the connection should span the whole test class, but this won't be possible until we have https://issues.jboss.org/browse/ARQ-350 in place.
> Improve DBUnit database connection handling
> -------------------------------------------
>
> Key: ARQ-1131
> URL: https://issues.jboss.org/browse/ARQ-1131
> Project: Arquillian
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Reporter: Bartosz Majsak
> Assignee: Bartosz Majsak
> Fix For: persistence_1.0.0.next
>
>
> -As Vineet Reynolds pointed out, current implementation initializes the connection and holds on to it, until the verification is performed. It would be better to relinquish the connection after the seeding phase (so utilize it only around "before persistence test" event), and obtain another connection for the dataset verification phase (around "after persistence test" event).-
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (ARQ-1339) hbm2ddl.auto = validate is not validating tables created when using plain SQL and @CreateSchema
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1339?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak commented on ARQ-1339:
-------------------------------------
It's not a bug, [as discussed here|https://github.com/arquillian/arquillian-extension-persistence/issue...]. However this feature might be handy.
> hbm2ddl.auto = validate is not validating tables created when using plain SQL and @CreateSchema
> -----------------------------------------------------------------------------------------------
>
> Key: ARQ-1339
> URL: https://issues.jboss.org/browse/ARQ-1339
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: 1.0.0.Alpha5
> Environment: Using JBoss AS 7.1.1.Final (managed)
> Reporter: Fagner Martins
> Assignee: Bartosz Majsak
> Priority: Minor
>
> When using @CreateSchema and hbm2ddl.auto = validate the CREATE TABLE statement does not work.
> It throws:
> {code:java}
> 19:11:38,106 INFO [java.sql.DatabaseMetaData] (MSC service thread 1-7) HHH000262: Table not found: table_name
> 19:11:38,108 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.persistenceunit."44fdf497-81e8-42cf-b964-0e5dc9347ffe.war#PersistenceUnit": org.jboss.msc.service.StartException in service jboss.persistenceunit."44fdf497-81e8-42cf-b964-0e5dc9347ffe.war#PersistenceUnit": Failed to start service
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
> Caused by: javax.persistence.PersistenceException: [PersistenceUnit: PersistenceUnit] Unable to build EntityManagerFactory
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
> at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
> at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> ... 3 more
> Caused by: org.hibernate.HibernateException: Missing table: table_name
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1265)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
> at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:460)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
> at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
> ... 9 more
> {code}
> I suppose this could be a bug with the persistence-api, am I right?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (ARQ-1339) hbm2ddl.auto = validate is not validating tables created when using plain SQL and @CreateSchema
by Fagner Martins (JIRA)
Fagner Martins created ARQ-1339:
-----------------------------------
Summary: hbm2ddl.auto = validate is not validating tables created when using plain SQL and @CreateSchema
Key: ARQ-1339
URL: https://issues.jboss.org/browse/ARQ-1339
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: 1.0.0.Alpha5
Environment: Using JBoss AS 7.1.1.Final (managed)
Reporter: Fagner Martins
Assignee: Bartosz Majsak
Priority: Minor
When using @CreateSchema and hbm2ddl.auto = validate the CREATE TABLE statement does not work.
It throws:
{code:java}
19:11:38,106 INFO [java.sql.DatabaseMetaData] (MSC service thread 1-7) HHH000262: Table not found: table_name
19:11:38,108 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.persistenceunit."44fdf497-81e8-42cf-b964-0e5dc9347ffe.war#PersistenceUnit": org.jboss.msc.service.StartException in service jboss.persistenceunit."44fdf497-81e8-42cf-b964-0e5dc9347ffe.war#PersistenceUnit": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: PersistenceUnit] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
... 3 more
Caused by: org.hibernate.HibernateException: Missing table: table_name
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1265)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:460)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
... 9 more
{code}
I suppose this could be a bug with the persistence-api, am I right?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (ARQ-1338) Should be able to define ad-hoc sql script through ApplyScript annotation
by Bartosz Majsak (JIRA)
Bartosz Majsak created ARQ-1338:
-----------------------------------
Summary: Should be able to define ad-hoc sql script through ApplyScript annotation
Key: ARQ-1338
URL: https://issues.jboss.org/browse/ARQ-1338
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Reporter: Bartosz Majsak
Assignee: Bartosz Majsak
Priority: Minor
Fix For: persistence_1.0.0.next
This should be handy for some cases, when external script is not really needed. In particular for some fiddling around with the tests during development / diagnostic of errors.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (ARQ-1337) Should support multiple datasources
by Bartosz Majsak (JIRA)
Bartosz Majsak created ARQ-1337:
-----------------------------------
Summary: Should support multiple datasources
Key: ARQ-1337
URL: https://issues.jboss.org/browse/ARQ-1337
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Reporter: Bartosz Majsak
Assignee: Bartosz Majsak
Seeding, comparing and applying scripts should be possible for multiple datasources.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months