Java.io.IOException: Error in encoded stream: needed 4 valid base64 charact

Hi All,
I am getting IOException for some of the messages.
Even though I set
   <system-property mail.mime.base64.ignoreerrors='true' />I am still getting exception
Java version i am using is Java 1.4.2
any help would be appreciated
Thanks,
Amit

You're probably using an older version of JavaMail. The property was
added in JavaMail 1.3.2

Similar Messages

  • Error in encoded stream: needed 4 valid base64 characters but only got 3 be

    Folks,
    We are trying to copying a file in to temp directory. But we keep getting this error. Please help..
    import java.io.FileOutputStream;
       myfile = File.createTempFile(atType, fName,
                       new File(FileUtils.getTmpRootDir()));
               output = new FileOutputStream(myFile); java.io.IOException: Error in encoded stream: needed 4 valid base64 characters but only got 3 before EOF, the 10 most recent characters were: "-A-G-EASDF"
    _Thanks Much
    :rolleyes:

    What are the values of atType and fName? Also, what does getTmpRootDir() do? Also, which of those two lines of code you posted does the error occur on?

  • Java.io.IOException: error in poll: Input/output error

    Hello,
    My server is running on Linux 7.1, IBM JDK 1.3 and WLS 6.1. When the
    following error is thrown in weblogic.log, the server is stopped by this
    error. This error keeps happening once it occurs for about every one second.
    ####<Dec 23, 2001 3:12:46 AM SGT> <Error> <Posix Performance Pack>
    <MyPC.1st-cube.com> <myserver> <ExecuteThread: '12' for queue:
    'default'><><><000000> <Uncaught Throwable in processSockets>
    java.io.IOException: error in poll: Input/output error
    at weblogic.socket.PosixSocketMuxer.poll(Native Method)
    at
    weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:371)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Can anyone help?
    Thanks.
    Regards,
    Mo

    I too am seeing a slight variation of this error with JM 1.3.1. Unfortunately, the message has since been deleted. Any ideas?
    java.io.IOException: Error in encoded stream, got 2
    at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:148)
    at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:53)
    at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:78)
    at java.io.FilterInputStream.read(FilterInputStream.java:90)
    at javax.activation.DataHandler.writeTo(DataHandler.java:289)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1147)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:668)
    at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233)
    at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:67)
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839)
    at javax.activation.DataHandler.writeTo(DataHandler.java:295)

  • Getting java.io.IOException: unsupported type / corrupted stream

    I am sporadically getting the following exception:
    (Wrapped) java.io.IOException: unsupported type / corrupted stream
         at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2162)
         at com.tangosol.util.ExternalizableHelper.readMap(ExternalizableHelper.java:1557)
         at com.tsysa.risk.SyncpointController.readExternal(SyncpointController.java:262)
         at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:1908)
         at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2199)
         at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:205)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ConverterFromBinary.convert(DistributedCache.CDB:4)
         at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1317)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap.put(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
         at test.SyncpointController.updateStateInCache(SyncpointController.java:151) 
         at test.SyncpointController.onMapEvent(SyncpointController.java:121)
         at com.tangosol.util.MultiplexingMapListener.entryUpdated(MultiplexingMapListener.java:41)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:195)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:164)
         at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
         at com.tangosol.coherence.component.util.SafeNamedCache.translateMapEvent(SafeNamedCache.CDB:7)
         at com.tangosol.coherence.component.util.SafeNamedCache.entryUpdated(SafeNamedCache.CDB:1)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:195)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.dispatch(DistributedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.entryUpdated(DistributedCache.CDB:1)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:195)
         at com.tangosol.coherence.component.util.CacheEvent.run(CacheEvent.CDB:18)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onNotify(Service.CDB:17)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:35)
         at java.lang.Thread.run(Thread.java:595)I get this during a cache.put() call. Any idea what this could be about?
    Thanks
    Ghanshyam

    This is an issue with my code. I was selectively serializing a class member and relying on EOFException to detect if the class member should be initialized during readExternal(). Following shows the situation:
    public class A implements ExternalizableLite{
         private A1 a1 = null; // A1 is ExternalizableLite
         private A2 a2 = null; // A2 is ExternalizableLite
         public A(){}
         public void setA1(A1 a1){ this.a1 = a1; }
         public void readExternal(DataInput in) throws IOException {
             this.a1.readExternal(in);
             this.a2 = new A2();
             try{
                 this.a2.readExternal(in);
             catch(EOFException ex){ // a2 is null
                 this.a2 = null;
        public void writeExternal(DataOutput out) throws IOException {
            this.a1.writeExternal(out);
            if(this.a2 != null) this.a2.writeExternal(out);
    }A map had the above class A as the value and when the map was getting serialized, I was getting the exception. I changed class A (as below) to always initialize a2 to a non-null but empty class and the error went away:
    public class A implements ExternalizableLite{
         private A1 a1 = null; // A1 is ExternalizableLite
         private A2 a2 = new A2();
         public A(){}
         public void setA1(A1 a1){ this.a1 = a1; }
         public void readExternal(DataInput in) throws IOException {
             this.a1.readExternal(in);
             this.a2.readExternal(in);
        public void writeExternal(DataOutput out) throws IOException {
            this.a1.writeExternal(out);
            this.a2.writeExternal(out);
    }This means needless serialization/deserialization when a2 is null but the hit is negligible. Is there a way to get around the null values?
    Thanks
    Ghanshyam

  • Java.io.IOException: Error writing to server after installing SP17

    After installing SP17 in production, we are seeing message in AE failing with com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Error writing to server.
    The messages don't make it to IS and are stuck in AE.
    We've checked pipeline url / sm59 entry for INTEGRATION_DIRECTORY_HMI using user - XIISUSER, we did a full cache refresh.
    They all appear to be set correctly.
    We'll take any ideas and suggestions.
    Thank you.

    Yes...we have been working all night on this. The FM did create an entry but it does no look like its recognising.
    This is what we see in the Adapter messaging tool.
    2006-09-18 13:28:24 Error Returning synchronous error notification to calling application: Received HTTP response code 401 : Unauthorized.
    2006-09-18 13:28:24 Error Transmitting the message using connection http://host:8176/sap/xi/engine?type=entry failed, due to: Received HTTP response code 401 : Unauthorized.
    2006-09-18 13:28:24 Error The message status set to FAIL.
    2006-09-18 13:28:24 Error Returning to application. Exception: Received HTTP response code 401 : Unauthorized
    Any help?

  • Oc4jDcmServlet  : java.io.IOException: Error writing to server

    I've been using the following ant task to do a remote deployment to an OC4J container :
    <tasks>
    <java jar="../../../../../MAVEN-WORK/portal-lib/oc4j_remote_deploy.jar" fork="yes" maxmemory ="512m">
    <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
    <arg value="http://wblv-ep-sp05:1824/Oc4jDcmServletAPI/"/>
    <arg value="ias_admin"/>
    <arg value="admin_dev3"/>
    <arg value="redeploy"/>
    <arg value="/app/oracle/product/oc4jext10.1.2-d3"/>
    <arg value="../portal-ear/target/portal.ear"/>
    <arg value="portal"/>
    <arg value="OC4J_portal"/>
    </java>
    </tasks>
    This has worked before , but I'm suddenly getting error when trying to run it .The error message and stack trace are shown below :
    [INFO] Executing tasks
    [java] Initializing log
    [java] Servlet interface for OC4J DCM commands
    [java] Command timeout defined at 600 seconds
    [java] Executing DCM command...
    [java] Executing command redeploy /app/oracle/product/oc4jext10.1.2-d3 ../e
    portal-ear/target/ePortalep2x-QA-V-02_00_5-20070220.ear eportal OC4J_Eportal
    [java] Command = REDEPLOY
    [java] Reading application's ear file
    [java] Ear file was successfully read
    [java] Opening connection to Oc4jDcmServlet
    [java] Setting userName to ias_admin
    [java] Sending command to DCM servlet
    [java] **** Could not check HTTP response code
    [java] ** Thread[main,5,main] ** Sun Feb 25 20:47:34 CAT 2007 ** ** EXCEP
    TION: java.io.IOException: Error writing to server
    [java] java.io.IOException: Error writing to server
    [java] at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Htt
    pURLConnection.java:416)
    [java] at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Htt
    pURLConnection.java:428)
    [java] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Ht
    tpURLConnection.java:934)
    [java] at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.
    java:367)
    [java] at oracle.j2ee.tools.remote_deploy.Oc4jDcmClient.isHttpResponseO
    k(Unknown Source)
    [java] at oracle.j2ee.tools.remote_deploy.Oc4jDcmClient.sendCommand(Unk
    nown Source)
    [java] at oracle.j2ee.tools.remote_deploy.Oc4jDcmCommand.execute(Unknow
    n Source)
    [java] at oracle.j2ee.tools.remote_deploy.Oc4jDcmCommand.redeployApplic
    ation(Unknown Source)
    [java] at oracle.j2ee.tools.remote_deploy.Oc4jDcmMain.main(Oc4jDcmMain.
    java:63)
    [java] #### HTTP response is NOT ok
    [java] Closing connection to Oc4jDcmServlet
    [java] #### DCM command did not complete successfully (-1)
    [java] #### HTTP return code was -1
    [java] Java Result: -1
    [INFO] Executed tasks
    It seems to stall at the "Sending command to DCM servlet" stage , then fails.
    Does the DCM servlet write out logs that I can look at?Where is the Oc4jDcmServlet.ear located in an OC4J container directory hierarchy?How do I redeploy the Oc4jDcmServlet.ear ?
    This was working a few hours ago as seen here in my previous logs (and I do not understand what could have gone wrong) :
    ** Thread[main,5,main] ** Thu Feb 22 14:50:39 CAT 2007 ** Initializing log
    ** Thread[main,5,main] ** Thu Feb 22 14:50:39 CAT 2007 ** Servlet interface for OC4J DCM commands
    ** Thread[main,5,main] ** Thu Feb 22 14:50:39 CAT 2007 ** Command timeout defined at 600 seconds
    ** Thread[main,5,main] ** Thu Feb 22 14:50:39 CAT 2007 ** Executing command redeploy /app/oracle/product/oc4jext10.1.2-d3 ../portal-ear/target/portal.ear portal OC4J_portal
    ** Thread[main,5,main] ** Thu Feb 22 14:50:39 CAT 2007 ** Command = REDEPLOY
    ** Thread[main,5,main] ** Thu Feb 22 14:50:39 CAT 2007 ** Reading application's ear file
    ** Thread[main,5,main] ** Thu Feb 22 14:50:45 CAT 2007 ** Ear file was successfully read
    ** Thread[main,5,main] ** Thu Feb 22 14:50:45 CAT 2007 ** Opening connection to Oc4jDcmServlet
    ** Thread[main,5,main] ** Thu Feb 22 14:50:45 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:50:45 CAT 2007 ** Sending command to DCM servlet
    ** Thread[main,5,main] ** Thu Feb 22 14:50:50 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:50:50 CAT 2007 ** Command was successfully sent to Oc4jDcmServlet
    ** Thread[main,5,main] ** Thu Feb 22 14:50:50 CAT 2007 ** Receiving session id from servlet to check command status
    ** Thread[main,5,main] ** Thu Feb 22 14:50:50 CAT 2007 ** Session id = 0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:50:50 CAT 2007 ** Please, wait for command to finish...
    ** Thread[main,5,main] ** Thu Feb 22 14:51:00 CAT 2007 ** Checking command status...
    ** Thread[main,5,main] ** Thu Feb 22 14:51:00 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:51:00 CAT 2007 ** Setting Cookie to JSESSIONID=0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:51:00 CAT 2007 ** Checking command status
    ** Thread[main,5,main] ** Thu Feb 22 14:51:00 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:51:00 CAT 2007 ** Command has not finished yet
    ** Thread[main,5,main] ** Thu Feb 22 14:51:10 CAT 2007 ** Checking command status...
    ** Thread[main,5,main] ** Thu Feb 22 14:51:10 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:51:10 CAT 2007 ** Setting Cookie to JSESSIONID=0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:51:10 CAT 2007 ** Checking command status
    ** Thread[main,5,main] ** Thu Feb 22 14:51:10 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:51:10 CAT 2007 ** Command has not finished yet
    ** Thread[main,5,main] ** Thu Feb 22 14:51:20 CAT 2007 ** Checking command status...
    ** Thread[main,5,main] ** Thu Feb 22 14:51:20 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:51:20 CAT 2007 ** Setting Cookie to JSESSIONID=0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:51:20 CAT 2007 ** Checking command status
    ** Thread[main,5,main] ** Thu Feb 22 14:51:20 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:51:20 CAT 2007 ** Command has not finished yet
    ** Thread[main,5,main] ** Thu Feb 22 14:51:30 CAT 2007 ** Checking command status...
    ** Thread[main,5,main] ** Thu Feb 22 14:51:30 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:51:30 CAT 2007 ** Setting Cookie to JSESSIONID=0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:51:30 CAT 2007 ** Checking command status
    ** Thread[main,5,main] ** Thu Feb 22 14:51:30 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:51:30 CAT 2007 ** Command has not finished yet
    ** Thread[main,5,main] ** Thu Feb 22 14:51:40 CAT 2007 ** Checking command status...
    ** Thread[main,5,main] ** Thu Feb 22 14:51:40 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:51:40 CAT 2007 ** Setting Cookie to JSESSIONID=0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:51:40 CAT 2007 ** Checking command status
    ** Thread[main,5,main] ** Thu Feb 22 14:51:40 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:51:40 CAT 2007 ** Command has not finished yet
    ** Thread[main,5,main] ** Thu Feb 22 14:51:50 CAT 2007 ** Checking command status...
    ** Thread[main,5,main] ** Thu Feb 22 14:51:50 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:51:50 CAT 2007 ** Setting Cookie to JSESSIONID=0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:51:50 CAT 2007 ** Checking command status
    ** Thread[main,5,main] ** Thu Feb 22 14:51:50 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:51:50 CAT 2007 ** Command has not finished yet
    ** Thread[main,5,main] ** Thu Feb 22 14:52:00 CAT 2007 ** Checking command status...
    ** Thread[main,5,main] ** Thu Feb 22 14:52:00 CAT 2007 ** Setting userName to ias_admin
    ** Thread[main,5,main] ** Thu Feb 22 14:52:00 CAT 2007 ** Setting Cookie to JSESSIONID=0afb65197201792b582df0d486285eef6aa19c1ab64
    ** Thread[main,5,main] ** Thu Feb 22 14:52:00 CAT 2007 ** Checking command status
    ** Thread[main,5,main] ** Thu Feb 22 14:52:00 CAT 2007 ** HTTP response code = 200, HTTP response msg = OK
    ** Thread[main,5,main] ** Thu Feb 22 14:52:00 CAT 2007 ** Command has finished

    I looked at the log.xml file under the dcm/logs/daemon_logs directory and saw this :
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2007-02-26T08:49:13.203+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>DCM</COMPONENT_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>wblv-ep-sp05</HOST_ID>
    <HOST_NWADDR>10.251.101.25</HOST_NWADDR>
    <MODULE_ID>oracle/defaultLogger/ExceptionLogger</MODULE_ID>
    <THREAD_ID>Deamon Worker for TaskMaster of iAS instance at: /app/oracle/product/oc4jext10.1.2-d3 JVM Id = 1b09468.110df14be01.-8000</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.251.101.25:47620:1172472553186:2846</UNIQUE_ID><SEQ>0</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>principals specified in application is not a valid path: /app/oracle/product/oc4jext10.1.2-d3/j2ee/home/config/../application-deployments/ADFBCManager/principals.xml</MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    The same MSG_TEXT appears in the log every time i had a failed deploy.

  • Java.io.IOException: Error initializing HTTP tunnel connection:

    Hi,
    I am running sample Midlet to communicate to any URL like http://www.google.com or my internal servlet. It is opening the connection but when I try to open the inputstream it gives me following error.
    java.io.IOException: Error initializing HTTP tunnel connection:
    HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
    Via: 1.1 TPSL-PROXY
    Proxy-Authenticate: Negotiate
    Proxy-Authenticate: Kerberos
    Proxy-Authenticate: NTLM
    Proxy-Authenticate: Digest qop="auth",algorithm=MD5-sess,nonce="3ace49b386edc8013f52a8f9b7c0638bfb8a6ca60b76bf826632da7cd6185c30d3c61c1a61a0aa91",charset=utf-8,realm="TPSL.LOCAL"
    Connection: close
    Proxy-Connection: close
    Pragma: no-cache
    Cache-Control: no-cache
    Content-Type: text/html
    Content-Length: 722
         at com.sun.midp.io.j2me.http.Protocol.doTunnelHandshake(+333)
         at com.sun.midp.io.j2me.http.Protocol.connect(+145)
         at com.sun.midp.io.j2me.http.Protocol.streamConnect(+57)
         at com.sun.midp.io.j2me.http.Protocol.startRequest(+12)
         at com.sun.midp.io.j2me.http.Protocol.sendRequest(+38)
         at com.sun.midp.io.j2me.http.Protocol.sendRequest(+6)
         at com.sun.midp.io.j2me.http.Protocol.closeOutputStream(+4)
         at com.sun.midp.io.BaseOutputStream.close(+14)
         at HTTPTest.getGrade(+155)
         at HTTPTest.startApp(+8)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+270)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+80)
    I think it is going through SSL handshake which implemented in HTTP protocol in J2ME.
    I have already done the proxy setup and authentication in Sun Wireless toolkit > preferences > Network configuration.
    Still error is there. Please help me regarding this, not able to go ahead and rest in peace.
    thanks & regards,
    mJK

    Hi,
    have you checked proxy settings in WTK preferences?
    Peter

  • Java.io.IOException: Error in HTTP operation

    hai
    My Application is working fine in emulator and working fine under Via OTA and also works fine in Nokia 7210 ,but i install in Nokia 6230i i got the error java.io.IOException: Error in HTTP operation,when i type the same url in Nokia 6230i browser the result came back from the server ,only in application its not working ,plese help me regarding this , what is the problem
    my code for Http Connection
    System.out.println("in here");
         HttpConnection c = null;
    InputStream is = null;
    try
              System.out.println("in try");
    c=(HttpConnection)Connector.open(url);
              c.setRequestMethod(HttpConnection.GET);
              c.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");
              c.setRequestProperty("Content-Language", "en-US");
              System.out.println("after passing url");
    int rc = c.getResponseCode();
    if (rc != HttpConnection.HTTP_OK)
    throw new IOException("HTTP response code: " + rc);
    System.out.println("after responce");
    is = c.openInputStream();
    ByteArrayOutputStream bin = new ByteArrayOutputStream();
    byte[] buffer = new byte[3000];
    int rd;
    while ( (rd=is.read(buffer))!= -1)
    bin.write(buffer,0,rd);
    System.out.println("after getting data");
    bin.flush();
    return bin.toString();
    Thanks & regards
    Ravi varma

    You still did not answer my question on the other forum: what is the value of rc? int rc = c.getResponseCode();Mihai

  • Cannot run program "keytool": java.io.IOException

    Hi,
    I would like to follow the procedure to change the master password
    of glassfish server hosting APEX listener
    using the change-master-password subcommand, but the utility keytool
    is not found:
    glassfish@ahost:/opt/glassfish3/glassfish/domains/mydom01/config> /opt/glassfish3/bin/asadmin
    /opt/glassfish3/bin/asadmin
    Use "exit" to exit and "help" for online help.
    asadmin> change-master-password mydom01
    Enter the current master password> changeit
    Enter the new master password> changedit
    Enter the new master password again> changedit
    Cannot run program "keytool": java.io.IOException: error=2, No such file or directory
    Command change-master-password failed.
    asadmin>
    Command multimode failed.
    glassfish@ahost:/opt/glassfish3/glassfish/domains/mydom01/config> which java
    /usr/bin/java
    glassfish@ahost:/opt/glassfish3/glassfish/domains/mydom01/config>
    All of glassfish is running fine apart from this.
    keytool could be found in /usr/java/latest/bin/keytool.
    Do we need to have this in the path? There is no requirement in the
    install guide for this, nor did the RPM installation adjust the system
    path accordingly.
    Hopefully someone can tell my how things ought to be regarding keytool?
    Thanks, Tom

    Hi Tom,
    the procedure to change the master password of glassfish server hosting APEX listener... sounds more like a GlassFish-related topic to me. I guess you'd get the best answers for such questions in a GlassFish-related forum...
    For what it's worth, I'll try my best anyway:
    Cannot run program "keytool": java.io.IOException: error=2, No such file or directoryThis seems to be a pretty clear error message: keytool , which is probably used to manage the keys for GlassFish users, wasn't found. This means, you're either running on an OS that is not officially certified for GlassFish, or you GlassFish hasn't been configured properly.
    You ran
    glassfish@ahost:/opt/glassfish3/glassfish/domains/mydom01/config> which java
    /usr/bin/java... which indicates you assume your GlassFish is running without JAVA_HOME being set. If that's true, I'd begin to setup you GlassFish properly starting with that parameter.
    Anyway, you also found out that
    keytool could be found in /usr/java/latest/bin/keytool.... which is not +/usr/bin+ and hence probably not in the global search path of the user on whose behalf your GlassFish is running. So, you could either create a link-set[*] for +/usr/bin/keytool+ to (finally) point to +/usr/java/latest/bin/keytool+, or you setup JAVA_HOME to be +/usr/java/latest+ .
    [*] Note that depending on your OS there might be more than one stage of indirection, e.g. my Ubuntu has +/usr/bin/java+ pointing to +/etc/alternatives/java+ which is pointing to +/usr/lib/jvm/java-6-sun/jre/bin/java+ where +/usr/lib/jvm/java-6-sun/+ is pointing to the directory containing the actual JDK to be used. You'll probably find something like that on your system as well. My Ubuntu box has a link for +/usr/bin/keytool+, so I get that when running "which keytool".
    Do we need to have this in the path? There is no requirement in the install guide for this, nor did the RPM installation adjust the system path accordingly.Again, this is not a GlassFish forum.
    I hope my hints help you solve your problem. If they don't, please choose the appropriate forum for your next post on that topic. And I guess, giving some more information on your OS and how you manage your JDK (and which version you use) will help people there to help you.
    Thanks,
    Udo

  • Java.io.IOException: Cannot run program "ant"

    Hi all,
    I'm running a Job in Hudson.
    I build this job from a Hudson Master Server but the job is built in a Hudson Linux Node.
    This is the result:
    Started by user builder
    Building remotely on Linux-Node
    Updating http://150.200.20.200:8000/mvtv_all/DESCOS/MVTVc_D2ph1/branches revision: 17-may-2013 16:01:46 depth:infinity ignoreExternals: false
    At revision 529
    Updating http://150.200.200.200:8000/mvtv_all/DESCOS/KaluModules/branches revision: 17-may-2013 16:01:46 depth:infinity ignoreExternals: false
    At revision 529
    no change for http://159.200.300.20:8000/mvtv_all/DESCOS/MVTVc_D2ph1/branches since the previous build
    no change for http://159.230.300.20:8000/mvtv_all/DESCOS/KaluModules/branches since the previous build
    No emails were triggered.
    [bt] $ ant -file build.xml -DSUBSYSTEM=ALL -DTARGET=makeBuild -DCRLIST= -DOWNER= -DbuildTool.patch.release=$RELEASE -DbuildTool.system=$SYSTEM -DbuildTool.patch.type=$PATCH_TYPE -DbuildTool.subsystem=ALL -DbuildTool.buildRules=pkgBuild -DbuildTool.dynamicView=$WORKSPACE/ALL -DbuildTool.compilationRules=compile -DbuildTool.patch.name=$PATCH_NAME makeBuild
    FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations?
    java.io.IOException: Cannot run program "ant" (in directory "/hudson/buildTool/src/bt"): error=2, No existe el fichero o el directorio
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    at hudson.Proc$LocalProc.<init>(Proc.java:192)
    at hudson.Proc$LocalProc.<init>(Proc.java:164)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:639)
    at hudson.Launcher$ProcStarter.start(Launcher.java:274)
    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:794)
    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:768)
    at hudson.remoting.UserRequest.perform(UserRequest.java:114)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:283)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.io.IOException: error=2, No existe el fichero o el directorio
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
    at java.lang.ProcessImpl.start(ProcessImpl.java:130)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
    ... 15 more
    Do you know something about this issue?
    Thanks and Regards

    No, and this is not the Hudson forums either. But see this error?
    FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations?Try posting that in Google and see what you get. That's basic misery solution research 101. Post the error in Google. 999/1000 times someone has already run into it before. Please learn from their experiences by reading through them.

  • Java.io.IOException during large file processing on PI 7.1

    Hello Colleagues,
    for a large file scenario on our PI 7.1 System we have to verify with big file size we are able to process over PI.
    During handing over the large file (200 MB XML) form the Adapter Frame Work (File Adapter) to the Integration Engine we receive following error:
    Transmitting the message to endpoint http://<host>:<port>/sap/xi/engine?type=entry using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error transmitting the message over HTTP. Reason: java.io.IOException: Error writing to server.
    The message processing stopped and message still lies at Adapter Frame Work. Large files up to 100 MB we are able to process successfully.
    Please, could you tell me why this happened and how we are able to solve it?
    Because there is not a java.outofmemory exception however a IO exception i think it could be an memory issue?!
    Many thanks in advance!
    Regards,
    Jochen

    Hi Jochen,
    Indeed the error is IO Error and it is because the Adapter engine was not able to send the message to Integration server. But it happens due to memory/heap size issues.
    Look at these thread, they are having the same problem. Please try the remedy measures suggested by them
    Mail to Proxy scenario with attachment. AF channel error.
    Error with huge file
    problem with big file in file-to-proxy scenario
    Is there any additional information in Adapter messaging tool.?
    Regards
    Suraj
    Edited by: S.R.Suraj on Oct 1, 2009 8:55 AM

  • Attempt to process file failed with java.io.IOException

    Hi,
    The scenario is from Idoc to flat file and messages are getting processed successfully in XI. but in receiver communication channel error is coming:
    Attempt to process file failed with java.io.IOException: Error during STOR/APPE epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 426 Connection closed; transfer aborted.
    MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error during STOR/APPE epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 426 Connection closed; transfer aborted.: java.io.IOException: Error during STOR/APPE epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 426 Connection closed; transfer aborted.

    Hi,
    If you are using FTP then,
    1. Make sure that the FTP sever does not have issues with Firewall or a Proxy server access.
    2. Also verify that the specified FTP user ID has the necessary WRITE or overwrite authorization?
    Regards,
    Sarvesh
    ***Reward points, if it helped you.

  • IOException: error 10054

    after I run my program on emulator with monitor I get this exception:
    java.io.IOException: error 10054 during TCP read
    what is wrong?

    you have to send more details what you are doing. Does app run without problem when you aren't using network monitor.

  • Keystore java.io.IOException

    Hi all, when i try to generate a secretkey and store it in a keystore, but i get an io exception for some reason.
    it says:
    Exception in thread "main" java.security.KeyStoreException: java.io.IOException:
    Error initialising store of key store.
    i really don't know what i'm doing wrong, a little bit of help would be usefull
    this is a piece of my code:
    private static String FILENAME = "keystore.ks";
    private void registerUserKey(char[] password) throws Exception{
              // Generate secret key for HMACRIPEMD160
              KeyGenerator kg = KeyGenerator.getInstance("HMACRIPEMD160");
              SecretKey sk = kg.generateKey();
              // Create a keystore and place the key in it
              // I use an UBER keystore, which is provided by Bouncycastle.
              KeyStore keyStore = KeyStore.getInstance("UBER");
              keyStore.load(null, null);
              String alias = "exampleKey";
              keyStore.setKeyEntry(alias, sk, password, null);
              FileOutputStream fos = new FileOutputStream(FILENAME);
              keyStore.store(fos, password);
              fos.close();
         }

    my days of wandering forums of all kind have finally paid off.
    seems like adding the specific classpath option solves my problems
    so now i run and compile my files with this line
    java -Xbootclasspath:c:\jdk1.2.2\jre\lib\ext\jce-jdk12-118.jar;c:\jdk1.2.2\jr
    e\lib\rt.jar; myfilename
    and it works fine.
    if there is anybody who can tell me why it doesn't work when i change my classpath (and class), that would be hugely appreciated.
    But at least now i can run my applications

  • Help!! ioexception error

    hi, i been having this error --> java.io.IOException: Error: Attempt to clear a buffer that's already been flushed
    when i attempt to forward using <jsp:forward page=abc.jsp/>
    anyone can offer any suggestions?

    hi.
    hmm, but i didn't flush anything except for the tag <jsp:include page="Header.jsp" flush=true"/>.
    I tried removing the flush but it will give mi error msg.
    any suggestions?

Maybe you are looking for

  • Can not  open  a  password protected file from OSX2.8 in OSX4.x

    I have a few files that I password protected in OSX2.8 that will not open now in OSX 4.6. The are not part of the vault type protection. It seems that the feature of individually password protecting files in the earlier OSX system do not open, nor gi

  • Copying a slide to the clipboard?

    I want to copy a Captivate slide to the clipboard so I can edit it in a graphics program. The documentation first says: Adobe Captivate provides an easy way to copy a slide to the clipboard. Then the instructions say: To copy a slide to the clipboard

  • Cannot Import Java Classes

    I am trying to do the sample contact walkthrough in FLEX builder. For the Java Adapter. http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00000138 .html I cannot get any import statements to work for the java class fil

  • How to associate recent (non-CC) Acrobat XI purchase with account?

    I recently purchased Acrobat XI Pro (Mac, non-CC), and it is installed and running on my rMBP. I already had Premiere Pro CC installed, as well as Dreamweaver CS6. These last 2 apps are displayed in the "Your Apps" section of the "Apps" tab on the Cr

  • Download problem on iTunes

    I have a question.  I jsut purchased to own "The Ghost Writer HD" on iTuens,  but its also downloading the regular version as well.  why is it doning this and will I be charged for both the HD and regular version?