Hi,
I’m getting compilation error in the following code:
public static final void runAdapter( IData pipeline ) throws ServiceException
{
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String adaptorName = IDataUtil.getString( pipelineCursor, “adaptorName” );
Properties propertyObj = (Properties) IDataUtil.get( pipelineCursor, “propertyObj” );
pipelineCursor.destroy();
String successFlag = “TRUE”;
System.out.println(“About to invoke adapter”);
writeLog(“About to invoke adapter”);
try{
System.out.println("props = " + propertyObj);
// RunAdaptor adaptor = new RunAdaptor(adaptorName, propertyObj);
ShutdownRunAdaptor adaptor = new ShutdownRunAdaptor(adaptorName, propertyObj);
System.out.println(“Instance created”);
writeLog("Instance created ");
adaptor.run();
System.out.println("Adapter running... About to terminate");
writeLog("Adapter running... About to terminate");
adaptor.getController().terminate();
System.out.println("Adapter terminated");
writeLog("Adapter terminated");
}catch (IbafException ibe){
successFlag = "FALSE";
ibe.printStackTrace();
writeLog("In 1st Catch Block");
throw new ServiceException("IbafException " + ibe.getMessage());
}catch (ClassCastException cce){
successFlag = "FALSE";
cce.printStackTrace();
writeLog("In 2nd Catch Block");
throw new ServiceException(" ERROR IN CREATING THE LOCALSOURCE;CHECK COMPONENT NAME AND LOGGING " + cce.getMessage());
}catch(Exception e){
successFlag = "FALSE";
e.printStackTrace();
writeLog("In 3rd Catch Block");
throw new ServiceException(" ERROR IN SETUP OF THE IBUSADAPTOR " + e.getMessage());
}
// pipeline
IDataCursor pipelineCursor_1 = pipeline.getCursor();
IDataUtil.put( pipelineCursor_1, “successFlag”, successFlag );
pipelineCursor_1.destroy();
}
Can any one please compile this code and tell me why i’m getting the following error.
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:26: testing is not abstract and does not override abstract method close() in java.io.Writer
public final class testing
[FONT=Arial] [1]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:140: cannot find symbol
symbol : method writeLog(java.lang.String)
location: class testing
writeLog(“About to invoke adapter”);
[FONT=Arial] [2]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:145: cannot find symbol
symbol : class RunAdaptor
location: class testing
RunAdaptor adaptor = new RunAdaptor(adaptorName, propertyObj);
[FONT=Arial] [3]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:145: cannot find symbol
symbol : class RunAdaptor
location: class testing
RunAdaptor adaptor = new RunAdaptor(adaptorName, propertyObj);
[FONT=Arial] [4]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:148: package org.jpedal.utils does not exist
org.jpedal.utils.LogWriter.writeLog("Instance created ");
[FONT=Arial] [5]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:152: cannot find symbol
symbol : method writeLog(java.lang.String)
location: class testing
writeLog(“Adapter running… About to terminate”);
[FONT=Arial] [6]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:156: cannot find symbol
symbol : method writeLog(java.lang.String)
location: class testing
writeLog(“Adapter terminated”);
[FONT=Arial] [7]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:160: cannot find symbol
symbol : variable ibe
location: class testing
ibe.printStackTrace();
[FONT=Arial] [8]
C:\Program Files\webMethods6\IntegrationServer\packages\DBADAPTER\code\source\testing.java:162: cannot find symbol
symbol : variable ibe
location: class testing
throw new ServiceException("IbafException " + ibe.getMessage());
[FONT=Arial] [9]
9 errors
Should I use any jar files for this?I am new to web methods and also to java services.Please let me know what needs to be done.