-
15. Re: Application not getting deployed
jaikiran Dec 11, 2013 2:04 AM (in response to sachin.dhingra)1 of 1 people found this helpfulPerhaps you are running into a problem similar to [WFLY-917] jboss-ejb3.xml faults fail silently and result in a hanging thread - JBoss Issue Tracker?
What does the code in TimerServiceBean look like? Does it depend/inject (either via annotation or deployment descriptor) some other bean or resource (which might not yet be ready)?
-
16. Re: Re: Re: Application not getting deployed
sachin.dhingra Dec 14, 2013 10:26 PM (in response to jaikiran)Another observation:
The code is hanging when it is trying to do a lookup for an EJB (also other than TimerServiceBean).
For all the bean it is showing the below similar bindings in server.log during application startup:
14:48:19,893 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named xxxCCQueuePosterBean in deployment unit subdeployment "xxxEJB.jar" of deployment "xxxServer.ear" are as follows: java:global/xxxServer/xxxEJB/xxxCCQueuePosterBean!com.xxx.yyy.zzz.sessionbean.IxxxCCQueuePosterBeanLocal java:app/xxxEJB/xxxCCQueuePosterBean!com.xxx.yyy.zzz.sessionbean.IxxxCCQueuePosterBeanLocal java:module/xxxCCQueuePosterBean!com.xxx.yyy.zzz.sessionbean.IxxxCCQueuePosterBeanLocal java:global/xxxServer/xxxEJB/xxxCCQueuePosterBean java:app/xxxEJB/xxxCCQueuePosterBean java:module/xxxCCQueuePosterBean 14:48:19,896 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named MailBean in deployment unit subdeployment "xxxEJB.jar" of deployment "xxxServer.ear" are as follows: java:global/xxxServer/xxxEJB/MailBean!com.xxx.yyy.commons.sessionbean.IMailBeanLocal java:app/xxxEJB/MailBean!com.xxx.yyy.commons.sessionbean.IMailBeanLocal java:module/MailBean!com.xxx.yyy.commons.sessionbean.IMailBeanLocal java:global/xxxServer/xxxEJB/MailBean java:app/xxxEJB/MailBean java:module/MailBean
My code that lookup is as follows:
InitialContext context = new InitialContext(); IMailBeanLocal mailBean = (IMailBeanLocal) context.lookup("java:app/xxxEJB/" + MailBean.class.getSimpleName()); mailBean.sendMail(fromEmailAddress, adminEmailAddresses,subject, mailContent, contentType);
But seems to be it is not working. I even tried using the other mentioned JNDI bindings but no luck.
When I used module level JNDI as shown above, it gave me below error:
2013-12-11T17:14:18:309, ERROR: The following validation errors were found: TimerServiceBean -- service jboss.naming.context.java.module.yyy.zzzWeb.TimerServiceBean 2013-12-11T17:14:18:310, DEBUG: The following validation errors were found: TimerServiceBean -- service jboss.naming.context.java.module.yyy.zzzWeb.TimerServiceBean javax.naming.NameNotFoundException: TimerServiceBean -- service jboss.naming.context.java.module.yyy.zzzWeb.TimerServiceBean at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:174) at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:122) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.xxx.yyy.commons.HUBConfigValidator.stopAllTimers(HUBConfigValidator.java:264) at com.xxx.yyy.listener.xxxServerApplicationListener.contextInitialized(xxxServerApplicationListener.java:123) at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 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:662) at org.jboss.threads.JBossThread.run(JBossThread.java:122)
-
17. Re: Re: Re: Application not getting deployed
sachin.dhingra Dec 14, 2013 11:09 PM (in response to jaikiran)I have created a test project similar to what my main project is but it only contains the listener and TimerServiceBean similar to original project and it worked fine when deployed.
So I think as JaiKiran mentioned there is some dependency or something which is not available and causing this problem. Is there any quicker way to know what bean or resoruce is ready and what is not?
Also for few of my jars in my ear lib directory i am facing below warnings:
09:11:51,720 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry ../lib/grouplayout.jar in /D:/Official/JBoss/jboss-eap-6.1.0/bin/content/xxxServer.ear/lib/xxx-commons.jar does not point to a valid jar for a Class-Path reference.
I don't know whether this is causing the main issue as these are coming xxx-commons.jar file has manifest.mf whose classpath entry points to ../lib/grouplayout.jar which is not present? Is it mandatory to resolve these error as this error is coming for jars which are not mine i.e., some third-party jars which i don't want to touch.
Along with that for my MDB's I am getting below warn messages:
09:11:52,705 WARN [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014105: ActivationConfigProperty ClientId will be ignored since it is not allowed by resource adapter: hornetq-ra 09:11:52,710 WARN [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014105: ActivationConfigProperty SubscriptionName will be ignored since it is not allowed by resource adapter: hornetq-ra 09:11:52,710 WARN [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014105: ActivationConfigProperty SubscriptionDurability will be ignored since it is not allowed by resource adapter: hornetq-ra
Because my MDB code is:
@MessageDriven(mappedName="jms/Test", activationConfig = { @ActivationConfigProperty(propertyName = "DestinationType", propertyValue = "javax.jms.Topic") ,@ActivationConfigProperty(propertyName = "SubscriptionDurability", propertyValue = "Durable") ,@ActivationConfigProperty(propertyName = "ClientId", propertyValue = "XXX") ,@ActivationConfigProperty(propertyName = "SubscriptionName", propertyValue = "Test")}) public class TestMDB implements MessageListener { @Resource MessageDrivenContext context; /** * Default constructor. */ public TestMDB() { }
Can this also cause the problem?
-
18. Re: Re: Re: Re: Re: Application not getting deployed
sachin.dhingra Dec 17, 2013 11:21 AM (in response to sachin.dhingra)Finally I got the solution. The problem was due to below error which it was not appearing in my log file when I copied the ear file to deployment-scanner folder and then started the server (in this case it hangs but no error)
JBAS014771: Services with missing/unavailable dependencies"
Then I changed my deployment process by starting the server when no ear is present in deployment-scanner folder and then placing ear file when server starts up which resulted me this error and after solving those it worked fine.
Thanks all of you guyz.
-
19. Re: Application not getting deployed
wdfink Dec 18, 2013 2:11 AM (in response to sachin.dhingra)Weird,
if you copy the EAR before starting the server that should make no difference. Do you have some deployment marker files in the folder? It is named <name of the ear>.doDeploy or another suffix?
If that behaviour is the same for EAP6.2 it will be good if you have a simple reproducer and file a JIRA issue
-
20. Re: Application not getting deployed
sachin.dhingra Dec 23, 2013 7:48 AM (in response to wdfink)Yes, That also sounds weird to me.
I will spare some time around Christmas to create a reproducer for this and try with EAP6.2 and see how it goes.