Is it an bug in SunJCE Cipher implementation?

i encountered an issue running the following piece of codes
public static void main(String[] args) {
          try {
               String clearText = args[0];
               KeyGenerator kg = KeyGenerator.getInstance("DESede", "SunJCE");
               kg.init(new SecureRandom());
               SecretKey secretKey = kg.generateKey();
               Cipher c = Cipher.getInstance("DESede/ECB/PKCS5Padding", "SunJCE");
               c.init(Cipher.ENCRYPT_MODE, secretKey);
               c.update(clearText.getBytes("ISO8859_1"));
               byte[] encrypted = c.doFinal();
               System.out.println("Size of encrypted byte array:" + encrypted.length);
               c.init(Cipher.DECRYPT_MODE, secretKey);
               c.update(encrypted);
               byte[] decrypted = c.doFinal();
               System.out.println("Size of encrypted byte array:" + decrypted.length);
               String msg = new String(decrypted, "ISO8859_1");
               System.out.println("Decrypted text:" + msg);     
          } catch (Exception e) {
               System.out.println(e.toString());
when starting with comandline parameter as "1", "12", ...., until "1234567", it runs fine, the size of encrypted byte array is 8, as expected, and the decrypted text mataches the original. however, when given the parameter as "12345678", a 8-character string, the DES block size, the size of the encrypted byte array is 0, no encrypted data generated. when given the parameter as "123456789", the size of encypted byte array is 8, the size of decrypted byte array is 1, and decrypted text is "9", the first block of the original data is lost. This pattern remains with other input data, seems when the size of input string is a multiple of DES block size, the entire data is lost. when it is not, then only the one in the last block remains.
it's hard for me to believe this is caused by a bug in SunJCE, it's so obvious that it would be reported long ago, but i also could not find any coding issue in the code above. Any one can give me some suggestions/hints? i really appreciate it.
I run the code on winXP box, with sun jdk 1.5.0_06 or jdk 1.4.2_11, same result. i also run the code on my linux box, with sun jdk 1.4.1_03, same result.

Please use code tags the next time you post.
The bug is in your code. You're throwing away the byte [] returned by Cipher.update().
In your small example you're better off just skipping the update method and only using the doFinal(byte []) method e.g. ...
Cipher c = Cipher.getInstance("DESede/ECB/PKCS5Padding", "SunJCE");
c.init(Cipher.ENCRYPT_MODE, secretKey);
byte[] encrypted = c.doFinal(clearText.getBytes("ISO8859_1"));

Similar Messages

  • Javax.print problems on applet - bug on mac os implementation?

    Dear All,
    I am working on an applet and application that include a print function and I get a weird behaviour on MacOS in applet mode (both with Safari and Firefox - Mac OS X Versione 10.4.9 (Build 8P135) ). In contrast, things work fine on Windows XP (both Explorer 7 and Firefox with Java Plug-in 1.6.0_01) and even in MacOS when using the application.
    The problems are:
    - the print dialogue goes on and off a few times before letting the user interact with it
    - the page format in the dialogue is set to A5 (instead of the printer's default)
    - there is a small empty window appearing together with the dialogue and not disappearing even after the applet is closed
    Is this a known problem? If so, are there work-arounds?
    (I had no luck on Google about this)
    To reproduce the problem I created a stripped down version of the applet, in 2 files, I report it at the bottom of this message. I am using a modified version the PrintUtilities class from http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html
    Am I doing something wrong? Or shall I consider submitting a bug report?
    Any suggestion is welcome! Please let me know if I should provide more detailed information.
    Thank you in advance,
    Enrico
    PrintMe.java
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import javax.swing.JApplet;
    import javax.swing.JPanel;
    public class PrintMe extends JApplet implements MouseListener{
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         public PrintMe() {
              super();
         private class MyComponent extends JPanel{
              private static final long serialVersionUID = 1L;
              public void paintComponent(Graphics g) {
                   super.paintComponent(g);
                  Graphics2D g2 = (Graphics2D) g;
                  g2.setColor(Color.black);
                  g2.drawString( "Test text", 0, g2.getFontMetrics().getHeight() );
         public void init() {
              MyComponent aComponent = new MyComponent();
              jContentPane = new JPanel();
              jContentPane.setLayout(new BorderLayout());
              jContentPane.add(aComponent);
              this.setContentPane(jContentPane);
              this.addMouseListener(this);
         public void print(){
              try{
                   PrintUtilities.printComponent(this);
              }catch (Exception e) {
                   e.printStackTrace();
         public void mouseClicked(MouseEvent e) {
              print();
         public void mouseEntered(MouseEvent e) {
              // not used
         public void mouseExited(MouseEvent e) {
              // not used
         public void mousePressed(MouseEvent e) {
              // not used
         public void mouseReleased(MouseEvent e) {
              // not used
    PrintUtilities.java
    import java.awt.Component;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.print.attribute.PrintRequestAttributeSet;
    import javax.swing.RepaintManager;
    import javax.swing.RootPaneContainer;
    /** A simple utility class that lets you very simply print
    *  an arbitrary component. Just pass the component to the
    *  PrintUtilities.printComponent. The component you want to
    *  print doesn't need a print method and doesn't have to
    *  implement any interface or do anything special at all.
    *  If you are going to be printing many times, it is marginally more
    *  efficient to first do the following:
    *    PrintUtilities printHelper = new PrintUtilities(theComponent);
    *  then later do printHelper.print(). But this is a very tiny
    *  difference, so in most cases just do the simpler
    *  PrintUtilities.printComponent(componentToBePrinted).
    *  7/99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
    *  May be freely used or adapted.
    public class PrintUtilities implements Printable {
         private Component componentToBePrinted;
         public static void printComponent(Component c) {
              new PrintUtilities(c).print();
         public PrintUtilities(Component componentToBePrinted) {
              this.componentToBePrinted = componentToBePrinted;
         public void print() {
              try{
                   PrinterJob printJob = PrinterJob.getPrinterJob();
                   printJob.setPrintable(this);
                   PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
                   if( printJob.printDialog(attributes) ){
                        try {
                             printJob.setJobName("MyName");
                             printJob.print(attributes);
                        } catch(PrinterException pe) {
                             System.err.println("Error printing: " + pe);
                             pe.printStackTrace();
              }catch (Exception e) {
                   e.printStackTrace();
         public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
              if (pageIndex > 0) {
                   return(NO_SUCH_PAGE);
              } else {
                   RootPaneContainer rpc = (RootPaneContainer)(this.componentToBePrinted);
                   rpc.getRootPane().getGlassPane().setVisible( false );
                   Graphics2D g2d = (Graphics2D)g;
                   double sy = pageFormat.getImageableHeight() / componentToBePrinted.getHeight();
                   double sx = pageFormat.getImageableWidth() / componentToBePrinted.getWidth();
                   if( sx > sy ){
                        sx = sy;
                   }else{
                        sy = sx;
                   g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
                   g2d.scale(sx, sy);
                   disableDoubleBuffering(componentToBePrinted);
                   componentToBePrinted.paint(g2d);
                   enableDoubleBuffering(componentToBePrinted);
                   return(PAGE_EXISTS);
         /** The speed and quality of printing suffers dramatically if
          *  any of the containers have double buffering turned on.
          *  So this turns if off globally.
          *  @see enableDoubleBuffering
         public static void disableDoubleBuffering(Component c) {
              RepaintManager currentManager = RepaintManager.currentManager(c);
              currentManager.setDoubleBufferingEnabled(false);
         /** Re-enables double buffering globally. */
         public static void enableDoubleBuffering(Component c) {
              RepaintManager currentManager = RepaintManager.currentManager(c);
              currentManager.setDoubleBufferingEnabled(true);
    }

    Trying to answer to myself..
    Is it possible that the problems are due to me mixing java.awt.print and javax.swing.print ?

  • Bug in xs:pattern implementation when calling schemaValidate?

    Hi all,
    I have a schema with a pattern <xs:pattern value="(0?[1-9]|1[0-2])"/> that is supposed to validate the digits 01-09, 1-9, 10, 11, 12. When validating XML against the schema, values such as '12' fail. If the xs:pattern in re-written "(1[0-2]|0?[1-9])", i.e. the parts either side of the | are swapped, the xs:pattern works as expected, i.e. '12' validates as correct. The pattern itself works as expected with validators such as with Eclipse, and the RE seems to work as expected in PL/SQL
    Is this a bug with the XML parser used in "Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production", or is there another parser I can configure 10g to use? I have a number of xml schemas and patterns to check, and want to be sure that they work as expected.
    thanks
    Paul
    -- A simple example demonstrating the problem.
    declare
    vSchemaName varchar(100);
    xmldoc XMLType;
    vReturn boolean;
    vResult int;
    begin
    vSchemaName := 'test.xsd';
    -- Remove the old schema, if it exists.
    if (dbms_xdb.existsResource('/' || vSchemaName)) then
    dbms_xdb.deleteResource('/' || vSchemaName);
    end if;
    select count(1)
    into vResult
    from sys.DBA_XML_SCHEMAS
    where SCHEMA_URL = vSchemaName;
    if (vResult = 1) then
    dbms_XMLSchema.deleteSchema(vSchemaName, DELETE_OPTION => dbms_xmlschema.DELETE_CASCADE_FORCE);
    end if;
    vReturn := dbms_xdb.createResource(
    '/' || vSchemaName
    , XMLType('
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xs:element name="Document_Creation_Date" type="Date_Mandatory"/>
         <xs:simpleType name="Date_Mandatory">
              <xs:restriction base="xs:string">
    <!-- <xs:pattern value="[0-9]?[0-9]/(0?[1-9]|1[0-2])/[0-9]{4}"/> Original Expression -->
    <!-- <xs:pattern value="(0?[1-9]|1[0-2])"/> Problem part of expression -->
    <xs:pattern value="(0?[1-9]|1[0-2])"/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>')
    -- Register the schema
    dbms_XMLSchema.registerSchema( schemaUrl => vSchemaName, schemaDoc => sys.UriFactory.getUri('/' || vSchemaName), GENTYPES => false, GENTABLES => false);
    -- Sample XML to validate
    xmldoc := XMLType('<Document_Creation_Date>12</Document_Creation_Date>').createSchemaBasedXML('test.xsd');
    xmldoc.schemaValidate();
    commit;
    end;
    /

    Please patch one fo your machines to 10.2.0.3 and then try and duplicate. You do not have to go through the complete registration of the XSD process thoguh you can check and see if the c based parser will validate on the command line using the
    schema executible under your oracle_home bin directory.
    schema 1.xml 1.xsd
    for example
    if it dupes in 10.2.0.3 open a TAR with support so that we may bug it.
    regards
    Coby

  • Bug or Very Annoying Implementation

    Greetings,
    I recently was making a VI that uses the VI server. I have a VI that
    calls another using the Open VI Reference. They type specifier is used
    and I browse and select the VI I want to call. This puts the selected
    VIs connector on the specifier and I can wire in and out using the Call
    By Reference Node.
    Here is the catch. On my selected VI and the calling VI I have a
    cluster that is saved as a type def. I wire the output of the called vi
    from the Call By Reference Node to the same type def on the calling VI.
    However, whenever the Type Def is changed this link breaks. The Call By
    Reference Node does not give the choice to adapt either. So I am forced
    to rebrowse the Callee connecter and then I get the adap
    t choice.
    This is a major impact to our software design. Type defs obviously give
    us the power to centeralize changes to the in and out cluster of many
    VIs. But now every vi reference made will have to be redone everytime
    there is a change to the type definition. That is contradictory in my
    opinion.
    If anybody wants and example I can send it.
    Anybody have any insight I am missing? Is this how its supposed to be
    or is this an oversight?
    Regards,
    Jim Morrison
    Motorola

    Greetings,
    I recently was making a VI that uses the VI server. I have a VI that
    calls another using the Open VI Reference. They type specifier is used
    and I browse and select the VI I want to call. This puts the selected
    VIs connector on the specifier and I can wire in and out using the Call
    By Reference Node.
    Here is the catch. On my selected VI and the calling VI I have a
    cluster that is saved as a type def. I wire the output of the called vi
    from the Call By Reference Node to the same type def on the calling VI.
    However, whenever the Type Def is changed this link breaks. The Call By
    Reference Node does not give the choice to adapt either. So I am forced
    to rebrowse the Callee connecter and then I get the adap
    t choice.
    This is a major impact to our software design. Type defs obviously give
    us the power to centeralize changes to the in and out cluster of many
    VIs. But now every vi reference made will have to be redone everytime
    there is a change to the type definition. That is contradictory in my
    opinion.
    If anybody wants and example I can send it.
    Anybody have any insight I am missing? Is this how its supposed to be
    or is this an oversight?
    Regards,
    Jim Morrison
    Motorola

  • Does Oracle's implementation of JSF have this published bug?

    re: jsf with filter crashes when link to static html link is clicked.
    I also posted this on Sun's JSF forum and got a reply that said it sounded like this bug:
    https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=146
    Does Oracle know whether or not this bug is in their implementation of JSF?
    Regards,
    Al Malin

    Steve,
    I have determined that, with the JDev supplied JSF libs, a jsf with filter crashes when an invalid static html link is clicked.
    Replacing jsf-api.jar and jsf-impl.jar with the ones from JSF 1.1_02, my app did not crash. Instead it correctly displayed a 404 Not Found page.
    After restoring the jars and correcting the static link paths in the jsp, the links worked properly.
    What a way to discover a coding error!
    Al

  • The provider SunJCE may not be signed by a trusted party...

    Hi all, first time poster, long time reader
    I am having a bit of an issue getting encryption to work in Java and I thought I'd ask for some tips. I have scoured the 'net by and far, read every thread here and still I am at a loss.
    Background:
    OS: WinXP
    Java ver: j2sdk 1.4.2_01
    IDE: Eclipse 3.0.1
    Location: Canada (Maybe this is the trouble, dunno)
    End goal: two way encryption to enable storage & retrieval of data for a school project
    I have boiled down the error producing code to this:
    package security;
    import java.security.*;
    import javax.crypto.*;
    public class JCEProviderCheck {
        public static void main(String[] args) {
            Provider p = Security.getProvider("SunJCE");
            System.out.println("My provider name is " + p.getName());
            System.out.println("My provider version # is " + p.getVersion());
            System.out.println("My provider info is " + p.getInfo());
            System.out.println ("Home: " + System.getProperty("java.home"));
            Security.addProvider(new com.sun.crypto.provider.SunJCE());
            try {
                Cipher c = Cipher.getInstance("DES", "SunJCE");
                System.out.println("My Cipher algorithm name is " + c.getAlgorithm());
            } catch (Exception e) {
                e.printStackTrace(System.out);
    }The output:
    My provider name is SunJCE
    My provider version # is 1.42
    My provider info is SunJCE Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
    Home: C:\Program Files\j2sdk1.4.2_01\jre
    java.lang.SecurityException: The provider SunJCE may not be signed by a trusted party
         at javax.crypto.SunJCE_b.a(DashoA6275)
         at javax.crypto.Cipher.a(DashoA6275)
         at javax.crypto.Cipher.getInstance(DashoA6275)
         at security.JCEProviderCheck.main(JCEProviderCheck.java:29)I have checked and re-checked both java.policy and java.security plus made sure the following jars are in %JAVA_HOME%\lib\ext:
    local_policy.jar
    sunjce_provider.jar
    US_export_policy.jar
    Is there some glaringly obvious step I have overlooked? Any help would be greatly appreciated
    -Kev

    I am seeing a related bug to this under jdk1.5_04 / Win32. Very strange behavior...
    KeyAgreement keyAgreement = KeyAgreement.getInstance( algo );
    intermittently throws an exception:
    Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: DiffieHellman, provider: SunJCE, class: com.sun.crypto.provider.DHKeyPairGenerator)
    at java.security.Provider$Service.newInstance(Provider.java:1155)
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:220)
    at java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:177)
    ... 54 more
    Caused by: java.lang.SecurityException: class "com.sun.crypto.provider.DHKeyPairGenerator"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
    at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
    Trying the same on RH Linux works fine.
    PS. I am in the US and we did not unpackage/repackage the JARS.

  • Help enabling AES 256-bit cipher suites

    I can't seem to create an SSLServerSocket with the 2 AES 256-bit cipher suites that are supposed to be available in JDK1.4.2. As you can see in the following code, the SSLServerSocket, ss, is enabled with the 2 AES_256 cipher suites. But, when ss.getEnabledCipherSuites() is invoked, those 2 suites aren't listed. What's up?
    Also, what is this SSLv2Hello that I can't seem to get rid of?
        String[] PROTOCOLS = {"SSLv3", "TLSv1"};
        String[] CIPHER_SUITES = {"TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
                                  "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
                                  "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
                                  "TLS_RSA_WITH_AES_256_CBC_SHA",
                                  "TLS_RSA_WITH_AES_128_CBC_SHA",
                                  "SSL_RSA_WITH_3DES_EDE_CBC_SHA"};// create an SSLServerSocket ss
            SSLContext context = SSLContext.getInstance("TLS", "SunJSSE");
            context.init(myKeyManagers, myTrustManagers, SecureRandom.getInstance("SHA1PRNG", "SUN"));
            SSLServerSocketFactory ssFactory = context.getServerSocketFactory();
            SSLServerSocket ss = ssFactory.createServerSocket();
            ss.setEnabledProtocols(PROTOCOLS);
            ss.setEnabledCipherSuites(CIPHER_SUITES);// output a bunch of useful debugging information
            System.out.println(System.getProperty("java.version") + "\n");
            Provider[] providers = Security.getProviders();
            for(int i=0; i < providers.length; ++i)
                System.out.println(providers[i] + "\n" + providers.getInfo() + "\n********************");
    String[] enabledProtocols = ss.getEnabledProtocols();
    for(int i=0; i < enabledProtocols.length; ++i)
    System.out.println(enabledProtocols[i]);
    String[] enabledCipherSuites = ss.getEnabledCipherSuites();
    for(int i=0; i < enabledCipherSuites.length; ++i)
    System.out.println(enabledCipherSuites[i]);
    OUTPUT
    1.4.2
    SUN version 1.42
    SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
    SunJSSE version 1.42
    Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
    SunRsaSign version 1.42
    SUN's provider for RSA signatures
    SunJCE version 1.42
    SunJCE Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
    SunJGSS version 1.0
    Sun (Kerberos v5)
    SSLv2Hello
    SSLv3
    TLSv1
    TLS_DHE_RSA_WITH_AES_128_CBC_SHA
    SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
    TLS_RSA_WITH_AES_128_CBC_SHA

    Now I get an Exception when I run the same program.
    OUTPUT
    1.4.2
    SUN version 1.42
    SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
    SunJSSE version 1.42
    Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
    SunRsaSign version 1.42
    SUN's provider for RSA signatures
    SunJCE version 1.42
    SunJCE Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
    SunJGSS version 1.0
    Sun (Kerberos v5)
    java.lang.IllegalArgumentException: Cannot support TLS_DHE_RSA_WITH_AES_256_CBC_SHA with currently installed providers
            at com.sun.net.ssl.internal.ssl.CipherSuiteList.<init>(DashoA6275)
            at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.setEnabledCipherSuites(DashoA6275)
            at test.util.ConcreteSSLServerSocketFactory.initSocket(ConcreteSSLServerSocketFactory.java:111)
            at test.util.ConcreteSSLServerSocketFactory.createServerSocket(ConcreteSSLServerSocketFactory.java:100)
            at test.Test.main(Test.java:111)
    Exception in thread "main"

  • Bug/No full support for GLUT on macbook pro retina

    Hi,
    We have a software that makes use of GLUT, the openGL utility library. This is multiplatform so it conveniently let's our software compile to many platforms. We are now thinking of compiling it for macs but there seems to be some bug in the OSX implementation of GLUT. Rendering to 1 pixel in our rendering context shows up as 4 pixels. Why is this the case? This will make the graphics look horrible on an otherwise superb screen. Is there some way to get around this?
    Cheers,
    Petter

    Hi lzawacki,
    If you are not able to send SMS messages from your MacBook Pro, check the settings for this Continuity feature in the article below.  Then restart your Mac and test.
    Connect your iPhone, iPad, iPod touch, and Mac using Continuity - Apple Support
    http://support.apple.com/en-us/HT6337
    SMS
    With Continuity, all the SMS and MMS text messages you send and receive on your iPhone also appear on your Mac, iPad, and iPod touch. Even if the person you’re communicating with doesn’t have an iPhone. And regardless of what phone they have, you can reply from whichever device is closest to you, including your iPad or Mac. You can also initiate a  conversation by clicking a phone number in Safari, Contacts, or Calendar.
    To use Continuity for SMS and MMS with your iPhone and your Mac, iPad or iPod touch
    Your iPhone, iPad, and iPod touch need to use iOS 8.1, and your Mac needs to use OS X Yosemite.
    Sign in to iMessage on your iPhone, your other iOS devices, and your Mac using the same Apple ID.
    On your iPhone:
    Go to Settings > Messages > Send & Receive > You Can Be Reached By, and add a check to both your phone number and email address.
    Go to Messages > Text Message Forwarding, and enable the device(s) you would like to forward messages to.
    Your Mac, iPad, or iPod touch will display a code. Enter this code on your iPhone to verify the SMS feature.
    I hope this information helps ....
    - Judy

  • FIXED: BUG in Oracle XSLT processor

    Edit: I fixed it by just importing all of the Jdev libraries. My bad for being a dolt.
    I am trying to detect certain values in an XML document that start with $ (the dollar sign) character. This has some conflicts with the syntax for XSL variables. The following code gives an exception when running in the Oracle XSLT...
    <xsl:template name="interpretToken">
    <xsl:param name="token" />
    <xsl:choose>
    <xsl:when test="starts-with($token, '$')" >
    <a><xsl:attribute name="href">
    <xsl:value-of select='replace($token, "\$", "#")' />
    </xsl:attribute>
    <xsl:value-of select='replace($token, "\$", "")' />
    </a>
    </xsl:when>
    </xsl:choose>
    </xsl:template>
    (note that this isn't the best way to write the above code, but replace suffices)
    When I run this in the XSLT of JDev 10.1.3.2, the following stack trace is given:
    Exception in thread "Thread-1" java.lang.NoClassDefFoundError: oracle/i18n/text/OraNormalizer
         at oracle.xml.util.UnicodeUtil.<clinit>(UnicodeUtil.java:35)
         at oracle.xml.xslt.XSLSAXPrintDriver.printAttributes(XSLSAXPrintDriver.java:492)
         at oracle.xml.xslt.XSLSAXPrintDriver.startElement(XSLSAXPrintDriver.java:408)
         at oracle.xml.xslt.XSLEventHandler.reportStartElement(XSLEventHandler.java:267)
         at oracle.xml.xslt.XSLEventHandler.characters(XSLEventHandler.java:863)
         at oracle.xml.xslt.XSLValueOf.processAction(XSLValueOf.java:143)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLCondition.processAction(XSLCondition.java:181)
         at oracle.xml.xslt.XSLCondition.processAction(XSLCondition.java:157)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLCallTemplate.processAction(XSLCallTemplate.java:132)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLCondition.processAction(XSLCondition.java:181)
         at oracle.xml.xslt.XSLCondition.processAction(XSLCondition.java:157)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLCallTemplate.processAction(XSLCallTemplate.java:132)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLCondition.processAction(XSLCondition.java:181)
         at oracle.xml.xslt.XSLCondition.processAction(XSLCondition.java:157)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:242)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:142)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:242)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:142)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:242)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:142)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:242)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:142)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:242)
         at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:142)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:581)
         at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:548)
         at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:333)
         at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:181)
         at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:218)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:121)
         at oracle.xml.async.XSLTransformer.run(XSLTransformer.java:136)
         at java.lang.Thread.run(Thread.java:595)
    No line number in my XSLT is written, but I have isolated it to the above code in the XSL file. This is some bug in the Oracle implementation, because when I run it against Saxon9, it produces output without complaint. Please help me with a work around for detecting the dollar sign and removing it for the output or can I find an oracle xslt patched package.
    Thanks a lot. - astewart / [email protected]
    Message was edited by:
    astewart
    Message was edited by:
    astewart
    Message was edited by:
    astewart

    Hi,
    You have posted to the wrong forum. Try posting to one of the XML forums such as:
    General XML
    Ron

  • IE7 z-index bug

    My Spry drop down menu appears behind the text on my pages in
    IE7, because of the apparently well-known bug in IE7's
    implementation of positioned elements and stacking contexts (
    explanation
    here).
    Is there a solution, or will I have to create a different
    menu system for IE, and do some browser-sniffing? Bit of a drag,
    that...
    Here's the problem in action (if you use IE7...) go
    here
    and click on the "MENU" icon in the top left of the screen...
    Thanks for any advice.

    Hi Gaurav! Thanks for your reply.
    I do indeed use a lot of Javascript, but it's all
    encapsulated ("namespaced") and so it shouldn't be interfering with
    anything!
    Maybe I tweaked something in the Spry code that I shouldn't
    have, but I can't imagine what...
    I will try rebuilding the Spry menu, as you suggest.
    Cheers

  • ServerSocket bind, bug or windows feature

    I wanted to check if a TCP socket was already bound before attempting to use it.
    I had my own ideas, but looked for other ideas as well.
    While testing these other ideas I stumbled on the following issue.
    On Windows XP(SP3), its the work platform of choice, I noted the following from a netstat:
    $ netstat -an|grep 139
    TCP 10.11.13.98:139 0.0.0.0:0 LISTENING
    TCP 192.168.56.1:139 0.0.0.0:0 LISTENING
    TCP 192.168.113.1:139 0.0.0.0:0 LISTENING
    TCP 192.168.231.1:139 0.0.0.0:0 LISTENING
    Note that this is the Windows 'NETBIOS Session Service' of course and that it is bound to all my machines interfaces except for the loopback.
    If I execute the following call:
    ServerSocket anyAddressSocket = new ServerSocket(139, 2, null);
    I will not get java.net.BindException thrown.
    I will see a new listener bound to port 139 and the 'any address' as follows:
    $ netstat -an|grep TCP|grep 139
    TCP 0.0.0.0:139 0.0.0.0:0 LISTENING
    TCP 10.11.13.98:139 0.0.0.0:0 LISTENING
    TCP 192.168.56.1:139 0.0.0.0:0 LISTENING
    TCP 192.168.113.1:139 0.0.0.0:0 LISTENING
    TCP 192.168.231.1:139 0.0.0.0:0 LISTENING
    But if I replicate the situation using Java on a different arbitrary port as follows:
    List<ServerSocket> sockets = new ArrayList<ServerSocket>();
    Enumeration<NetworkInterface> enumOfNetworkInterfaces =
    NetworkInterface.getNetworkInterfaces();
    while(enumOfNetworkInterfaces.hasMoreElements())
    NetworkInterface networkInterface = enumOfNetworkInterfaces.nextElement();
    List<InterfaceAddress> addrs = networkInterface.getInterfaceAddresses();
    for(int idx = 0; idx < addrs.size(); idx++)
    InterfaceAddress intFace = addrs.get(idx);
    if (!networkInterface.isLoopback())
    ServerSocket socket = new ServerSocket(7777, 2, intFace.getAddress());
    sockets.add(socket);
    // At this point, netstat shows the same output as the first port 139 output above.
    ServerSocket brokenSocketNo = new ServerSocket(7777, 2, null);
    I will get the expected exception:
    "java.net.BindException: Address already in use: JVM_Bind"
    I am testing this with Java 6u6 which I know is old, but is what is required to be used for this product.
    Is this a bug in the JVM implementation? I cannot find any reference to such in the bugs DB.
    Is this a feature of Windows TCP stack?
    I have not tried this on a linux platform because I am really trying to understand the issue as exhibited on the MS platform.
    Any insight into this would be helpful.
    Cheers Mark

    Hello EJP.
    Thanks for that pointer.
    I tried it as you indicated and inside the loop using the following:
    ServerSocket socket = new ServerSocket();
    socket.setReuseAddress(true);
    socket.bind(new InetSocketAddress(intFace.getAddress(), 7777), 2);
    Each ServerSocket is now listening on a specific interface using the 'setReuseAddress(true);' call.
    This by itself did not change the effect I see when I then make the call 'new ServerSocket(7777, 2, null)' which succeeded with port 139 but not with my port 7777 test.
    If I changed the call for the for the 'wild card' address to also use 'setReuseAddress(true);' then all succeeds, but this is not the situation that succeeded with the port 139 test.
    I think I am still attempting to solve the issue as a bug or a 'windows XP feature', but I am leaning more about the intricacies of sockets.
    I will follow your suggestion and have a look at 'Stevens' 3rd Edition.
    Cheers Mark

  • Inconsistency using SUN Rowset Reference Implementation

    I am Using the RowSet reference implemention with Oracle Database.
    I am having a class which takes a input in form of XML adhering to the webrowset format.
    The xml contains some records to be inserted , some records to be updated and some records to be deleted.
    This xml is then fed to a WebRowSet using the webRowSet.readXml method which takes a Reader as a parameter. I am using a StringReader here.
    Here is the code snippet:-
    public void executeUpdate(String webRowSetXML)throws SQLComponentException{
    System.out.println(" webRowSetXML "+webRowSetXML);
    StringReader sr = new StringReader(webRowSetXML);
    WebRowSet webRowSet = null;
    try {
    webRowSet = new WebRowSetImpl();
    webRowSet.readXml(sr);
    webRowSet.acceptChanges(connection);
    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    I found here that the insertion and updating works without any problem , but the deletion doesn't work.
    Then to study this problem , i wrote a program with two WebRowSets, one will be the producer of the data and the other will be the consumer.
    the first WebRowSet will read the data from the data source , delete a record using the following piece of code:-
    wrs1.absolute(6);
    wrs1.deleteRow();
    And then i generate a String XML using the writeXML method.
    Then i feed this xml to the readXML method of the second WebRowSet and i call the acceptChanges method of the second WebRowSet. But the record doesn't get deleted.Also after printing the xml from the second WebRowSet , the <deleteRow> tag is absent from the xml.
    The same condition works properly for the insert and update operation and the respective <insertRow> and <updateRow> methods appear in both the xml's generated from both the WebRowSet's.
    Is this a bug in the webRowSet implemention or is it a problem of Oracle? Or is it that something else needs to be done for the delete operation to work.
    I tried the same thing with Pervasive SQL instead of oracle. Here only the insert operation works.
    Any body please help me in solving this problem...

    http://java.sun.com/j2se/1.4.1/docs/api/javax/sql/RowSet.html
    From the sun desc above.
    The RowSet interface is unique in that it is intended to be implemented using the rest of the JDBC API. In other words, a RowSet implementation
    is a layer of software that executes "on top" of a JDBC driver.
    Implementations of the RowSet interface can be provided by anyone,
    including JDBC driver vendors who want to provide a RowSet
    implementation as part of their JDBC products.
    rykk

  • Cipher.getInstance("DES") not working in servlet!

    Hi - I'm working on Sun ONE Identity Server 6.1 using Sun ONE Web Server 6.1 using J2SDK 1.4.1_05
    I've modified one of the files to perform DES Encryption prior to getting some data.
    The code works fine when compiled separately - even works fine as a console program - but when I try running it as a servlet - I get a WHOLE bunch of errors when the program hits this line:
    cipher = Cipher.getInstance("DES");Here is the complete code:
    public String encryptPassword(String Password, String AppName)
         Key key;
         Cipher cipher;
         String Data = Password;
         String ApplicationName = AppName;
         String result = new String("hi");
         try
                    ObjectInputStream in = new ObjectInputStream(new FileInputStream("PrivateKey.ser"));
                  key = (Key)in.readObject();
                 in.close();
                 Security.addProvider(new com.sun.crypto.provider.SunJCE());
              cipher = Cipher.getInstance("DES"); // This LINE GIVES THE ERROR
              cipher.init(Cipher.ENCRYPT_MODE, key);
              byte[] stringBytes = Data.getBytes("UTF8");
              byte[] raw = cipher.doFinal(stringBytes);                    
              BASE64Encoder encoder = new BASE64Encoder();
              String result = encoder.encode(raw);
         catch (Exception e)
              // Print some error
    return result;
    }Here is the error log from the webserver:
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Handler method "handleBtnSubmitRequest" threw an exception
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: java.lang.ExceptionInInitializerError
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.Cipher.a(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.Cipher.getInstance(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.am.console.user.UMChangeUserPasswordViewBean.encryptPassword(UMChangeUserPasswordViewBean.java:244)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.am.console.user.UMChangeUserPasswordViewBean.handleBtnSubmitRequest(UMChangeUserPasswordViewBean.java:172)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.lang.reflect.Method.invoke(Method.java:324)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:299)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:811)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:749)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:596)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:772)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:446)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 27 more
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.security.PrivilegedActionException: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.security.AccessController.doPrivileged(Native Method)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 28 more
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key 
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.pkcs11.PK11Signature.engineInitVerify(PK11Signature.java:172)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.crypto.Signature.initVerify(Signature.java:95) 
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.provider.Signature.engineInitVerify(Signature.java:94)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.provider.DSASignature.engineInitVerify(DSASignature.java:70)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.security.Signature.initVerify(Signature.java:297)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:394)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:363)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_b.e(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_v.run(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 29 more
    [20/Oct/2003:16:58:01] failure ( 6417):  for host 10.42.7.235 trying to POST /amconsole/user/UMChangeUserPassword, service-j2ee reports: StandardWrapperValve[UMServlet]: WEB2792: Servlet.service() for servlet UMServlet threw exception   com.iplanet.jato.CompleteRequestException   at com.iplanet.am.console.base.ConsoleServletBase.onUncaughtException(ConsoleServletBase.java:331)   at com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1023)   at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:469)   at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)   at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)   at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)    

    Hey.
    Not certain, but I think you need to make sure that your ciphers/certificates are installed on your server. Check the docs on the Sun server, and see what they say about installing certificates.
    Hope this helps.
    Vic

  • JBO framework - BUG ! very URGENT !!!!

    Hi JDev-Team,
    there seems to be a bug in the JBO implementation of the JDev 3.1.
    I have used the JboHtml Beans to generate a JSP application, but because the beans are still young and didn't face some of my problems, I make some changes to extended them.
    More exactly I added some features to the RowSetBrowser bean that enables my application to have a master detail information autogenerated via JavaScript, from extra columns of the rowsetbrowser, something like the show recordnr and editurl.
    After I make changes in these details (JavaScript generated) I do a post(html form) with the target set as the page with the RowSetBrowser bean and in the render() I look for data that has to be changed.
    I apply these changes to the table using the
    getApplicationModule().getTRansaction().executeCommand(sqlstmt).
    So far everything is ok.
    Now this is what's happening. Let us have this scenario :
    1. open the RowSetBrowser, navigate to one rec, do a edit using the EditCurrentRecord()
    this operation I can repeat n-times, no problem.
    2. now I try to modify some information in my javascript details, post is ok, data is changed.
    again I can repeat this step n-times, no problem again.
    3. if I like now to do step 1 after 2, I got always a error.
    After changing to debugmode I got this from the debugger:
    log3: EditCurrentRecord Bean : execute() - field name ... Ergbeschlog3: EditCurrentRecord Bean : execute() - field Ergbesch has sNewValue ... test101log3: EditCurrentRecord Bean : execute() - **** Updating Attribute: Ergbesch new value is test101[1235] OracleSQLBuilder Executing doSelect ... (true)log3: [1236] Built select: 'SELECT ERGBESCHID, ERGBESCH, ERGTABEL FROM EREIG_REF Ereig_Ref'log3: [1237] Executing LOCK...SELECT ERGBESCHID, ERGBESCH, ERGTABEL FROM EREIG_REF Ereig_Ref WHERE ERGBESCHID=? FOR UPDATE NOWAITlog3: [1238] OracleSQLBuilderImpl.doEntitySelect failed...log3: [1239] java.sql.SQLException: ORA-01002: FETCH auf ung|ltigen oder geschlossenen Cursor.the ORA-01002 is in english :
    ORA-01002: fetch out of sequence
    In the jdbc FAQ writes:
    Error Message: "ORA-01002: fetch out of sequence"
    A JDBC Connection by default has the AutoCommit turned ON. However, to use a SQL that has 'for update' you need to have autoCommit to be turned OFF.
    Hence, the solution is to set autocommit to false.
    I'm running the application in stateless mode which has autocommit set on, but I got the same problem running in statefull mode and also I must run the application in stateless mode.
    Can you help me. I would appreciate a briefly answer, especially from Huan Oropeza.
    TIA,
    Seb.
    null

    Hi Steven,
    let me explain why I need this solutions.
    I have a application that has a master detail view from table1 companys to table2 events, so I can have many events to one company. Futher more I have pro event other tables (tableevent1, ... tableevent2) where I have properties of a event recorded, so event1 has properties1, event2 some other and so on ...
    Companys -----> Events ------> Event1properties
    In my application logic when I create a new event typ I have to create a new table where I will save the properties for that event. So, because the events can have different properties I can not create this in BC4J AppModule.
    With VO I have created a ViewLink beetween Company and Event. For data manipulation of the tableevent1 ... I extended the RowSetBrowser thus when changing data to do:
    UPDATE ..... statements and SELECTs to get that data.
    I have also implemented this kind of operation for the DDL of the tableevent1 ...
    (event properties) so this time to get that data I use :
    select * from "SYS"."COL" where TNAME=tableevent1;
    Changes are done with DDL Statements:
    ALTER TABLE ...
    CREATE TABLE ...
    My problem is when I changed something with the RowSetBrowser methods in the tableevent1...(properties) I can not futher make any inserts, edits using the EditCurrentRecord Bean in the events table (detail table of company).
    Please help me with this !
    TIA,
    Seb

  • To JDev Team. PCOL_CONTROL table bug in JDev9i

    I have an application that I developed in 3.2 using BC4J. When I open my workspace in 9i, It upgrades BC4J, but I can navigate through the records of my larger BC4J View Objects. The smaller ones with less than 100 total rows work fine, but the ones with more rows (this one has 836) don't work. Here are the errors I get:-
    JBO-28020: Passivation error on collection AllWauView, node id 146
    BO-28030: Could not insert row into table null, id 146: ORA-00001: unique constraint (PGAT490.NULL_PK) violated
    ORA-06512: at line 1
    When I look at the database, looks like the BC4J engine is attempting to insert nulls into the primary key column. I had no problems in the Jdev 3.2. AllWauView is a view I built in expert mode, and all it does is a simple SELECT from a group of tables for a list of values. Please let me know if I am missing something here. I attempted to bump the prefetch count to 1000 but it doesn't help.

    Weird as this may sound, the problem has re-curred again. This time even after running the clean-up procedure that Steven posted seems to have no effect. I get the same exact error. I also notice a table called 'null' has been created in my schema, besides the PCST_* and PCOL_* tables. What is this null table? Is it supposed to have a different name and Jdeveloper gives null as the name? Anyway, now I am back to square one. The spill-over behaviour also seems to be random. Is it possible that running the clean up procedure (I installed the PL\SQL package into my schema) from SQL PLUS doesn't really fix anything, and that there is another reason for the problem? I even got a weird error message that said that an insert into the table null has failled, leading me to think this table was actually valid, but isn't null a reserved word that we can't use to name a table in Oracle? Sure it is a spill over problem as it only occurs with my larger view object, and interestingly enough, not when I navigate the rows one at a time, but when I attempt to scroll all the way to the last row while populating my LOV. This doesn't happen with 3.2, so I think there is actually a bug in the 9i implementation. Any comments on that?

Maybe you are looking for

  • Free but Not free apps

    Hello. I have a problem. I want to download some so called "free applications" but in fact when I want to download them into my Iphone I am directed to verify my account to make the payment. Althought all the applications I want to download are in th

  • Appleworks Printing Problem

    Hi, I recently bought a Brother DCP 7020 Laser printer and I have been very pleased with it. Alas when I tried printing a file created in Appleworks today I found that when I clicked on Print and then attempted to change the print quality from Normal

  • Has anybody experience with the application "MacKeeper"

    The Qustion ist over there thanks for help

  • How to install standby serve (HA) cluster

    hi friends how to install the  standby server . os / redhad linux 5.0 db/ oracle sap / ecc, ep my requirments are  installing ecc, ep in one(A) box . (production box) and standby server on second (B)box. what ever the data that is there in A box need

  • 8iLite on WIN/2000 -- navigator crash.

    Hi there, I installed Oracle 8iLite in a WIN/2000 laptop and tried to create a snapshot of a table hosted on our 8.1.7EE server running under Linux. I previously created a master group on the server containing the questionable table. Dragging and Dro