2

i'm get the following error when deploying my application with a JMS producer and consumer

com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : QueueName

I used the annotations below:

Producer

@Resource(name = "jms/EmailNotificationQueue", mappedName = "EmailNotificationQueue")
private Destination destination;

@Resource(name = "jms/QueueConnectionFactory")
private ConnectionFactory connectionFactory;

I then create the connection and start it before sending the message

Consumer

@MessageDriven(name = "EmailNotificationBean", activationConfig = {                                           
@ActivationConfigProperty(                                  
    propertyName="destinationType",                         
    propertyValue="javax.jms.Queue"),                       
@ActivationConfigProperty(                                  
    propertyName="destinationName",                         
    propertyValue="EmailNotificationQueue"),
@ActivationConfigProperty(
    propertyName="acknowledgeMode",
    propertyValue="CLIENT_ACKNOWLEDGE")

}   
,mappedName = "EmailNotificationQueue"                                                                               
)   
MaDa
  • 10,511
  • 9
  • 46
  • 84
n002213f
  • 7,805
  • 13
  • 69
  • 105
  • do you have a glassfish-resources.xml file in your classpath? when I created a JMS in Netbeans, it automatically added this files, which contains the jms configuration. It's located in 'Other Sources/setup'. I didn't have to manually create the Queue and QueueConnectionFactory – damian Jul 17 '13 at 13:22

1 Answers1

1

Have you manually created the Destination?

Log into the admin console, expand Resource, JMS Resources, then Destination Resources. You'll probably need to create a connection factory as well.

Preston
  • 3,273
  • 4
  • 26
  • 35
  • i could create the queue manually, but the spec does not talk about creating manually. Other servers will definitely create the queue on deployment. I saw a lot of people with the same issue, but there doesn't seem to an official solution about it. – n002213f Apr 20 '10 at 18:29