cancel
Showing results for 
Search instead for 
Did you mean: 

append error

Former Member
0 Kudos

StringBuffer x = new StringBuffer();

String entriesName = dataNode.getNodeInfo().getName();

x.append("<").append(entriesName).append(">\n");

why the above code is not working why it is giving the type abstractbuilder is not visible error in the third line.????

but if i replace third line of code with the following line it si not giving error.

x.append("<");

x.append(entriesName);

x.append(">\n");

but during deployment and execution it is throwing java.lang.NoSuchMethodError: java.lang.StringBuffer.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; exception.

Can anyone tell how to resolve the issue..

I have problem in toexcel method in export to excel..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

there is java version problem , may be you are working with java 1.4 and you need java 1.5 to solve this .

i hope you are working on NWDS 7.0 , and using java 1.4 ,

so instead of using

StringBuffer x = new StringBuffer();

String entriesName = dataNode.getNodeInfo().getName();

x.append("<">\n");

you can use this , try the below your problem should be solved

String x = new String();

String entriesName = dataNode.getNodeInfo().getName();

x.concat("<">\n");

i have faced the similar problem when working on export to excel application ,

i have used the above approach. you can even use jdk 1.5 but in the later stages when you are working

on other webdynpro applications you may face problem when you are using NWDS 7.0 & EP 7.0.

THANKS

Former Member
0 Kudos

I am using jdk 1.5 and nwds 7.01. Is this the reason shall i install jdk 1.4.???

Former Member
0 Kudos

hi

yes,you have to install jdk 1.4 for NWDS 7.0.14 to get rid of Absract string builder error.

Regards

sowmya

Former Member
0 Kudos

Thanks for the reply. But right now I cant change my whole project to jdk 1.4. I have use the concat concept. but while deploying it is trowing classcast exception.

Former Member
0 Kudos

hi

classcastexception , may be you have to typecast in your code , please post the line of code where you are

getting the error .

Answers (4)

Answers (4)

Former Member
0 Kudos

hi

i faced same problem for NWDS 7.0.14,

i changed my JRE version to 1.4,then that problem got resolved..

Regards

sowmya.

Former Member
0 Kudos

Check the JDK version you are using in NWDS. It must be the same version than on the J2EE engine.

Armin

Former Member
0 Kudos

Hi Nithya,

I assume that <"> with a new line is the text you want to be appended. If you want to append a double quote in a string you need to add a escape sequence

Your method should be

x.append("<\">\n");

Check this

http://www.cerritos.edu/jwilson/cis_182/Language_Resources/Java_Escape_Sequences.htm

Regards

Srini

Former Member
0 Kudos

How to resolve appen method issues.