Develop and compiling my own Mbnode is OK - BUT RUNNING FAILS
Hello !
Platform: WSAD 5.1 java 1.4
Platform: MBtoolkit java 1.4
I'm developing my own MbNode from the typecal sample like
public class WorkflowEmulatorNode extends MbNode implements MbNodeInterface{
...... etc code shown in the bottom
}
I can build the project i WSAD without errors, but running the code
not successfully
NB! I have placed jplugin.jar i classpath etc.
I can't see the WorkflowEmulatorNode.class file any place in the project
Running the sample code in the MB toolkit environment fails too.
Platform: WSAD 5.1 java 1.4
java.lang.NoClassDefFoundError: com/ibm/broker/trace/Trace
at com.ibm.broker.plugin.MbNode.<init>(MbNode.java:76)
at WorkflowEmulatorNode.<init>(WorkflowEmulatorNode.java:6)
at WorkflowEmulatorNode.main(WorkflowEmulatorNode.java:64)
Exception in thread "main"
If You have any suggestions to what goes wrong please give
answer this question.
regards Tom Stevns Nielsen
Code shown below
*************************************************************************
import com.ibm.broker.plugin.*;
public class WorkflowEmulatorNode extends MbNode implements MbNodeInterface{
private String _attribute1, _attribute2;
public WorkflowEmulatorNode() throws MbException {
// create terminals here
createInputTerminal("in");
createOutputTerminal("out");
createOutputTerminal("failure");
}
public void evaluate(MbMessageAssembly assembly, MbInputTerminal in)
throws MbException
{
// do node processing here
// ...
// all nodes (except output nodes) should propagate a message assembly
// to the next node in the message flow via an output terminal.
MbOutputTerminal out = getOutputTerminal("out");
if(out != null)
out.propagate(assembly);
}
// the following static method declares the name of this node to the broker
public static String getNodeName()
{
return "ComIspSampleNode";
}
// by supplying the following two methods, the broker infers this node
// has an attribute named 'firstAttribute'.
public String getFirstAttribute()
{
return _attribute1;
}
public void setFirstAttribute(String attr)
{
_attribute1 = attr;
}
// by supplying the following two methods, the broker infers this node
// has an attribute named 'secondAttribute'.
public String getSecondAttribute()
{
return _attribute2;
}
public void setSecondAttribute(String attr)
{
_attribute2 = attr;
}
public void onDelete( )
{
// perform node clean up if necessary.
}
public static void main(String[] args) {
try {
WorkflowEmulatorNode wfen = new WorkflowEmulatorNode();
wfen.createInputTerminal("MyInput");
wfen.createOutputTerminal("MyOutput");
} catch (MbException e) {
// TODO: handle exception
}
}
}
Re: Develop and compiling my own Mbnode is OK - BUT RUNNING FAILS
In the meanwhile I have imported bipbroker.jar . It eliminates the
java.lang.NoClassDefFoundError: com/ibm/broker/trace/Trace
but afterwards another arises like:
java.lang.UnsatisfiedLinkError: _createInputTerminal
at com.ibm.broker.plugin.MbNode._createInputTerminal(Native Method)
at com.ibm.broker.plugin.MbNode.createInputTerminal(MbNode.java:137)
at WorkflowEmulatorNode.<init>(WorkflowEmulatorNode.java:8)
at WorkflowEmulatorNode.main(WorkflowEmulatorNode.java:64)
Exception in thread "main"
Very funny indeed ;o))
[email]tsn@atp.dk[/email] (Tom Stevns Nielsen) wrote in message news:<d4719509.0507070042.32b90b4e@posting.google.com>...[color=blue]
> Hello !
>
> Platform: WSAD 5.1 java 1.4
> Platform: MBtoolkit java 1.4
>
> I'm developing my own MbNode from the typecal sample like
>
> public class WorkflowEmulatorNode extends MbNode implements MbNodeInterface{
> ..... etc code shown in the bottom
> }
>
> I can build the project i WSAD without errors, but running the code
> not successfully
>
> NB! I have placed jplugin.jar i classpath etc.
>
> I can't see the WorkflowEmulatorNode.class file any place in the project
>
> Running the sample code in the MB toolkit environment fails too.
>
> Platform: WSAD 5.1 java 1.4
>
> java.lang.NoClassDefFoundError: com/ibm/broker/trace/Trace
> at com.ibm.broker.plugin.MbNode.<init>(MbNode.java:76)
> at WorkflowEmulatorNode.<init>(WorkflowEmulatorNode.java:6)
> at WorkflowEmulatorNode.main(WorkflowEmulatorNode.java:64)
> Exception in thread "main"
>
>
> If You have any suggestions to what goes wrong please give
> answer this question.
>
>
>
> regards Tom Stevns Nielsen
>
>
> Code shown below
> *************************************************************************
> import com.ibm.broker.plugin.*;
>
> public class WorkflowEmulatorNode extends MbNode implements MbNodeInterface{
> private String _attribute1, _attribute2;
>
> public WorkflowEmulatorNode() throws MbException {
> // create terminals here
> createInputTerminal("in");
> createOutputTerminal("out");
> createOutputTerminal("failure");
> }
>
> public void evaluate(MbMessageAssembly assembly, MbInputTerminal in)
> throws MbException
> {
> // do node processing here
> // ...
>
> // all nodes (except output nodes) should propagate a message assembly
> // to the next node in the message flow via an output terminal.
> MbOutputTerminal out = getOutputTerminal("out");
> if(out != null)
> out.propagate(assembly);
> }
>
> // the following static method declares the name of this node to the broker
> public static String getNodeName()
> {
> return "ComIspSampleNode";
> }
>
> // by supplying the following two methods, the broker infers this node
> // has an attribute named 'firstAttribute'.
> public String getFirstAttribute()
> {
> return _attribute1;
> }
>
> public void setFirstAttribute(String attr)
> {
> _attribute1 = attr;
> }
>
> // by supplying the following two methods, the broker infers this node
> // has an attribute named 'secondAttribute'.
> public String getSecondAttribute()
> {
> return _attribute2;
> }
>
> public void setSecondAttribute(String attr)
> {
> _attribute2 = attr;
> }
>
> public void onDelete( )
> {
> // perform node clean up if necessary.
> }
> public static void main(String[] args) {
>
> try {
>
> WorkflowEmulatorNode wfen = new WorkflowEmulatorNode();
> wfen.createInputTerminal("MyInput");
> wfen.createOutputTerminal("MyOutput");
> } catch (MbException e) {
> // TODO: handle exception
> }
>
> }
>
>
> }[/color]
Re: Develop and compiling my own Mbnode is OK - BUT RUNNING FAILS
In the meanwhile I have imported bipbroker.jar . It eliminates the
java.lang.NoClassDefFoundError: com/ibm/broker/trace/Trace
but afterwards another arises like:
java.lang.UnsatisfiedLinkError: _createInputTerminal
at com.ibm.broker.plugin.MbNode._createInputTerminal(Native Method)
at com.ibm.broker.plugin.MbNode.createInputTerminal(MbNode.java:137)
at WorkflowEmulatorNode.<init>(WorkflowEmulatorNode.java:8)
at WorkflowEmulatorNode.main(WorkflowEmulatorNode.java:64)
Exception in thread "main"
Very funny indeed ;o))
[email]tsn@atp.dk[/email] (Tom Stevns Nielsen) wrote in message news:<d4719509.0507070042.32b90b4e@posting.google.com>...[color=blue]
> Hello !
>
> Platform: WSAD 5.1 java 1.4
> Platform: MBtoolkit java 1.4
>
> I'm developing my own MbNode from the typecal sample like
>
> public class WorkflowEmulatorNode extends MbNode implements MbNodeInterface{
> ..... etc code shown in the bottom
> }
>
> I can build the project i WSAD without errors, but running the code
> not successfully
>
> NB! I have placed jplugin.jar i classpath etc.
>
> I can't see the WorkflowEmulatorNode.class file any place in the project
>
> Running the sample code in the MB toolkit environment fails too.
>
> Platform: WSAD 5.1 java 1.4
>
> java.lang.NoClassDefFoundError: com/ibm/broker/trace/Trace
> at com.ibm.broker.plugin.MbNode.<init>(MbNode.java:76)
> at WorkflowEmulatorNode.<init>(WorkflowEmulatorNode.java:6)
> at WorkflowEmulatorNode.main(WorkflowEmulatorNode.java:64)
> Exception in thread "main"
>
>
> If You have any suggestions to what goes wrong please give
> answer this question.
>
>
>
> regards Tom Stevns Nielsen
>
>
> Code shown below
> *************************************************************************
> import com.ibm.broker.plugin.*;
>
> public class WorkflowEmulatorNode extends MbNode implements MbNodeInterface{
> private String _attribute1, _attribute2;
>
> public WorkflowEmulatorNode() throws MbException {
> // create terminals here
> createInputTerminal("in");
> createOutputTerminal("out");
> createOutputTerminal("failure");
> }
>
> public void evaluate(MbMessageAssembly assembly, MbInputTerminal in)
> throws MbException
> {
> // do node processing here
> // ...
>
> // all nodes (except output nodes) should propagate a message assembly
> // to the next node in the message flow via an output terminal.
> MbOutputTerminal out = getOutputTerminal("out");
> if(out != null)
> out.propagate(assembly);
> }
>
> // the following static method declares the name of this node to the broker
> public static String getNodeName()
> {
> return "ComIspSampleNode";
> }
>
> // by supplying the following two methods, the broker infers this node
> // has an attribute named 'firstAttribute'.
> public String getFirstAttribute()
> {
> return _attribute1;
> }
>
> public void setFirstAttribute(String attr)
> {
> _attribute1 = attr;
> }
>
> // by supplying the following two methods, the broker infers this node
> // has an attribute named 'secondAttribute'.
> public String getSecondAttribute()
> {
> return _attribute2;
> }
>
> public void setSecondAttribute(String attr)
> {
> _attribute2 = attr;
> }
>
> public void onDelete( )
> {
> // perform node clean up if necessary.
> }
> public static void main(String[] args) {
>
> try {
>
> WorkflowEmulatorNode wfen = new WorkflowEmulatorNode();
> wfen.createInputTerminal("MyInput");
> wfen.createOutputTerminal("MyOutput");
> } catch (MbException e) {
> // TODO: handle exception
> }
>
> }
>
>
> }[/color]