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 155026 - java.util.zip.ZipException and entity class not created
Summary: java.util.zip.ZipException and entity class not created
Status: RESOLVED INVALID
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-09 13:30 UTC by bordasb
Modified: 2008-12-16 01:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bordasb 2008-12-09 13:30:23 UTC
1. Select New Project/Java EE/Enterprise Application
2. uncheck "Create Web Application Module" check "Create Application Client Module" press "Finish" button. Select
"Glassfish V2" and "Java EE 5".
3. Create a stateless session bean in the EJB module
4. create a Persistence Unit in the EJB module with "Use Java Transaction APIs" selected and Table Generation Strategy
"Create" and select a MySQL Data Source. Persistence provider: Toplink(default)
5. Right click the EJB module in the Projects window and select new/Entity class, fill the "package" field and press
"Finish".
6. Create some field in the entity class and encapsulate them. 
7. build and deploy the application and the Glassfish output window gives a 
java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
        at java.util.jar.JarFile.<init>(JarFile.java:133)
        at java.util.jar.JarFile.<init>(JarFile.java:97)....

Also database table from entity class is not created. 

Issue may or may not relate to 'Issue 153430'

Experience is the same with Netbeans 6.1 with the same exception and table creation failure. 
Have not checked with Netbeans 6. 
However, the above procedure works fine with Netbeans 5.5
Comment 1 Vince Kraemer 2008-12-15 02:59:43 UTC
this is probably a gf v2 server issue...

Please attach the complete stack trace to the issue if possible.
Comment 2 Vince Kraemer 2008-12-15 21:25:55 UTC
the exception that you are seeing is a dup of 153430... but that does not resolve the issue related to the table creation.

I can replicate this result using asadmin to deploy the ent app... so it may be a server side issue...
Comment 3 Vince Kraemer 2008-12-16 01:09:54 UTC
it turns out that this is by design in GlassFish v2 servers.  The tables aren't created if the PU is unused... based on
your steps, it appears that there is no reference to the PU in the app yet.  Once the entity manager is used, tables
will be created at deploy-time....

I filed https://glassfish.dev.java.net/issues/show_bug.cgi?id=6932, to request that a warning message of some sort
appear when this happens.  

I am marking this as invalid, since it is really an issue for the server.... not the IDE.