>> >The problem is this I have now got my servlet (jswdk-1.0.1 because
>>tomcat
>> >has/is cause me all manner of probs!) to invoke my createaccount method
>> >that
>> >reads in my XML file
>>using the
>>DOM
>> >and adds a new account to the DOM tree and writes (i.e save) the DOM
>>tree
>> >back to the XML file. Now this works fine upto a call to the save method
>> >from createaccount method. I have tested the createaccount method and
>>works
>> >when the createaccount method is not invoked by the servlet. So in
>>theory
>> >it
>> >should work when called by the servlet?? But NO, things are not that
>> >simple,
>> >Well can anybody help:
>> >the code for save looks like this:
>> >public static void save() {
>> >try{
>> >1       DOMSource source = new DOMSource(doc);
>> >2       FileOutputStream outstream = new FileOutputStream("acc.xml");
>> >3       StreamResult result = new StreamResult(outstream);
>> >4       TransformerFactory transfac = TransformerFactory.newInstance();
>> >5       Transformer trans = transfac.newTransformer();
>> >6       trans.transform(source,result);
>> >         }
>> >catch (Throwable e) {e.printStackTrace);}
>> >}
>> >Now I have traced the problem to line 6) and it is this line that throws
>>an
>> >exception so the method doesn't work, well the output is a
>> >blank acc.xml because of line 2).
>> >
>> >So does any body know why this does not work??? can transformer
>>interface
>> >not be used from the servlet or something??
The error (exception) that occurs when I try to run the
>transformer, it is this:
>
>java.lang.NoSuchMethodError
at org.apache.xpathDOM2Helper.getNamespaceOfNode(DOM2 Helper)
>
>What does this mean does it mean???? I am confused beacuse if the method
>works when not invoked by the servlet then it must be able to find the
>methods I have used what could this possibly mean ??
>
>PLEASE HELP
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to