Skip to main content

Several re- and undeployment Problems!

2 replies [Last post]
iceandfire
Offline
Joined: 2006-11-16

Several re- and undeployment Problems!

I have an ear which contains two EJB3s.
When I deploy it the first time everything works fine.

I'm working on linux.

Whenn i deploy it the second time:
Buildfile: /home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml
deploy.j2ee.ear:
[jar] Building jar: /home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/dycide2EAR.ear
tools:
deploy:
[exec] CLI171 Command deploy failed : Deploying application in domain failed; Could not rename /opt/glassfish-v1-b14/domains/domain1/generated/ejb/j2ee-apps/dycide2EAR to /opt/glassfish-v1-b14/domains/domain1/generated/ejb/j2ee-apps/dycide2EAR_old

BUILD FAILED
/home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml:175: The following error occurred while executing this line:
/home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml:78: exec returned: 1

Total time: 3 seconds

I buil this script to clean up for glassfish:
rm -r /opt/glassfish-v1-b14/domains/domain1/applications/j2ee-apps/dycide2EAR
rm -r /opt/glassfish-v1-b14/domains/domain1/applications/j2ee-apps/dycide2EAR
rm -r /opt/glassfish-v1-b14/domains/domain1/generated/xml/j2ee-apps/dycide2EAR
rm -r /opt/glassfish-v1-b14/domains/domain1/generated/ejb/j2ee-apps/dycide2EAR
rm -r /opt/glassfish-v1-b14/domains/domain1/generated/ejb/j2ee-modules/dycide2EAR
rm -r /opt/glassfish-v1-b14/domains/domain1/generated/xml/j2ee-modules/dycide2EAR
rm -r /opt/glassfish-v1-b14/domains/domain1/applications/j2ee-apps/dycide2EAR_old

after running this script, I deploy again:
Buildfile: /home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml
deploy.j2ee.ear:
[jar] Building jar: /home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/dycide2EAR.ear
tools:
deploy:
[exec] CLI171 Command deploy failed : Deploying application in domain failed; Could not rename /opt/glassfish-v1-b14/domains/domain1/applications/j2ee-apps/dycide2EAR to /opt/glassfish-v1-b14/domains/domain1/applications/j2ee-apps/dycide2EAR_old

BUILD FAILED
/home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml:175: The following error occurred while executing this line:
/home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml:78: exec returned: 1

Total time: 3 seconds

The I do nothing, just deploy a second time, then it works!!!
[echo] Application Deployed at: http://127.0.0.1:8080/dycide2EAR

Buildfile: /home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml
deploy.j2ee.ear:
[jar] Building jar: /home/stephan/DateinVonStephan/Diplomarbeit/workspaces/dycide2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/dycide2EAR.ear
tools:
deploy:
[exec] Command deploy executed successfully with following warning messages: WARNING:
[exec] JDO76614: Deployment encountered SQL Exceptions:
[exec] JDO76609: Got SQLException executing statement "CREATE TABLE DYCIDE (ID INTEGER NOT NULL, OWNER VARCHAR(255), DESCRIPTOR VARCHAR(255), SERVICENAME VARCHAR(255), SERVICEID VARCHAR(255), PRIMARY KEY (ID))": org.apache.derby.client.am.SqlException: Table/View 'DYCIDE' already exists in Schema 'APP'.
[exec] JDO76609: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY (SEQ_NAME))": org.apache.derby.client.am.SqlException: Table/View 'SEQUENCE' already exists in Schema 'APP'.
[exec] JDO76609: Got SQLException executing statement "INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)": org.apache.derby.client.am.SqlException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL061128051259740' defined on 'SEQUENCE'.
deploy-url-message:
[echo] Application Deployed at: http://127.0.0.1:8080/dycide2EAR
BUILD SUCCESSFUL
Total time: 8 seconds

There zou can spot a other problem:

I”m using

but the schema is not droped.

Thanks for zour attention.

Bye
Stephan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
iceandfire
Offline
Joined: 2006-11-16

After a clean re-installation, both errors seem to be gone!

the only remaining one is:
[exec] JDO76609: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY (SEQ_NAME))": org.apache.derby.client.am.SqlException: Table/View 'SEQUENCE' already exists in Schema 'APP'.

But I don't think this is a problem.

iceandfire
Offline
Joined: 2006-11-16

Problem was solved after a clean reinstall.