This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 211244

Summary: Cannot deploy LeanServiceECBComponentWithAjax on GlassFish 3.1.2
Product: javaee Reporter: Vladimir Riha <vriha>
Component: SamplesAssignee: Martin Janicek <mjanicek>
Status: VERIFIED FIXED    
Severity: normal CC: vkraemer, vriha
Priority: P2    
Version: 7.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: server log

Description Vladimir Riha 2012-04-16 11:26:29 UTC
Quite possible similar as issue #208706

When I try to deploy the application, the action fails with following in output window:


Starting GlassFish Server 3+
GlassFish Server 3+ is running.
In-place deployment at /home/vriha/NetBeansProjects/LeanServiceECBComponentWithAjax/LeanServiceECBComponentWithAjax/build/web
Initializing...
deploy?DEFAULT=/home/vriha/NetBeansProjects/LeanServiceECBComponentWithAjax/LeanServiceECBComponentWithAjax/build/web&name=LeanServiceECBComponentWithAjax&contextroot=/LeanServiceECBComponentWithAjax&force=true failed on GlassFish Server 3+ 
 Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: com.sun.jersey.spi.inject.Errors$ErrorMessagesException. Please see server.log for more details.
PER01003: Deployment encountered SQL Exceptions:
	PER01000: Got SQLException executing statement "CREATE TABLE T_ORDER (ID BIGINT NOT NULL, AMOUNT INTEGER, CUSTOMER VARCHAR(255), DELIVERED SMALLINT DEFAULT 0, PAID SMALLINT DEFAULT 0, PRODUCTID INTEGER, PRIMARY KEY (ID))": java.sql.SQLException: Table/View 'T_ORDER' already exists in Schema 'APP'.
	PER01000: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME))": java.sql.SQLException: Table/View 'SEQUENCE' already exists in Schema 'APP'.
	PER01000: Got SQLException executing statement "INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)": java.sql.SQLIntegrityConstraintViolationException: 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 'SQL120416130627890' defined on 'SEQUENCE'.
/home/vriha/NetBeansProjects/LeanServiceECBComponentWithAjax/LeanServiceECBComponentWithAjax/nbproject/build-impl.xml:743: The module has not been deployed.
See the server log for details.





Product Version: NetBeans IDE 7.1.2 (Build 201204101705)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; en_US (nb
Comment 1 Vladimir Riha 2012-04-16 11:28:55 UTC
Created attachment 118321 [details]
server log
Comment 2 Martin Janicek 2012-04-16 13:01:43 UTC
Reassigning to Denis for evaluation. I can't say from the server log if it's a web service problem or some glassfish deployment problem.
But it looks quite similar to issue 208706.
Comment 3 Denis Anisimov 2012-04-16 14:59:58 UTC
I see here a number of problems:
1) Jersey related problem
2) SQL problem
I have no information about SQL issue.

Jersey issue is exactly the same as we solved some time ago for 7.1.1 :
project contains NB bundled Jersey library reference which is a problem for 
GF 3.1.2.
One needs to prevent Jersey packaging with the project. Please note that you 
can't remove Jersey from the project because there is JAXBContextResolver class 
that uses internal jersey classes : com.sun.jersey.api.json.*.
So to fix Jersey problem : open project properties , choose libraries, and
uncheck the "Package" checkbox for Jersey 1.8 library.
Comment 4 Martin Janicek 2012-04-17 08:44:07 UTC
Fixed in: web-main #5cf4f44259f3

Thanks denis for your help!
Comment 5 Quality Engineering 2012-04-18 21:26:15 UTC
Integrated into 'main-golden', will be available in build *201204181547* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5cf4f44259f3
User: Martin Janicek <mjanicek@netbeans.org>
Log: #211244 - Cannot deploy LeanServiceECBComponentWithAjax on GlassFish 3.1.2
Comment 6 Vladimir Riha 2012-04-19 07:26:15 UTC
verified, thanks

Product Version: NetBeans IDE Dev (Build 201204181547)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; en_US (nb)