Problem with StreamCorruptedException: invalid stream header: 3C68746D

Hi
I am attempting to code a project in Java which involves the user of object serialization to send a String via serialization from an applet embedded in a JSP tp a servlet all files are running on the same machine for testing purposes.
However I seem to be getting StreamCorruptedException: invalid stream header: 3C68746D whenever I attempt to read the inputstream once I have written to it.
My code is as follows below (I apologise for the lack of details I have attempted to comment and simplify my code as much as possible for improved readability)
////////////////////////APPLET CODE////////////////
import java.io.*;
import java.io.Serializable;
import javax.servlet.http.*;
import java.applet.*;
import javax.swing.*;
import java.net.*;
*Compiled using netbeans 5.1
*Uses Apache server embedded with netbeans
*JSP address http://localhost:8084/TestServ
*Applet is embedded within this page
*Servlet address http://localhost:8084/TestServ/TServ
public class Main extends javax.swing.JApplet {
JFrame jf;//frame for the test applet
JTextArea jt;//result text box
public Main() {
jt=new JTextArea();//set up applet
this.add(jt);
URL servletURL;
HttpURLConnection servletConnection;
InputStream iStream=null;
try
{   //this address as far as is known is correct
servletURL = new URL( "http://localhost:8084/TestServ/TServ" );
//open connection to servlet
servletConnection = (HttpURLConnection)servletURL.openConnection();
//set up connection
servletConnection.setDoInput(true);
servletConnection.setDoOutput(true);
servletConnection.setUseCaches(false);
servletConnection.setDefaultUseCaches(false);
//have tried "GET" and "POST" and "PUT"(PUT not directly compatible with apache servers)
servletConnection.setRequestMethod("POST");
servletConnection.setRequestProperty("Content-type","application/octet-stream");
/*Have also tried application/x-java-serialized-object*/
//set object output stream
ObjectOutputStream outStream =
new ObjectOutputStream(servletConnection.getOutputStream());
//write a string for test purposes (As far as I am aware String implements Serializable)
outStream.writeObject("h");
//flush and close connection
//have tried a combination of flush and/or close
outStream.flush();
outStream.close();
//get input stream rdy for objectinput stream
iStream = servletConnection.getInputStream();
catch(IOException e)
jt.setText("Error in output "+e);
ObjectInputStream oInStream=null;
String str = iStream.toString();
//iStream at this point equals ""sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@6754d6
try
//this is where the error occurs
//upon even trying to create a objectinputstream using iStream IOException occurs
oInStream = new ObjectInputStream(iStream);
//program does not get any further
oInStream.close();
catch(IOException e)
//this error has been driving me crazy :(
jt.setText("Error in input "+e);
Servlet code is below however it does not even reach this point
(If reading input stream is removed from the applet the servlet provides the same error message)
/////////////////////Servlet code (however does not reach this point)///////////////
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class TServ extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
ObjectInputStream inputFromApplet = null;
InputStream in = request.getInputStream();
BufferedReader inTest = null;
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet TServ</title>");
out.println("</head>");
out.println("<body>");
try
inputFromApplet = new ObjectInputStream(in);
out.println("<h2>Sucess </h1>");
catch(EOFException e)
out.println("<h3>ERROR: " e " Error</h3>");
out.println("<h3>End Servlet</h3>");
out.println("</body>");
out.println("</html>");
out.close();
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
public String getServletInfo() {
return "Short description";
Thank you for your time I have searched for an answer for some time now and how found people in similar situations however no solution has been found
Any help is appreciated
Az

The servlet isn't writing any objects back in reply. It is writing text. Not the same thing. If you want to read using an ObjectInputStream you have to write using an ObjectOutputStream.

Similar Messages

  • Need Help With: java.io StreamCorruptedException invalid stream header

    All:
    1. For some time I have tried to correct an error: "java.io StreamCorruptedException invalid stream header" , reoccuring in Jasper Reports source code.
    2. Based upon requirements, The Program packages variables into a HashMap, and creates a "BLOB" object which is inserted into an Oracle database. At a later point, the BLOB object is retrieved, and the "BLOB" contents are read into a byte array. The next occurring task is to retrieve data from the receiving byte array and reconstitute the original HashMap object.
    THIS IS WHEN THE PROGRAM FAILS !!!!!
    3. I can verify the number of bytes going in/out of the "BLOB" object as being the same count. I have tried different approaches listed on diverse sites w/o success. My Source Code Follows:
    // I tried to include only germane source code.
    // THIS SECTION GETS THE BLOB OBJECT AND PUTS IT INTO A BYTE //ARRAY
    rs = ps.executeQuery();
    if (rs.next())
    BLOB myblob =((OracleResultSet)rs).getBLOB("JASPERDATA");
    int chunkSize = myblob.getChunkSize();
    System.out.println("Incomming DATA size is ........." + chunkSize);
    textbuffer = new byte[chunkSize];
    int bytesRead;
    InputStream myis = myblob.getBinaryStream();
    OutputStream myout = myblob.getBinaryOutputStream();
    while((bytesRead = myis.read(textbuffer) )!= -1)
    myout.write(textbuffer);
    myout.flush();
    "" //code not germane to Discussion
              return (textbuffer); //Returns Byte Array
    // I tried to include only germane source code.
    byte [] textbuffer = adb.getBLOBFromQueue(dataFile); // Get Byte Array from above.
    int textbufferLength = textbuffer.length;
              HashMap localParamValueMap = null;
              Object in = new ObjectInputStream(new ByteArrayInputStream(textbuffer ));
              localParamValueMap = (HashMap) ((ObjectInputStream) in).readObject(); // THIS IS THE PROBLEM AREA EXCEPTION OCCURS AT "readObject"
    // ERROR RECEIVED IN TOMCAT
    //ERROR CALLSTACK
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at com.entservlet.DisplayJasperReports.doGet(DisplayJasperReports.java:72)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)

    Be sure that you are not seeing a secondary problem.
    In my case, with serialized objects back to the client, the client will see this expection when any of the following occurs:
    1) The server has timed out the session and instead of sending back an object, the object stream is seeing the login page.
    2) An error is occured somewhere inside of the jsp code and instead of getting a the expected serailized object in the stream, I'm getting the 500 status page...
    So...
    In your case you are going from one server to tomcat but I wouldn't be surprised if something similar is going on.
    -Dennis

  • Java.io.StreamCorruptedException: invalid stream header

    I am having a problem with sending two objects (over a socket). I have read in other posts that this could be due to trying to receive incompatible data types but my applications work fine if I send my objects synchronously rather than asynchronously.
    I will try my best to describe what my problem is as my code is very long.
    I have a server and a client application (2 apps). Multiple clients connect to the server and send their details (as an object) to the server. The server then amends the object (adds some more data) and sends it back to the clients. Both the SendObject and ReceiveObject class are threads and I have created a Listener (within the client) that activates when an object is received (asynchronous communication). The Listener method looks to see if the event is an instance of a particular class and casts is as appropriate (as per below).
    public void receivedObject(ReceivedObjectEvent e) {
         ReceiveObjectThread obj = (ReceiveObjectThread) e.getObject();
         if(obj.getObject() instanceof Player) {
              thePlayer = (Player) obj.getObject();
              theTable.setHandData(thePlayer.getHand());
         if(obj.getObject() instanceof GameData) {
              gameData = (GameData) obj.getObject();
              theTable.setPlayerList(gameData.getOpponents());
    }The objects that are passed between applications both implement Serializable.
    This all works fine synchronously object passing. However, if I try and spawn two sendObject threads within the server and the corresponding two receive threads within the client and wait for the Listener to activate (asynchronously) I get the following error:
    java.io.StreamCorruptedException: invalid stream header: 00057372
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
         at ReceiveObjectThread.run(ReceiveObjectThread.java:84)
    java.io.StreamCorruptedException: invalid stream header: ACED0006
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
         at ReceiveObjectThread.run(ReceiveObjectThread.java:84)
    I am sure that this problem is due to my limited knowledge on socket and data transfer. Therefore any help on this one will be gratefully received.

    Hello ejp, your reply is very much appreciated.
    If I explain how I have implemented my sockets you may be able to see where I wrong.
    When a player connects, the client sends the server a �player� object. The server receives the �player� object and passes the socket from which it connected (within the server) to a socket property within the �player� class. Whenever the server needs to send an object to that client (player), it sends the output stream from the socket property within that �player� object. ( player.getSocket().getOutputStream() ).
    Below is the code from the �SendObjectThread� class.
    * This class allows an object to be passed over a Socket
    * @author Harold Clements
    * @version 1.0.1 12-Jun-2007 (12-Jul-2007)
    //http://www.seasite.niu.edu/cs580java/Object_Serialization.html
    public class SendObjectThread extends Thread {
         private OutputStream out;
         private Object obj;
          * This constructor allows the user to passes the two parameters for transmitting.
          * @param out The data stream that the object is going to be sent to.
          * @param obj The object to be sent.
         public SendObjectThread(OutputStream out, Object obj) {
              this.out = out;
              this.obj = obj;
          * The main thread
         public void run() {
              try {
                   ObjectOutputStream objOut = new ObjectOutputStream(out);
                   objOut.writeObject(obj);
                   objOut.flush();
              } catch (IOException e) {
                   e.printStackTrace();
    }The client only has one socket which is defined when the client first makes a connection with the server. The �getOutputStream()� and �getInputStream()� are used for all communication from the client.
    Is this what you described in your first option?
    The funny thing about it all is if I create a new �receiveObjectTread� and wait for that to finish, then create another �receiveObjectTread� both objects in question (Player and GameData) are received correctly and the application works. I only have the problem when I set both threads off and leave it for the �ReceivedObjectEvent� listener to pick them up and cast them (as per my first post).
    Thanks again for your help,
    Harold Clements

  • Getting "java.io.StreamCorruptedException: invalid stream header"

    When creating a self made Stream (MacInputStream) and then using an ObjectInputStream over it to read Objects from a socket, I get this error:
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
         at TServidor.run(TServidor.java:32)
    Is there any special feature that the "self-made" streams have to implement to be possible to use ObjectInput streams over them :P ?
    Here is the MacInputStream.java code:
    import java.io.Closeable;
    import java.io.FilterInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Arrays;
    import javax.crypto.Mac;
    public class MacInputStream extends FilterInputStream implements Closeable{
         private Mac mac; // algorithm
         private byte [] mmac; //message MAC
         private boolean FIRST_TIME;
         public MacInputStream(InputStream is,Mac mac) {
              super(is);
              this.mac=mac;
              FIRST_TIME=true;
    public int read() throws IOException{
              if(FIRST_TIME){
                   mmac = new byte [mac.getMacLength()];
                   super.read(mmac);
              if(super.in.available()==0){
                   FIRST_TIME=true;
                   return -1;
              int rbyte = super.in.read();
              FIRST_TIME=false;
              mac.update((byte)rbyte);
              System.out.println("available: "+super.in.available());          
              if(super.in.available()==0){
                   byte [] macres =mac.doFinal();
                   System.out.println("message MAC: "+new String(mmac));
                   System.out.println("calculated MAC: "+new String(macres));
                   if(!Arrays.equals(macres, mmac)){
                        throw new IOException("violated integrity");
              return rbyte;
    public int read(byte [] b) throws IOException{
         if(FIRST_TIME){
              mmac = new byte [mac.getMacLength()];
              super.in.read(mmac);          
         if(super.available()==0){
              FIRST_TIME=true;
              return -1;
         int rbytes = super.in.read(b);
         FIRST_TIME=false;
         mac.update(b);
         if(super.available()==0){
              byte [] macres =mac.doFinal();
              if(!Arrays.equals(macres, mmac)){
                   throw new IOException("violated integrity");
         return rbytes;
    }And here is the "main" function where the exception gets thrown:
    public void run() {
         try {
              ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());
              Mac mac = Mac.getInstance("HmacMD5");
              Key key = KeyGenerator.getInstance("HmacMD5").generateKey();          
              oos.writeObject(key);
              oos.flush();
              mac.init(key);          
              ObjectInputStream cis = new ObjectInputStream(new MacInputStream(s.getInputStream(),mac));
             String test;
             try {
                   while (true) {
                        test = (String)cis.readObject();
                        System.out.println(ct + " : " + test);
              } catch (EOFException e) {
                   System.out.println("["+ct + "]");
              } finally {
              if (cis!=null) cis.close();
              if (oos!=null) oos.close();
         } catch (Exception e) {
             e.printStackTrace();
        }It's exactly in the line: ObjectInputStream cis = new ObjectInputStream(new MacInputStream(s.getInputStream(),mac));Any ideas?
    I'm starting to desperate :P

    (a) I still don't see where you are writing the MAC that you're reading. You're reading something, but it's all or part of the Object stream header I described above, which is why ObjectInputStream' constructor is throwing that exception.
    (b) You don't need to override read(byte[] b) when you extend FilterInputStream, but you do need to override read(byte[] b, int offset, int length), and you need to do it like this:
    public int read(byte[] buffer, int offset, int length) throws IOException
      int count = 0;
      do
        int c = read();
        if (c < 0)
            break;
        buffer[offset+count++] = (byte)c;
      } while (count < length && available() > 0);
      return count > 0 ? count : -1;
    }This way the read() method gets to see every byte that's read and to do its MAC thing or whatever it does. The above is one of only two correct uses of available() in existence: it ensures that you only block once while reading, which is the correct behaviour e.g. on a network.

  • Invalid stream header Exception - AES PBE with SealedObject

    I am trying to do an PBE encryption with AES algorithm and SunJCE provider, using the SealedObject class to encrypt/decrypt the data...
    And Im still getting the "invalid stream header" exception. Ive searched this forum, readed lots of posts, examples etc...
    Here is my code for encryption (i collected it from more classes, so hopefully I didnt forget anything...):
        //assume that INPUT_STREAM is the source of plaintext
        //and OUTPUT_STREAM is the stream to save the ciphertext data to
        char[] pass; //assume initialized password
        SecureRandom r = new SecureRandom();
        byte[] salt = new byte[20];
        r.nextBytes(salt);
        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
        KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);
        SecretKey pbKey = factory.generateSecret(keySpec);
        SecretKeySpec key = new SecretKeySpec(pbKey.getEncoded(), "AES");
        Cipher ciph = Cipher.getInstance("AES/CTR/NoPadding");
        ciph.init(Cipher.ENCRYPT_MODE, key);
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        int ch;
        while ((ch = INPUT_STREAM.read()) >= 0) {
          byteOut.write(ch);
        SealedObject sealed = new SealedObject(byteOut.toByteArray(), ciph);
        BufferedOutputStream bufOut = new BufferedOutputStream(OUTPUTSTREAM);
        ObjectOutputStream objOut = new ObjectOutputStream(bufOut);   
        objOut.writeObject(sealed);
        objOut.close();
      }And here is my code for decrypting:
        //assume that INPUT_STREAM is the source of ciphertext
        //and OUTPUT_STREAM is the stream to save the plaintext data to
        char[] pass; //assume initialized password
        SecureRandom r = new SecureRandom();
        byte[] salt = new byte[20];
        r.nextBytes(salt);
        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
        KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);
        SecretKey pbKey = factory.generateSecret(keySpec);
        SecretKeySpec key = new SecretKeySpec(pbKey.getEncoded(), "AES");
        BufferedInputStream bufIn = new BufferedInputStream(INPUT_STREAM);    //MARK #1
        ObjectInputStream objIn = new ObjectInputStream(bufIn);   
        SealedObject sealed = (SealedObject) objIn.readObject();   
        byte[] unsealed = (byte[]) sealed.getObject(key);          //MARK #2
        ByteArrayInputStream byteIn = new ByteArrayInputStream(unsealed);
        int ch;
        while ((ch = byteIn.read()) >= 0) {
          OUTPUT_STREAM.write(ch);
        OUTPUT_STREAM.close();Everytime I run it, it gives me this exception:
    Exception in thread "main" java.io.StreamCorruptedException: invalid stream header: B559ADBE
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
         at javax.crypto.SunJCE_i.<init>(DashoA13*..)
         at javax.crypto.SealedObject.unseal(DashoA13*..)
         at javax.crypto.SealedObject.getObject(DashoA13*..)
         at oopsifrovanie.engine.ItemToCrypt.decrypt(ItemToCrypt.java:91)  //MARKED AS #2
         at oopsifrovanie.Main.main(Main.java:37)    //The class with all code below MARK #1I've also found out that the hashCode of the generated "key" object in the decrypting routine is not the same as the hashCode of the "key" object in the ecrypting routine. Can this be a problem? I assume that maybe yes... but don't know what to do...
    When I delete the r.nextBytes(salt); from both routines, the hashCodes are the same, but that's not the thing I want to do...
    I think, that the source of problem can be this part of code (generating the key):
        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
        KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);
        SecretKey pbKey = factory.generateSecret(keySpec);
        SecretKeySpec key = new SecretKeySpec(pbKey.getEncoded(), "AES");But I derived it from posts like: [http://forums.sun.com/thread.jspa?threadID=5307763] and [http://stackoverflow.com/questions/992019/java-256bit-aes-encryption] and they claimed it's working there...
    Is there anyone that can help me?
    Btw, I don't want to use any other providers like Bouncycastle etc. and I want to use PBE with AES and also SealedObject to store the parameters of encryption...

    Yes, it really uses only one Cipher object, but it does decoding in a little nonstandard (not often used) way, by using the SealedObject class and its getObject(Key key) method. You can check these links for documentation: [http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#SealedObject] and [http://java.sun.com/javase/6/docs/api/javax/crypto/SealedObject.html] So the question is, why it doesn't work also with the AES routines, because it should.
    Btw, according to [http://java.sun.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunJCEProvider] PBEWithSHA1AndDESede/CBC/PKCS5Padding is a valid JCE algorithm for the Cipher class.
    Firstly, I was generating the key for AES enc./decryption this way and it was working:
    char[] pass; //assume initialized password
    byte[] bpass = new byte[pass.length];
        for (int i = 0; i < pass.length; i++) {
          bpass[i] = (byte) pass;
    SecretKeySpec key = new SecretKeySpec(bpass, "AES");
    But I think, that it really wasn't secure, so I wanted to build a key from the password using the PBE.
    Maybe there's also a way how to do this part of my AES PBE algorithm: *KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);* manually (with my own algorithm), but I dont know how to do it and I'd like it to be really secure.
    Btw, thanks for your will to help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Invalid stream header exception

    hi all
    I have a program to encrypt/decrypt a file using existing secret key
    which is generated by my java code and it works fine. I got a key from a friend and an encrypted file to decrypt it but the program throws this exception:
    java.io.StreamCorruptedException: invalid stream header: 87449FAA
    Exception in thread "main" java.security.InvalidKeyException: No
    installed provider supports this key: (null) this is my code:
    try
        //throws exception here
        ObjectInputStream in = new ObjectInputStream(new
    FileInputStream("key.dat"));
        key = (SecretKey)in.readObject();
        byte[] raw = key.getEncoded();
        skeySpec = new SecretKeySpec(raw, "AES");
        in.close();
    catch (Exception e)
        System.out.println(e);
    Cipher cipher = Cipher.getInstance("AES");
    cipher.init(Cipher.DECRYPT_MODE, skeySpec); Honestly i don't know how my friend creates the secret key but i think he uses some key generation tools. I suppose the key file is not corrupted because he used it to encrypt/decrypt other files.

    Looks like your friend did not use Java serialization to save the key in the file.
    Edited by: sabre150 on Apr 13, 2008 5:27 PM

  • Problem with loading Binary Stream as image

    Hi all,
    I'm facing problem of loading Binary Stream as image.
    from source system we are getting image in XML file as string (i.e binary stream).
    Now i want to load that string again into table as BLOB. i am able to load in to BLOB column but not able to view image properly. it's giving error like "Image has not been decoded properly from binary stream".
    How can i solve this issues?
    Any help.
    thanks in advance.
    Vinay

    michali7x4s1 wrote:
    Thats a code i found somewhere, tried to check how some things work.Have you used exceptions before? If not, please read the sun tutorial on them as they are very very important. Also, whether this is your code or someone else's doesn't matter as it's yours now, and you would be best served by never throwing out exceptions as is done in this code. It's like driving with a blindfold on and then wondering why you struck the tree. It's always best to go through the tutorials to understand code before using it. If it were my project, I'd do it in Swing, not AWT. Fortunately Sun has a great tutorial on how to code in Swing, and I suggest you head there as well. Best of luck.

  • PDF Exaprom, problem with multitext in one header

    Problem is,that according to my simply thiking when I connect two elements Append Text HF one by one serialy with some text in header, and in their properties I set alligment both of them at left- MIDDLE in my opinion it suppose to overwrite one text on secand. When I set one text at left-MIDDLE and secont text in center-MIDDLE is should firstly create one text at left side, another at the middle. I doesn't.... When you try to combine with alligment of text,you easly notice,that when it's creating first text at the left side,it devide page on 3 and locate it at 1 collumn, and then when you pass this PDF Report to second Append Text HF this subVI divide not the same lenght of the side, but those 2-3 columnt whose left!!!! In effect text wich suppose to be at center of document is the center of 2-3 parts of document. 
    Do I doing something wrong or is it program bug? 
    Attachments:
    pdf_report_test.vi ‏53 KB
    Report.pdf ‏20 KB

    Now I see,
    I just haven't know about this specyfication of that subvi.
    I managed to deal with that, but unfortanatly I have another problem.
    In help context of create table.vi you can read that in cell can be eiter text or pictures. I want to add 2D array of pictures and it show mistake. Do I ones again don't understand description or I have to do it in other way? I just wanted to create table ona the page,which will contain pictures, let's say 2x2 size table, picture in each cell. Is it possible to using this program? 
    Attachments:
    pdf_report Folder.zip ‏2270 KB
    pdf report.JPG ‏402 KB
    pdf_report Folder.zip ‏2270 KB

  • Problems with Flash video streaming in any Browser (Windows 8.1)

    Hello.
    Since maybe the last Chrome update (to version 42.0.2311.90 m - I tried both 32 and 64 bits versions) or some Windows 8.1 updates (I don't know for sure), flash videos don't even start to buffer - they only play after the full content is downloaded (or loaded in the site's player) . So, If I try to watch a video from a Flash Player based interface (like Dailymotion, or Vimeo), I have no streaming, and I have to wait a long time, watching a "1%" or a load wheel until the full content is available to watch.
    This is happening with all browsers, not only Chrome (IE and Firefox too). I tried to update flash player (first, version 17,0,0,169 and then tried the beta, the one released April 14, 2015). No difference at all. So, I think this might be a problem with the flash player itself, or with some Windows settings.
    So, lets go to the facts:
    - That happened suddenly for no apparent reason - one day it was working, and on the other day it wasn't;
    - I have the latest versions of all browsers I use (Chrome, IE and Firefox);
    - My Flash Player version is, currently, the latest version;
    - I tried old Flash Player versions. didn't work;
    - This is not happening with HTML5 video players, like Youtube, so i think it's not a codec problem;
    - I have the latest nVidia graphics driver. And it was happening even before I update the driver (I have a GeForce GTX 770);
    - I tried disabling the hardware acceleration on Flash settings, nothing happened;
    - I use default Windows Firewall and Defender. Tried to disable firewall, nothing happened;
    - I had searched all over the internet for the answer, but I can't find it. I already did all what the troubleshoot pages from Adobe said to do;
    - My internet connection is fine. It's a fast connection, and It's on wireless. I have several PCs connected to this network and flash videos work fine with them, only in this specific machine isn't;
    - I tried uninstall flash player and install again several times, with several different versions. Didn't work;
    - Tried disable different versions of flash player on Chrome too, nothing happened.
    The thing is, I can imagine that this might not be only a flash player problem, but since it's the only plugin problem I have, I thought that you might have the answer.
    Thank you.

    Please work through the video troubleshooting guide.
    https://helpx.adobe.com/flash-player/kb/video-playback-issues.html
    If you're still stuck, please follow the directions in the guide on providing the dxdiag report and additional information about what you tested and saw.

  • Sync-problem with 'my photo stream' between iPhone (IOS) and PC (Win7)

    Hi all,
    I have a problem with the automatic sync of "my photo stream".
    My photo steam on my IOS device contains 52 photos.
    On my Windows computer there are only 43 photos available.
    There is no logic behind the missing photos.
    I took 2 more photos to test the stream. After I took the photos I've 54 photos in my album. 2 min later the upload seems to be completed because on my IOS device I've 54 photos.
    I've waited for over 2 hours now and on my Windows computer there are still 43 photos. So the new ones are missing beside some missing photos in between!
    What I've already done:
    # re-install iCould on Windows computer
    # reset iPhone to factory defaults
    # several shutdown and reboots of all devices
    maybe someone can help me with that problem!
    thanks in advance!
    cheers
    max

    I tried the sign-out/reboot/sign-in and now it's stranger than before.
    On my iPhone I have 79 pictures in 'my photo stream'.
    On my PC I have 24 randomly picked photos in 'my photo stream'.
    IMG_0001.JPG, IMG_0002.JPG, IMG_0003.JPG, IMG_0004.JPG, IMG_0005.JPG, IMG_0006.JPG, IMG_0007.JPG, IMG_0008.JPG, IMG_0009.JPG, IMG_0010.JPG, IMG_0011.JPG, IMG_0012.JPG, IMG_0013.JPG, IMG_0014.JPG, IMG_0015.JPG, IMG_0017.JPG, IMG_0022.JPG, IMG_0023.JPG, IMG_0028.JPG, IMG_0029.JPG, IMG_0030.JPG, IMG_0035.JPG, IMG_0041.JPG, IMG_0049.JPG
    Something very strange is happening here...

  • Problem with iCloud Photo Streaming to 3 OS6 devices?

    I have 3 OS6 devices with 3 different iCloud accounts, 2 iPhones and an iPod touch. Photo Stream will work between iPhone 1 and ipod touch and vise versa, but neither will connect by invite to the 2nd iPhone. The 2nd iPhone won't connect either to the other 2 devices?
    All settings are the same, The only possibilty I can think of is that the 2nd iPhone's iCloud account has become corrupted? Any suggestions?

    Hi Diiaablus95,
    I apologize, I'm a but unclear on the exact nature of the issue you are describing. If you are having issues with My Photo Stream on your iPhone after a recent upgrade to iOS 8, you may find the troubleshooting steps outlined in the following article helpful:
    Get help using My Photo Stream - Apple Support
    Regards,
    - Brenden

  • Problems with sub-items and header attributes in complains

    Hello Gurus!
    I am relatively new to the enterprise services and I have a requirement to create a complain with one product and a child product (items 1000 and 1010) but I tried several ways the service and no matter what I do I always get 2 items without relationship between them. I have tried specifying the parent item ID during create (did not expect to work as parent has also not been created yet) and also tried the BusinessTransactionDocumentReference, but also did not work or did not use the content correctly, in the ES Workplace there is not much info about the possible values for this data segment and it's not returned when I read an existing complain (so I think it is not the way to go)
    Finally, the question is... can I create a complain using the enterprise service CustomerComplaintCRMCreateRequ and with the header, item and subitem in the same step or must I create first and then update? (Like the manual process would be)
    Thanks!

    Hi Milos,
    If nothing at all has synchronized, I would first double check your connection settings and passwords.
    If the synch appears to to be connecting correctly, you will need to look at the data that it is failing on.
    The synch queue is the prx_transaction_queue table in the Business One database.  The object_type column refers to a Business One object.  2 for business partner and 4 for items.  The list_of_cols_val_tab_del is the key in the associated table.  For business partners that is OCRD.CardCode and items OITM.ItemCode.
    First determine that there is no bad data in the queue.  Bad data is typically defined as null or empty strings in the list_of_cols_val_tab_del column.
    Try running the following for business partners:
    select *
    from prx_transaction_queue
    where object_type = 2 and (list_of_cols_val_tab_del is null or list_of_cols_val_tab_del = '')
    And this for Items.
    select *
    from prx_transaction_queue
    where object_type = 4 and (list_of_cols_val_tab_del is null or list_of_cols_val_tab_del = '')
    If there are nulls or empty strings in the list_of_cols_val_tab_del column, delete them.
    If not, take a look at the first records in the queue.
    select top 1 *
    from prx_transaction_queue
    where object_type = 2
    order by tmstmp
    and for items:
    select top 1 *
    from prx_transaction_queue
    where object_type = 4
    order by tmstmp
    Change the transaction_type to "X" (remember what is was, because you will need to change it back).  Changing this value will remove the item from the synch.
    Rerun the synch. 
    If it runs at this point, there is probably data in the records that the synch was not expecting.  The business partner data will need to be examined.  Tics in key values (CardCode, Address Name, contact name, itemcode) may cause problems.
    If this is the case, you might want to contact support to try to track the problem down.
    Another source of problems may be database collation.  We can talk about that if none of the above works.

  • HT4858 Is anyone else having problems with shared photo stream URLs not updating after photos are added or deleted from a shared photo stream?

    I have made quite a few shared photo streams and love the idea of sharing easily with a variety of friends and family. The problem in having is that any modifications made to the shared photostream (adding/deleting pictures) are not updated in the URL I have sent to my family and friends. Is anyone else experiencing this? Does anyone have any ideas or solutions?

    Disable Photo Stream in the System/iCloud preference pane
    and in iPhoto's Photo Share preference pane.
    Reboot and reenable both respectively. That should jump start Photo Stream on your Mac.
    Happy Holidays

  • Problems with Data Objects, streams, and openDoc

    When I try to use this.openDataObject("myObject") in Acrobat 8, I get
    NotAllowedError: Security settings prevent access to this property or method.
    Doc.openDataObject:1:Console
    I have checked that the attachment type is allowed in the registry (and it is by default since the attachment is PDF), so is there a setting that can prohibit JavaScript from opening attachments?  If so, can I change this setting somewhere?
    I have discovered that while the above issue needs to be resolved, it is only part of the problem.  I am trying to read in a PDF file using Net.HTTP.request, convert the response using stringFromStream, then feed the response to createDataObject.  The result is not a valid PDF file.  Is this process possible or am I going about this the wrong way?  I have also tried app.openDoc, but since the PDF is located on our intranet https://someserver.com/doc.pdf I get a security error.  Using only folder level JavaScript, is it possible to open a remote file from a web server, evaluate its Doc object (fields, etc), then save the file back out to the local file system?
    Thanks,
    Scott
    Message was edited by: AcroBishop

    I have hundreds of Acrobat PDF forms out on the company web server.  There is a web service that produces an xml feed which lists all of the documents hosted on that server.  I read in the XML and query it to return the URL of a desired PDF.  What I need is a way to import the Doc object of that PDF so that I can enumerate over all of the fields and populate a listbox in the current document with those field names.  If I could then save the imported PDF to a local folder, well... that would just be icing on the cake.  The way I have been trying to go about this is to feed the URL to Net.HTTP.request which should (in theory) return the PDF as a stream object.  I run util.stringFromStream on that object because I want to feed it to createDataObject which requires a string to act upon.  My problems at this point in the operation are:
    1. I don't think this creates a valid PDF document object and I'm not sure if it should or if I am doing something wrong.  Though I am passing the correct MIME type to the createDataObject (application/pdf)
    2. regardless of the type or validity of the attachment, I get the error message that I mentioned in my original post which leads me to believe that somehow this company has disabled opening attachments via JavaScript.  If that is the case I need to know how to change that configuration.

  • Problem with XML Data Streaming sample

    Hello.
    I'm learning to use SAX API in order to insert large XML files into database. I'm trying to run sample xdksample_040602.zip (data stream sample using pl/sql and
    SAX). Everything runs fine until I run "ExDocumentTest.sql" file. I get this error:
    Errors for PROCEDURE DOCEXPAND:
    PL/SQL:SQL Statement ignored
    PLS-00385: type mismatch found at 'P_XML' in SELECT...INTO statement
    PL/SQL:SQL Statement ignored
    PLS-00385:type mismatch found at 'P_DTD' in SELECT...INTO statement
    Please I need to solve this problem. Or... where can I find another sample to do what I want? this seems to be the only sample for inserting XML into the database
    with SAX. I already know how to do it with DOM.
    Eric.

    Hi Eric,
    There is a SAX Loader Sample Application available at XML DB Sample corner page that also demonstrates the insertion of XML into the database with SAX.
    You can find this sample at the following URL:
    http://otn.oracle.com/sample_code/tech/xml/xmldb/index.html
    Hope it helps
    Shefali

Maybe you are looking for

  • File permission in unix - file is created by File Adapter

    I've created a composite that creates an output file in unix server. Problem that I have is the file permission. When file is created it has a permission like below even though this directory is widely open - chmod 777. -rw-r----- 1 oracle dba 1123 M

  • Re: BI BEx query in Portal

    Hi All, My user wants me to develop a report which to be displayed in portal. Kindly tell me what all the ways I can achieve this. Few questions, 1. There is an option available in BEx query Designer publish to portal. How to use this. what will happ

  • Sort by Develop Adjustments

    I would like to be able to sort a set of photos by those that have Develop Adjustments and those that do not.  Is this easily done?  For now, I don't want to sort by the type of adjustment.....just whether or not an image has one. Thanks

  • How to sync photos and videos from mac to ipad

    Hi, my brother took pictures and videos on my mac, I searched everywhere in itunes, but I don't know how, can you help me, thanks.

  • Change Pointers and Recovery Index

    Hi, Please give me any more details/docs/links about the Recovery index,indexing and Change Pointers. Is there any configuration needs to be done for change pointers and indexing. Regards, Krishna