| Author |
Error while deploying EJB3 mdb on Jboss 6
|
Panos Gouleas
Greenhorn
Joined: May 10, 2011
Posts: 4
|
|
I have a simple MDB in a jar file and when I try to deploy it on Jboss 6, I get the following error:
Deployment "jboss.j2ee:jar=panos-ejb.jar,name=TopicListenerBean,service=EJB3" is in error due to the following reason(s): java.lang.IllegalArgumentException: EntityManagerFactory cannot be null
My beans code is the following
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "panosTopic"),
@ActivationConfigProperty(propertyName = "isTopic",
propertyValue = "true")}
)
public class TopicListenerBean implements MessageListener {
Logger logger = Logger.getLogger(TopicListenerBean.class);
@Override
public void onMessage(Message inputMessage) {
TextMessage message = (TextMessage)inputMessage;
try {
logger.info("MESSAGE: " + message.getText());
} catch (JMSException e) {
logger.error("Cannot process message: " + e);
}
}
}
I don't have any deployment descriptors included, since this is an EJB3 mdb, and I am trying to deploy by copying my jar file in the server\default\deploy directory of Jboss 6.
Does anyone have an idea, what am I missing?
|
 |
Panos Gouleas
Greenhorn
Joined: May 10, 2011
Posts: 4
|
|
|
It looks like this is happening only if I start the server without the -Djboss.as.deployment.ondemand=false switch
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8145
|
|
Please post the entire exception stacktrace.
|
[My Blog] [JavaRanch Journal]
|
 |
 |
|
|
subject: Error while deploying EJB3 mdb on Jboss 6
|
|
|