Hi All,
I am calling SBO from TBO but it gives me NoClassDefFoundError. The code I have written is as below:
SBO Interface
public interface ITutorialSBO extends IDfService {
public void setAttributes(IDfSysObject sysObj, IDfSession session)
throws DfException;
}
SBO Implementation Class
public class TutorialSBO extends DfService implements ITutorialSBO {
public void setAttributes(IDfSysObject sysObj, IDfSession session)
throws DfException
{
sysObj.setTitle("Accessed from the SBO!");
sysObj.setAuthors(sysObj.getAuthorsCount(), "Bart Thierens");
}
}
TBO Interface
public interface ITutorialTBO extends IDfBusinessObject, IDfDynamicInheritance {
}
TBO Implementation Class
public class TutorialTBO extends DfDocument implements ITutorialTBO {
@Override
protected synchronized void doSave(boolean arg0, String arg1, Object[] arg2)
throws DfException
{
if(isNew())
{
// when the document is newly created, we will call the SBO
// and let it set the attributes
IDfSession session = getSession();
IDfClient client = session.getClient();
IDfSessionManager sessionMgr = session.getSessionManager();
String serviceName = ITutorialSBO.class.getName();
ITutorialSBO myService = (ITutorialSBO)client.newService(serviceName, sessionMgr);
myService.setAttributes(this, session);
}
super.doSave(arg0, arg1, arg2);
}
public String getVendorString()
{
return "Copyright Docbyte, 2010";
}
public String getVersion()
{
return "1.0";
}
public boolean isCompatible(String arg0)
{
return true;
}
public boolean supportsFeature(String arg0)
{
return true;
}
}
I have created these classes and interfaces in default source folder and I have deployed them using composer. I created module for TBO which has same name as my custom type and SBO module which has same name as my SBO interface i.e.ITutorialSBO but it gives me error like
java.lang.NoClassDefFoundError: ITutorialSBO
Please give me solution on this.
Thanks & Regards,
Anuradha