No more output streams available error
I have created a class to connect to a webserver extending the Thread class now using that i am trying to send data to the server with a timere task every 5 seconds first time works fine but when it tries to send for the second time it gives me an error saying. java.io.IOException: no more output streams available
can any one help me how to get rid of this. The line
connection.openDataOutputStream() is where things go wrong.
this is the problamatic code
try {
OutputStream ostr = connection.openDataOutputStream();
DataOutputStream os = new DataOutputStream(ostr);
os.writeInt(5);
//os.flush();
os.close();
catch (IOException ex) {
ex.printStackTrace();
when this part executes for the first time things are just fine but the second time it gives the no stream available exception at connection.openDataOutputStream()thanks 4 ur reply.can u look into this code if u could.
Similar Messages
-
Error flushing the output stream in Sun One server
Hi All,
I was running my servlet code in iPlanet 6.0 version and it was working fine. I upgraded my web server to new Sun One server (Oracle-iPlanet-Web-Server-7.0.9). With the new web server almost 90% of my application works fine, but there is a features in my application to download an Excel sheet by clicking a button. This feature is failing in new Sun One web server.
Below are my piece of code and the error log I m getting. Can anyone tell me how I can fix this error, I mean is there any web server specific change or configuration parameter need to be set.
Please ask for any information regarding my server configuration settings if needed for finding a solution for this
Code:
byte abyte0[] = new byte[1024];
BufferedInputStream bufferedinputstream=null;
BufferedOutputStream bufferedoutputstream=null;
java.io.InputStream inputstream = httpurlconnection.getInputStream();
bufferedinputstream = new BufferedInputStream(inputstream);
bufferedoutputstream = new BufferedOutputStream(httpservletresponse.getOutputStream());
int j;
long byteCount=0;
while((j = bufferedinputstream.read(abyte0, 0, 1024)) != -1)
byteCount=byteCount+j;
if(logger != null && logger.traceOn())
logger.log("total"+byteCount);
logger.log("Read bytes:"+j);
bufferedoutputstream.write(abyte0, 0, j);
if(logger != null && logger.traceOn())
logger.log("Wrote bytes:"+j);
bufferedoutputstream.flush(); // <<<<<< ERROR POINT >>>>>>
Error Log :
ClientAbortException: java.io.IOException: WEB8004: Error flushing the output stream
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:343)
at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:313)
at org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:147)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at com.reuters.bdec.as.ASRequestHandler.processResponse(ASRequestHandler.java:285)
at com.reuters.bdec.as.ASRequestHandler.initiateGetRequest(ASRequestHandler.java:89)
at com.reuters.bdec.as.ASRequestHandler.proceedToDestination(ASRequestHandler.java:220)
at com.reuters.bdec.as.ASExtension.authorisationCheck(ASExtension.java:84)
at com.reuters.bdec.as.ASExtension.doGet(ASExtension.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:794)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:915)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
Caused by: java.io.IOException: WEB8004: Error flushing the output stream
at com.sun.webserver.connector.nsapi.NSAPIProcessor.action(NSAPIProcessor.java:243)
at org.apache.coyote.Response.action(Response.java:197)
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:339)
... 20 moreDon't flush it yourself. The servlet container will automatically flush for you once its send buffer is full. You can change the size of the send buffer though.
-
Facing error in creating ObjectInput/output stream socket
hi I am Jatandar and i am implemeint client server program which will be using object Input/Output stream to pass data through sockets . The problem is the i m getting error when the cleint connects to the server here is the server and client code , YOur help will be appreciated
Inventory class with serializable has been implemented
public class Client
public static void main( String [] args )//throws IOException
Inventory invt[];
try
Socket serv = new Socket( "localhost", 8000 );
// connect to server at port 8000
ObjectInputStream ois ;
ois= new ObjectInputStream(serv.getInputStream());
invt=(Inventory[]) ois.readObject() ;
System.out.println(invt[0]);
catch(IOException e )
System.out.println(" no server Found \n");
catch(Exception e)
System.out.println(e);
public class A3Server
public static void main(String arg[] ) throws IOException
//create a Server Socet
ServerSocket ss= new ServerSocket(8000) ;
ObjectOutputStream oos;
//create a clent Socker that will listen for connection
//listen for the connection from client
BufferedReader br=null;
FileReader fr=null;
LinkedList ll=new LinkedList();
StringTokenizer stkr;
int i=0;
Inventory inv=new Inventory();
Inventory invt[];
String t[]=new String[5];
boolean choice=true;
String temp="",temp2;
// i am reading a text which contain data
//that data is stored in invt []
//that array is transfered to clien t when it is connected
Socket toClient= ss.accept();
oos = new ObjectOutputStream(toClient.getOutputStream());
oos.writeObject(invt );
oos.close();
}// end of main fucniton
}//end of Server class
DETAIL OF ERROR
error in natived socket write methodhi I am Jatandar and i am implemeint client server program which will be using object Input/Output stream to pass data through sockets . The problem is the i m getting error when the cleint connects to the server here is the server and client code , YOur help will be appreciated
Inventory class with serializable has been implemented
public class Client
public static void main( String [] args )//throws IOException
Inventory invt[];
try
Socket serv = new Socket( "localhost", 8000 );
// connect to server at port 8000
ObjectInputStream ois ;
ois= new ObjectInputStream(serv.getInputStream());
invt=(Inventory[]) ois.readObject() ;
System.out.println(invt[0]);
catch(IOException e )
System.out.println(" no server Found \n");
catch(Exception e)
System.out.println(e);
public class A3Server
public static void main(String arg[] ) throws IOException
//create a Server Socet
ServerSocket ss= new ServerSocket(8000) ;
ObjectOutputStream oos;
//create a clent Socker that will listen for connection
//listen for the connection from client
BufferedReader br=null;
FileReader fr=null;
LinkedList ll=new LinkedList();
StringTokenizer stkr;
int i=0;
Inventory inv=new Inventory();
Inventory invt[];
String t[]=new String[5];
boolean choice=true;
String temp="",temp2;
// i am reading a text which contain data
//that data is stored in invt []
//that array is transfered to clien t when it is connected
Socket toClient= ss.accept();
oos = new ObjectOutputStream(toClient.getOutputStream());
oos.writeObject(invt );
oos.close();
}// end of main fucniton
}//end of Server class
DETAIL OF ERROR
error in natived socket write method -
Error-No more storage space available for extending an internal table.
Hi Experts,
i am facing problem in a program . its showing runtime error.
Short text
No more storage space available for extending an internal table.
its showing error at
IF sy-subrc NE 0.
REFRESH p_wip_tab.
ELSE.
i_wip_tab-pspnr = i_internal_and_external-pspnr_prps.
LOOP AT p_wip_tab.
MOVE-CORRESPONDING p_wip_tab TO i_wip_tab.
==> APPEND i_wip_tab.
ENDLOOP.
ENDIF.
DATA: l_billable_tab LIKE p_billable_tab OCCURS 0 WITH HEADER LINE,
p_wip_tab LIKE zpswip OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF i_wip_tab OCCURS 0,
pspnr LIKE prps-pspnr.
INCLUDE STRUCTURE zpswip.
DATA: pernr_name LIKE pa0002-vorna,
END OF i_wip_tab.
How i can resolve this problem if anybody knows it then please reply me as soon as possible.
ThanksHello.
Probably you fill the internal table with too much data and it cannot hold that much.
You can either redesign the program so that it processes the data in batches of, say 100000 records, or contact your BASIS team and ask for their help. They could possible assign more memory to the running applications.
Reward if helpful.
Regards,
George -
IO error: Socket output stream shutdown by peer when trying to import DCs
Hi,
I am getting this error when trying to import DCs.
com.sap.lcr.api.cimclient.CIMClientException: IO error: Socket output stream shutdown by peer
I am specifying the SDM host, similar to J2EE URL I guess along with SDM port in Development configuration pool URL.
Can some one guide me if I am missing some thing or some thinkg else is going wrong.
Any help or suggestion will be very helpful to me.
Thanks and regards,
ChinnuHi Nithn,
Thank you for the response.
It is due to issue in track configuration.
Build Server and Repository server URLs are not Fully qualified domain names.
Made a host entry and I was able to import the configuration.
Thanks and regards,
Chinnu -
Error flushing output stream when stop button is used
Hello,
I have a servlet running on the Sun ONE Web server 6.1 that throws this error message: "java.io.IOException: WEB8004: Error flushing the output stream".
Through my testing, it seems as if this is caused by the user pressing the stop button before the output can be completely commited to the client. Strangely enough the error seems to thrown when IE is the browser but not when Firefox is. My guess is that what is happening is the client connection is closed when stop is pressed in IE and the server cannot write to the client anymore so the error is thrown.
I was wondering if anyone has any insight into how to prevent this from getting thrown. I realize that this error is not a major thing and probably doesn't need to be worried about, but it is quite annoying because webmaster gets emailed anytime an exception is thrown so cutting down on pointless exceptions is something we like to do :)
Thanks in advance.Hay, did you ever figure it out. I am getting it when one user hits my Servlet to download a specific piece of data????? I can't figure it out?
Thanks for the info,
Jeff -
Java.lang.IllegalStateException : output stream already retrived Error
Hi All
I am trying to integrate crystal reports 10g with oracle 10g AS.My application works fine on TOMCAT 4.1.31,but when I depoly in oracle 10G AS,it shows the following exception
Java.lang.IllegalStateException : output stream already retrived.
Any suggestions?
Regards
MohanHello,
Awaiting help.
Thanks and Regards
Mohan -
Sharing an output stream from more than 1 thread.
I have a problem, an ObjectOutputStream is giving me a nullpointerexception.
I have a thread which connects to a server application and uses object input/output streams to communicate. This thread will deal with any incoming requests from the server concurrently from the main program. I presumed you could use the same Socket connection that was created in this thread to send objects from other threads (for example the main thread) but I think I presumed wrong.
This is part of the class which runs as a separate thread:
public void connect()
try
mainSocket = new Socket(hostName, hostPort);
in = new ObjectInputStream(mainSocket.getInputStream());
out = new ObjectOutputStream(mainSocket.getOutputStream());
catch(UnknownHostException e)
System.out.println(e.getMessage());
catch(IOException e)
System.out.println(e.getMessage());
public void run()
connect();
while(true)
// (Not complete)
public boolean verifyEmployeeName(String employeeName)
boolean answer = false;
try
out.writeObject(Server.protocol.VERIFY_EMPLOYEE);
out.writeObject(employeeName);
answer = in.readBoolean();
catch(IOException e)
return answer;
}The verifyEmployeeName() method is called externally from the main thread and generates the IOException at out.writeObject(Server.protocol.VERIFY_EMPLOYEE); (or the first point at which the socket is used). Anyway my question is; do you have to create a new socket for each thread (bear in mind I haven't yet put in synchronization features) or is this nothing to do with that?
Very grateful for any help you have to offer.alex.p wrote:
Anyway my question is; do you have to create a new socket for each thread (bear in mind I haven't yet put in synchronization features) Not necessarily. But you'll have to sequentialise the communication.
Create a communication thread. Give it the control over the socket. Have it expose a BlockingQueue that takes some form of "tasks". As a thread, that communicator polls its queue, and executes the tasks. Other threads post their tasks on the queue and wait until they're completed. Look for clues in the java.util.concurrent package. -
Getting the Output Stream of a Process without exec()ing it first.
Hi there,
I am writing a java application which needs to open another application "gnuplot". Now my operating system is windows and I open pgnuplot .
Also I want to send input to the above gnuplot (say plot sin(x) ) via the outputStream. The following is what I do :-
String gnuplot_cmd = "plot sin(x)\n" ;
Process p = Runtime.getRuntime().exec("C:/gnuplot/gnuplot4/bin/pgnuplot.exe");
PrintWriter gp = new PrintWriter(p.getOutputStream());
gp.print(gnuplot_cmd);
gp.close();
But the above doesn't work fully , in that only the blank wgnuplot terminal window pops up however I am unable to direct input to the gnuplot application.
The reason being that , pgnuplot checks for
its stdin being redirected the moment it's started. If, at that time,
the "PrintWriter" is not yet connected to the OutputStream of the
process, that check will fail, and pgnuplot will revert to just executing
wgnuplot, without any command line redirection.
I am facing a problem of how to attach a OutputStream to the process, without getting exec()ing the process.
Is there anyway at all, i can get a process without starting it, so that I can attach an output Stream to it before it gets executed?
I am open to work arounds, anything that will automate the process of writing to the gnuplot terminal.
thanks!
nandita.The reason being that , pgnuplot checks for
its stdin being redirected the moment it's started.
If, at that time,
the "PrintWriter" is not yet connected to the
OutputStream of the
process, that check will fail, and pgnuplot will
revert to just executing
wgnuplot, without any command line redirection. I'm not convinced this analysis is correct. gnuplot doesn't need to know that there's a PrintWriter there, and it probably can't know. It just needs to know whether its standard input is coming from console or not. The Java library code that can invoke processes probably handles the redirect right away, and that's why there's the OutputStream available even before you create the PrintWriter.
exec can be tricky. I think the problem may be that you're not dealing with standard output or standard error. Read this:
When Runtime Exec Won't
If that still doesn't help, there may be options to gnuplot to tell it exactly where its input is coming from. -
Socket output stream shutdown by peer
Hi all,
I'm trying to import ESS component into CMS transport studio development track. All other components are properly imported(EP_BUILDT,SAP_JTECHS,SAP_JEE,SAP_BUILDT).
The ESS import is getting failed with following error:
"Fatal Exception:com.sap.cms.tcs.interfaces.exceptions.TCSCommunicationException: communication error: VcmFailure received: Communication error [cause: Socket output stream shutdown by peer.]"
The detailed stack trace is:
Info:Starting Step Repository-import at 2006-12-06 16:23:56.0049 +5:00
Info:Component:sap.com/SAP_ESS
Info:Version :MAIN_ERP05VAL_C.20060127161543
Info:1. PR is of type TCSSoftwareComponent
Fatal Exception:com.sap.cms.tcs.interfaces.exceptions.TCSCommunicationException: communication error: VcmFailure received: Communication error [cause: Socket output stream shutdown by peer.]:communication error: VcmFailure received: Communication error [cause: Socket output stream shutdown by peer.]
com.sap.cms.tcs.interfaces.exceptions.TCSCommunicationException: communication error: VcmFailure received: Communication error [cause: Socket output stream shutdown by peer.]
at com.sap.cms.tcs.client.DTRCommunicator.integrateChangelist(DTRCommunicator.java:381)
at com.sap.cms.tcs.core.RepositoryImportTask.processRepositoryImport(RepositoryImportTask.java:295)
at com.sap.cms.tcs.core.RepositoryImportTask.process(RepositoryImportTask.java:500)
at com.sap.cms.tcs.process.ProcessStep.processStep(ProcessStep.java:77)
at com.sap.cms.tcs.process.ProcessStarter.process(ProcessStarter.java:179)
at com.sap.cms.tcs.core.TCSManager.importPropagationRequests(TCSManager.java:376)
at com.sap.cms.pcs.transport.importazione.ImportManager.importazione(ImportManager.java:216)
at com.sap.cms.pcs.transport.importazione.ImportQueueHandler.execImport(ImportQueueHandler.java:585)
at com.sap.cms.pcs.transport.importazione.ImportQueueHandler.startImport(ImportQueueHandler.java:101)
at com.sap.cms.pcs.transport.proxy.CmsTransportProxyBean.startImport(CmsTransportProxyBean.java:583)
at com.sap.cms.pcs.transport.proxy.CmsTransportProxyBean.startImport(CmsTransportProxyBean.java:559)
at com.sap.cms.pcs.transport.proxy.LocalCmsTransportProxyLocalObjectImpl0.startImport(LocalCmsTransportProxyLocalObjectImpl0.java:1640)
at com.sap.cms.ui.wl.Custom1.importQueue(Custom1.java:1169)
at com.sap.cms.ui.wl.wdp.InternalCustom1.importQueue(InternalCustom1.java:2162)
at com.sap.cms.ui.wl.Worklist.onActionImportQueue(Worklist.java:880)
at com.sap.cms.ui.wl.wdp.InternalWorklist.wdInvokeEventHandler(InternalWorklist.java:2338)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:422)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:133)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:344)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:298)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:705)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:659)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:227)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:150)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:56)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:47)
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:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
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:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Info:Step Repository-import ended with result 'fatal error' ,stopping execution at 2006-12-06 16:42:07.0027 +5:00
Any clues on which output stream is getting shut???
regards,
avadhHi Pascal,
yup, There is enough free space available. Java heap size is also adequate(1024).
I have been through most of the threads on this topic, and have re-checked everything.
Still, the problem persists.
Any ideas??
regards,
avadh -
Lpq outputs print jobs + error T: unknown: moving-to-paused +
Dears,
I have setup remote printing, printing from the client show the print queue at print server(T) however command does not get executed and it outputs
print jobs + error "T: unknown: moving-to-paused"
When is triggered lpstat command before printing
# lpstat -t
scheduler is running
system default printer: T
device for Alis: /dev/ecpp0
device for T: /dev/lp1
Alis accepting requests since Wed Jan 25 14:27:39 2012
T accepting requests since Wed Jan 25 14:39:03 2012
printer Alis is idle. enabled since Sun Feb 19 11:23:34 2012. available.
printer T is idle. enabled since Sun Feb 19 12:03:31 2012. available.
When is triggered lpstat command After printing
bash-3.2# lpstat -t
scheduler is running
system default printer: T
device for Alis: /dev/ecpp0
device for T: /dev/lp1
Alis accepting requests since Wed Jan 25 14:27:39 2012
T accepting requests since Wed Jan 25 14:39:03 2012
printer Alis is idle. enabled since Sun Feb 19 11:23:34 2012. available.
printer T waiting for auto-retry. available.
Failed to open the printer port. (Device busy)
T-80 [email protected] 201097 Feb 19 12:28 f iltered
T-81 [email protected] 600569 Feb 19 12:28 f
lpq
===
bash-3.2# lpq
T: unknown: moving-to-paused
Rank Owner Job File(s) Total Size
1st appltest 80 /global/u02/oracle/TEST/inst/app201097 bytes
2nd appltest 81 /global/u02/oracle/TEST/inst/app600569 bytesHi Freind,
I hope you are doing good.
Q1l:-
Are these printers really physically attached to your Ultra-* parallel port (/dev/ecpp0)?
and what device is "/dev/lp1"?
Answer:-
"/dev/lp1" which is printer "T" and "/dev/ecpp0" which is printer "Alis" are configured at OS level via "printmgr" on the same machine.
This machine hostname is "tprinter" which is a print server. It is connected physically to "CIMA6120 LINE PRINTER".
[what I meant is: what physical port is this printer attached to on the Solaris machine? is this a Ultra 5/10/60 machine? I don't recall the /dev/ecpp port
existing on any modern sun hardware]
"failed to open printer port" can mean:
Answer2:- It's is a 25 pin serial port cable connected to 25 pin parallel port of Optiplex GX100 machine. I installed solaris 10 x86 to make print server. as our CIMA6120 its not a network printer, and our company want to print reports from oracle application to this printer.
Q:-you have attached your printer to the wrong port?
Answer: it is connected to the correct port.
[again . . how do you know this or test this?]
Answer2:- it is connected at the rare panel of the machine on a 25-hole connector (bidirectional).
Q:-you have attached your printer to the right port, but are using the wrong name?
Answer: I think we could have Alias, not necessarily give the same printer name.
[what i was getting at here is that you think the printer is attached to the parallel port, but actually the cable
is actually attached to the wrong port. For example the serial port on those older machines will fit but in that case, if you configure the printer with ecpp
it's not pointing to the correct port]
Answer2:- I configured CIMA6120 with "/dev/lp1" port which was perfectly working, I print numerous pages with this configuration, Suddenly this error "moving-to-paused" occurred. as i said it is connected to the parallel port at the rare panel. Initially, I attempted and tried to configure this printer with "/dev/ecpp0" port which was not successful.
Q:-you have a bad or wrong cable?
Answer:- I have checked the cable it is good.
[how did you do the checking?]
Answer2:- I tested the cable by connecting to other printer and it printed. so no problem with the cable.
In the olden days when local printers like this was the norm, we'd do test like catting a file to the port and see if the printer lights
up or responds. Something like: cat /etc/hosts > /dev/ecpp0 (or /dev/lp1, or whatever the device is). Then observe if the printer seems to
receives anything, blinks, prints the host file. You are copying the file directly to the port outside of lp or other mechanism.
Answer2:- I agree there was some conflict among the ports internally, or some process may be running at the background, that is why though it shows the request waiting in the queue it was moving to pause for some reason. when I check the error by command "lpstat -t" it sez "device busy" in /dev/lp1" file.
Solution
============
After goggling some more I found a fix for this issue at http://fixunix.com/solaris/143011-unaccepted-printer.html
1, I tried to remove the printer from printmgr, cud not remove it.
2, try kill the entries that going to /dev/lp1 port to printer "T". could not do it
3, uncheck the default printer option via printmgr.
4, Add a new printer name "test" with /dev/ecpp0" and reproduce the issue "got the same error"
5, With the forum above it sez its a "bug" and the Bug ID: 6374608. here are the details of it:-
Synopsis: No /devices entry for line printer
http://bugs.opensolaris.org/bugdatab...bug_id=6374608
Workaround is to manually install the missing driver binding
entry, using the command:
update_drv -a -i '"lp"' ecpp
This workaround should create the missing /dev/lp* devices. And after
running it, you should find the following line in "prtconf -D" output:
lp, instance #0 (driver name: ecpp)
6, I unplug the serial cable from the printer and turnoff and replug the serial cable to the printer and turn on the printer, made sure printer is ""ONLINE".
7, I restart the Solaris machine and delete the newly created "Test" printer via printmgr.
7, I just gave the lp /etc/passwd and it printed.
Finally, I thank you for your time and suggest me your opinion on this solution please.
Regards,
MKY
Edited by: user9007339 on Feb 22, 2012 12:15 AM
Edited by: user9007339 on Feb 22, 2012 12:21 AM -
On my MacPro with10.7.3. while running a Python script in terminal, after a while, in several hours actually, I see a system message for the Terminal app: "There is no more application memory available on your startup disk". Both RAM and VM appear to be fine at this point, i.e. Python uses only 10G of 16G RAM and VM =238G with ~1TB free. Log reads: " macx-swapon FAILED - 12" multiple times. Furthermore, other terminal windows can be opened and commands run there. It only happens with larger inputs (text files), but with inputs that are about half the size everything runs smoothly. So the issue must be the memory indeed, but where to look for the problem/fix?
http://liulab.dfci.harvard.edu/MACS/README.html
Have you tried with the --diag flag for diagnostics? Or changing verbose to 3 to show debug messages? Clearly one of three things is happening;
1. You ARE running out of disk space, but once it errors out the space is reclaimed if the output file is deleted on error. When it fails, does your output have the content generated up to the point of termination?
2. The application (Terminal) is allocated memory that you are exceeding
3. The task within Terminal is allocated memory that you are exceeding
I don't know anything about what this does but is there a way to maybe run a smaller test run of it? Something that takes 10 minutes? Just to see if it works. -
Hello,
I was a getting a harmlous excpetion :
<4/06/2002 16:48:04> <Error> <HTTP> <Servlet execution in servlet
context "WebAppServletContext(5985988,root,/root)" failed,
java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
'7358
4' bytes instead of stated: '94440' bytes.
java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
'73584' bytes instead of stated: '94440' bytes.
at
weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutputStreamImpl.java:413)
at
weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:974)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1964)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
I read about it on this newsgroup, and I saw some people suggesting to
flush the output streams with ( out.flush()).
But this is weird, doesn't Weblogic flush the output streams by itself??
I had the same application running on tomcat before and everything was
fine, I didn't have to flush the output streams with tomcat
And what is the consequence of not flushing the output streams.
Thanks guys
Itani
[att1.html]
I have the same problem. I have seen a lot of messages reporting this
problem... what is the right solution? Can weblogic become instable
due to this condition?
I use some Oreilly classes (com.oreilly.servlet.MultipartRequest) to
intercept some POST data; Is there anyone who knows if these classes
can cause the ProtocolException problem?
Bye
Luca
"Vinod Mehra" <[email protected]> wrote in message news:<[email protected]>...
> No flush will not help here.
>
> This exception will show up in only two cases:
>
> 1. You wrote less than the promised content length was.
>
> 2. While you were writing the client terminated the connection. I
> remember we used
> to throw this ProtocolException exception at the end, which was
> unnecessary.
> I know this problem has been fixed. We don't throw this exception
> anymore
> when the client abnormally terminates the connection. I believe the
> problem has
> been fixed in 610sp2. Which release/service pack are you using? If
> you
> can't upgrade and need a one off patch please contact support.
> CR057091
> was used to track this problem. One off patches are available for
> 610sp1 and
> 510sp12.
>
> Cheers!
> --Vinod.
> "Mohamed Itani" <[email protected]> wrote in message
> news:[email protected]...
> Hello,
> I was a getting a harmlous excpetion :
>
> <4/06/2002 16:48:04> <Error> <HTTP> <Servlet execution in servlet
> context "WebAppServletContext(5985988,root,/root)" failed,
> java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
> '7358
> 4' bytes instead of stated: '94440' bytes.
> java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
> '73584' bytes instead of stated: '94440' bytes.
> at
> weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutputStr
> eamImpl.java:413)
> at
> weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.ja
> va:974)
> at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j
> ava:1964)
> at
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
> I read about it on this newsgroup, and I saw some people suggesting to
> flush the output streams with ( out.flush()).
>
> But this is weird, doesn't Weblogic flush the output streams by
> itself??
> I had the same application running on tomcat before and everything was
> fine, I didn't have to flush the output streams with tomcat
>
> And what is the consequence of not flushing the output streams.
>
> Thanks guys
> Itani
>
>
>
> --
-
How can I put an output stream (HTML) from a remote process on my JSF page
Hello,
I've a question if someone could help.
I have a jsf application that need to execute some remote stuff on a different process (it is a SAS application). This remote process produces in output an html table that I want to display in my jsf page.
So I use a socket SAS class for setting up a server socket in a separate thread. The primary use of this class is to setup a socket listener, submit a command to a remote process (such as SAS) to generate a data stream (such as HTML or graphics) back to the listening socket, and then write the contents of the stream back to the servlet stream.
Now the problem is that I loose my jsf page at all. I need a suggestion if some one would help, to understand how can I use this html datastream without writing on my Servlet output stream.
Thank you in advance
A.
Just if you want to look at the details .....
// Create the remote model
com.sas.sasserver.submit.SubmitInterface si =
(com.sas.sasserver.submit.SubmitInterface)
rocf.newInstance(com.sas.sasserver.submit.SubmitInterface.class, connection);
// Create a work dataset
String stmt = "data work.foo;input field1 $ field2 $;cards;\na b\nc d\n;run;";
si.setProgramText(stmt);
// Setup our socket listener and get the port that it is bound to
com.sas.servlet.util.SocketListener socket =
new com.sas.servlet.util.SocketListener();
int port = socket.setup();
socket.start();
// Get the localhost name
String localhost = (java.net.InetAddress.getLocalHost()).getHostAddress();
stmt = "filename sock SOCKET '" + localhost + ":" + port + "';";
si.setProgramText(stmt);
// Setup the ods options
stmt = "ods html body=sock style=brick;";
si.setProgramText(stmt);
// Print the dataset
stmt = "proc print data=work.foo;run;";
si.setProgramText(stmt);
// Close
stmt = "ods html close;run;";
si.setProgramText(stmt);
// get my output stream
context = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
ServletOutputStream out = response.getOutputStream();
// Write the data from the socket to the response
socket.write(out);
// Close the socket listener
socket.close();The system exec function is on the Communication palette. Its for executing system commands. On my Win2K system, the help for FTP is:
"Ftp
Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. Click ftp commands in the Related Topics list for a description of available ftp subcommands. This command is available only if the TCP/IP protocol has been installed. Ftp is a service, that, once started, creates a sub-environment in which you can use ftp commands, and from which you can return to the Windows 2000 command prompt by typing the quit subcommand. When the ftp sub-environment is running, it is indicated by the ftp command prompt.
ftp [-v] [-n] [-i] [-d] [-g]
[-s:filename] [-a] [-w:windowsize] [computer]
Parameters
-v
Suppresses display of remote server responses.
-n
Suppresses autologin upon initial connection.
-i
Turns off interactive prompting during multiple file transfers.
-d
Enables debugging, displaying all ftp commands passed between the client and server.
-g
Disables file name globbing, which permits the use of wildcard characters (* and ?) in local file and path names. (See the glob command in the online Command Reference.)
-s:filename
Specifies a text file containing ftp commands; the commands automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
-a
Use any local interface when binding data connection.
-w:windowsize
Overrides the default transfer buffer size of 4096.
computer
Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last paramete
r on the line."
I use tftp all of the time to transfer files in a similar manner. Test the transfer from the Windows command line and copy it into a VI. Pass the command line to system exec and wait until it's done. -
Stream closed error while testing a composite in EM
HI,
I have deployed a simple composite and wanted to test it in EM. I am getting a stream closed popup, not sure whats wrong?
I have restarted the server and problem still persists.its actually remote server, I am able to deploy a simple HelloWorld composite and even able to see the same in Em.I can even browse through all the composites deployed there by many other people.But problem is when I try to test it its giving the Stream closed error.
Is it something to do with access permissions, if so i would not have deployed it in first case..
the pop up error message----
Stream Closed
For more information, please see the server's error log for
an entry beginning with: Server Esception beginning with PPR, #14
_______________________________
Maybe you are looking for
-
How can I convert MPEGs without losing quality?
Hi Guys Ok, to start, I have a MAC OS X 10.4.11/ Final Cut Pro 5/ new 1TB external hard-drive/ from UK So, I am new to FCP and not very tech savvy. Please be gentle with me.... Basically, I have some video files I would like to edit on FCP. They are
-
Just downloaded the new ios 7, and I can't seem to get any apps to download in the app store. It doesn't have the meter bar anymore and all it does is have a blue circle spin and spin for over 5 min. without nothing happening! Help!!!
-
Hi.. How r u all..? I'm doing a small program to change the color of those sections of an image which are having the same color, according to the color selected from the colorpicker.. Say we have selected a color from the colorpicker, and then the mo
-
Hi Friends I have to upload one file contains: PERNR STATUS Staus may be : In Planning,In Process,Submitted,Approved. I should have to upload same Pernr with Statuses In Planning,In Procee,Submitted. But once it has processed with Approved it h
-
When booting 7 64bit on HP Pavilion, I get a window saying loading "Trayapp.msi" It asks for a CD containing such. What can I do I have no CD? This new Desktop has Windows loaded from the Internet.