|
As this issue has not been progressed since it was created on June 30, 2015, here is full test case that allows to reproduce it.
Attachment name with test case: test.hhh9888.zip
To reproduce the problem, please follow the steps below:
-
Deploy the SQL script located in /src/main/sql to an Oracle schema
-
Optional: verify the access and the database script deployment with a unit test. To do so provide db connectivity details in
src/test/resources/META-INF/spring/test-hhh9888-context.xml
-
Create data source in a Weblogic 12c server with Jndi name = jdbc/hhh9888DataSource
-
Package the app for deployment with
-
For deployment from maven, update wls.* properties in the profile with ID local in the pom.xml file and then run
mvn com.oracle.weblogic:weblogic-maven-plugin:deploy -Denvironment=local -Dhttp.nonProxyHosts=localhost
After the app is deployed, perform a GET on http://server:port/hhh9888/resources/ok . This will return a 200 OK status with the content test created id=100 Do again a GET on the same URL. This time there will be constraint violation error as there is already a record with ID 100. This time you will see the error message:
Failed: org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is weblogic.transaction.RollbackException: setRollbackOnly called on transaction
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1024)
which cause should be about the Database constraint violation.
|