Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream

sansandy03

Location : India
Member since : Apr 23, 2006
Messages : 1
 Apr 23, 2006 at 2:46 PM
Hi,
I am using the below code to regenerate or to get an dynamically generated image:

URL url = new URL(s);
PJAToolkit pjatoolkit = new PJAToolkit();
Image image = pjatoolkit.createImage(url);

where s is the url of the servlet which generates the dynamic .png chart image

i.e s = "http://203.120.153.16/SDS/Chart?Pane1=50;(Study,CBI.N|TRDPRC_1,SMA,200,GREEN,OHLC)&ChartType=HISTORICAL&FillColor=PINK&GridColor=YELLOW&TextColor=YELLOW&DataRepresentation=Charts"

In my case there is not need for the proxy server and port number. I can execute the remote servlet directly without using any proxies.

while exection i am getting the following error, please help me.

java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream
com.eteks.awt.PJAGraphicsManager.getImage(PJAGraphicsManager.java:809)
com.eteks.awt.PJAGraphicsManager.createImage(PJAGraphicsManager.java:831)
com.eteks.awt.PJAToolkit.createImage(PJAToolkit.java:607)
MyImg.service(MyImg.java:46)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


I am using tomcat server for my servlet execution.



---
Thanks & Regards
-Sandeep


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation