File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Error when deploying an EAR on JBoss 5.1.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Error when deploying an EAR on JBoss 5.1.0" Watch "Error when deploying an EAR on JBoss 5.1.0" New topic
Author

Error when deploying an EAR on JBoss 5.1.0

Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Hi,

I get the following error when I try it from the admin console,


Failed to create Resource CustomerEAR.ear - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3" is missing the following dependencies: Dependency "<UNKNOWN jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=CustomerEAR.ear/CustomerEJB.jar#CustomerJPA' **") Deployment "jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall") DEPLOYMENTS IN ERROR: Deployment "<UNKNOWN jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=CustomerEAR.ear/CustomerEJB.jar#CustomerJPA' ** Deployment "persistence.unit:unitName=CustomerEAR.ear/CustomerEJB.jar#CustomerJPA" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider from BaseClassLoader@2fcde7{VFSClassLoaderPolicy@76fff7{name=vfszip:/C:/jboss-5.1.0.GA/server/default/deploy/CustomerEAR.ear/ domain=ClassLoaderDomain@639bf1{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@e86da0} roots=[MemoryContextHandler@10413224[path= context=vfsmemory://3j001-3sciif-g7duzx9q-1-g7dxjzl9-16n real=vfsmemory://3j001-3sciif-g7duzx9q-1-g7dxjzl9-16n], DelegatingHandler@32697041[path=CustomerEAR.ear context=file:/C:/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/jboss-5.1.0.GA/server/default/deploy/CustomerEAR.ear], DelegatingHandler@28701372[path=CustomerEAR.ear/CustomerEJB.jar context=file:/C:/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/jboss-5.1.0.GA/server/default/deploy/CustomerEAR.ear/CustomerEJB.jar]] delegates=null exported=[META-INF, com.example.sample.ejb, com.example.sample.mdb, com.example.sample.entity, CustomerJPA.jar.com.example.sample.entity, CustomerJPA.jar.META-INF] <IMPORT-ALL>NON_EMPTY}} -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3" is missing the following dependencies: Dependency "<UNKNOWN jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=CustomerEAR.ear/CustomerEJB.jar#CustomerJPA' **") Deployment "jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall") DEPLOYMENTS IN ERROR: Deployment "<UNKNOWN jboss.j2ee:ear=CustomerEAR.ear,jar=CustomerEJB.jar,name=CustomerSessionBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=CustomerEAR.ear/CustomerEJB.jar#CustomerJPA' ** Deployment "persistence.unit:unitName=CustomerEAR.ear/CustomerEJB.jar#CustomerJPA" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider from BaseClassLoader@2fcde7{VFSClassLoaderPolicy@76fff7{name=vfszip:/C:/jboss-5.1.0.GA/server/default/deploy/CustomerEAR.ear/ domain=ClassLoaderDomain@639bf1{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@e86da0} roots=[MemoryContextHandler@10413224[path= context=vfsmemory://3j001-3sciif-g7duzx9q-1-g7dxjzl9-16n real=vfsmemory://3j001-3sciif-g7duzx9q-1-g7dxjzl9-16n], DelegatingHandler@32697041[path=CustomerEAR.ear context=file:/C:/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/jboss-5.1.0.GA/server/default/deploy/CustomerEAR.ear], DelegatingHandler@28701372[path=CustomerEAR.ear/CustomerEJB.jar context=file:/C:/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/jboss-5.1.0.GA/server/default/deploy/CustomerEAR.ear/CustomerEJB.jar]] delegates=null exported=[META-INF, com.example.sample.ejb, com.example.sample.mdb, com.example.sample.entity, CustomerJPA.jar.com.example.sample.entity, CustomerJPA.jar.META-INF] <IMPORT-ALL>NON_EMPTY}}


On Eclipse IDE I get the error,


Deployment "persistence.unit:unitName=CustomerEAR.ear/CustomerEJB.jar#CustomerJPA" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider from BaseClassLoader@2fcde7{VFSClassLoaderPolicy@76fff7{name=vfszip:/C:/jboss-5.1.0.GA/server/default/deploy/CustomerEAR.ear/


I come from JBoss forum and reading some similar issues I think it is a bug.
On the other hand I think I have to have somthing like CustomerJPA-ds.xml deployed on server/default/deploy folder
Perhaps it is a fixed bug and I need some *.xml configurations files.

I do not going to post the code. I just want to know what does the above error means.

Thanks in advance,
Jose
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Hi,

Excuse my words. I was working until three o'clock in the night and I was tired.

This is my persistence.xml,



And here is the code,

The EJB,



The MDB,


And the JSF backing bean,


Thanking in advance,

Best Regards,
Jose
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166



So you are trying to use Eclipse JPA as the persistence provider? Have you placed the EclipseLink jar files in JBOSS_HOME/common/lib folder?


[My Blog] [JavaRanch Journal]
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Thanks a lot.

I did what you said and I can deploy my ear file ok.

Now I am having problems with the MDB ConnectionFactory. I have set it up
from the admin-console and the JNDIName is NotificationtionQueueFactory.

But on runtime I get the following exception,

javax.ejb.EJBException: java.lang.RuntimeException: Unable to inject jndi dependency: env/com.example.sample.ejb.CustomerSessionBean/notificationQueueFactory into property com.example.sample.ejb.CustomerSessionBean.notificationQueueFactory: NotificationQueueFactory not bound



This is what the exception says about the JNDI,


javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: NotificationQueueFactory not bound]
org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1352)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:89)
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:61)
org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1086)
org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
org.jboss.ejb3.InfinitePool.get(InfinitePool.java:56)
org.jboss.ejb3.InfinitePool.get(InfinitePool.java:51)
org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:53)
org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:93)
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)
org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
$Proxy348.retrieve(Unknown Source)
com.customerapp.web.CustomerList.getCustomers(CustomerList.java:61)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
org.apache.el.parser.AstValue.getValue(AstValue.java:118)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
javax.faces.component.UIData.getValue(UIData.java:609)
javax.faces.component.UIData.getDataModel(UIData.java:1124)
javax.faces.component.UIData.setRowIndex(UIData.java:451)
com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:77)
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
javax.faces.component.UIData.encodeBegin(UIData.java:962)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
org.apache.jsp.index_jsp._jspService(index_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


Is this meanig I have to use a Properties class to set up the InitialContext?

Thanking in advance,
Jose
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Hello Jaikiran,

I have resolved the issue. This is what I did,

#1 In NotificationQueueFactory-ds.xml I changed the tag

<use-java-context>false</use-java-context>


Default was in true

#2 In the code, now, I call to ConnectionFactory instead of NotificationQueueFactory,



Thanks a lot. Excuse me if I did not help you in everything you need to help me.

Best Regards,
Jose
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

Good to know, you solved the issue

Jose Alvarez de Lara wrote:

Thanks a lot. Excuse me if I did not help you in everything you need to help me.



Actually have been flooded with work, this whole week. So just could not find enough time to look into the details that you posted previously.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error when deploying an EAR on JBoss 5.1.0