Hi,
I have this peculiar problem on my production version of Tomcat 3.1 and   
sadly I can't replicate this on my test server ;-(

I keep getting this error
2002-11-06 14:35:45 - Ctx( /transformer ): IllegalStateException in: R(   
/transformer + /servlet/transformer + null) Current state = FLUSHED, new   
state = CODING
appear in my tomcat jmv.stderr log file over and over again until this   
server crashes out of memory.

I have got a servlet that does some processing and constructs an xml   
document which then gets passed to a transforming servlet along with the   
location of an xsl file as attributes.
This error is being caused by the transform servlet it seems.

Other info.
Running IIS4 using Tomcat as NT service using isapi director which also   
gets loads of errors. Don't know if they are connected
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
[jk_isapi_plugin.c (554)]: HttpExtensionProc error, service() failed

The static files i.e. .xsl file is being served up by IIS


Any suggestions would be very welcome as I say this is now in production   
and crashing Tomcat several time a day.

TIA
Conrad



>>>Source code for servlet

import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import org.w3c.dom.Document;

public class transformer extends HttpServlet {

/**
* Initialize global variables
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
}

/**
* Process the HTTP Get request
*/
public void doGet(HttpServletRequest request, HttpServletResponse   
response) throws ServletException, IOException {
response.setContentType("text/html; charset=WINDOWS-1252");
PrintWriter out = response.getWriter();

Document doc = null;
String xsl = null;

try {
doc = (Document) request.getAttribute("xml");
xsl = (String) request.getAttribute("xsl");
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new StreamSource(xsl));
// Transformer transformer = factory.newTransformer();

transformer.transform(new DOMSource(doc), new StreamResult(out));

} catch (Exception e) {
e.printStackTrace();
}



out.close();
}


}


Thanks
Conrad  

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to