Hi 

following is the build error 

 

C:\AppFuse\PubStats>mvn jetty:run-war

[INFO] Scanning for projects...

[INFO] Searching repository for plugin with prefix: 'jetty'.

[INFO]
------------------------------------------------------------------------

[INFO] Building AppFuse Struts 2 Application

[INFO]    task-segment: [jetty:run-war]

[INFO]
------------------------------------------------------------------------

[INFO] Preparing jetty:run-war

[INFO] [aspectj:compile {execution: default}]

[INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]

[INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Nothing to compile - all classes are up to date

[INFO] [resources:testResources]

[INFO] Using default encoding to copy filtered resources.

[INFO] Preparing hibernate3:hbm2ddl

[WARNING] Removing: hbm2ddl from forked lifecycle, to prevent recursive
invocation.

[INFO] [aspectj:compile {execution: default}]

[INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]

[INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is invalid.
It will be ignored for artifact re

solution. Reason: Parse error reading POM. Reason: TEXT must be immediately
followed by END_TAG and not START_

TAG (position: START_TAG seen ...<licenses>\n\t\t\t<license>... @12:13)  for
project org.hibernate:jtidy at C:

\mavenRepository\repository\org\hibernate\jtidy\r8-20060801\jtidy-r8-2006080
1.pom

[WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is invalid.
It will be ignored for artifact re

solution. Reason: Parse error reading POM. Reason: TEXT must be immediately
followed by END_TAG and not START_

TAG (position: START_TAG seen ...<licenses>\n\t\t\t<license>... @12:13)  for
project org.hibernate:jtidy at C:

\mavenRepository\repository\org\hibernate\jtidy\r8-20060801\jtidy-r8-2006080
1.pom

[INFO] [hibernate3:hbm2ddl {execution: default}]

[INFO] Configuration XML file loaded:
C:\AppFuse\PubStats\src\main\resources\hibernate.cfg.xml

[INFO] Configuration XML file loaded:
C:\AppFuse\PubStats\src\main\resources\hibernate.cfg.xml

[INFO] Configuration Properties file loaded:
C:\AppFuse\PubStats\target\classes\jdbc.properties

alter table app_institute drop foreign key FK8ADCB9772945925;

alter table app_institute drop foreign key FK8ADCB977ED9DE1AE;

alter table app_user_institute drop foreign key FK2D6CEC7F1946C9C5;

alter table app_user_institute drop foreign key FK2D6CEC7F660B8D0F;

alter table user_role drop foreign key FK143BF46AED3D7799;

alter table user_role drop foreign key FK143BF46A4812B3B9;

drop table if exists app_access;

drop table if exists app_institute;

drop table if exists app_user;

drop table if exists app_user_institute;

drop table if exists role;

drop table if exists user_role;

create table app_access (INSTITUTE_ACCESS_ID bigint not null auto_increment
unique, ACCESS_PERMISSION varchar(

100) not null, primary key (INSTITUTE_ACCESS_ID)) ENGINE=InnoDB;

create table app_institute (INSTITUTE_ID bigint not null auto_increment
unique, INSTITUTE_NAME varchar(50) not

 null, institute_INSTITUTE_ID bigint, primary key (INSTITUTE_ID))
ENGINE=InnoDB;

create table app_user (id bigint not null auto_increment, username
varchar(50) not null unique, email varchar(

255) not null unique, password_hint varchar(255), first_name varchar(50) not
null, last_name varchar(50) not n

ull, phone_number varchar(255), website varchar(255), account_expired bit
not null, account_locked bit not nul

l, credentials_expired bit not null, city varchar(50) not null, province
varchar(100), postal_code varchar(15)

 not null, address varchar(150), country varchar(100), account_enabled bit,
version integer, password varchar(

255) not null, primary key (id)) ENGINE=InnoDB;

create table app_user_institute (user_id bigint not null, INSTITUTE_ID
bigint not null, primary key (user_id,

INSTITUTE_ID)) ENGINE=InnoDB;

create table role (id bigint not null auto_increment, name varchar(20),
description varchar(64), primary key (

id)) ENGINE=InnoDB;

create table user_role (user_id bigint not null, role_id bigint not null,
primary key (user_id, role_id)) ENGI

NE=InnoDB;

alter table app_institute add index FK8ADCB9772945925
(institute_INSTITUTE_ID), add constraint FK8ADCB97729459

25 foreign key (institute_INSTITUTE_ID) references app_institute
(INSTITUTE_ID);

alter table app_institute add index FK8ADCB977ED9DE1AE (INSTITUTE_ID), add
constraint FK8ADCB977ED9DE1AE forei

gn key (INSTITUTE_ID) references app_access (INSTITUTE_ACCESS_ID);

alter table app_user_institute add index FK2D6CEC7F1946C9C5 (user_id), add
constraint FK2D6CEC7F1946C9C5 forei

gn key (user_id) references app_institute (INSTITUTE_ID);

alter table app_user_institute add index FK2D6CEC7F660B8D0F (INSTITUTE_ID),
add constraint FK2D6CEC7F660B8D0F

foreign key (INSTITUTE_ID) references app_user (id);

alter table user_role add index FK143BF46AED3D7799 (user_id), add constraint
FK143BF46AED3D7799 foreign key (u

ser_id) references app_user (id);

alter table user_role add index FK143BF46A4812B3B9 (role_id), add constraint
FK143BF46A4812B3B9 foreign key (r

ole_id) references role (id);

[INFO] [compiler:testCompile]

[INFO] Nothing to compile - all classes are up to date

[INFO] [dbunit:operation {execution: test-compile}]

[INFO]
------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------

[INFO] Error executing database operation: UPDATE

 

Embedded error: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You
have an error in your SQL syntax; che

ck the manual that corresponds to your MySQL server version for the right
syntax to use near 'where user_id =

-1 and role_id = -2' at line 1

[INFO]
------------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 15 seconds

[INFO] Finished at: Fri Apr 25 09:27:29 IST 2008

[INFO] Final Memory: 15M/28M

[INFO]
------------------------------------------------------------------------

 

Regards

Anshu

  _____  

From: Michael Horwitz [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 25, 2008 1:26 AM
To: users@appfuse.dev.java.net
Subject: Re: [appfuse-user] database problem

 

Perhaps if you post the details of your build error we could help?

Mike

2008/4/24 Anshu Dhamija <[EMAIL PROTECTED]>:

Hi
  I don't want to create my database table from the POJO but want to create
database table and POJO separately and them map them of my own for this I
made following changes into pom.xml

<!-- Database settings -->

<dbunit.dataTypeFactoryName>org.dbunit.dataset.datatype.DefaultDataTypeFacto
ry</dbunit.dataTypeFactoryName>
       <dbunit.operation.type>UPDATE</dbunit.operation.type>

<hibernate.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</hibernate.dial
ect>
       <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/PubStats?createDatabaseIfNotExist=
true&amp;useUnicode=true&amp;characterEncoding=utf-8]]></jdbc.url>
       <jdbc.username>root</jdbc.username>
       <jdbc.password>root</jdbc.password>

And I am running mvn jetty:run-war
It gives me build error
Can anyone solve my problem?

Regards
Anshu




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

Reply via email to