I am getting Unique constraint errors if I run on oracle. Same thing works
on MySQL
Signup:
[INFO] [talledLocalContainer] [eitms30] WARN [http-9081-Processor22]
JDBCExcepti
onReporter.logExceptions(77) | SQL Error: 1, SQLState: 23000
[INFO] [talledLocalContainer] [eitms30] ERROR [http-9081-Processor22]
JDBCExcept
ionReporter.logExceptions(78) | ORA-00001: unique constraint
(USER_ITMS.SYS_C006
787) violated
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] [eitms30] WARN [http-9081-Processor22]
JDBCExcepti
onReporter.logExceptions(77) | SQL Error: 1, SQLState: 23000
[INFO] [talledLocalContainer] [eitms30] ERROR [http-9081-Processor22]
JDBCExcept
ionReporter.logExceptions(78) | ORA-00001: unique constraint
(USER_ITMS.SYS_C006
787) violated
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] [eitms30] ERROR [http-9081-Processor22]
AbstractFl
ushingEventListener.performExecutions(301) | Could not synchronize database
stat
e with session
[INFO] [talledLocalContainer]
org.hibernate.exception.ConstraintViolationExcepti
on: Could not execute JDBC batch update
[INFO] [talledLocalContainer] at
org.hibernate.exception.SQLStateConverter.con
vert(SQLStateConverter.java:71)
[INFO] [talledLocalContainer] at
org.hibernate.exception.JDBCExceptionHelper.c
onvert(JDBCExceptionHelper.java:43)
[INFO] [talledLocalContainer] at
org.hibernate.jdbc.AbstractBatcher.executeBat
ch(AbstractBatcher.java:249)
Sandhu wrote:
>
>
> CheatSheet-Five-Step-Setup-oracle10g-Spring-Appfuse 2.0 M5
> Step 1:
>
> Install Oracle Driver to your local repository:
> cd C:\dl\oracle driver\oracle 10.2.0.2.0
>
> mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=oracle.jdbc
> -DartifactId=ojdbc14 -Dversion=10.2.0.2.0 -Dpackaging=jar
> -DgeneratePom=true
>
> C:\Documents and Settings\jaspsand>cd C:\dl\oracle driver\oracle
> 10.2.0.2.0
>
> C:\dl\oracle driver\oracle 10.2.0.2.0>mvn install:install-file
> -Dfile=ojdbc14.ja
> r -DgroupId=oracle.jdbc -DartifactId=ojdbc14
> -Dversion=10.2.0.2.0
> -Dpackaging=ja
> r -DgeneratePom=true [INFO] Scanning for projects... [INFO]
> Searching
> repository
> for plugin with prefix: 'install'. [INFO]
>
> -------------------------------------------------------------------------
> ---
> [INFO] Building Maven Default Project [INFO] task-segment:
> [install:install-file] (aggregator-style) [INFO]
>
> -------------------------------------------------------------------------
> ---
> [INFO] [install:install-file] [INFO] Installing C:\dl\oracle
> driver\oracle
> 10.2.0.2.0\ojdbc14.jar to C:\Docume nts and
>
> Settings\jaspsand\.m2\repository\oracle\jdbc\ojdbc14\10.2.0.2.0\ojdbc14-
> 10.2.0.2.0.jar [INFO]
>
> ------------------------------------------------------------------------
> [INFO]
> BUILD SUCCESSFUL [INFO]
>
> ------------------------------------------------------------------------
> [INFO]
> Total time: 4 seconds [INFO] Finished at: Wed Jun 06 12:48:54
> PDT 2007
> [INFO]
> Final Memory: 3M/508M [INFO]
>
> ------------------------------------------------------------------------
>
> Step 2: Change c:\work\sandbox\xxxxx\pom.xml
>
> Make sure that
> <dependency>
> <groupId>${jdbc.groupId}</groupId>
> <artifactId>${jdbc.artifactId}</artifactId>
> <version>${jdbc.version}</version>
> </dependency>
>
> Check that you have profile as follows in your pom.xml
>
> <profile>
> <id>oracle</id>
> <properties>
>
> <dbunit.dataTypeFactoryName>org.dbunit.ext.oracle.OracleDataTypeFactory</dbunit.dataTypeFactoryName>
> <dbunit.schema>SYSTEM</dbunit.schema> <!-- Make sure to
> capitalize the schema name -->
>
> <hibernate.dialect>org.hibernate.dialect.Oracle9Dialect</hibernate.dialect>
> <jdbc.groupId>com.oracle</jdbc.groupId>
> <jdbc.artifactId>ojdbc14</jdbc.artifactId>
> <jdbc.version>10.2.0.2.0</jdbc.version>
>
> <jdbc.driverClassName>oracle.jdbc.OracleDriver</jdbc.driverClassName>
>
> <jdbc.url><![CDATA[jdbc:oracle:thin:@localhost:1521:XE]]></jdbc.url>
> <jdbc.username>system</jdbc.username>
> <jdbc.password>admin</jdbc.password>
> </properties>
> </profile>
>
> Comment out MySQL
> <!-- Database settings MySQL-->
> <!--
>
> <dbunit.dataTypeFactoryName>org.dbunit.dataset.datatype.DefaultDataTypeFactory</dbunit.dataTypeFactoryName>
> <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type>
>
> <hibernate.dialect>org.hibernate.dialect.MySQLInnoDBDialect</hibernate.dialect>
> <jdbc.groupId>mysql</jdbc.groupId>
> <jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
> <jdbc.version>5.0.5</jdbc.version>
> <jdbc.driverClassName>com.mysql.jdbc.Driver</jdbc.driverClassName>
>
> <jdbc.url><![CDATA[jdbc:mysql://localhost/eitms30?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8]]></jdbc.url>
> <jdbc.username>root</jdbc.username>
> <jdbc.password>admin</jdbc.password>
> -->
>
>
> Add the following
>
>
> <!-- Database settings Oracle -->
>
> <dbunit.dataTypeFactoryName>org.dbunit.dataset.datatype.DefaultDataTypeFactory</dbunit.dataTypeFactoryName>
> <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type>
> <dbunit.schema>SYSTEM</dbunit.schema> <!-- Make sure to capitalize
> the
> schema name -->
>
> <hibernate.dialect>org.hibernate.dialect.Oracle9Dialect</hibernate.dialect>
> <jdbc.groupId>oracle.jdbc</jdbc.groupId>
> <jdbc.artifactId>ojdbc14</jdbc.artifactId>
> <jdbc.version>10.2.0.2.0</jdbc.version>
>
> <jdbc.driverClassName>oracle.jdbc.driver.OracleDriver</jdbc.driverClassName>
>
> <jdbc.url><![CDATA[jdbc:oracle:thin:@localhost:1521:XE]]></jdbc.url>
> <jdbc.username>system</jdbc.username>
> <jdbc.password>admin</jdbc.password>
>
>
> Step 3: cd core
> mvn resources:testResources hibernate3:hbm2ddl
> mvn compile hibernate3:hbm2ddl
> Step 4: mvn integration-test from main directory if you are using module
> based.
>
> Step 5: mvn jetty:run-war -Djetty.port=9090 (With Oracle, change port to
> 9090 since oracle uses 8080 port)
>
> CheatSheet-Five-Step-Setup-oracle10g-Spring-Appfuse 2.0 M5
>
--
View this message in context:
http://www.nabble.com/CheatSheet-Five-Step-Setup-oracle10g-Spring-Appfuse-2.0-M5-tf3880665s2369.html#a11016787
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]