DeploymentException: cannot fully load class

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

DeploymentException: cannot fully load class

Putter, S.M.J. de
Dear all,



I get a DeploymentException when trying to deploy an ear file.

The ear file is setup as follows:



- META-INF/MANIFEST.MF

- BI3_Remote-client.jar

- BI3_Remote-ejb.jar



For brevity, I will refer to BI3_Remote-client.jar as client.jar and to BI3_Remote-ejb.jar as ejb.jar.



Client.jar refers to ejb.jar via its manifest through ClassPath.

Ejb.jar  has a bean implementing the BI3_RemoteInterface remote business interface. A simple method of the BI3_RemoteInterface is invoked by the main class of client.jar.



I get the following error, indicating failure to deploy due to a problem with BI3_RemoteInterface:



2013-07-15 16:31:28,058 ERROR [DeployTool] Error:

org.apache.geronimo.common.DeploymentException: Unable to deploy BI3_Remote-ear.ear: Could not fully load class: lqs.ejb.spec.counterexample.BI3_Remote_client

 due to:Llqs/ejb/spec/counterexample/BI3_RemoteInterface;

 in classLoader:

GeronimoClassLoader[default.BI3_Remote-ear_BI3_Remote-client.jar-DEPLOYMENT_0.0.

0.1373898687178 [443]]



        at org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:43)

        at org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:148)

        at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)

        at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)

        at org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)

        at org.apache.geronimo.main.Bootstrapper.start(Bootstrapper.java:88)

        at org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:61)

        at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)

        at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)



I think somehow the ejb.jar does not get linked to the client.jar. But I cannot see why, as the ejb.jar is found through the manifest. Is there anything I’m missing? I cannot find any hints in the logs. The source code attached to this e-mail.



Thanks in advance.

Sander

CannotDeploy.zip (91K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DeploymentException: cannot fully load class

Ivan Xu
Hi,

For the class visibility, it is a little ambiguous for the app client. The client applications should not have access to ejb jar files in the ear file, I would suggest to use a common jar file, and share that for ejb and client application.

You may refer to Java EE 6 Spec, EE 8.3.3

Hope it helps.


2013/7/15 Putter, S.M.J. de <[hidden email]>
Dear all,



I get a DeploymentException when trying to deploy an ear file.

The ear file is setup as follows:



- META-INF/MANIFEST.MF

- BI3_Remote-client.jar

- BI3_Remote-ejb.jar



For brevity, I will refer to BI3_Remote-client.jar as client.jar and to BI3_Remote-ejb.jar as ejb.jar.



Client.jar refers to ejb.jar via its manifest through ClassPath.

Ejb.jar  has a bean implementing the BI3_RemoteInterface remote business interface. A simple method of the BI3_RemoteInterface is invoked by the main class of client.jar.



I get the following error, indicating failure to deploy due to a problem with BI3_RemoteInterface:



2013-07-15 16:31:28,058 ERROR [DeployTool] Error:

org.apache.geronimo.common.DeploymentException: Unable to deploy BI3_Remote-ear.ear: Could not fully load class: lqs.ejb.spec.counterexample.BI3_Remote_client

 due to:Llqs/ejb/spec/counterexample/BI3_RemoteInterface;

 in classLoader:

GeronimoClassLoader[default.BI3_Remote-ear_BI3_Remote-client.jar-DEPLOYMENT_0.0.

0.1373898687178 [443]]



        at org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:43)

        at org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:148)

        at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)

        at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)

        at org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)

        at org.apache.geronimo.main.Bootstrapper.start(Bootstrapper.java:88)

        at org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:61)

        at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)

        at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)



I think somehow the ejb.jar does not get linked to the client.jar. But I cannot see why, as the ejb.jar is found through the manifest. Is there anything I’m missing? I cannot find any hints in the logs. The source code attached to this e-mail.



Thanks in advance.

Sander



--
Ivan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: DeploymentException: cannot fully load class

Putter, S.M.J. de
Hi,

Thanks for your help. I managed to get the application working with your suggestions.
The specification is indeed ambiguous. Other than an example stating that the app-client should not have access to EJB jar files, I haven't found anything explicit on this (not even in Sectino 8.2). Do you of more explicit rules set out by the spec that prevent app-clients to have access to EJB jar files? I'm interested in this, as I'm doing research on the conformance of EJB application servers to a set of requirements listed in the EJB specification.

Best Regards,
Sander
________________________________
Van: Ivan [[hidden email]]
Verzonden: donderdag 18 juli 2013 4:07
Aan: [hidden email]
Onderwerp: Re: DeploymentException: cannot fully load class

Hi,

For the class visibility, it is a little ambiguous for the app client. The client applications should not have access to ejb jar files in the ear file, I would suggest to use a common jar file, and share that for ejb and client application.

You may refer to Java EE 6 Spec, EE 8.3.3

Hope it helps.


2013/7/15 Putter, S.M.J. de <[hidden email]<mailto:[hidden email]>>
Dear all,



I get a DeploymentException when trying to deploy an ear file.

The ear file is setup as follows:



- META-INF/MANIFEST.MF

- BI3_Remote-client.jar

- BI3_Remote-ejb.jar



For brevity, I will refer to BI3_Remote-client.jar as client.jar and to BI3_Remote-ejb.jar as ejb.jar.



Client.jar refers to ejb.jar via its manifest through ClassPath.

Ejb.jar  has a bean implementing the BI3_RemoteInterface remote business interface. A simple method of the BI3_RemoteInterface is invoked by the main class of client.jar.



I get the following error, indicating failure to deploy due to a problem with BI3_RemoteInterface:



2013-07-15 16:31:28,058 ERROR [DeployTool] Error:

org.apache.geronimo.common.DeploymentException: Unable to deploy BI3_Remote-ear.ear: Could not fully load class: lqs.ejb.spec.counterexample.BI3_Remote_client

 due to:Llqs/ejb/spec/counterexample/BI3_RemoteInterface;

 in classLoader:

GeronimoClassLoader[default.BI3_Remote-ear_BI3_Remote-client.jar-DEPLOYMENT_0.0.

0.1373898687178 [443]]



        at org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:43)

        at org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:148)

        at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)

        at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)

        at org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)

        at org.apache.geronimo.main.Bootstrapper.start(Bootstrapper.java:88)

        at org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:61)

        at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)

        at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)



I think somehow the ejb.jar does not get linked to the client.jar. But I cannot see why, as the ejb.jar is found through the manifest. Is there anything I’m missing? I cannot find any hints in the logs. The source code attached to this e-mail.



Thanks in advance.

Sander



--
Ivan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: DeploymentException: cannot fully load class

Rajender
This post has NOT been accepted by the mailing list yet.
Hi Sander,
  I am also facing this issue. Can you please send me he code by which you were able to get this working?
 How is it that Geronimo samples do get this working with out the common Jar shared in the EAR?

Thanks and Regards
Rajender
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: DeploymentException: cannot fully load class

Rajender
Dear All ,
 can some one post a working example EAR to solve this problem?

Thanks and regards
Rajender
Loading...