on 05-09-2005 12:36 PM
Hi @ll;
I try to implement a java mapping in SAP Xi 3.0;
by trying to use the "append-method of the StringBuffer class.
But the following error arises:
<b>java.lang.NoSuchMethodError; java.lang.StringBuffer: method append(C)Ljava/lang/Appendable; not found.</b>
Can anybody help me?
thanks
Jochen
I had same problem - StringBuffer seems to be not working under XI.
Finally I've found that I had wrong JRE at my specific project libraries. I've changed it from 1.6 to 1.4 and rebulid the source.
After uploading it to XI everytihng worked fine.
So, anyone - please check Your libriaries - that's the problem.
Best Regards,
Mikolaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jochen,
I am using string buffer in advance user defined java function as follows and the append function works fine.
===============================================
String NTTEXT = "";
StringBuffer tmpStr = new StringBuffer();
for(int i=0;i<a.length;i++)
{
tmpStr.append(a<i>);
}
result.addValue(tmpStr.toString());
================================================
Post your code sample of the appending part. Lets have a look.
thanks,
Sasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Does it work in your JDE (Eclipse) ?
Regards,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @ll;
I edited the code.
I try to append just the string "Hello World" to the StringBuffer!
-
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
public class TestMapping implements StreamTransformation {
String delemiter = new String(";");
/**
@see com.sap.aii.mapping.api.StreamTransformation#setParameter(Map)
*/
public void setParameter(Map arg0) {
}
public void execute(InputStream in, OutputStream out) throws StreamTransformationException {
try {
StringBuffer resultXML = new StringBuffer();
resultXML.append("HelloWorld");
DataOutputStream writeOut = new DataOutputStream(out);
writeOut.writeBytes(resultXML.toString());
} catch (Exception e) {
e.printStackTrace();
throw new StreamTransformationException("Exception during KeyMapping: (" + e.getClass().getName() + ") " + e.getMessage(), e);
}
}
}
-
Finally the same error arises!
thanks
Jochen
Hello!
I am having a very similar problem with StringBuffer in SAP WEB AS 6.40
Can somebody throw some light?
Details: java.lang.NoSuchMethodError: java.lang.StringBuffer.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder;
at com.test.framework.properties.PropertyManagerImpl.getProperties(PropertyManagerImpl.java:162)
at com.test.app.util.PropertiesHelper.getProperty(Unknown Source)
at jsp_login1120135922615._jspService(jsp_login1120135922615.java:26)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:467)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
Hey,
Even I am getting similar error in WebAs while using JAXB and HTTP sender in EJB Web Services.
Did u get any solution for that??
com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method test.
at com.ltitl.ejb.pvtosap.PV_to_SAP_WebServiceObjectImpl10.test(PV_to_SAP_WebServiceObjectImpl10.java:269)
at com.ltitl.ejb.pvtosap.PV_to_SAP_WebService_Stub.test(PV_to_SAP_WebService_Stub.java:233)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
at $Proxy316.test(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
Caused by: java.lang.NoSuchMethodError: java.lang.StringBuffer.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder;
at com.ltitl.jaxb.impl.runtime.SAXMarshaller.text(SAXMarshaller.java:278)
at com.ltitl.jaxb.impl.INSPWDTYProjectImpl.serializeBody(INSPWDTYProjectImpl.java:239)
at com.ltitl.jaxb.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
at com.ltitl.jaxb.impl.INSPWDTYObjDetailsImpl.serializeBody(INSPWDTYObjDetailsImpl.java:64)
at com.ltitl.jaxb.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
at com.ltitl.jaxb.impl.runtime.MarshallerImpl.write(MarshallerImpl.java:171)
at com.ltitl.jaxb.impl.runtime.MarshallerImpl.marshal(MarshallerImpl.java:144)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:66)
at com.ltitl.ejb.pvtosap.PV_to_SAP_WebServiceBean.sendDataToXI(PV_to_SAP_WebServiceBean.java:1397)
at com.ltitl.ejb.pvtosap.PV_to_SAP_WebServiceBean.test(PV_to_SAP_WebServiceBean.java:367)
at com.ltitl.ejb.pvtosap.PV_to_SAP_WebServiceObjectImpl10.test(PV_to_SAP_WebServiceObjectImpl10.java:253)
... 32 more
; nested exception is:
java.lang.NoSuchMethodError: java.lang.StringBuffer.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder;
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.