Problems with using SAXParser.parse with an InputStream

Hello:
I have successfully run the echo01 program from the XML tutorial. I made the following changes to parse the output from a servlet which generates an XML document.
URL recordedSensor = new URL("http://redbd01:8010/servlet/RecordedSensor?vin=1M000000000000001");
URLConnection rsConn = recordedSensor.openConnection();
// Parse the input
SAXParser saxParser = factory.newSAXParser();
saxParser.parse( rsConn.getInputStream(), handler);
I get the following errors when I try to run the code.
org.xml.sax.SAXParseException: java.lang.NullPointerException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:393)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:191)
at ServletInterface.main(ServletInterface.java:29)
I think I have the problem narrowed down to the handlers accessing the class variable out which is a Writer the emit() method uses to output the document. When I replace out.write in emit() with System.out.println() the code works.
I've tried accessing other class variables in the handler methods with similar results.
Anybody encountered similar problems? And what is the solution.
Thanks in advance,
Gary

I have the same problem, if you find a solution let me know. I've double checked my objects to make sure their not null, I've checked my constructors in the extended default handler, not really sure where else to look, its such a simple program....

Similar Messages

  • I am having problem while using ms word with anjal( OS X Lion 10.7.5 (11G63))

    i am having problem while using ms word with anjal  is not working properly but its working in facebook and other areas.i need and  its very important to using tamil fonts for my job.can anyone help me out from this problem.
    thanking you
    by
    moses

    Those who are knowledgable in this area (myself not among them) say that Word's support for Asian languages is faulty. The best word processor for that use is "Mellel."

  • Problems in using Windows Explorer with VPC Virtual PC?

    Has anybody experienced problems in using Windows Explorer with VPC Virtual PC?
    Lacking any "forbidden" or "appropriate usage" guidelines, I regularly use Windows Explorer (Windows 2000) to transfer file from the desktop. I have occasionally sensed that this might be wrong. Today I inadvertently clicked the MAC harddrive instead of the Desktop (within Windows Explorer) and caused all manner of mischief.
    Any other views please?

    Let me correct this:
    I regularly use Windows Explorer (Windows 2000) to transfer files from the "Mac" desktop
    Any ideas please Virtual PC VPC users?

  • AUDIO PROBLEM WHILE USING OR ALONG WITH WEBCAM

    Hi friends,
    SUBJECT : AUDIO PROBLEM WHILE USING OR ALONG WITH WEBCAM
    I'm not getting any sound while using web-cam.
    I tried recording my voice , and played.. i can see my video but audio
    Do we have any settings where i need to cross-check to make sure that everything being turned-on ?
    My laptop details:-
    HP Pavilion dv6 laptop
    Operating system Installed - Windows 7
    Can someone help me with this?
    Thanks
    kiran

    Hi,
    not sure if coincidence or the same question, but the same question got asked internally. The seeded option is required to get the OJSP filter installed. Here's the internal response
    ADF View integration with MDS not configured
    In web.xml, you need to have mds-ojsp intg enabled to load jspx base + customizations from MDS. In your web project in Jdev, go to ADFv project properties and select “Seeded customization” property. It would enable mds-jsp engine configuration in web.xml. If you want to use user personalization feature at runtime, you would need to select “User customization” property as well which would enable ADFv change persistence config in web.xml.
    Warning: Some of the metadata under ... is packaged as part of both WAR and MAR. This metadata cannot be accessed from WAR using MDS.
    For these two packages, you are including the files in both WAR & MAR. This warning conveys that since these base files are being put in MAR, at runtime they would be read from mds repository & not from WAR.
    Frank

  • Problem in using SAX parser.

    Hai All,
    I have got a problem in using SAX parser.
    My XML looks like this:
    <authorizer>
    <first-name>HP</first-name>
    <last-name>Services</last-name>
    <phone>800-22-1984</phone>
    </authorizer>
    <destination>
    <first-name>John</first-name>
    <last-name>Doe</last-name>
    <company>John Doe Enterprises, Inc.</company>
    <department>Manufacturing</department>
    <phone>800-555-1234</phone>
    <address>
    <street-one>1654 Peachtree Str</street-one>
    <street-two>Suite Y</street-two>
    <city>Atlanta</city>
    <province>GA</province>
    <country>US</country>
    <postal-code>30326</postal-code>
    </address>
    </destination>
    my part of SAX parser code is:
    public void startElement (String name, AttributeList attrs)
    throws SAXException
    accumulator.setLength(0);
    public void characters (char buf [], int offset, int len)
    throws SAXException
    accumulator.append(buf, offset, len);
    public void endElement (String name)
    throws SAXException
    if (name.equals("first-name") )
    firstname=accumulator.toString().trim();
    if (name.equals("last-name"))
    lastname=accumulator.toString().trim();
    My problem is that i have to store the values of first-name and last-name.
    but i have that in both
    <authorizer> </authorizer> Tag and
    <destination> </destination>
    I need to retrive authorizer's firstname,lastname and
    destination's firstname and lastname.
    what i mean is i need to store authorizerFirstName,authorizerLastName
    destinationFirstname and destinationLastname.
    Pls let me know how to do that.
    Thanks in advance.
    Pooja.

    hi pooja,
    I think you are using DataHandler for parsing. Its deprecated. try using contentHandler . You can get the value of the element at the beginning. say for example
    <firstname>sdfs</firstname>
    the startElement will be firstname
    the next method that it invokes will be characters method which has the text associated with the element. I am sending a sample code for your problem. try using it .
    boolean m_boolinAuth = false;
    boolean m_boolinDest = false;
    boolean m_bAuthFName = false;
    boolean m_bAuthLName = false;
    public void startElement(String namespaceURI, String elementName, String qName, Attributes atts)
    //does the logic for startElement
    if(qName.equals("Authorization"))
    m_boolinAuth = true;
    m_boolinDest = false;
    else if(qName.equals("Destination"))
    m_boolinDest = true;
    m_boolinAuth = false;
    if(qName.equals("firstname"))
    m_bFirstName = true;
    if(qName.equals("lastname"))
    m_bLastName = true;
    public void characters(char[] ch, int start, int length)
    //does the logic for characters.
    String str = new String(ch,start,length);
    if(m_bFirstName)
    if(m_boolinAuth)
    m_strAuthFirstName =str;
    else if(m_boolinDest)
    m_strDestFirstName = str;
    m_bFirstName = false;
    if(m_bLastName)
    //same as first name case;
    }

  • How to use a parser with crimson XmlDocumentBuilder

    Hi,
    I'd be very grateful for any help on the following...
    I used to use the following code to parse an Xml document, using a SimpleElementFactory to create my own class Element nodes...
    XmlDocumentBuilder builder = new XmlDocumentBuilder();
    parser = new com.sun.xml.tree.ValidatingParser();
    parser.setDocumentHandler( builder );
    parser.parse( in );
    Docuent doc = buider.getDocument();
    This worked fine using the project X code. However after migrating to the crimson code I can't find a way to link my XmlDocumentBuilder with the parser.
    com.apache.crimson.parser.ValidatingParser seems to have no methods to link it to a com.apache.crimson.tree.XmlDocumentBuilder. If I follow a similar pattern to before the getDocument call returns null as the parser is not linked to the builder.
    Please could someone point out my obvious mistake!
    Many thanks

    Hello,
    I am using Crimson parser to parse an XML Document containing Czech characters. When I write the stuff read from the file, the output seems to be a corrupted one. It will be highly appreciable if someone can come up with any idea on where things might have gone wrong?
    The foll is the piece of code that reads and writes the XML.
    Writer xout = null;
    String inputXML     =     "content-chzech.xml";
    javax.xml.parsers.DocumentBuilderFactory xDbf     =     javax.xml.parsers.DocumentBuilderFactory.newInstance();
    javax.xml.parsers.DocumentBuilder     xDb     =     xDbf.newDocumentBuilder();
    Document xD                          =     xDb.newDocument();
    File xmlFile                          =      new File(inputXML);
    xD                              =      xDb.parse(xmlFile);
    XmlDocument xdoc                     = (XmlDocument) xD;
    xdoc.normalize();
    Writer writer = new BufferedWriter( new FileWriter( "parsedOutput.xml") );
    xdoc.write( writer);
    writer.close();

  • Problems in using Labview DLL with TestStand!

    Hi,
    I tried to put the VI's to create a TCP/IP Connection, read/write Data to it and close it inside a LabVIEW DLL and use these functions with TestStand.
    The problem is to get access to the ConnectionID generated as TCP Network Refnum in LabVIEW.
    I don't know how to specify the prototype entry for this Refnum in LabVIEW and how to read it with TestStand.
    Another try to pass an ActiveXReference of SequenceContext and use the SetValIDispatch method to set a local variable (Type: ActiveXReference) to the returned ConnectionID of the TCPOpen.VI wasn't successful too.
    It seems to me that the connectionID isn't a normal ActiveXReference.
    Regards,
    Sunny

    Hi Sunny -
    You should treat this parameter as a pointer to an int when calling the DLL from TestStand (or any language like C or C++). Note that you can't do anything with the value outside of LabVIEW since it only has meaning inside of LabVIEW. You can only pass it around for use in other VIs you call from TestStand.
    Hope this helps....
    Kyle G.
    National Instruments
    Kyle Gupton
    LabVIEW R&D
    National Instruments

  • Help needed with using network disk with iMovie with NFS or AFP

    Hi,
    I have iMac with iMovie08 that talks to a remote disk hosted under Linux over a gigabit network using SMB (Samba). It all works ok and I have done a few movies.
    Now, I have done some tests with NFS and AFP (AppleTalk) and it seems that these are much faster than SMB.
    I then stopped the Samba server and proceeded to setup NFS and also AFP
    First NFS,
    So I then exported my directory using NFS and I can see everything from my Mac (correct permissions too since I made both user and group IDs the same...). The problem is that when I launch iMovie it shows me the Volume for my external networked disk but it shows it with a little triangle with yellow exclamation and it does not show any of the events (>500GB of events).
    If I stop NFS and then switch to AFP I get the same behavior. That is, everything from the Mac works on the AFS mounted disk (copying files back and forth, etc....) but I can't see the contents of the disk from within iMovie
    I changed permissions so that anybody can read/write/execute (although there are files that have an '@' sign at the end when I do ls -l on them and I can't remember what that means....)
    If I stop NFS and then go back to SMB (Samba) then I am back to a working configuration.
    Can I use NFS or AFP with iMovie? What exactly does the yellow triangle mean?
    Thanks
    Dazed and confused at 330am EST...

    More timings on smb vs nfs. Note that the big diffs is when sending single large files. The dd cmd was used to simulate 1 hour of DV video which is about 12GB
    1.27GB dvd project (twice each, note the variability... I guess because the project has multiple files?):
    MEiMac:Movies me$ time cp -r LS2000Berlin.dvdproj /Volumes/bigsmb/
    real 0m37.114s
    user 0m0.008s
    sys 0m4.164s
    MEiMac:Movies me$ time cp -r LS2000Berlin.dvdproj /Volumes/bignfs/
    real 0m59.351s
    user 0m0.009s
    sys 0m8.336s
    MEiMac:Movies me$ time cp -r LS2000Berlin.dvdproj /Volumes/bignfs/
    real 0m40.671s
    user 0m0.009s
    sys 0m8.205s
    MEiMac:Movies me$ time cp -r LS2000Berlin.dvdproj /Volumes/bigsmb/
    real 0m41.680s
    user 0m0.008s
    sys 0m4.094s
    Simulated 1 hour video single file:
    MEiMac:Movies me$ time dd if=/dev/zero of=/Volumes/bigsmb/1hour bs=16k count=786432
    786432+0 records in
    786432+0 records out
    12884901888 bytes transferred in 443.960166 secs (29022653 bytes/sec)
    real 7m23.994s
    user 0m3.434s
    sys 1m18.900s
    MEiMac:Movies me$ time dd if=/dev/zero of=/Volumes/bignfs/1hournfs bs=16k count=786432
    786432+0 records in
    786432+0 records out
    12884901888 bytes transferred in 235.887283 secs (54623131 bytes/sec)
    real 3m56.271s
    user 0m1.666s
    sys 1m56.995s

  • Problem Using Sax parser with Eclipse 3.0 and command line

    Hi,
    I am parsing a xml file with sax. When I am running my programm in the command line everthing is ok and I get the right results from parsing.
    But if I am running the programm in Eclipse 3.0 (the same java code) I get an other result (the wrong results).
    Does anybody know what this can be the reason for. Is Eclipse using an other xml parser and if where I can change the parser?
    It would be very kind if somebody can give me a reason for this strange behaviour.
    Thanks in advance

    I have solved my problem.
    In the command line I used jre 1.4 and in Eclipse I used jre 1.5.
    I think jre 1.5 uses an other xml parser so I got an other result.
    If i use in Eclipse jre1.4 I get the same result as in the command line.

  • Problem in using socket streams with encryption and decryption

    Hi,
    I am developing a client/server program with encryption and decryption at both end. While sending a message from client it should be encrypted and at the receiving end(server) it should be decrypted and vice versa.
    But while doing so i got a problem if i use both encryption and decryption at both ends. But If i use only encryption at one (only outputstream) and decryption at other end(only inputstream) there is no problem.
    Here is client/server pair of programs in which i am encrypting the outputstream of the socket in client side and decrypting the inputstream of the socket in server side.
    serverSocketDemo.java
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import java.security.spec.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.util.*;
    import java.util.zip.*;
    class serverSocketDemo
         public static void main(String args[])
              try
              {                    //server listening on port 2000
                   ServerSocket server=new ServerSocket(2000);
                   while (true)
                        Socket theConnection=server.accept();
                        System.out.println("Connecting from local address : "+theConnection.getLocalAddress());
                        System.out.println("Connection request from : "+theConnection.getInetAddress());
                        //Input starts from here
                        Reader in=new InputStreamReader(getNetInStream(theConnection.getInputStream()),"ASCII");
                        StringBuffer strbuf=new StringBuffer();
                        int c;
                        while (true)
                             c=in.read();
                             if(c=='\n' || c==-1)
                                  break;
                             strbuf.append((char)c);     
                        String str=strbuf.toString();
                        System.out.println("Message from Client : "+str);
                        in.close();               
                        theConnection.close();
              catch(BindException e)
                   System.out.println("The Port is in use or u have no privilage on this port");
              catch(ConnectException e)
                   System.out.println("Connection is refused at remote host because the host is busy or no process is listening on that port");
              catch(IOException e)
                   System.out.println("Connection disconnected");          
              catch(Exception e)
         public static BufferedInputStream getNetInStream(InputStream in) throws Exception
              // register the provider that implements the algorithm
              Provider sunJce = new com.sun.crypto.provider.SunJCE( );
              Security.addProvider(sunJce);
              // create a key
              byte[] desKeyDataDec = "This encryption can not be decrypted".getBytes();
              DESKeySpec desKeySpecDec = new DESKeySpec(desKeyDataDec);
              SecretKeyFactory keyFactoryDec = SecretKeyFactory.getInstance("DES");
              SecretKey desKeyDec = keyFactoryDec.generateSecret(desKeySpecDec);
              // use Data Encryption Standard
              Cipher desDec = Cipher.getInstance("DES");
              desDec.init(Cipher.DECRYPT_MODE, desKeyDec);
              CipherInputStream cin = new CipherInputStream(in, desDec);
              BufferedInputStream bin=new BufferedInputStream(new GZIPInputStream(cin));
              return bin;
    clientSocketDemo.java
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import java.security.spec.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.util.*;
    import java.util.zip.*;
    class clientSocketDemo
         public static void main(String args[])
              try
                   Socket theConnection=new Socket("localhost",2000);
                   System.out.println("Connecting from local address : "+theConnection.getLocalAddress());
                   System.out.println("Connecting to : "+theConnection.getInetAddress());
                   //Output starts from here               
                   OutputStream out=getNetOutStream(theConnection.getOutputStream());
                   out.write("Please Welcome me\n".getBytes());
                   out.flush();
                   out.close();
                   theConnection.close();
              catch(BindException e)
                   System.out.println("The Port is in use or u have no privilage on this port");
              catch(ConnectException e)
                   System.out.println("Connection is refused at remote host because the host is busy or no process is listening on that port");
              catch(IOException e)
                   System.out.println("Connection disconnected");          
              catch(Exception e)
         public static OutputStream getNetOutStream(OutputStream out) throws Exception
              // register the provider that implements the algorithm
              Provider sunJce = new com.sun.crypto.provider.SunJCE( );
              Security.addProvider(sunJce);
              // create a key
              byte[] desKeyDataEnc = "This encryption can not be decrypted".getBytes();
              DESKeySpec desKeySpecEnc = new DESKeySpec(desKeyDataEnc);
              SecretKeyFactory keyFactoryEnc = SecretKeyFactory.getInstance("DES");
              SecretKey desKeyEnc = keyFactoryEnc.generateSecret(desKeySpecEnc);
              // use Data Encryption Standard
              Cipher desEnc = Cipher.getInstance("DES");
              desEnc.init(Cipher.ENCRYPT_MODE, desKeyEnc);
              CipherOutputStream cout = new CipherOutputStream(out, desEnc);
              OutputStream outstream=new BufferedOutputStream(new GZIPOutputStream(cout));
              return outstream;
    Here is client/server pair in which i use both encrypting outpustream and decrypting inputstream at both ends.
    serverSocketDemo.java
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import java.security.spec.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.util.*;
    import java.util.zip.*;
    class serverSocketDemo
         private Cipher desEnc,desDec;
         serverSocketDemo()
              try
                   // register the provider that implements the algorithm
                   Provider sunJce = new com.sun.crypto.provider.SunJCE( );
                   Security.addProvider(sunJce);
                   // create a key
                   byte[] desKeyData = "This encryption can not be decrypted".getBytes();
                   DESKeySpec desKeySpec = new DESKeySpec(desKeyData);
                   SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
                   SecretKey desKey = keyFactory.generateSecret(desKeySpec);
                   desEnc = Cipher.getInstance("DES");
                   desEnc.init(Cipher.ENCRYPT_MODE, desKey);
                   desDec = Cipher.getInstance("DES");
                   desDec.init(Cipher.DECRYPT_MODE, desKey);               
              catch (javax.crypto.NoSuchPaddingException e)
                   System.out.println(e);          
              catch (java.security.NoSuchAlgorithmException e)
                   System.out.println(e);          
              catch (java.security.InvalidKeyException e)
                   System.out.println(e);          
              catch(Exception e)
                   System.out.println(e);
              startProcess();
         public void startProcess()
              try
                   ServerSocket server=new ServerSocket(2000);
                   while (true)
                        final Socket theConnection=server.accept();
                        System.out.println("Connecting from local address : "+theConnection.getLocalAddress());
                        System.out.println("Connection request from : "+theConnection.getInetAddress());
                        Thread input=new Thread()
                             public void run()
                                  try
                                       //Input starts from here
                                       Reader in=new InputStreamReader(new BufferedInputStream(new CipherInputStream(theConnection.getInputStream(), desDec)),"ASCII");
                                       StringBuffer strbuf=new StringBuffer();
                                       int c;
                                       while (true)
                                            c=in.read();
                                            if(c=='\n'|| c==-1)
                                                 break;
                                            strbuf.append((char)c);     
                                       String str=strbuf.toString();
                                       System.out.println("Message from Client : "+str);
                                  catch(Exception e)
                                       System.out.println("Error caught inside input Thread : "+e);
                        input.start();
                        Thread output=new Thread()
                             public void run()
                                  try
                                       //Output starts from here
                                       OutputStream out=new BufferedOutputStream(new CipherOutputStream(theConnection.getOutputStream(), desEnc));
                                       System.out.println("it will not be printed");
                                       out.write("You are Welcome\n".getBytes());
                                       out.flush();
                                  catch(Exception e)
                                       System.out.println("Error caught inside output Thread : "+e);
                        output.start();
                        try
                             output.join();
                             input.join();
                        catch(Exception e)
                        theConnection.close();
              catch(BindException e)
                   System.out.println("The Port is in use or u have no privilage on this port");
              catch(ConnectException e)
                   System.out.println("Connection is refused at remote host because the host is busy or no process is listening on that port");
              catch(IOException e)
                   System.out.println("Connection disconnected");          
              catch(Exception e)
         public static void main(String args[])
              serverSocketDemo server=new serverSocketDemo();          
    clientSocketDemo.java
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import java.security.spec.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.util.*;
    import java.util.zip.*;
    class clientSocketDemo
         private Cipher desEnc,desDec;
         clientSocketDemo()
              try
                   // register the provider that implements the algorithm
                   Provider sunJce = new com.sun.crypto.provider.SunJCE( );
                   Security.addProvider(sunJce);
                   // create a key
                   byte[] desKeyData = "This encryption can not be decrypted".getBytes();
                   DESKeySpec desKeySpec = new DESKeySpec(desKeyData);
                   SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
                   SecretKey desKey = keyFactory.generateSecret(desKeySpec);
                   desEnc = Cipher.getInstance("DES");
                   desDec = Cipher.getInstance("DES");
                   desEnc.init(Cipher.ENCRYPT_MODE, desKey);
                   desDec.init(Cipher.DECRYPT_MODE, desKey);               
              catch (javax.crypto.NoSuchPaddingException e)
                   System.out.println(e);          
              catch (java.security.NoSuchAlgorithmException e)
                   System.out.println(e);          
              catch (java.security.InvalidKeyException e)
                   System.out.println(e);          
              catch(Exception e)
                   System.out.println(e);
              startProcess();
         public void startProcess()
              try
                   final Socket theConnection=new Socket("localhost",2000);
                   System.out.println("Connecting from local address : "+theConnection.getLocalAddress());
                   System.out.println("Connecting to : "+theConnection.getInetAddress());
                   Thread output=new Thread()
                        public void run()
                             try
                                  //Output starts from here               
                                  OutputStream out=new BufferedOutputStream(new CipherOutputStream(theConnection.getOutputStream(), desEnc));
                                  out.write("Please Welcome me\n".getBytes());
                                  out.flush();
                             catch(Exception e)
                                  System.out.println("Error caught inside output thread : "+e);
                   output.start();     
                   Thread input=new Thread()
                        public void run()
                             try
                                  //Input starts from here
                                  Reader in=new InputStreamReader(new BufferedInputStream(new CipherInputStream(theConnection.getInputStream(), desDec)),"ASCII");          
                                  System.out.println("it will not be printed");
                                  StringBuffer strbuf=new StringBuffer();
                                  int c;
                                  while (true)
                                       c=in.read();
                                       if(c=='\n' || c==-1)
                                            break;
                                       strbuf.append((char)c);     
                                  String str=strbuf.toString();
                                  System.out.println("Message from Server : "+str);
                             catch(Exception e)
                                  System.out.println("Error caught inside input Thread : "+e);
                   input.start();
                   try
                        output.join();
                        input.join();
                   catch(Exception e)
                   theConnection.close();
              catch(BindException e)
                   System.out.println("The Port is in use or u have no privilage on this port");
              catch(ConnectException e)
                   System.out.println("Connection is refused at remote host because the host is busy or no process is listening on that port");
              catch(IOException e)
                   System.out.println("Connection disconnected");          
              catch(Exception e)
         public static void main(String args[])
              clientSocketDemo client=new clientSocketDemo();     
    **** I know that the CInput tries to read some header stuff thats why i used two threads for input and output.
    Waiting for the reply.
    Thank you.

    Do not ever post your code unless requested to. It is very annoying.
    Try testing what key is being used. Just to test this out, build a copy of your program and loop the input and outputs together. Have them print the data stream onto the screen or a text file. Compare the 1st Output and the 2nd Output and the 1st Input with the 2nd Input and then do a static test of the chipher with sample data (same data which was outputted), then do another cipher test with the ciphertext created by the first test.
    Everything should match - if it does not then follow the steps below.
    Case 1: IO Loops do not match
    Case 2: IO Loops match, but ciphertext 1st run does not match loop
    Case 3: IO Loops match, 1st ciphertext 1st run matches, but 2nd run does not
    Case 4: IO Loops match, both chiphertext runs do not match anything
    Case 5: Ciphertext runs do not match eachother when decrypted correctly (outside of the test program)
    Problems associated with the cases above:
    Case 1: Private Key is changing on either side (likely the sender - output channel)
    Case 2: Public Key is changing on either side (likely the sender - output channel)
    Case 3: Private Key changed on receiver - input channel
    Case 4: PKI failure, causing private key and public key mismatch only after a good combination was used
    Case 5: Same as Case 4

  • Problems in using a certificate with  different versions of JVM

    Hi friends,
    I am facing a typical problem:
    I have to use a certificate which uses the sha1DSA signing algorithm to contact a web service(I am coding a client). I was using J2SDK_1.4.1_02 before. I added the certificate to keystore and it was working fine. But if I upgraded my JRE to 1.4.2_13 the same code doesn't work,. I got the following exception:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA12275)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:570)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(DashoA12275)
         at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:263)
         at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:151)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
         at TestRequest.getCustomerInfo(TestRequest.java:60)
         at TestRequest.main(TestRequest.java:122)After some investigation I found that this JRE is accepting only certificate with sha1RSA signature algorithm. Please help me if anybody knows why this occurs or is this an issue which is to be addressed in server side.

    Hi Michal,
    Keeping in mind the recommendations of the Production Checklist...
    All other things being equal, homogenous deployments are usually less prone to surprises.
    But JDK 1.6 is noticeably faster than JDK 1.4, and features much better JMX support as well, so it's a probably the better option.
    Jon Purdy
    Oracle

  • Problem in using sybase drivers with JDK 1.5

    hi all,
    i have an app that is connecting to a sybase database.
    so far i have run it using jdk 1.4 using sybase jconn2.jar , it has workedf ine.
    Now, i haven't changed the code, i just recompiled it and re-run it using jdk 1.5 , and suddenly i am getting a classNotFoundException
    java.lang.ClassNotFoundException: com.sybase.jdbc2.jdbc.SybDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at BNPParibas.Collateral.SQL.SQLConnectionFactory.DoConnection(SQLConnec
    tionFactory.java:65)
    at BNPParibas.Collateral.SQL.SQLConnectionFactory.Connect(SQLConnectionF
    actory.java:29)
    at BNPParibas.Collateral.SQL.ResultSetFactory.<init>(ResultSetFactory.ja
    va:27)
    at BNPParibas.Collateral.Batch.Flow.FlowControl.load(FlowControl.java:81
    at BNPParibas.Collateral.Batch.Flow.FlowControl.<init>(FlowControl.java:
    62)
    at BNPParibas.Collateral.Batch.Flow.FlowControl.main(FlowControl.java:37
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Appe
    nder
    at BNPParibas.Collateral.Batch.Flow.FlowControl.load(FlowControl.java:16
    8)
    at BNPParibas.Collateral.Batch.Flow.FlowControl.<init>(FlowControl.java:
    62)
    at BNPParibas.Collateral.Batch.Flow.FlowControl.main(FlowControl.java:37
    and NOTHING has changed except that now i am runnign java 1.5 instead of 1.4
    has anyone ever experienced a similar problem?
    regards
    marco

    Hello,
    well, yes it is.
    Running the code with jdk 1.4 is absolutely fine.
    if i run it like this
    <myjdk14install>\bin\java -jar xxx.jar works fine
    if i run it l ike this (which will use 1.5 by default)
    java -jar xxx.jar it gives me that exception...
    have the classloading mechanism changed between jdk 1.4 and jdk 1.5?
    regards
    marco

  • Problem in using PARTITION BY with SCORE

    Hi
    I have a table in which I have list of products along with the name of the company that offers that product. Table structure is as shown below:
    PRD_ID NUMBER
    PRD_NAME VARCHAR2(100)
    COMPANY_NAME VARCHAR2(100)
    PRD_DESC VARCHAR2(500)
    DUMMY CHAR(1)
    I have created an Intermedia Index on PRD_NAME and PRD_DESC with
    PRD_NAME and PRD_DESC as two separate field sections.
    Now I want to retrieve up-to 3 products per company that match the searched keywords. Now if a user searches for Candle Holders then I write following query
    SELECT A.*, ROWNUM FROM
    (SELECT SCORE(1) AS SC,
    PRD_ID,
         PRD_NAME,
         COMPANY_NAME,
         ROW_NUMBER() OVER (PARTITION BY COMPANY_NAME ORDER BY SCORE(1) DESC) AS RK
    FROM PRODUCTS
    WHERE CONTAINS(DUMMY,'(Candle Holders)*7, ($Candle $Holders)*5, (Candle% Holders%)*3) within PRD_NAME)'
    ,1) > 0 ) A
    WHERE A.RK <= 3
    ORDER BY A.COMPANY_NAME, SC DESC;
    I have many records in my database that should get a score of 100 in the above query - e.g.
    Glass Candle Holder Comp1
    Iron Candle Holder Comp1
    Metal Candle Holder Comp2
    Votive Candle Holder Comp3
    Silver Plated Candle Holder Comp4
    Gold Plated Candle Holder Comp4
    Copper Plated Candle Holder Comp4
    Platinum Coated Candle Holder Comp4
    and so on.
    My query is returning upto 3 records per company, but it is not giving 100 as score.
    If I remove the row_number() partition by clause, then my query returns 100 score.
    I want to restrict the query from returning product at a certain cut-off score.
    Please advise what is wrong in the above query and what can I do to fix the problem
    Regards
    Madhup

    I am unable to reproduce the problem given only what you have provided. I get the same score no matter what. What version of Oracle are you using? The only thing I can think of is to put the query without the row_number in an inline view and add a condition where rownum > 0 to try to materialize the view, then apply your row_number in an outer query, as in the last query in the example below.
    SCOTT@10gXE> CREATE TABLE products
      2    (PRD_ID           NUMBER,
      3       PRD_NAME      VARCHAR2(100),
      4       COMPANY_NAME  VARCHAR2(100),
      5       PRD_DESC      VARCHAR2(500),
      6       DUMMY           CHAR(1)
      7  )
      8  /
    Table created.
    SCOTT@10gXE> INSERT ALL
      2  INTO PRODUCTS VALUES (1, 'Glass Candle Holder', 'Comp1', NULL, NULL)
      3  INTO PRODUCTS VALUES (2, 'Iron Candle Holder', 'Comp1', NULL, NULL)
      4  INTO PRODUCTS VALUES (3, 'Metal Candle Holder', 'Comp2', NULL, NULL)
      5  INTO PRODUCTS VALUES (4, 'Votive Candle Holder', 'Comp3', NULL, NULL)
      6  INTO PRODUCTS VALUES (5, 'Silver Plated Candle Holder', 'Comp4', NULL, NULL)
      7  INTO PRODUCTS VALUES (6, 'Gold Plated Candle Holder', 'Comp4', NULL, NULL)
      8  INTO PRODUCTS VALUES (7, 'Copper Plated Candle Holder', 'Comp4', NULL, NULL)
      9  INTO PRODUCTS VALUES (8, 'Platinum Coated Candle Holder', 'Comp4', NULL, NULL)
    10  SELECT * FROM DUAL
    11  /
    8 rows created.
    SCOTT@10gXE> BEGIN
      2    FOR i IN 1 .. 10 LOOP
      3        INSERT INTO products (prd_id, prd_name, company_name)
      4        SELECT object_id, object_name, 'Comp1' FROM all_objects;
      5    END LOOP;
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> COMMIT
      2  /
    Commit complete.
    SCOTT@10gXE> EXEC CTX_DDL.CREATE_PREFERENCE ('your_multi', 'MULTI_COLUMN_DATASTORE')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> BEGIN
      2    CTX_DDL.SET_ATTRIBUTE ('your_multi', 'COLUMNS', 'PRD_DESC, PRD_NAME');
      3  END;
      4  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> EXEC CTX_DDL.CREATE_SECTION_GROUP ('your_sec_group', 'BASIC_SECTION_GROUP')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> BEGIN
      2    CTX_DDL.ADD_FIELD_SECTION ('your_sec_group', 'PRD_DESC', 'PRD_DESC', TRUE);
      3    CTX_DDL.ADD_FIELD_SECTION ('your_sec_group', 'PRD_NAME', 'PRD_NAME', TRUE);
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> CREATE INDEX your_index ON products (dummy)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS
      4    ('DATASTORE     your_multi
      5        SECTION GROUP your_sec_group')
      6  /
    Index created.
    SCOTT@10gXE> EXEC DBMS_STATS.GATHER_TABLE_STATS ('SCOTT', 'PRODUCTS')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE>
    SCOTT@10gXE> COLUMN prd_name      FORMAT A30
    SCOTT@10gXE> COLUMN company_name FORMAT A10
    SCOTT@10gXE> COLUMN prd_desc      FORMAT A8
    SCOTT@10gXE> SELECT A.*, ROWNUM FROM
      2  (SELECT SCORE(1) AS SC,
      3  PRD_ID,
      4  PRD_NAME,
      5  COMPANY_NAME,
      6  ROW_NUMBER() OVER (PARTITION BY COMPANY_NAME ORDER BY SCORE(1) DESC) AS RK
      7  FROM PRODUCTS
      8  WHERE CONTAINS(DUMMY,'(((Candle Holders)*7, ($Candle $Holders)*5, (Candle% Holders%)*3) within PRD_NAME)'
      9  ,1) > 0 ) A
    10  WHERE A.RK <= 3
    11  ORDER BY A.COMPANY_NAME, SC DESC
    12  /
            SC     PRD_ID PRD_NAME                       COMPANY_NA         RK     ROWNUM
            28          1 Glass Candle Holder            Comp1               1          1
            28          2 Iron Candle Holder             Comp1               2          2
            28          3 Metal Candle Holder            Comp2               1          3
            28          4 Votive Candle Holder           Comp3               1          4
            28          8 Platinum Coated Candle Holder  Comp4               1          5
            28          7 Copper Plated Candle Holder    Comp4               2          6
            28          6 Gold Plated Candle Holder      Comp4               3          7
    7 rows selected.
    SCOTT@10gXE> SELECT A.*, ROWNUM FROM
      2  (SELECT SCORE(1) AS SC,
      3  PRD_ID,
      4  PRD_NAME,
      5  COMPANY_NAME
      6  FROM PRODUCTS
      7  WHERE CONTAINS(DUMMY,'(((Candle Holders)*7, ($Candle $Holders)*5, (Candle% Holders%)*3) within PRD_NAME)'
      8  ,1) > 0 ) A
      9  ORDER BY A.COMPANY_NAME, SC DESC
    10  /
            SC     PRD_ID PRD_NAME                       COMPANY_NA     ROWNUM
            28          1 Glass Candle Holder            Comp1               1
            28          2 Iron Candle Holder             Comp1               2
            28          3 Metal Candle Holder            Comp2               3
            28          4 Votive Candle Holder           Comp3               4
            28          5 Silver Plated Candle Holder    Comp4               5
            28          6 Gold Plated Candle Holder      Comp4               6
            28          7 Copper Plated Candle Holder    Comp4               7
            28          8 Platinum Coated Candle Holder  Comp4               8
    8 rows selected.
    SCOTT@10gXE> SELECT SCORE(1) AS SC,
      2           PRD_ID,
      3           PRD_NAME,
      4           COMPANY_NAME
      5  FROM   PRODUCTS
      6  WHERE  CONTAINS
      7             (DUMMY,
      8              '(((Candle Holders)*7,
      9            ($Candle $Holders)*5,
    10            (Candle% Holders%)*3) within PRD_NAME)',
    11              1) > 0
    12  /
            SC     PRD_ID PRD_NAME                       COMPANY_NA
            28          1 Glass Candle Holder            Comp1
            28          2 Iron Candle Holder             Comp1
            28          3 Metal Candle Holder            Comp2
            28          4 Votive Candle Holder           Comp3
            28          5 Silver Plated Candle Holder    Comp4
            28          6 Gold Plated Candle Holder      Comp4
            28          7 Copper Plated Candle Holder    Comp4
            28          8 Platinum Coated Candle Holder  Comp4
    8 rows selected.
    SCOTT@10gXE> SELECT *
      2  FROM   (SELECT sc, prd_id, prd_name, company_name,
      3                ROW_NUMBER () OVER
      4                  (PARTITION BY company_name ORDER BY sc DESC) AS rk
      5            FROM   (SELECT SCORE(1) AS SC,
      6                     PRD_ID,
      7                     PRD_NAME,
      8                     COMPANY_NAME
      9                 FROM   PRODUCTS
    10                 WHERE  CONTAINS
    11                       (DUMMY,
    12                        '(((Candle Holders)*7,
    13                      ($Candle $Holders)*5,
    14                      (Candle% Holders%)*3) within PRD_NAME)',
    15                        1) > 0
    16                 AND    ROWNUM > 0))
    17  WHERE  rk <= 3
    18  /
            SC     PRD_ID PRD_NAME                       COMPANY_NA         RK
            28          1 Glass Candle Holder            Comp1               1
            28          2 Iron Candle Holder             Comp1               2
            28          3 Metal Candle Holder            Comp2               1
            28          4 Votive Candle Holder           Comp3               1
            28          5 Silver Plated Candle Holder    Comp4               1
            28          6 Gold Plated Candle Holder      Comp4               2
            28          7 Copper Plated Candle Holder    Comp4               3
    7 rows selected.
    SCOTT@10gXE>

  • Problem in using Infoswing GridControl with jre 1.3

    Hi,
    I'm using the InfoSwing GridControl which is bound to a table ....the problem is that when I deploy it and run the applet in the browser then it shows a blank row when I scroll down towards the end of the rows.
    I'm using the java Plug-in and jre 1.3. IF I OPEN THE SAME APPLET IN BROWSER AND RUN IT JRE 1.2 THEN IT WORKS FINE. ?? Why So ??
    Thanx in Advance,
    Jigar.

    Hello,
    well, yes it is.
    Running the code with jdk 1.4 is absolutely fine.
    if i run it like this
    <myjdk14install>\bin\java -jar xxx.jar works fine
    if i run it l ike this (which will use 1.5 by default)
    java -jar xxx.jar it gives me that exception...
    have the classloading mechanism changed between jdk 1.4 and jdk 1.5?
    regards
    marco

  • Problem in using JDeveloper 10g with JHeadstart

    I am using JDeveloper 9.0.3 and jheadstart 9.0.4.5 and I would like to test jdeveloper 10g preview with JHeadstart.
    So, I have downloaded the JDeveloper 10g to test it with my old application.
    Having run the Jdeveloper for the first time, I realized that Jdeveloper
    installed the jheadstart automatically and following message was shown in the message window :
    E:\Software\10g\JDev10g\jdev\lib\ext\jheadstart\PrjWizard.jar!\META-INF\jdev-ext.xml
    Error: <Line 12, Column 24>: XSD-2034: (Error) Element 'description' not expected.
    Error: <Line 13, Column 17>: XSD-2034: (Error) Element 'help' not expected.
    Error: <Line 17, Column 27>: XSD-2034: (Error) Element 'dependency_addin' not expected.
    Converting JDeveloper 9.0.3 extension manifest to 9.0.5
    E:\Software\10g\JDev10g\jdev\lib\ext\jheadstart\JhsShare.jar!\META-INF\jdev-ext.xml
    Converting JDeveloper 9.0.3 extension manifest to 9.0.5
    E:\Software\10g\JDev10g\jdev\lib\ext\jheadstart\MvcFrameworkServiceFileViewer.jar!\META-INF\jdev-ext.xml
    Converting JDeveloper 9.0.3 extension manifest to 9.0.5
    E:\Software\10g\JDev10g\jdev\lib\ext\jheadstart\JHeadstartDesignerGenerator.jar!\META-INF\jdev-ext.xml
    Converting JDeveloper 9.0.3 extension manifest to 9.0.5
    E:\Software\10g\JDev10g\jdev\lib\ext\jheadstart\JAGLauncher.jar!\META-INF\jdev-ext.xml
    Converting JDeveloper 9.0.3 extension manifest to 9.0.5
    E:\Software\10g\JDev10g\jdev\lib\ext\jheadstart\Bc4jPropertyEditor.jar!\META-INF\jdev-ext.xml
    Converting JDeveloper 9.0.3 extension manifest to 9.0.5
    E:\Software\10g\JDev10g\jdev\lib\ext\jheadstart\JASEditor.jar!\META-INF\jdev-ext.xml
    Converting JDeveloper 9.0.3 extension manifest to 9.0.5
    So I try to test one of my old application with this configuration. After Jdeveloper migrated my workspace and projects and business componenet
    to the newer version, I run the application generator. It worked fine without any problem but after running the application, I got an error page showing
    that my bc4j.xcfg is not in the path.
    On the other hand, I found out that when I wanted to view my UIX pages, 2 dialog boxes appeared. The first one asked to upgrade
    to UIX 2.2's new expression language syntax and the other which is on the top of the first one, showing that UIX runtime failed to render the page
    with following detail :
    javax.servlet.ServletException: No page broker found!
         at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source)
         at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at oracle.cuervo.share.servlet.PreviewServletContainer.handleRequest(PreviewServletContainer.java:305)
         at oracle.cuervo.share.servlet.PreviewServletContainer.handleRequest(PreviewServletContainer.java:229)
         at oracle.cabo.ide.addin.preview.UIXRenderThread._reallyLoad(UIXRenderThread.java:263)
         at oracle.cabo.ide.addin.preview.UIXRenderThread.runImpl(UIXRenderThread.java:203)
         at oracle.cabo.ide.addin.preview.BasePreviewThread.run(BasePreviewThread.java:79)
    I think that I should have set some setting before use JHeadstart with JDeveloper.
    Could anybody help me ?

    Alex,
    The document Sandra referred to applies to JDeveloper 10g preview (9.0.5.0). JHeadstart 9.0.4.5 will NOT work with JDeveloper 109 production (9.0.5.1).
    We plan to release a new version end of april that is compatible with 9.0.5.1. See this thread for more info: JDeveloper 10g production, status JHeadstart?
    Steven Davelaar,
    JHeadstart Team.

Maybe you are looking for

  • Since my iphone 3g has changed to the new orange EE i cant get onto the app store it says cannot connect to itunes store can anyone help me fix it?

    Hi, since i upgraded my iphone to the latest IOS system last week, i have been on this new orange EE network, and since then i have been unable to get onto itunes and the app store, i keep getting the message "cannott connect to i tunes" can anyone h

  • How does the Concurrent Access License (CAL) work.

    Description from Google: How does the Concurrent Access License (CAL) work? Xcelsius Engage Server CALs allow for concurrent live data updates inside Xcelsius dashboards. Every time an end-user triggers a Web service inside an Xcelsius dashboard to r

  • BAPI for changing CONTRACTS.

    Hi All, I want to update the short text for CONTRACTS in table EKPO from filed CDPOS-VALUE_NEW for this i was using function module BAPI_PO_CHANGE This Bapi is is succesfully updating the PO it is not updating the contracts.... Please help me with th

  • BalanceSheet ALV to ALV grid

    Hiii experts.. I have created one report program similar to RFBILA00 standard program... now all the information is present in my internal table IT... now what I want to create a ALV tree similar to the output of the this standard program when ALV gr

  • Multiplexer Error Why?

    Why do I keep getting the multiplexer error the last 10 mins. or so when encoding assets. Why has apple not fixed this yet. There was an error during muxing preparation (project conversion). I have tried everything. This is supposed to be an easy qui