cancel
Showing results for 
Search instead for 
Did you mean: 

Exception: model node element cannot be created without a model instance

Former Member
0 Kudos

Hi experts,

I'm making WD app with EJB model. I've done it before but now I have a problem. In the wdDoInit method of the component controller I create model instance and put it in the modelInstanceMap of the component and also the cardinality of my request nodes is 1..1. So I think everything should be fine but I get model node element cannot be created without a model instance error. The only difference from previous cases is that now I use one ejb app as back-end to two different WD apps but the first one is still working. Any ideas will be appreciated. My coding in the wdDoInit method is:

MyModel myModel = new MyModel();
		wdComponentAPI
				.getModelInstanceMap()
				.putDefaultInstance(
						"com.sap.demo.app.wd.models.mymodel.MyModel",
						myModel);

Regards,

Martin

Edited by: musaka on Oct 28, 2009 11:31 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi guys,

I resolved my problem. It turns out that when I'm using common EJB Module with several WD apps I need to pack it in separate EJB Application for each one of them and deploy them on the server. This make sense I just wasn't thinking about that.

Regards,

Martin

Edited by: musaka on Oct 28, 2009 1:29 PM

Former Member
0 Kudos

can you give some sample code?

or SCA