You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Marcel Urbanek (JIRA)" <ji...@apache.org> on 2012/06/26 16:57:44 UTC

[jira] [Created] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Marcel Urbanek created OPENEJB-1847:
---------------------------------------

             Summary: When deploying two ear files in openejb only the first one gets deployed correctly
                 Key: OPENEJB-1847
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
             Project: OpenEJB
          Issue Type: Bug
          Components: deployment
    Affects Versions: 4.0.0
            Reporter: Marcel Urbanek


I deployed two ear files in open ejb by copying them to the "apps" directory. 
While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).

I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau closed OPENEJB-1847.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.1.0
    
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>             Fix For: 4.1.0
>
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Marcel Urbanek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402086#comment-13402086 ] 

Marcel Urbanek commented on OPENEJB-1847:
-----------------------------------------

It seems that even ejbs I have on the classpath get deployed twice:

INFO - Jndi(name=global/Application_ID/ear-scoped-cdi-beans/GroupService!com.retail_sc.test.ejb.GroupServiceLocal) --> Ejb(deployment-id=Application_ID/ear-scoped-cdi-beans/GroupService)

INFO - Jndi(name=webshop-product-facade-deployment-3.0.4/ear-scoped-cdi-beans/GroupServiceLocal) --> Ejb(deployment-id=webshop-product-facade-deployment-3.0.4/ear-scoped-cdi-beans/GroupService)

GroupService is in none of the both ears, it is deployed on the classpath (unpackaged) using the openejb embedded mechanism. I would assume this ejb should be deployed under "classpath.ear".
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Marcel Urbanek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402080#comment-13402080 ] 

Marcel Urbanek commented on OPENEJB-1847:
-----------------------------------------

I got it running now. The trick seems to be to add

openejb.deploymentId.format={appId}/{moduleId}/{ejbName}

to the

system.properties

I am not completely sure what the reason is. I removed everything from my ejb-jar.xml without success so this can not be the reason. But following I saw on the console when not using "openejb.deploymentId.format":
INFO - Jndi(name=ear-scoped-cdi-beans.CompLocalBean) --> Ejb(deployment-id=ear-scoped-cdi-beans.Comp)

I don't know where this CompLocalBean comes from, but it is registered for each ear, and without "openejb.deploymentId.format" it seems to me that it is registered under the very same name. After setting "openejb.deploymentId.format" the output is as follows:


INFO - Jndi(name=aTestEJBAnnotaitionEA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.CompLocalBean) --> Ejb(deployment-id=aTestEJBAnnotaitionEA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.Comp)
INFO - Jndi(name=TestEJB3EA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.CompLocalBean) --> Ejb(deployment-id=TestEJB3EA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.Comp)

and it works.
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401473#comment-13401473 ] 

Romain Manni-Bucau commented on OPENEJB-1847:
---------------------------------------------

i got this: https://gist.github.com/4283d24ea02850f0379d

maybe your ejb-jar.xml re-define the same bean than the annotation (sisnt look your code)
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Marcel Urbanek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401577#comment-13401577 ] 

Marcel Urbanek commented on OPENEJB-1847:
-----------------------------------------

Thanks for having a look into this.

Ok in your log file everything is fine, all beans of both ears are registered at the jndi. Tomorrow I can add some of my log files (logfile for each ear seperate deployed and logfile for both ears together). But it seems that you are running tomee in standalone (trunk version) and we are just running openejb embedded (4.0.0). Isn't that a difference?

I do not completely understand what you mean by "maybe your ejb-jar.xml re-define the same bean than the annotation".Do you think I defined the ejb by adding an annotation AND adding it to the ejb-jar.xml at the same time?
Thanks again.
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402090#comment-13402090 ] 

Romain Manni-Bucau commented on OPENEJB-1847:
---------------------------------------------

EJB have now standard names, here you have 2 of the ejb names (one with the interface specified and another without).
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Marcel Urbanek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402107#comment-13402107 ] 

Marcel Urbanek commented on OPENEJB-1847:
-----------------------------------------

Sorry i copied the wrong log output:

DEBUG - bound ejb at name: openejb/Deployment/webshop-product-facade-deployment-3.0.4/ear-scoped-cdi-beans/GroupService/com.retail_sc.test.ejb.GroupServiceLocal, ref: org.apache.openejb.core.ivm.naming.BusinessLocalReference@1940be55

DEBUG - bound ejb at name: openejb/Deployment/Application_ID/ear-scoped-cdi-beans/GroupService/com.retail_sc.test.ejb.GroupServiceLocal, ref: org.apache.openejb.core.ivm.naming.BusinessLocalReference@4de17cff

Here the same bean is deployed two times, the only difference is the appId ("webshop-product-facade-deployment-3.0.4" versus "Application_ID"). Note: the Bean GroupServiceLocal is in none of the both ears, instead it is deployed on the classpath (embedded/unpackaged).
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401637#comment-13401637 ] 

Romain Manni-Bucau commented on OPENEJB-1847:
---------------------------------------------

I used tomee snapshot.

well the point was did you define twice the same bean (maybe ignoring it-
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402081#comment-13402081 ] 

Romain Manni-Bucau commented on OPENEJB-1847:
---------------------------------------------

you got it, will have a look. The comp bean is an internal bean.
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>         Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1847) When deploying two ear files in openejb only the first one gets deployed correctly

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401446#comment-13401446 ] 

Romain Manni-Bucau commented on OPENEJB-1847:
---------------------------------------------

Hi,

can you share your ears even if they are trivial please?
                
> When deploying two ear files in openejb only the first one gets deployed correctly
> ----------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1847
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1847
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.0.0
>            Reporter: Marcel Urbanek
>
> I deployed two ear files in open ejb by copying them to the "apps" directory. 
> While each of the ear files is deployed correctly when deployed alone, when deploying them together open ejb will correctly find the ejbs in the second ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial ones.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira