users@glassfish.java.net

Re: NetBeans and GlassFish deploy error

From: Ronaldo Rigoni ... <rrigoni_at_gmail.com>
Date: Thu, 16 Jul 2009 11:16:22 -0300

Well,
The structure is:
Application Client module > Contains Entitys and Stubs ( interfaces).
Ejb Modulo > Contains WebServices, Ejbs remotes and Locals.
War Module > Access the EJBs with interfaces declared in Client Module.

The configuration files is:
application.xml
<?xml version="1.0" encoding="UTF-8"?>
<application version="5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_5.xsd">
  <display-name>portaldoprofessor</display-name>
  <module>
    <ejb>portaldoprofessor-ejb.jar</ejb>
  </module>
  <module>
    <web>
      <web-uri>portaldoprofessor-war.war</web-uri>
      <context-root>/portaldoprofessor</context-root>
    </web>
  </module>
  <module>
    <java>portaldoprofessor-client.jar</java>
  </module>
</application>

application-client.xml

<?xml version="1.0" encoding="UTF-8"?>
<application-client version="5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
  <display-name>portaldoprofessor-client</display-name>
</application-client>

If I contruct de EAR export and deploy in GlassFish by hand don't have problem.

Sametimes the error is relative in Application client.
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.


Almost always the error is relative a Remote interfaces.
Exception occured in J2EEC Phasejava.lang.RuntimeException: Trying to
set an ejb-ref on an EJB, while the EJB does not define remote
interfaces
com.sun.enterprise.deployment.backend.IASDeploymentException: Error
loading deployment descriptors for module [portaldoprofessor] --
Trying to set an ejb-ref on an EJB, while the EJB does not define
remote interfaces

And I have 13 EJBs with remote interfaces.

Can anyone halpme?

Regards.




2009/7/16 Felipe Gaúcho <fgaucho_at_gmail.com>:
> please  send us the structure of the EAR and the description of the
> client jar contents..
>
> If possible, please include any configuration file or deployment descriptor...
>
> * I am in vacations, but I hope the list will save your day :)
>
>
> On Thu, Jul 16, 2009 at 10:29 AM, Ronaldo Rigoni ...<rrigoni_at_gmail.com> wrote:
>> Hi all,
>> I am try to deploy a application in GlassFish and NetBeans in a new EAR project.
>> And i recieve a error.
>> I have 13 EJBs with @Remote interfaces and 21 with @Local, because
>> Application server responses with a EJB don't have a Remote interface.
>>
>> Ronaldo.
>>
>> Exception occured in J2EEC Phasejava.lang.RuntimeException: Trying to
>> set an ejb-ref on an EJB, while the EJB does not define remote
>> interfaces
>> com.sun.enterprise.deployment.backend.IASDeploymentException: Error
>> loading deployment descriptors for module [portaldoprofessor] --
>> Trying to set an ejb-ref on an EJB, while the EJB does not define
>> remote interfaces
>>        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.deploy(AppDeployer.java:226)
>>        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.RuntimeException: Trying to set an ejb-ref on an
>> EJB, while the EJB does not define remote interfaces
>>        at com.sun.enterprise.deployment.EjbReferenceDescriptor.setEjbDescriptor(EjbReferenceDescriptor.java:167)
>>        at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:335)
>>        at com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1415)
>>        at com.sun.enterprise.deployment.Application.visit(Application.java:1832)
>>        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:520)
>>        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:840)
>>        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:794)
>>        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:365)
>>        ... 10 more
>>
>>
>> --
>> []'s,
>> Ronaldo Rigoni
>> http://www.ronaldorigoni.com.br
>> Desenvolvedor JEE
>> Ministério da Educação -  CESPE
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>
>
> --
> Looking for a client application for this service:
> http://fgaucho.dyndns.org:8080/footprint-service/wadl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>



-- 
[]'s,
Ronaldo Rigoni
http://www.ronaldorigoni.com.br
Desenvolvedor JEE
Ministério da Educação -  CESPE