cancel
Showing results for 
Search instead for 
Did you mean: 

CAFFindException - java.lang.NoClassDefFoundError

Former Member
0 Kudos

Hello people,

I trying to call a finder method of a EJB generated with CAF. I have created a standard WD DC. The code of my method is below. The name of the method I am calling is findByNivelClasificacion, that throws a CAFFindException. In order to compile the method I have added in the <b>Used DCs</b> of my WD project: /caf/runtime/impl (CAFRuntimeAPI). At runtime the error is <b>java.lang.NoClassDefFoundError: com/sap/caf/rt/exception/CAFFindException</b>. I also put <b>sap.com/cafruntimeimpl</b> in the section Web Dynpro - Sharing References of my project properties. Dont worked. Can u help me?

public void onActionEnviar(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionEnviar(ServerEvent)

	TeraPlanLocal teraPlanLocal = null;

	IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();

	try {


	Context ctx = new javax.naming.InitialContext();


	TeraPlanLocalHome teraPlanLocalHome = (TeraPlanLocalHome ) ctx.lookup("localejbs/realt.com/TeraPlan/TeraPlan");

	
	teraPlanLocal = teraPlanLocalHome.create();

	ArrayList a = new ArrayList();

	Nodo n = new Nodo();
	
	n = (Nodo)(teraPlanLocal.findByNivelClasificacion(wdContext.currentContextElement().getInput()).get(0));

	wdContext.currentContextElement().setOutput(n.getNombre());


	} catch (CreateException e) {

	msgMgr.reportSuccess(e.getMessage());

	e.printStackTrace();

	} catch (NamingException e) {

	msgMgr.reportException(e.getMessage(), false);

	e.printStackTrace();

	}
	
	catch(Exception e)
	{
		msgMgr.reportException(e.getMessage(), false);

		e.printStackTrace();
		
	}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Ivan,

Do you have a runtime reference to cafruntimeear?

If you have further questions please do not hesitate to contact me.

Best regards,

Renny

Former Member
0 Kudos

Hello Renny,

Yes, I have a reference to that. I will give up by now and try another path. Im going to generate Web Services from the CAF Services and call them. Anyway, thanks for your response.

Best regards,

Ivan

> Hello Ivan,

>

> Do you have a runtime reference to cafruntimeear?

> If you have further questions please do not hesitate

> to contact me.

>

> Best regards,

> Renny

Answers (0)