8 Replies Latest reply on Mar 22, 2010 8:07 AM by jaikiran pai

    Stability of the ejb3.1 spec in AS6M2?

    Yucca Nel Novice

      Given that this is milestone 2 I was a bit surprised that basic deployment of small ear failed due to the following:

       

      Caused by: org.jboss.metadata.validation.chain.ValidatorChainException: Validation has failed due to the following ValidationException(s) raised:
      * EJB ManageUser has defined EJB2.x local component interface of org.jarbar.usermanager.model.LocalUserManager but has no localHome; ; Incomplete EJB2.x View [JBMETA-130]

       

          at org.jboss.metadata.validation.chain.ejb.jboss.JBossMetaDataValidatorChain.validate(JBossMetaDataValidatorChain.java:130)
          at org.jboss.ejb3.deployers.Ejb3MetadataProcessingDeployer.deploy(Ejb3MetadataProcessingDeployer.java:147)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

       

      I read the ejb3.1 spec just to make sure that nothing has changed for the rules in DD for defiing Stateles session beans and chapter 19 of the spec states that it should be good enough to define a Local interface through the <local> element. More importnatly, ia there a current workaround for this?

        • 1. Re: Stability of the ejb3.1 spec in AS6M2?
          jaikiran pai Master

          If you want to use EJB3.x local business view (i.e. one that doesn't require a local home interface), then you should use the business-local element:

           

          <business-local>blah.blah</business-local> 
          

           

          The local element is for EJB2.x local component view (which requires a local home interface).

          1 of 1 people found this helpful
          • 2. Re: Stability of the ejb3.1 spec in AS6M2?
            Yucca Nel Novice

            helpful but incorrect I am afraid the actual ejb3.1 spec (final druaght) says that using <local> should be sufficient to define a local interface in the DD.

             

            Read chapter 19 if you don't believe me

            • 3. Re: Stability of the ejb3.1 spec in AS6M2?
              jaikiran pai Master

              Are you referring to this:

              {quote}
              Enterprise bean’s local interface. If the bean class has a local interface, and the local home interface has not been specified using metadata annotations, the Bean Provider must specify the fully-qualified name of the enterprise bean’s local interface in the local element.
              {quote}

              • 4. Re: Stability of the ejb3.1 spec in AS6M2?
                Yucca Nel Novice

                Yes your answer did help me though as I have succesfully gotten rid of that error, only to be dealt a new blow fow which the server log gives little info other than the war failed to deploy. Can anyone pont me to the correct section to post, in order to get help with deployment error? I basically have a EJB that has bean put into an ear purely for cactus testing. I used maven to build it but I feel I am giving info here in an irrelevant section.

                 

                Many ty for replies so far.

                • 5. Re: Stability of the ejb3.1 spec in AS6M2?
                  jaikiran pai Master

                  Yucca Nel wrote:

                   

                  Yes


                  Okay. Now that we are on the same page (literally ) here's some details about that error message. If you look at the same 19 section of the spec, you will *also* notice:

                   


                  Enterprise bean’s local business interface. If the bean class has a local business interface and neither implements the business interface nor specifies it as a local business interface using metadata annotations on the bean class, the Bean Provider must specify the fully-qualified name of the enterprise bean’s local business interface in the business-local element.

                   

                  The usage of local/business-local and remote/business-remote is the most confused ones in EJB3.

                   

                  Starting EJB3, we now have "business interface"(s), which is a Plain Old Java Interface. So you have *business* local and *business* remote interfaces (their annotations are @Local and @Remote respectively). To configure them in xml, you use <business-local> and/or <business-remote> elements. These are plain java interfaces (and are known as business interfaces) and provide a EJB3.x view for the bean. Furthermore, EJB3 is backward compatible. What this means is, you can have EJB2.x view for your bean. The EJB2.x view has a local/remote *(component)* interface and corresponding local/remote home interfaces. Such *component* local/remote interfaces extend javax.ejb.EJBLocalObject/javax.ejb.EJBObject respectively. The local/remote *component* interfaces are configured using the <local> (and/or) <remote> element in the xml. So if you use the <local> element in the xml, then you are using the EJB2.x view and are expected to provide a corresponding <local-home> element in the xml (or use a @LocalHome to annotate the local home interface)

                  • 6. Re: Stability of the ejb3.1 spec in AS6M2?
                    jaikiran pai Master

                    Yucca Nel wrote:

                     

                    I have succesfully gotten rid of that error, only to be dealt a new blow fow which the server log gives little info other than the war failed to deploy.


                    Please post that entire exception stacktrace along with more details about your application packaging and any relevant configuration files. Are you packaging EJBs in .war file?

                     

                    P.S: While posting logs or xml content or code please use the forum editor's formatting options.

                    • 7. Re: Stability of the ejb3.1 spec in AS6M2?
                      Yucca Nel Novice

                      Hi, Here we go:

                       

                      build with mavan 2 succesfully. A single ejb into an ear with my personal lib and a few extras like cactus.

                       

                      Eploded ear as follows:

                           .jar(ejb)

                           .war(no pages, just cactus servlet class for testing)

                           lib(contains cactus and personal lib)

                           Meta-Inf

                       

                       

                       

                      java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

                       

                      *** DEPLOYMENTS IN ERROR: Name -> Error

                       

                      vfszip:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/deploy/buhaugane.ear/ -> org.jboss.deployers.spi.DeploymentException: URL file:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/tmp/1563467-8n4quf-g70n647y-1-g70q1i1v-ow/buhaugane-war-1.0-SNAPSHOT.war/ deployment failed

                       


                      DEPLOYMENTS IN ERROR:
                        Deployment "vfszip:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/deploy/buhaugane.ear/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/tmp/1563467-8n4quf-g70n647y-1-g70q1i1v-ow/buhaugane-war-1.0-SNAPSHOT.war/ deployment failed

                       

                              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)
                              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:189)
                              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)
                              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)
                              at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:155)
                              at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.invokeOperation(AbstractManagedDeploymentComponent.java:173)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:597)
                              at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
                              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                              at java.lang.Thread.run(Thread.java:619)
                      Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

                       

                      *** DEPLOYMENTS IN ERROR: Name -> Error

                       

                      vfszip:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/deploy/buhaugane.ear/ -> org.jboss.deployers.spi.DeploymentException: URL file:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/tmp/1563467-8n4quf-g70n647y-1-g70q1i1v-ow/buhaugane-war-1.0-SNAPSHOT.war/ deployment failed

                       


                      DEPLOYMENTS IN ERROR:
                        Deployment "vfszip:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/deploy/buhaugane.ear/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/Users/Yucca/DEV/jboss-6.0.0.20100216-M2/server/default/tmp/1563467-8n4quf-g70n647y-1-g70q1i1v-ow/buhaugane-war-1.0-SNAPSHOT.war/ deployment failed

                       

                              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1198)
                              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1144)
                              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:848)
                              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
                              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:326)
                              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:238)
                              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
                              at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
                              at org.jboss.remoting.Client.invoke(Client.java:1927)
                              at org.jboss.remoting.Client.invoke(Client.java:770)
                              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304)
                              ... 15 more

                       

                      Not expecting much here anyway as was my first maven and cactus attempt but succesfull manged to build the ear and all dependancies are resolved. I am happy to provide more info perhaps even my ear as it is very small

                      • 8. Re: Stability of the ejb3.1 spec in AS6M2?
                        jaikiran pai Master

                        That error doesn't tell much. Is there any other exception stacktrace or error message before that summary report on the console? If yes, post that console log.

                         

                        And please format your logs before posting (use the forum editor formatting options)