[JBoss JIRA] (ARQ-1943) Deployment fails because of duplicate CDI beans when beans inside a dependent JAR.
by Chris Rankin (JIRA)
Chris Rankin created ARQ-1943:
---------------------------------
Summary: Deployment fails because of duplicate CDI beans when beans inside a dependent JAR.
Key: ARQ-1943
URL: https://issues.jboss.org/browse/ARQ-1943
Project: Arquillian
Issue Type: Bug
Components: Tomcat Containers
Affects Versions: tomcat_1.0.0.CR7
Environment: Windows 7 x64, Linux x64, JDK7
Reporter: Chris Rankin
Attachments: arquillian-test.tar.xz
Using arquillian-tomcat-embedded-7, arquillian-bom 1.1.7.Final, WELD 2.2.10.Final:
I have created a simple WAR file that contains WELD and a single servlet. There is also a dependent JAR that contains the following:
- a @Dependent bean with a @Produces method
- a META-INF/beans.xml file.
When I try to test this servlet using Arquillian's TestNG container, the deployment fails with this error:
SEVERE: Servlet threw load() exception
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type String with qualifiers @Trouble
at injection point [BackedAnnotatedField] @Trouble @Inject private org.testing.web.TroubleServlet.trouble
at org.testing.web.TroubleServlet.trouble(TroubleServlet.java:0)
Possible dependencies:
- Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()],
- Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()]
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak commented on ARQ-1942:
-------------------------------------
Thanks for a detailed report. I am on holidays now so cannot really dive into this, but I will be back first weekend of May and this is one of the first things for me to look at.
Cheers,
Bartosz
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1937) Class loading issue with injected deployer
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQ-1937?page=com.atlassian.jira.plugin.s... ]
Matous Jobanek commented on ARQ-1937:
-------------------------------------
Hi,
in general, when there is no running deployment the current implementation launches a test method on the client side - no matter if the annotation {{@RunAsClient}} is not declared or the parameter {{testable}} is set to {{true}} \[1\]. So the question might be if this can be allowed at all - something similar to Aslak's suggestion, but more general. I do not see this approach as a good solution - too cruel :-), I believe that some log warning, or changed javadoc could be sufficient - like this one: \[2\]. WDYT?
\[1\] https://github.com/arquillian/arquillian-core/blob/master/container/test-...
\[2\] https://github.com/MatousJobanek/arquillian-core/commit/42a2528cb65f540c5...
> Class loading issue with injected deployer
> -------------------------------------------
>
> Key: ARQ-1937
> URL: https://issues.jboss.org/browse/ARQ-1937
> Project: Arquillian
> Issue Type: Bug
> Components: Deployable Containers SPI
> Affects Versions: 1.1.1.Final
> Reporter: Martin Gencur
> Fix For: 1.1.8.Final
>
>
> Steps to reproduce:
> 1) inject a Deployer via @ArquillianResource
> 2) declare a deployment as managed=false, use the deployer to deploy artifacts to a managed container
> 3) run a test method that operates on the deployment
> 4) check that classes inside the test method have the same classloader as the test class itself (see the code below where I call cache.getClass().getClassLoader())
> 5) this does not happen when the deployment is managed=true and deployer API is NOT used. In this case, the classes have a different class loader
> In the test below, I tried to load different versions of Infinispan in two deployments and test backward compatibility. However, due to this class loading issue the Infinispan classes are of the latest version regardless of libraries bundled in the WAR. This is probably due to the fact that the Maven test module has the latest Infinispan libraries defined in <dependencies> while the older version is downloaded separately via Maven dependency plugin.
> {code}
> package com.jboss.datagrid.test.backwardcompatibility;
> @RunWith(Arquillian.class)
> public class SingleFileStoreBackwardCompatibilityIT {
> private DefaultCacheManager dfc;
> private String cacheName = "testCache";
> private static final String OLD_ISPN = "dep1_with_old_ispn";
> private static final String NEW_ISPN = "dep2_with_new_ispn";
> private static Map<String, String> storedMap;
> @ArquillianResource
> Deployer deployer;
> @Deployment(name = OLD_ISPN, testable = true, managed = true, order=1)
> @TargetsContainer("container1")
> public static WebArchive createDeploymentOld() {
> WebArchive jar = DeploymentBuilder.createTestArchiveWithPreviousJDG("test1.war", "previous");
> System.out.println("ClassLoader: " + SingleFileStoreBackwardCompatibilityIT.class.getClassLoader());
> return jar;
> }
> @Deployment(name = NEW_ISPN, testable = true, managed = true, order=2)
> @TargetsContainer("container2")
> public static WebArchive createDeploymentNew() {
> WebArchive jar = DeploymentBuilder.createTestArchive("test2.war", "current");
> return jar;
> }
> private DefaultCacheManager configureCacheManager(boolean clearCacheStore) throws Exception {
> GlobalConfiguration glob = new GlobalConfigurationBuilder().nonClusteredDefault()
> .globalJmxStatistics().allowDuplicateDomains(true).
> build();
> ConfigurationBuilder c = new ConfigurationBuilder();
> c.clustering().cacheMode(CacheMode.LOCAL);
> File tmpStore = new File("/tmp/cache/" + cacheName + ".dat");
> if (clearCacheStore && tmpStore.exists()) {
> tmpStore.delete();
> }
> c.persistence().passivation(false).addSingleFileStore().purgeOnStartup(false).location("/tmp/cache/");
> Configuration cnf = c.build();
> DefaultCacheManager manager = new DefaultCacheManager(glob);
> manager.defineConfiguration(cacheName, cnf);
> return manager;
> }
> @Test
> @OperateOnDeployment(OLD_ISPN)
> @InSequence(1)
> public void testStoreWithOldJDG() throws Exception {
> deployer.deploy(OLD_ISPN);
> dfc = configureCacheManager(true);
> dfc.start();
> Cache<Object, Object> cache = dfc.getCache(cacheName);
> System.out.println("Version: " + cache.getVersion());
> System.out.println("ClassLoader: " + cache.getClass().getClassLoader());
> storedMap = new HashMap<String, String>();
> storedMap.put("k", "v");
> cache.put("mapKey", storedMap);
> dfc.stop();
> deployer.undeploy(OLD_ISPN);
> }
> @Test
> @OperateOnDeployment(NEW_ISPN)
> @InSequence(2)
> public void testReadWithNewJDG() throws Exception {
> deployer.deploy(NEW_ISPN);
> dfc = configureCacheManager(false);
> dfc.start();
> Cache<Object, Object> cache = dfc.getCache(cacheName);
> System.out.println("ClassLoader: " + cache.getClass().getClassLoader());
> System.out.println("Version: " + cache.getVersion());
> assertEquals(storedMap, cache.get("mapKey"));
> dfc.stop();
> deployer.undeploy(NEW_ISPN);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Dimitrios Kordas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Dimitrios Kordas commented on ARQ-1942:
---------------------------------------
After more close inspection (and closer reading of the docs) i can see that my problem is this:
I have not defined a defaultCleanupStrategy strategy, so arquillian defaults to STRICT.
I have also not defined a excludeTablesFromCleanup table list with the effect that after the 1st test method (within the same test) the sequences tables and my own tables are being emptied, leading to the errors i have gotten.
I have now defined a wildcard excludeTablesFromCleanup setting and a UsingDataSet only on the 1st method and it works.
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Dimitrios Kordas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Dimitrios Kordas edited comment on ARQ-1942 at 4/14/15 7:13 AM:
----------------------------------------------------------------
After more testing i have determined the following:
Inside the dataset xml i am defining primary keys. These are inserted by persistence with no problem.
So if we were to use the above dataset, apps with the ids 2,3,4 would be inserted into the database.
Then, inside the test i am creating more apps using jpa/hibernate. If i create only one app, it will take the ID of 1 and no error will occur.
If i create more than one apps though, the 2nd will be assigned the ID 2 and it will raise a violation exception since the id2 already exists.
So i guess that the dataset script does not update the sequence table in PostgreSQL, and when hibernate starts it doesn't find any entries in the sequence and happilly and obliviously starts at ID 1 causing the problem.
If i include no primary keys in the dataset xml, then the problem goes away.
Is this a misconfiguration on my part? Can this problem somehow be fixed using configuration for persistence?
Thanks for your time,
Dimitris
was (Author: sm0ke):
After more testing i have determined the following:
Inside the dataset xml i am defining primary keys. These are inserted by persistence with no problem.
So if we were to use the above dataset, apps with the ids 2,3,4 would be inserted into the database.
Then, inside the test i am creating more apps using jpa/hibernate. If i create only one app, it will take the ID of 1 and no error will occur.
If i create more than one apps though, the 2nd will be assigned the ID 2 and it will raise a violation exception since the id2 already exists.
So i guess that the dataset script does not update the sequence table in PostgreSQL, and when hibernate starts it doesn't find any entries in the sequence and happilly and obliviously starts at ID 1 causing the problem.
Is this a misconfiguration on my part? Can this problem somehow be fixed using configuration for persistence?
Thanks for your time,
Dimitris
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Dimitrios Kordas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Dimitrios Kordas commented on ARQ-1942:
---------------------------------------
After more testing i have determined the following:
Inside the dataset xml i am defining primary keys. These are inserted by persistence with no problem.
So if we were to use the above dataset, apps with the ids 2,3,4 would be inserted into the database.
Then, inside the test i am creating more apps using jpa/hibernate. If i create only one app, it will take the ID of 1 and no error will occur.
If i create more than one apps though, the 2nd will be assigned the ID 2 and it will raise a violation exception since the id2 already exists.
So i guess that the dataset script does not update the sequence table in PostgreSQL, and when hibernate starts it doesn't find any entries in the sequence and happilly and obliviously starts at ID 1 causing the problem.
Is this a misconfiguration on my part? Can this problem somehow be fixed using configuration for persistence?
Thanks for your time,
Dimitris
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Dimitrios Kordas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Dimitrios Kordas edited comment on ARQ-1942 at 4/14/15 5:19 AM:
----------------------------------------------------------------
I have tested the same issue with JSON/YAML/XML and @UsingDataSet and it still behaves the same way (PK constraints violation)
was (Author: sm0ke):
I have tested the same issue with JSON/YAML/XML and @UsingDataSet and it still behaves the same way (PK constrains violation)
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Dimitrios Kordas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Dimitrios Kordas commented on ARQ-1942:
---------------------------------------
If the following XML is used which starts at primary key 2 instead of 1, the test works.
<dataset>
<app_category id="1" description="entertainment category" name="Entertainment" />
<app id="2" active="true" fqn="com.facebook" name="facebook" app_category_id="1" />
<app id="3" active="true" fqn="com.twitter" name="twitter" app_category_id="1" />
<app id="4" active="true" fqn="com.instagram" name="instagram" app_category_id="1" />
</dataset>
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Dimitrios Kordas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Dimitrios Kordas commented on ARQ-1942:
---------------------------------------
I have tested the same issue with JSON/YAML/XML and @UsingDataSet and it still behaves the same way (PK constrains violation)
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Dimitrios Kordas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Dimitrios Kordas commented on ARQ-1942:
---------------------------------------
I should add the output of the test.
-------------------------------------------------------------------------------
Test set: com.ebiscon.mdm.mdmserver.test.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 20.226 sec <<< FAILURE!
TestCreateApp(com.ebiscon.mdm.mdmserver.test.AppTest) Time elapsed: 7.113 sec <<< ERROR!
javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:163)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:253)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:342)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:439)
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
at com.ebiscon.mdm.mdmserver.dao.AppDao$$$view8.save(Unknown Source)
at com.ebiscon.mdm.mdmserver.services.impl.AppServiceImpl.save(AppServiceImpl.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.NonPooledEJBComponentInstanceAssociatingInterceptor.processInvocation(NonPooledEJBComponentInstanceAssociatingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:251)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:342)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
at com.ebiscon.mdm.mdmserver.services.AppService$$$view49.save(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:414)
at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:65)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
at com.ebiscon.mdm.mdmserver.services.impl.AppService$750867534$Proxy$_$$_Weld$EnterpriseProxy$.save(Unknown Source)
at com.ebiscon.mdm.mdmserver.test.AppTest.TestCreateApp(AppTest.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)
at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.createTestContext(TestContextHandler.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.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:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
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:309)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
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:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1683)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1187)
at org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:581)
at com.ebiscon.mdm.mdmserver.dao.base.GenericDao.save(GenericDao.java:22)
at com.ebiscon.mdm.mdmserver.dao.impl.AppDaoImpl.save(AppDaoImpl.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.NonPooledEJBComponentInstanceAssociatingInterceptor.processInvocation(NonPooledEJBComponentInstanceAssociatingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:251)
... 216 more
Caused by: org.jboss.arquillian.test.spi.ArquillianProxyException: org.hibernate.exception.ConstraintViolationException : could not execute statement [Proxied because : Original exception not deserilizable, ClassNotFoundException]
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3032)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3558)
at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:98)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:490)
at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:195)
at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:179)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:214)
at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:324)
at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288)
at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:194)
at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125)
at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:84)
at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:206)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:149)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75)
at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:811)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:784)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:789)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181)
... 254 more
Caused by: org.jboss.arquillian.test.spi.ArquillianProxyException: org.postgresql.util.PSQLException : ERROR: duplicate key value violates unique constraint "app_pkey"
Detail: Key (id)=(1) already exists. [Proxied because : Original exception not deserilizable, ClassNotFoundException]
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
... 275 more
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months