• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while deploying EJB3 mdb on Jboss 6

 
Panos Gouleas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like this is happening only if I start the server without the -Djboss.as.deployment.ondemand=false switch
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the entire exception stacktrace.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic