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 95871 - EJB3 Webservice cannot point at external shared library
Summary: EJB3 Webservice cannot point at external shared library
Status: RESOLVED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB Project (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-17 18:53 UTC by vprise
Modified: 2007-06-18 13:42 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 vprise 2007-02-17 18:53:16 UTC
When creating an EJB3 webservice EJB and using within it an object defined in an
external project (while choosing that the project be packaged in the EJB or the
EAR) the external JAR gets packaged as a JAR and is thus not found during
deployment causing deployment to fail. So far I couldn't even get an "ant"
related workaround to work since the ant targets I tried to override just aren't
getting called... Will need to look deeper into that when I get a chance.
Copying the object used works perfectly.

Steps to reproduce on Netbeans 5.5 with Sun One Application server 9 (the
default that ships with NB):
Create a shared library project, within it create a simple bean with one field.
Create an EAR project which includes an EJB module but doesn't include a WAR.
Add the shared library project to the EJB project as a required library that is
packaged during build.
In the EJB module create a new web service, add an operation that makes use of
the simple bean within the shared object.
Deployment will fail.

To verify remove the shared library from the EAR then copy the simple bean into
the EJB project. Deployment should succeed.
Comment 1 Milan Kuchtiak 2007-02-28 17:47:23 UTC
Tested on GlassFish V2 and got this error :
mbean.deploy_failed
com.sun.enterprise.admin.common.exception.DeploymentException: Error attempting
to determine the Java EE module type for
/space/home/mkuchtiak/glassfish_v2/domains/domain1/config/EJBModule2.jar; the
archive may be incorrectly constructed, non-existent, or inaccessible from the
server
        at
com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.getTypeFromFile(DeploymentServiceUtils.java:1187)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:707)
        at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
        at
com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
Caused by: java.io.IOException: Cannot determine the Java EE module type for
/space/home/mkuchtiak/glassfish_v2/domains/domain1/config/EJBModule2.jar
        at
com.sun.enterprise.deployment.archivist.PluggableArchivistsHelper.getArchivistForArchive(PluggableArchivistsHelper.java:124)
        at
com.sun.enterprise.deployment.archivist.PluggableArchivistsHelper.getArchivistForArchive(PluggableArchivistsHelper.java:85)
        at
com.sun.enterprise.deployment.archivist.ArchivistFactory.getArchivistForArchive(ArchivistFactory.java:93)
        at
com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.getTypeFromFile(DeploymentServiceUtils.java:1182)
        ... 3 more
Comment 2 Milan Kuchtiak 2007-02-28 17:51:34 UTC
I reported a GlassFish issue for this :
https://glassfish.dev.java.net/issues/show_bug.cgi?id=2511
Comment 3 Milan Kuchtiak 2007-04-13 09:56:17 UTC
I reopened again the GlassFish bug.
Comment 4 Milan Kuchtiak 2007-04-17 08:33:26 UTC
According to the response from GlassFish people there is no standard way to
package jar files to standalone EJB module. 

Use Enterprise Appplication project for that.

However, we should probably inform user about this behaviour when libraries are
being added to standalone EJB project.
Comment 5 Andrei Badea 2007-06-18 13:42:10 UTC
This is not a defect, the behavior is according to the Java EE spec. When the EJB module is deployed as part of an
enterprise application, everything works as expected.

Closing as invalid.