-
1. Re: Jboss6 M5 Hornet ResourceAdapter issue
thunder.farmer Nov 11, 2010 1:09 AM (in response to thunder.farmer)package thunder.hornetq;import javax.ejb.ActivationConfigProperty;import javax.ejb.MessageDriven;import javax.jms.Message;import javax.jms.MessageListener;import javax.jms.TextMessage;import org.jboss.ejb3.annotation.ResourceAdapter;import javax.ejb.TransactionManagement;import javax.ejb.TransactionAttributeType;import javax.ejb.TransactionAttribute;import javax.ejb.TransactionManagementType;@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"),@ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),@ActivationConfigProperty(propertyName = "password", propertyValue = "guest")})@TransactionManagement(value= TransactionManagementType.CONTAINER)@TransactionAttribute(value= TransactionAttributeType.REQUIRED)@ResourceAdapter("jms-ra.rar")public class FirstMDB implements MessageListener {public FirstMDB() {}public void onMessage(Message message) {try {TextMessage textMessage = (TextMessage)message;String text = textMessage.getText();System.out.println("message " + text);} catch (Exception e) {e.printStackTrace();}}}package thunder.hornetq;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
import org.jboss.ejb3.annotation.ResourceAdapter;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionAttributeType;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionManagementType;
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "guest")})
@TransactionManagement(value= TransactionManagementType.CONTAINER)
@TransactionAttribute(value= TransactionAttributeType.REQUIRED)
@ResourceAdapter("jms-ra.rar")
public class FirstMDB implements MessageListener {
public FirstMDB() {
}
public void onMessage(Message message) {
try {
TextMessage textMessage = (TextMessage)message;
String text = textMessage.getText();
System.out.println("message " + text);
} catch (Exception e) {
e.printStackTrace();
}
}
}
-
2. Re: Jboss6 M5 Hornet ResourceAdapter issue
thunder.farmer Nov 11, 2010 2:04 AM (in response to thunder.farmer)Exception:
13:57:09,660 INFO [EJBContainer] STARTED EJB: thunder.hornetq.FirstMDB ejbName: FirstMDB13:57:10,253 WARN [HornetQActivation] Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@b1a911 destination=queue/testQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=guestpassword=**** maxSession=15): HornetQException[errorCode=105 message=Unable to validate user: guest for check type CONSUME for address jms.queue.testQueue]at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:287) [:6.0.0.20100911-M5]at org.hornetq.core.client.impl.ClientSessionImpl.internalCreateConsumer(ClientSessionImpl.java:1556) [:6.0.0.20100911-M5]at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:447) [:6.0.0.20100911-M5]at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:392) [:6.0.0.20100911-M5]at org.hornetq.core.client.impl.DelegatingSession.createConsumer(DelegatingSession.java:201) [:6.0.0.20100911-M5]at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:165) [:6.0.0.20100911-M5]at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:291) [:6.0.0.20100911-M5]at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:573) [:6.0.0.20100911-M5]at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172) [:6.0.0.20100911-M5]at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) [:6.0.0.20100911-M5]at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780) [:6.0.0.20100911-M5]at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45) [:6.0.0.20100911-M5]at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800) [:6.0.0.20100911-M5]at java.lang.Thread.run(Thread.java:619) [:1.6.0_10-rc]at org.jboss.threads.JBossThread.run(JBossThread.java:122) [:6.0.0.20100911-M5]13:57:10,690 INFO [xnio] XNIO Version 2.1.0.CR213:57:10,690 INFO [nio] XNIO NIO Implementation Version 2.1.0.CR213:57:11,033 INFO [remoting] JBoss Remoting version 3.1.0.Beta213:57:11,111 INFO [TomcatDeployment] deploy, ctxPath=/13:57:11,391 INFO [service] Removing bootstrap log handlers13:57:11,532 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-808013:57:11,641 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-800913:57:11,641 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.20100911-M5 "Neo"] Started in 1m:6s:452ms13:57:12,249 INFO [org.hornetq.ra.inflow.HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@b1a911 destination=queue/testQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=guest password=**** maxSession=15)13:57:12,468 INFO [org.hornetq.ra.inflow.HornetQActivation] Reconnected with HornetQ13:57:09,660 INFO [EJBContainer] STARTED EJB: thunder.hornetq.FirstMDB ejbName: FirstMDB
13:57:10,253 WARN [HornetQActivation] Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQRe
sourceAdapter@b1a911 destination=queue/testQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=guest
password=**** maxSession=15): HornetQException[errorCode=105 message=Unable to validate user: guest for check type CONSUME for address jms.
queue.testQueue]
at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:287) [:6.0.0.20100911-M5]
at org.hornetq.core.client.impl.ClientSessionImpl.internalCreateConsumer(ClientSessionImpl.java:1556) [:6.0.0.20100911-M5]
at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:447) [:6.0.0.20100911-M5]
at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:392) [:6.0.0.20100911-M5]
at org.hornetq.core.client.impl.DelegatingSession.createConsumer(DelegatingSession.java:201) [:6.0.0.20100911-M5]
at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:165) [:6.0.0.20100911-M5]
at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:291) [:6.0.0.20100911-M5]
at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:573) [:6.0.0.20100911-M5]
at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172) [:6.0.0.20100911-M5]
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) [:6.0.0.20100911-M5]
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780) [:6.0.0.20100911-M5]
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45) [:6.0.0.20100911-M5]
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800) [:6.0.0.20100911-M5]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_10-rc]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [:6.0.0.20100911-M5]
13:57:10,690 INFO [xnio] XNIO Version 2.1.0.CR2
13:57:10,690 INFO [nio] XNIO NIO Implementation Version 2.1.0.CR2
13:57:11,033 INFO [remoting] JBoss Remoting version 3.1.0.Beta2
13:57:11,111 INFO [TomcatDeployment] deploy, ctxPath=/
13:57:11,391 INFO [service] Removing bootstrap log handlers
13:57:11,532 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
13:57:11,641 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
13:57:11,641 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.20100911-M5 "Neo"] Started in 1m:6s:452ms
13:57:12,249 INFO [org.hornetq.ra.inflow.HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.horn
etq.ra.HornetQResourceAdapter@b1a911 destination=queue/testQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID
=null user=guest password=**** maxSession=15)
13:57:12,468 INFO [org.hornetq.ra.inflow.HornetQActivation] Reconnected with HornetQ
-
3. Re: Jboss6 M5 Hornet ResourceAdapter issue
clebert.suconic Nov 11, 2010 10:30 AM (in response to thunder.farmer)You need to setup the user/password at the users properties file. Look at the security integration for AS6. There's probably a doc about it.
-
4. Re: Jboss6 M5 Hornet ResourceAdapter issue
shelly.mcgowan Nov 12, 2010 12:02 PM (in response to clebert.suconic)Look at the JBoss AS 6 Security Guide .
-
5. Re: Jboss6 M5 Hornet ResourceAdapter issue
thunder.farmer Nov 14, 2010 9:37 PM (in response to shelly.mcgowan)Thanks, let me check....
-
6. Re: Jboss6 M5 Hornet ResourceAdapter issue
thunder.farmer Nov 15, 2010 5:39 AM (in response to thunder.farmer)According to my investigation, it turn out to be that this issue has nothing to do with JBoss Security.
Seems it exists from M3, http://community.jboss.org/message/544278#544278
At the point when JBoss server deploys MDB, the JMS queue is not ready for use.
I try it out in below way:
1. I start up the JBoss server first, and them deploy(by copying the jar) my MDB to default\deploy. Then everything works fine, no any exception.
2. If I deploy the MDB first, and then start up the JBoss server, I always get the exception "HornetQException[errorCode=105 message=Unable to validate user....".
Just put the comments here for newbies like me.
If anybody has different understandings regards this issue, pls correct me.
Thanks.
-
7. Jboss6 M5 Hornet ResourceAdapter issue -- JMS Queue NOT ready for use
ctron Jan 11, 2011 4:37 AM (in response to thunder.farmer)Any news or ideas on this issue?
It popped up for me when I upgraded from JBoss AS 6 CR1 to Final. Everything was OK with M5 and CR1 but I can't see any difference.
Hope someone can help.
tia
-
8. Re: Jboss6 M5 Hornet ResourceAdapter issue
sappo Jan 11, 2011 8:00 AM (in response to ctron)Hi,
for me worked to disable the security in the configuration.xml
<security-enabled>false</security-enabled>
It's only a workaround, so if someone finds a solution for this problem it would be nice to know.
//Kevin
-
9. Re: Jboss6 M5 Hornet ResourceAdapter issue
ctron Jan 11, 2011 9:22 AM (in response to sappo)Thanks a lot! ... this seems to help. Although I don't understand what is different between CR1 and Final here.
My collegue and I can both reproduce this issue starting with the Final release.
I hope someone has more details on this topic.
-
10. Re: Jboss6 M5 Hornet ResourceAdapter issue
vidy5300 Jan 26, 2011 4:10 PM (in response to ctron)I have the same issue on the AS 6 final release. I am using Spring JMS, and not an MDB, so the solution described in http://community.jboss.org/message/544278#544278 does not work for me. I am unable to find a solution for this.
I will give <security-enabled>false</security-enabled> a try. I too hope that someone would find a solution for this soon.