H:selectOneMenu - Update problem through a Java Function

Hi,
I'm designed a little form which has two h:selectOneMenu.
<h:form>
<h:selectOneMenu id="listas_disponibles"
                             value="#{sesion.listaSeleccionada}"
                             valueChangeListener="#{sesion.escogerLista}"
                             onchange="submit();"
                             immediate="true">
    <f:selectItems value="#{sesion.listasConfiguracionIDNombre}"/>
</h:selectOneMenu>
<h:selectOneMenu id="listas_hijas"
                            value="#{sesion.listaHijaSeleccionada}"
                            valueChangeListener="#{sesion.escogerListaHija}"
                            onchange="submit()">
    <f:selectItems value="#{sesion.listasHijas}" />
</h:selectOneMenu>The problem is that when I change the "listas_hijas" value, I want update the "listas_disponibles" value through the "sesion.escogerListaHija" method.
public void escogerListaHija(ValueChangeEvent value){
this.listaSeleccionada
= idListNewValue;
}But when the JSF page is rendered, the value of "listas_disponibles" hasn't changed.
Can anybody help me? Need you more data or code? Thanks!!

Try to access your list through the ValueBinding.In your function
FacesContext context = FacesContext.getCurrentInstance();
context.getApplication().createValueBinding("#{sesion.listaSeleccionada}").setValue(context, idListNewValue);
you must have the setter for you list.

Similar Messages

  • Problem while calling java function from html

    when i tried to call a java function from html i'm getting an error
    object don't support this property.
    what could be the reason.
    This is my html.
    I got this from this forum only.
    My applet is accessing the system property "user.home".
    I ran it in IE
    <DIV id="dvObjectHolder">Applet comes here</DIV>
    <br><br>
    <script>
    if(window.navigator.appName.toLowerCase().indexOf("netscape")!=-1){ // set object for Netscape:
         document.getElementById('dvObjectHolder').innerHTML = " <object ID='appletTest1' classid=\"java:test.class\"" +
    "height=\"0\" width=\"0\" onError=\"changeObject();\"" +
              ">" +
    "<param name=\"mayscript\" value=\"Y\">" +
    "<param name=\"archive\" value=\"sTest.jar\">" +
    "</object>";
    }else if(window.navigator.appName.toLowerCase().indexOf('internet explorer')!=-1){ //set object for IE
         document.getElementById('dvObjectHolder').innerHTML = "<object ID='appletTest1' classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" +
              " height=\"0\" width=\"0\" >" +
              " <param name=\"code\" value=\"test.class\" />" +
         "<param name=\"archive\" value=\"sTest.jar\">" +
              " </object>"
    </script>
    <LABEL id="lblOutputText">This text will be replaced by the applet</LABEL>
    <BR>
    <input value="Javascript to java" type=button onClick="document.appletTest1.fromJavaScript()">

    I tried this example using the repy given to an earlier post.
    But its not working with me.
    What i did in addition was adding plugin.jar to classpath to import netscape.javascript.*;
    Let me add some more details
    1) I'll add the stack trace
    2) my java progrma
    3) batch file to sign the applet.
    1) This is the stack trace i don't know whether u will undertand this
    load: class test.class not found.
    java.lang.ClassNotFoundException: test.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: C:\FastranJava\AppletObject\bin\test\class.class (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception in thread "Thread-5" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    2) Java Program
    import netscape.javascript.*;
    import java.applet.*;
    public class test extends Applet
         private JSObject win;
         private JSObject outputLabel;
         private boolean buttonFromJavaClicked=false;
         checkJavaScriptEvent evt=new checkJavaScriptEvent();
         public void init()
              try
                   evt.start();
                   win=JSObject.getWindow(this);
                   outputLabel=(JSObject)win.eval("document.getElementById('lblOutputText')");
                   outputLabel.setMember("innerHTML", "<center><h1>From Init<br>Your Home directory" + System.getProperty("user.home") + "</h1></center>");
              catch(Exception e)
                   e.printStackTrace();
         public void fromJavaScript()
              buttonFromJavaClicked=true;          
         public void fromJavaScript2()
              System.out.println("Started Form JavaScript2");
              try
                   String strLbl="<center><h1>From JavaScript<br>Your Homedir:" + System.getProperty("user.home") + "</h1></center>";
                   outputLabel.setMember("innerHTML", strLbl);
              catch(Exception e)
                   e.printStackTrace();
         class checkJavaScriptEvent extends Thread
              public void run()
                   while(true)
                        if(test.this.buttonFromJavaClicked)
                             System.out.println("OK buttonfromjava is true");
                             test.this.buttonFromJavaClicked=false;
                             fromJavaScript2();
                        try
                             Thread.sleep(3000);
                        catch(Exception e)
                             e.printStackTrace();
    3) Batch file
    del *.cer
    del *.com
    del *.jar
    del *.class
    javac -classpath ".;C:\Program Files\Java\jre1.5.0_06\lib\plugin.jar" test.java
    keytool -genkey -keystore harm.com -keyalg rsa -dname "CN=Harm Meijer, OU=Technology, O=org, L=Amsterdam, ST=, C=NL" -alias harm -validity 3600 -keypass password -storepass password
    jar cf0 test.jar *.class
    jarsigner -keystore harm.com -storepass password -keypass password -signedjar sTest.jar test.jar harm
    del *.class

  • LMS 3.1 Device Update problem through CCO

    If I use the correct CCO password, I get "Connection to Cisco.com failed. Please check log files. Download operation cannot proceed." All I see in psu.log is "FATAL  [DevUpdate : performAdd]  : Error while trying to connect to Cisco.com. Return Code = 1". If I use a bogus password, I'm told so, which leads me to think, without digging further on the LMS or proxy side that there's problem on the CCO end. Am I off base here?

    I was able to download via Device Update with a different CCO account, which makes me think it's an account entitlement problem. Does it sound plausible given the error message ([DevUpdate : performAdd]  : Error while
    trying to connect to Cisco.com. Return Code = 1) that it's CCO's way of saying the first account was not entitled to download RME & CiscoView pkgs?

  • Java Function Activity Agent not starting

    Hi,
    I am facing some problem in starting Java Function Activity Agent on Windows XP.
    I hav modified WF_CLASSPATH of wfjavlsnr.bat script to include classes12.jar, ojdbc14.jar & my custom jar files.
    But when I run this script from command prompt using following syntax
    wfjvlsnr.bat owf_mgr/password@host:portid:sid or
    wfjvlsnr.bat owf_mgr/password@sidfollowing messge is thrown...
    Oracle Workflow 2.6.0 JAVA Function Activity Agent
    t2cCreateState
    Connected to owf_mgr@dbserver:1521:ORA10G with character set
    UTF8
    Unable to connect to dbserver:1521:ORA10G
    Can anybody please point out what could be the problem....?
    what is this t2cCreateState? I have never see this "t2cCreateState" when we run JFAA in unix box.
    Any points will be appreciated..
    Regards,
    Nitin

    Hi,
    I tried to run the same without entering password,but still i am getting error.
    The error description is:
    Oracle Workflow 2.6.3 JAVA Function Activity Agent
    Please Enter Database Password :
    ORA-06401: NETCMN: invalid driver designator
    Unable to connect to nn0734.nucleussoftware.com:1521:asdb
    Accepted arguments:
    java <program> <user> <conStr> [oci8]
    java <program> <user> <conStr> thin
    Where <conStr> is in the form of <host>:<port>:<sid> for thin
    and DB Service name for oci8
    Please Help. Is there any problem with my tnsnames.ora or something else.
    Thanx in advance,
    Sarab

  • What's Java Function Activity Agent?it's wfapi.jar?

    pls explain the words below,tks a lot:
    You must include the JAR files containing your custom classes in your
    CLASSPATH to make the classes accessible to the Java Function
    Activity Agent. The custom class files should reside on the same
    platform where the Java Function Activity Agent is run. The Java
    Function Activity Agent does not need to reside on the same tier as the
    database, however.

    Hi,
    I am facing some problem in starting Java Function Activity Agent on Windows XP.
    I hav modified WF_CLASSPATH of wfjavlsnr.bat script to include classes12.jar, ojdbc14.jar & my custom jar files.
    But when I run this script from command prompt using following syntax
    wfjvlsnr.bat owf_mgr/password@host:portid:sid or
    wfjvlsnr.bat owf_mgr/password@sidfollowing messge is thrown...
    Oracle Workflow 2.6.0 JAVA Function Activity Agent
    t2cCreateState
    Connected to owf_mgr@dbserver:1521:ORA10G with character set
    UTF8
    Unable to connect to dbserver:1521:ORA10G
    Can anybody please point out what could be the problem....?
    what is this t2cCreateState? I have never see this "t2cCreateState" when we run JFAA in unix box.
    Any points will be appreciated..
    Regards,
    Nitin

  • Problem with updating oracle DB with java date thru resultset.updateDate()

    URGENT Please
    I am facing problem in updating oracle database with java date through resultset.updateDate() method. Can anybody help me please
    following code is saving wrong date value (dec 4, 2006 instead of java date jul 4, 2007) in database:
    ResultSet rs = stmt.executeQuery("SELECT myDate FROM myTable");
    rs.first();
    SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-mm-dd");
    java.util.Date myDate = new Date();
    rs.updateDate("myDate", java.sql.Date.valueOf(sqlFormat.format(myDate)));
    rs.updateRow();

    I believe you should use yyyy-MM-dd instead of yyyy-mm-dd. I think MM stands for month while mm stands for minute as per
    http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    (If this works, after spending so much of your time trying to solve it, don't hit yourself in the head too hard. I find running out of the room laughing hysterically feels better).
    Here is a more standard(?) way of updating:
    String sqlStatement=
    "update myTable set myDate=? where personID=?"
    PreparedStatement p1= connection.prepareStatement(sqlStatement);
    p1.setDate(1,new java.sqlDate());
    p1.setInt(2, personID);
    p1.executeUpdate();

  • HT4623 Hi,        There was ios 4.1 in my iphone3gs.i have tried to update it through itunes but there is a problem.After installation through itunes,there is problem that it is not activating my iphone and shows a message that your iphone could not be ac

    Hi,
        There was ios 4.1 in my iphone3gs.i have tried to update it through itunes but there is a problem.After installation through itunes,there is problem that it is not activating my iphone and shows a message that your iphone could not be activated because the activation server is temporarily unavailable,try connecting your iphone to itunes to activate it,or try again in a couple of minutes.i tried many times but it again shows the same message,
    after installation,when i connect my iphone to itunes it shows a message that we are unable to activate your iphone at this time please try again or contact customer care.please reply me urgently to resolve this problem.

    That is usually a symptom thet the phone was hacked or jailbroken. Was it?

  • Problem passing param to a java function from xslt

    HI all,
    A thousand thankyou's to any who can help me.
    Documentation is scarce, and I got to bed late last night. It has been a hard day of fruitless searching for a solution to this.
    Problem:
    Calling a named template in xsl using the with-param tag to pass in a parameter.
    attempting to call a java function, specifying that parameter as an argument.
    getting parse error:
    ERROR: 'Cannot convert argument/return type in call to method 'java.lang.String.new(java.util.Date)''
    sample code:
    calling the named template
              <xsl:call-template name="calc-age">
                   <xsl:with-param name="dob">
                        <xsl:value-of select="/FullRecord/Patient/dob"/>
                   </xsl:with-param>
              </xsl:call-template>the template itself
         <xsl:template name="calc-age">
              <xsl:param name="dob"/>          
             <xsl:variable name="date" select="java:util.Date.new()"/>
             <xsl:value-of select="java:toString($date)"/>
              <xsl:variable name="sdob" select="java:lang.String.new($date)"/>
         </xsl:template>          the error
    ERROR:  'Cannot convert argument/return type in call to method 'java.lang.String.new(java.util.Date)''
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:613)does anyone know what is wrong here?
    And if they do, where I can find examples or a reference on how this is supposed to work?
    It's driving me mad!
    Thanks all!
    svaens
    Edited by: svaens on Apr 14, 2008 9:16 AM

    ok.
    What I had pasted was wrong, But I was it was only confused because I had tried quite a few different things to get it working, and had made a mistake somewhere along the way.
    HOWEVER!!!
    This code, I believe should work, (below) but doesn't.
    the error is different, but similar.
    The call to the template remains the same, but the template itself is now different.
    What is wrong with it?
    Do i need to convert a xml document string to a java string somehow?
    template:     <xsl:template name="calc-age">
              <xsl:param name="dob"/>          
             <xsl:variable name="sdob" select="java:lang.String.new($dob)"/>
             <xsl:value-of select="java:toString($sdob)"/>        
         </xsl:template>     the error:
    ERROR:  'Cannot convert argument/return type in call to method 'java.lang.String.new(reference)''
    FATAL ERROR:  'Could not compile stylesheet'To be more clear, I am translating XML via XSL which is transformed using Java 6, and the packages:
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;

  • Problem java function

    Hello guys,
    I've done a java function to handle the fact that i move the decimal of a number to 2 instead of 3, 4, 5 or else.
    For exemple, if i have in input the field 159, 7934 then i should have in output 159,79.
    My problem is that it rounds the number !! So i have in output 159,8 !
    Here's my function :
    // Round the given input value to given number of decimals
    // The result will be a floating point number (not integer value)
    String zeroes = "00000000000000";
    String numDec = numDecimals;
    // To prevent a Divide by zero error default to 1 which would lead to a No-op
    if (numDec.equals("") || numDec.equals("0"))
      numDec = "0";
    String strFactor = "1" + zeroes.substring(0, Integer.parseInt(numDec));
    int intFactor = Integer.parseInt(strFactor);
    float i =Float.parseFloat(inputValue);
    i = Math.round(i*intFactor);
    i = i/intFactor;
    return Float.toString(i);
    Like you see, i'm putting in string format for the output because i am using a replacestring after in order to suppress the '.'
    I think the problem come from that.
    The solution would be to suppress the '.' in my UDF but i don't know how to code it in java.
    Is someone knows please ?
    Thanks by advance,
    JP

    Ok my UDF is now :
    // Round the given input value to given number of decimals
    // The result will be a floating point number (not integer value)
    String zeroes = "00000000000000";
    String numDec = numDecimals;
    // To prevent a Divide by zero error default to 1 which would lead to a No-op
    if (numDec.equals("") || numDec.equals("0"))
      numDec = "0";
    //String strFactor = "1" + zeroes.substring(0, Integer.parseInt(numDec));
    //int intFactor = Integer.parseInt(strFactor);
    double i =Double.parseDouble(inputValue);
    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(2);
    String n = nf.format(i);
    return n ;
    BUT, when i put 2 digits, it still "rounding" my number even if i use a double or a float !
    Nevertheless, when i want 3 digits, it still "rounding" !
    Is it impossible to avoid the "round machine ?"

  • I bought an iPad in June 2012 and have it worked fine, but after 2 weeks of purchase, he began to hang up, then the sound disappeared and the screen became black. I updated all through itunes, but the sound is still absent, and still problem with sound an

    I bought an iPad in June 2012 and have it worked fine, but after 2 weeks of purchase, he began to hang up, then the sound disappeared and the screen became black. I updated all through iTunes, but the sound is still absent, and still problem with sound and iPad still doesnt work.

    Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • Updating problem...I have a update that starts out going through but then does not finish just keep running

    also with the update problem it says software update and below the running bar it says connecting to the server

    Please do the following:<br><br>
    #Go to [http://www.mozilla.com/en-US/firefox/fx/?ref=logo Download Firefox 4.0.1] and download a fresh installation file to the desktop.<br><br>
    #Then go to Add/Remove Programs, scroll down to "Mozilla Firefox" and remove it, choosing to keep your bookmarks, customizations etc., (''don't checkmark the box'').<br><br>
    #Then reboot and delete the folder called "Mozilla Firefox" at this location: C:\Program Files\Mozilla Firefox<br><br>
    #Finally run the installation file you downloaded to the desktop earlier.<br>
    Your bookmarks, customizations etc., are maintained in a different location and will become available to you again once you complete the installation.

  • HT1218 After a recent iTunes update attempt iTunes no longer functions and the airport extreme base station is not accessable on our computer.  We still have wifi but cannot access the base station software.

    After a recent iTunes update attempt iTunes no longer functions and the airport extreme base station is not accessable on our computer.  We still have wifi but cannot access the base station software.

    Thanks for the reply. I appreciate the response. I tried that approach this evening and it didn't work for me. (Technically it worked for me, when I was hardwired into my base station, but would not work for me wirelessly, which is my main issue.)
    Again, using the approach you recommended works only if I have my ethernet cable attached to the LAN port so my computer is communicating directly to the base station through the hard wire. I am able to scan for my base station and make setting adjustments normally this way too.
    As soon as I disconnect from the LAN port and try to go wireless is where I run into problems. The Base Station's wireless network I created is available to choose in the top right corner of the monitor with all of the other available wireless devices/networks -- but the network I created does not have access to the internet. I am also unable to configure my Base Station wirelessly. When my Airport Utility tries to scan for the Base Station and Network, it cannot find any Apple Wireless Device. It's like the Wireless Network in my base station is not sending out a signal.
    Is there a way to resolve this issue?

  • Problem 10.6.8 update, Problem 10.6.8 update

    Like most people I know I have gotten used to just doing the suggested Software Updates from Apple.
    Never again!!! Time Machine for me from now on...
    I have had a trouble free existence on my 3.06 GHz Intel Core i3 upto 10.6.7
    Now I am in the strange position of my Mac working fine from reboot but whenever I go near the file system either through Finder or even Save As in Pages etc the following happens...
    1. the left button of the mouse stops working except the Apple menu!
    2. any editable field e.g. browser window address bar, password in Skype or anything in a Pages document is selectable but can´t be changed!
    3. I can´t cmd-tab through the open applications!
    4. the menu bar no longer changes when I change applications!
    it is possible there are other issues that I have not yet found.
    Everything goes fine once I reboot until I go near the File System again.
    When I installed 10.6.8 it did crash at the end and asked if I wanted to send a report to Apple which I did.
    I did also update the AirPort Utility, Java for Mac OS X 19.6 Update 5 and iTunes 10.3.1 at the same time.
    Following other suggestions I have now installed the Mac OS X Combined Update but this did not change anything.
    Until someone can help I will be rebooting my Mac a lot.

    So...fixed my issue and it was not related to the updates, it was just coincidence.
    What I finally did was take a video of the startup screen and was able to see that what was happening was fsck was failing, and then the system just halted.  This info presumably makes it to dmesg, but not to system.log (huge oversight IMO).  So its not easily discerned.
    Once I figured that out I googled around and this guy's page helped me fix the problem:
    http://blog.jbheren.com/post/2011/02/09/repair-hfs-volume-on-osx
    Specifically I had to boot into single user (command+S at the startup sound)
    and issue:
    fsck_hfs -ypr /dev/rdisk0s2
    Then I did
    reboot
    and here we are

  • ABAP Calling JAVA Function or Method

    Hi Friend,
    I need help in how to proceed using  ABAP  and Call JAVA Function . I know that  we need to use RFC enabled Function modules. I was able to connect  using JAVA Connector which was provided by SAP For communicating with JAVA Apps. The approach for connecting the JAVA to SAP is working fine.  But I  have browsed through various website but failed to find any information.Now i am looking forward to help from you friends to solve my problems .
    The Requirement is mentioned below:-
      1. Prerequiste for SAP ABAP calling a third Party software which is working in JAVA Platform (like any middle ware which might be hardware or software).
      2. Sample Code  like calling a Text  ' Hello  to the world  calling JAVA from ABAP'.
      3. Steps and process so that it would be helpful.
    Timely help would be appreciated.
    Rajiv Christopher.

    1.Middleware is JCO RFC provider it comes with SAP so no need any third party Adapter.
    2.
    " The ECHOTXT parameter should contain the text of REQUTXT.Information on
    " calling the function module should be returned in RESPTXT, indicating, for
    " example, in which system and when the function module call was processed.
    data:ECHOTEXT type SY-LISEL,
         RESPTEXT type SY-LISEL.
    CALL FUNCTION 'STFC_CONNECTION' DESTINATION '<Your JCO destination name>' " which one you have developed in SM59 as TCP/IP
      EXPORTING
        requtext       = 'ABAP Calls JAVA'
    IMPORTING
       ECHOTEXT       = ECHOTEXT
       RESPTEXT       = RESPTEXT.
    if sy-subrc = 0.
      WRITE:/'---------------------------------------------------------------------'.
      WRITE: / 'establish a link to the ABAP application server with logon data'.
      WRITE:/'---------------------------------------------------------------------'.
      write:/ ECHOTEXT .
      else.
          WRITE:/'---------------------------------------------------------------------'.
      WRITE: / 'Not establish a link to the ABAP application server with logon data'.
      WRITE:/'---------------------------------------------------------------------'.
      endif.
    Check the sample code and Let me know will you get ECHOTEXT ?
    Kanagaraja L
    Edited by: Kanagaraja  Lokanathan on Jan 6, 2010 1:27 PM

  • Java functions with Oracle 10g

    I have browsed through other related message threads on this forum and it seems that the general recommendation is to develop stored procedures and functions using PL/SQL.
    I need to implement a set of functions that perform date related processing and are self contained (no SQL code or calls). For this I could reuse some Java methods that I have successfully used in an Apache Derby database. In this situation what is your experience related to performance of Java functions compared to PL/SQL? Does the effort of rewriting this code in PL/SQL make sense?

    I made some changes on the class posted by to solve the encoding problems with CLOBs.
    So here is the result of my job.
    import java.sql.SQLException;
    import oracle.sql.*;
    import java.io.*;
    import java.util.zip.InflaterInputStream;
    import java.util.zip.DeflaterOutputStream;
    * A simple class for LOB compression and decompression in Oracle Database.
    * Will work in 8i and better.  Use utl_compress from 10g onward.
    public class CompressionUtility {
         private static void pipeStreams( InputStream inStream, OutputStream outStream, int bufferSize) throws IOException {
              //System.out.println("PIPE -");
              byte[] buffer=new byte[bufferSize];
              int cnt;
              while ((cnt=inStream.read(buffer))!=-1) {
                   outStream.write(buffer,0,cnt);
         private static void pipeStreams( Reader inStream, Writer outStream) throws IOException {
              //System.out.println("PIPE Reader-Writer");
              int val = 0;
              while ( (val = inStream.read()) != -1 ) {
                   outStream.write(val);
         private static void pipeStreams( Reader inStream, OutputStream outStream) throws IOException {
              //System.out.println("PIPE Reader-");
              int val = 0;
              while ( (val = inStream.read()) != -1 ) {
                   outStream.write(val);
        private static void pipeStreams( InputStream inStream, Writer outStream) throws IOException {
              System.out.println("PIPE -Writer");
              int val = 0;
              while ( (val=inStream.read()) != -1 ) {
                   outStream.write(val);
    * Compresses the CLOB into BLOB
    * @param clob the source CLOB (plain text)
    * @param blob the target BLOB (will hold compressed binary data) it should be
    * an empty BLOB retrieved for example with dbms_lob.createtemporary(l_blob,true);
    * @throws Exception mostly I/O exception if ever
         public static void compress(CLOB clob, BLOB blob) throws IOException, SQLException {
              //System.out.println("Compressione C->B");
              Reader in=clob.getCharacterStream();
              Writer z=new OutputStreamWriter(new DeflaterOutputStream(blob.getBinaryOutputStream()));
              DeflaterOutputStream z = new DeflaterOutputStream(blob.getBinaryOutputStream());
              int val = 0;
              while ( (val=in.read()) != -1 ) {
                   z.write(val);
              pipeStreams(in, z);
              in.close();
              z.close();
    * Decompresses the BLOB into CLOB
    * @param blob the source BLOB (compressed binary data)
    * @param clob the target CLOB (will hold plain text) it should be an empty CLOB
    * retrieved for example with dbms_lob.createtemporary(l_clob,true);
    * @throws Exception mostly I/O exception if ever
        public static void decompress(BLOB blob, CLOB clob)
          throws IOException, SQLException {
               //System.out.println("Decompressione B->C");
            Writer out=clob.getCharacterOutputStream();
            Reader z=new InputStreamReader(new InflaterInputStream(blob.getBinaryStream()));
              InflaterInputStream z = new InflaterInputStream(blob.getBinaryStream());
            int val = 0;
              while ( (val=z.read()) != -1 ) {
                   out.write(val);
            pipeStreams(z, out);
            z.close();
            out.close();
    * Compresses the BLOB into BLOB
    * @param slob the source BLOB (plain binary data)
    * @param blob the target BLOB (will hold compressed binary data) it should be
    * an empty BLOB retrieved for example with dbms_lob.createtemporary(l_blob,true);
    * @throws Exception mostly I/O exception if ever
        public static void compress(BLOB slob, BLOB blob)
          throws IOException, SQLException {
               //System.out.println("Compressione B->B");
            InputStream in=slob.getBinaryStream();
            DeflaterOutputStream z=new DeflaterOutputStream(blob.getBinaryOutputStream());
            pipeStreams(in, z, blob.getBufferSize());
            in.close();
            z.close();
    * Decompresses the BLOB into CLOB
    * @param blob the source BLOB (compressed binary data)
    * @param slob the target CLOB (will hold plain binary data) it should be an
    * empty CLOB retrieved for example with dbms_lob.createtemporary(l_blob,true);
    * @throws Exception mostly I/O exception if ever
        public static void decompress(BLOB blob, BLOB slob)
          throws IOException, SQLException {
               //System.out.println("Decompressione B->B");
            OutputStream out=slob.getBinaryOutputStream();
            InflaterInputStream z=new InflaterInputStream(blob.getBinaryStream());
            pipeStreams(z, out, blob.getBufferSize());
            z.close();
            out.close();
    }The main problem was with the getAsciiStream() function that has to be replaced by getCharacterStream().

Maybe you are looking for

  • Why does fglrx need to be updated for every Xorg release?

    Guess: Because of the libraries they're linking to? I may be imagining things but it seems the nvidia driver is less loosely tied to it and will work with any recentish version of X. I'm pretty sure I've upgraded X before without upgrading the nvidia

  • Adobe Reader & DirectX 11

    Operating system is Win Vista Home Premium 32 bit.  After installing DirectX 11 some months ago I can no longer view a particular PDF though have no problem with others.  Current Adobe Reader is 9.3 which shows the Preferred Renderer opertions as Dir

  • Disable and enable field at runtime in sap crm 2007

    Dear experts!    I created 2 new fields on Opportunity type by EEWB. The first field is checkbox type, is called FIELD1. The second is dropdown list type, is called FIELD2. My problem is: In general, if FIELD1 is not checked, FIELD2 is disalbe. When

  • Podcast already submitted problem

    On Feb 19, 09, I got the approved podcast email from iTunes. See below: Dear Podcast Owner Your podcast, located at [ http://djarity.podOmatic.com/rss2.xml ], has been approved. You should expect to see it in iTunes within the next few hours. When it

  • Locate camera calibration profiles

    I just reinstalled my 10.5 OS on my system. I've backed up my entire drive before reinstalling. And now in my camera calibration tab I'm only seeing ACR 3.3 and ACR 4.4 where as before I had showing Faithful, Landscape etc.. What folder do these prof