Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Can't deploy when using LAZY, can deply when using EAGER

Hi Michael,

Using a recreation of your issue, I was able to see the problem occur. My initial look suggests that something about the environment GlassFish puts us in for DDL generation is getting in the way of weaving. Based on your suggestion below, I removed the DDL generation tag and the recreation appears to deploy. Can you try that? (i.e. remove <property name="eclipselink.ddl-generation" value="create-tables"/> completely from your persistence unit and see if your deployment works)

If that works, it suggests to me that there is a GlassFish issue here. If so, there are a few GlassFish engineers that watch this forum, so they may be able to give you some help, but posting to the GlassFish forum will hit a wider audience of Experts, the key points to mention are that you are deploying to GlassFish 2.1 with EclipseLink, how you have EclipseLink packaged and that you get an exception indicating weaving is not successful on DDL generation, but not without DDL generation.

If that does not work, I am more likely to be able to diagnose the problem as it is more likely to be an EclipseLink issue.

Let me know,
Tom

BTW: It seems strange to me that you are packaging javaee.jar in your ear file. I would expect those classes to be available from any app server you deployed on (in fact, glassfish has that very jar)

Michael Bar-sinai wrote:
Well, the last change WAS my bad - when I removed the weaving=static
flag from the persistence the recent problem (the class that was not
mentioned initially) was fixed.

Now for some good news: WE'VE GOT A WORKAROUND!
1. Make all the problematic relationship EAGER.
2. Add the <property name="eclipselink.ddl-generation"
value="create-tables"/> to the property.xml file
3. Deploy
4. Change the relationships you want to LAZY
5. Remove the <property name="eclipselink.ddl-generation"
value="create-tables"/> to the property.xml file
6. Deploy.
done.

As for the static weaver, I tried static weaving of the exploded
structure. The static weaver seems to remove the
@Stateless/@Stateful/@MessageDriven, as I get this message:
Invalid ejb jar [eBill-ejb.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x
style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as
library jar.
3. If the jar file contains valid EJBs which are annotated with EJB
component level annotations (@Stateless, @Stateful, @MessageDriven),
please check server.log to see whether the annotations were processed
properly.
com.sun.enterprise.deployment.backend.IASDeploymentException: Error
loading deployment descriptors for module [eBill] -- Invalid ejb jar
[eBill-ejb.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x
style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as
library jar.
3. If the jar file contains valid EJBs which are annotated with EJB
component level annotations (@Stateless, @Stateful, @MessageDriven),
please check server.log to see whether the annotations were processed
properly.
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:303)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:283)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:835)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:225)
Caused by: java.lang.IllegalArgumentException: Invalid ejb jar
[eBill-ejb.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x
style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as
library jar.
3. If the jar file contains valid EJBs which are annotated with EJB
component level annotations (@Stateless, @Stateful, @MessageDriven),
please check server.log to see whether the annotations were processed
properly.
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:95)
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:82)
at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
at com.sun.enterprise.deployment.Application.visit(Application.java:1819)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:520)
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:382)

On Wed, Sep 23, 2009 at 11:16 PM, Michael Bar-Sinai
<mich.barsinai@xxxxxxxxx> wrote:
Hi Tom,

The latest change was probably my bad - I left the weaving=static property in the persistence.xml file.
The OS is Windows XP SP3, the VM is java 6 update 11. I'll try the directory structure weaving first thing in the morning.

- Michael


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top