NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Trouble syncing MYSQL with EJB project

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
jr1667a



Joined: 19 Nov 2010
Posts: 2

PostPosted: Fri Nov 19, 2010 4:51 am    Post subject: Trouble syncing MYSQL with EJB project Reply with quote

Hello. I am working on a project and this is my first time using NetBeans (or an IDE in general) and my first time working with EJB. I have successfully linked my NetBeans project with the MYSQL (by going to services > drivers > MySQL (Connector / J Driver) and setting it to root with my password). I now have a listed connection: jdbc:mysql:///[root on Default schema].

So, first I am wondering how I can test that this is actually working correctly. I have also generated a number of Entities that I would like to try some sample queries on and am not sure how to do that in NetBeans. The most pressing issue though is that when I attempt to deploy my project I receive a series of errors much like this:
Code:

WARNING: Got SQLException executing statement "CREATE TABLE GROUPVOLUNTEERRECORD (orgName VARCHAR(255) NOT NULL, numberOfVolunteers INTEGER, totalHoursWorked FLOAT, fieldWorked INTEGER, organization VARCHAR(255), PRIMARY KEY (orgName))": java.sql.SQLException: Table/View 'GROUPVOLUNTEERRECORD' already exists in Schema 'APP'.


and recently when I tried to implement some JSP I am additionally receiving this error:
Code:

org.glassfish.deployment.common.DeploymentException: Error in linking security policy for TSW-war -- Inconsistent Module State


Thanks for any help.
Back to top
jr1667a



Joined: 19 Nov 2010
Posts: 2

PostPosted: Sat Nov 20, 2010 5:07 pm    Post subject: Reply with quote

Just bumping this. Anyone know anything about this or resources at which I could look?
Back to top
Tony
Posted via mailing list.





PostPosted: Mon Nov 22, 2010 8:34 pm    Post subject: Re: Trouble syncing MYSQL with EJB project Reply with quote

First issue .. I'm assuming you are using one of the persistence providers,
so set your table generation strategy in the persistence.xml to 'None'. I'm
assuming this because you've got some entities 'generated', which I take to
mean that you used the NB wizard to create these files.

This prevents the server from trying to create the schema all over again.
Actually, this is only a warning, so you COULD ignore it. The strategy
options are Create, Drop and Create, and None. They do what they say, so can
be used for a variety of scenarios, but since you've already got a database
lined up and I'd guess some data in the database, the best option would be
'None'.

I don't use plain jsp on glassfish, so can't help you there too much, but
check you have a valid framework in place in NB (Project
Properties->Frameworks).

YMMV

Tony

-----Original Message-----
From: jr1667a [mailto:address-removed]
Sent: 20 November 2010 17:07
To: address-removed
Subject: [nbj2ee] Trouble syncing MYSQL with EJB project

Just bumping this. Anyone know anything about this or resources at which I
could look?



Hello. I am working on a project and this is my first time using NetBeans
(or an IDE in general) and my first time working with EJB. I have
successfully linked my NetBeans project with the MYSQL (by going to services
Quote:
drivers > MySQL (Connector / J Driver) and setting it to root with my
password). I now have a listed connection: jdbc:mysql:///[root on Default
schema].

So, first I am wondering how I can test that this is actually working
correctly. I have also generated a number of Entities that I would like to
try some sample queries on and am not sure how to do that in NetBeans. The
most pressing issue though is that when I attempt to deploy my project I
receive a series of errors much like this:

Code:

WARNING: Got SQLException executing statement "CREATE TABLE
GROUPVOLUNTEERRECORD (orgName VARCHAR(255) NOT NULL, numberOfVolunteers
INTEGER, totalHoursWorked FLOAT, fieldWorked INTEGER, organization
VARCHAR(255), PRIMARY KEY (orgName))": java.sql.SQLException: Table/View
'GROUPVOLUNTEERRECORD' already exists in Schema 'APP'.



and recently when I tried to implement some JSP I am additionally receiving
this error:

Code:

org.glassfish.deployment.common.DeploymentException: Error in linking
security policy for TSW-war -- Inconsistent Module State



Thanks for any help.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo