[jboss-user] [Installation, Configuration & Deployment] - Deployment problem/question JBoss 5.1 migration

lvonk2000 do-not-reply at jboss.com
Fri Sep 4 09:56:52 EDT 2009


Hi,

We are migrating from 4.2.3 to 5.1.0 (JDK 6). We have migrated some applications but I have a question about a problem we faced when migrating an ear file.

After deploying I saw the following error in the log


  | DEPLOYMENTS MISSING DEPENDENCIES:
  |   Deployment "jboss.j2ee:ear=billing.ear,jar=billing-services-2.0-SNAPSHOT.jar,name=BillingLogicBean,service=EJB3_endpoint" is missing the following dependencies:
  |     Dependency "jboss.j2ee:ear=billing.ear,jar=billing-services-2.0-SNAPSHOT.jar,name=BillingLogicBean,service=EJB3" (should be in state "Configured", but is actually in state "**ERROR**")
  | 
  | DEPLOYMENTS IN ERROR:
  |   Deployment "jboss.j2ee:ear=billing.ear,jar=billing-services-2.0-SNAPSHOT.jar,name=BillingLogicBean,service=EJB3" is in error due to the following reason(s): java.lang.AssertionError: container is null, **ERROR**
  | 
  | 

This error has to do with The BillingLogicBean that depends on another EJB called RipePrintingService. For some reason we are referring to it as Local ejb although it is deployed as seperate jar on the same machine. I did not know this was possible but apparently it is.

Before migration we referred to it as follows (and that worked):


  | @Stateless
  | public class BillingLogicBean implements BillingLogic {
  |     @EJB
  |     private RipePrintingService printingService;
  | 
  |   // rest omitted
  | }
  | 



Further up the logfile the following stacktrace was printed (we have assertions put on)


  | 2009-09-04 13:32:25,232 DEBUG [org.jboss.ejb3.deployers.JBoss5DeploymentScope] (main) Failed to find endpoint for interface: interface net.ripe.commons.printing.RipePrintingService
  | 2009-09-04 13:32:25,232 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.j2ee:ear=billing.ear,jar=billing-services-2.0-SNAPSHOT.jar,name=BillingLogicBean,service=EJB3 state=Create
  | java.lang.AssertionError: container is null
  | 	at org.jboss.ejb3.proxy.factory.ProxyFactoryHelper.getJndiName(ProxyFactoryHelper.java:410)
  | 	at org.jboss.ejb3.Ejb3Deployment.getEjbJndiName(Ejb3Deployment.java:403)
  | 	at org.jboss.ejb3.EJBContainer.getEjbJndiName(EJBContainer.java:1521)
  | 	at org.jboss.injection.EjbEncInjector.inject(EjbEncInjector.java:80)
  | 	at org.jboss.ejb3.EJBContainer.lockedStart(EJBContainer.java:900)
  | 	at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:200)
  | 	at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:577)
  | 	at org.jboss.ejb3.stateless.StatelessContainer.lockedStart(StatelessContainer.java:192)
  | 	at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)
  | 	at sun.reflect.GeneratedMethodAccessor325.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
  | 	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
  | 	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
  | 	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
  | 	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
  | 	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
  | 	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
  | 	at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
  | 	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
  | 	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
  | 	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
  | 	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
  | 	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
  | 	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
  | 	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
  | 	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
  | 	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
  | 	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
  | 	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
  | 	at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
  | 	at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
  | 	at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
  | 	at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  | 	at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
  | 	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
  | 	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
  | 	at org.jboss.Main.boot(Main.java:221)
  | 	at org.jboss.Main$1.run(Main.java:556)
  | 	at java.lang.Thread.run(Thread.java:619)
  | 2009-09-04 13:32:25,296 WARN  [org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB] (main) Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData at bab8daf9{BillingDomainRepositoryBean}
  | 2009-09-04 13:32:25,296 WARN  [org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB] (main) Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData at bab8daf9{BillingDomainRepositoryBean}
  | 


And a little further up I noticed a logging statement referring to https://jira.jboss.org/jira/browse/EJBTHREE-1289


Complete log statement


  | 2009-09-04 13:32:16,898 DEBUG [org.jboss.ejb3.deployers.JBoss5DeploymentScope] (main) Failed to find endpoint for interface: interface net.ripe.commons.printing.RipePrintingService
  | 2009-09-04 13:32:16,899 WARN  [org.jboss.injection.EJBRemoteHandler] (main) EJBTHREE-1289: Using legacy EjbEncInjector, because mappedName for enc "env/RipePrintingServiceBean", field "printingService" is null (container.environmentRefGroup.annotatedEjbReferences = [AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/customerFacade,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/CustomerFacadeBean/local-net.ripe.domain.billing.customerservice.CustomerFacade,beanInterface=interface net.ripe.domain.billing.customerservice.CustomerFacade}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/afasIntegration,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/AfasIntegrationBean/local-net.ripe.billing.services.afas.AfasIntegration,beanInterface=interface net.ripe.billing.services.afas.AfasIntegration}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/config,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/BillingConfigBean/local-net.ripe.billing.services.BillingConfig,beanInterface=interface net.ripe.billing.services.BillingConfig}, AnnotatedEJBReferenceMetaData{name=BillingDomainRepositoryBean,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/BillingDomainRepositoryBean/local-net.ripe.domain.billing.interfaces.BillingDomainRepository,beanInterface=interface net.ripe.domain.billing.interfaces.BillingDomainRepository}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/asyncManager,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/AsyncManagerBean/local-net.ripe.billing.services.async.AsyncManager,beanInterface=interface net.ripe.billing.services.async.AsyncManager}, AnnotatedEJBReferenceMetaData{name=RipePrintingServiceBean,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=null,beanInterface=interface net.ripe.commons.printing.RipePrintingService}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/mailTemplateLoader,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/MailTemplateLoaderBean/local-net.ripe.billing.services.logic.MailTemplateLoader,beanInterface=interface net.ripe.billing.services.logic.MailTemplateLoader}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/closeOrganisationService,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/CloseOrganisationServiceBean/local-net.ripe.billing.services.logic.CloseOrganisationService,beanInterface=interface net.ripe.billing.services.logic.CloseOrganisationService}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/paymentService,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/PaymentServiceBean/local-net.ripe.billing.services.PaymentService,beanInterface=interface net.ripe.billing.services.PaymentService}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/membershipInvoicingWorkflow,ejb-ref-type=null,link=MembershipInvoicingWorkflowBean,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/MembershipInvoicingWorkflowBean/local-net.ripe.billing.orchestration.InvoicingWorkflow,beanInterface=interface net.ripe.billing.orchestration.InvoicingWorkflow}, AnnotatedEJBReferenceMetaData{name=net.ripe.billing.services.ejb.BillingLogicBean/meetingInvoicingWorkflow,ejb-ref-type=null,link=MeetingInvoicingWorkflowBean,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=billing/MeetingInvoicingWorkflowBean/local-net.ripe.billing.orchestration.InvoicingWorkflow,beanInterface=interface net.ripe.billing.orchestration.InvoicingWorkflow}])
  | 


Now we solved it by adding the "mappedName" property to the @EJB annotation on the RipePrintingService property in the BillingLogicBean:


  |     @EJB(mappedName="RipePrintingServiceBean/local")
  |     private RipePrintingService printingService;
  | 

The thing is I do not understand why I need to do this in JBoss 5.1.0, it was working in 4.2.3 without the mappedName property.

Thanks in advance.

Lars


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253587#4253587

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253587




More information about the jboss-user mailing list