HI, I am getting the following
error when I am trying to run the pom file bellow:
Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2hbmxml (hbm2hbmxml) on project hibernate_reverese_enjenering: Execution hbm2hbmxml of goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2hbmxml failed: Duplicate class name 'CheckConstraints' generated for 'org.hibernate.mapping.Table(Alla.sys.check_constraints)'. Same name where generated for 'org.hibernate.mapping.Table(Alla.sys.check_constraints)' -> [Help 1]
What I am doing wrong? Your help will be very much appreciated. thanks
here it is a table definition:USE [Alla]
GO
/****** Object: Table [dbo].[roles] Script Date: 08/02/2011 13:09:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[roles](
[role_id] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[role_name] [varchar](50) NULL,
CONSTRAINT [PK_roles] PRIMARY KEY CLUSTERED
(
[role_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
hibernate.propertieshibernate.dialect = org.hibernate.dialect.SQLServerDialect
#hibernate.connection.driver_class = com.microsoft.sqlserver.jdbc.SQLServerDriver
hibernate.connection.driver_class = net.sourceforge.jtds.jdbc.Driver
#hibernate.connection.url = jdbc:sqlserver://localhost:1433;databaseName=Alla
hibernate.connection.url = jdbc:jtds:sqlserver://localhost:1433;User=sa;Password=tiger123;DatabaseName=Alla;SelectMethod=cursor
hibernate.connection.username = sa
hibernate.connection.password= tiger123
hibernate.reveng.xml<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<table-filter match-catalog="Alla" match-schema="dbo" match-name="roles"/>
<!-- <table-filter match-catalog="Alla" match-schema="dbo" match-name="user_role"/>
<table-filter match-catalog="Alla" match-schema="dbo" match-name="users"/>
-->
</hibernate-reverse-engineering>
Here it is my pom file:<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>japa_maven</artifactId>
<groupId>main</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>main</groupId>
<artifactId>hibernate_reverese_enjenering</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>hibernate_reverese_enjenering</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution> <id>hbm2hbmxml</id>
<phase>generate-sources</phase>
<goals>
<goal>hbm2hbmxml</goal>
</goals> <configuration> <components> <component>
<name>hbm2hbmxml</name> <outputDirectory>src/main/resources</outputDirectory>
</component> </components> </configuration> </execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.2.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- <dependencies> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derbyclient</artifactId>
<version>10.4.2.0</version> </dependency> </dependencies> -->
</project>