Javax.imageio.ImageIO: LUT has improper length!

I have a problem similar to those described in these forum postings:
http://forum.java.sun.com/thread.jspa?forumID=31&threadID=404731
and
http://forum.java.sun.com/thread.jspa?forumID=256&threadID=510170
I use the following code:
String imageURL = "http://a-valid-url";
java.net.URL url = new java.net.URL(imageURL);
javax.imageio.stream.ImageInputStream iis =
javax.imageio.ImageIO.createImageInputStream(url.openStream());
java.awt.Image img = javax.imageio.ImageIO.read(iis);
The server at the end of the URL sends back an image in PNG format. The code works fine except on the rare occasions that the image is only black and white, when our old friend the java.lang.IllegalArgumentException is thrown with the message "LUT has improper length!". (I think the exclamation mark on the end is a nice touch.)
I understand from the other postings that this is a shortcoming in the class I am using. Does anyone know of a way to work around it?
Thanks in advance!

I have a problem similar to those described in these forum postings:
http://forum.java.sun.com/thread.jspa?forumID=31&threadID=404731
and
http://forum.java.sun.com/thread.jspa?forumID=256&threadID=510170
I use the following code:
String imageURL = "http://a-valid-url";
java.net.URL url = new java.net.URL(imageURL);
javax.imageio.stream.ImageInputStream iis =
javax.imageio.ImageIO.createImageInputStream(url.openStream());
java.awt.Image img = javax.imageio.ImageIO.read(iis);
The server at the end of the URL sends back an image in PNG format. The code works fine except on the rare occasions that the image is only black and white, when our old friend the java.lang.IllegalArgumentException is thrown with the message "LUT has improper length!". (I think the exclamation mark on the end is a nice touch.)
I understand from the other postings that this is a shortcoming in the class I am using. Does anyone know of a way to work around it?
Thanks in advance!

Similar Messages

  • Can't find default package `javax.imageio' error

    We are running jdk "1.4.2_05-b04" on linux. And I have a simple program that is importing package javax.imageio. But the compiler is not finding it. Now since this is a j2ee envrionment I am using ANT to compile. Here is the error I am getting:
    --- BEGIN ERROR TEXT---- [javac] /home/sroshan/samcvs/psimc/src/com/psi/psimc/tasks/servlets/StockGraphProducer.java:28:
    error: Can't find default package `javax.imageio'.
    Check the CLASSPATH environment variable and the access to the archives
    [javac] 1 error
    --- END ERROR TEXT----
    Here are my questions:
    1-Any one has any idea why this package may be in a special location in my jdk path that ANT can not find?
    2- What jar file would be containing the javax.imageio package?
    Since at list I could see if that jar may be included into my ANT classpath or not.
    Any help is appreciated
    Regards
    Siamak

    Hi,
    hey..I am also getting the same error. Please let me know what do you mean by path was so long??
    Are you talking about system Path variable or the installation path?I believe there is no restriction on the system path length, just search for cl.exe and make sure it is included in the system PATH.
    Regards,
    Hussein

  • Javax.imageio.IIOException: Insufficient memory (case 2)         at com.sun

    javax.imageio.IIOException: Insufficient memory (case 2)
    at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(J[BIII[IIIIII[Ljavax.imageio.plugins.jpeg.JPEGQTable;Z[Ljavax.imageio.plugins.jpeg.JPEGHuffmanTable;[Ljavax.imageio.plugins.jpeg.JPEGHuffmanTable;ZZZI[I[I[I[I[IZI)Z(Native Method)
            at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:971)
            at javax.imageio.ImageWriter.write(ImageWriter.java:598)
            at javax.imageio.ImageIO.write(ImageIO.java:1450)
            at javax.imageio.ImageIO.write(ImageIO.java:1515)
            at jsp_servlet._css.__code._jspService(__code.java:145)
            at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:230)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    <img border=0 src="code.jsp">
    the content of JSP file about:
    <%@ page import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*"%>
    <%@ page import="java.io.OutputStream"%>
    <%@ page pageEncoding="UTF-8"%>
    <%!Color getRandColor(int fc, int bc) {   
    Random random = new Random();
    if (fc > 255)
    fc = 255;
    if (bc > 255)
    bc = 255;
    int r = fc + random.nextInt(bc - fc);
    int g = fc + random.nextInt(bc - fc);
    int b = fc + random.nextInt(bc - fc);
    return new Color(r, g, b);
    %>
    <%
    try {  
    out.clearBuffer(); // 加上这一句
    response.setHeader("Pragma", "No-cache");
    response.setHeader("Cache-Control", "no-cache");
    response.setDateHeader("Expires", 0);
    int width = 70, height = 20;
    BufferedImage image = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB);
    OutputStream os = response.getOutputStream();
    Graphics g = image.getGraphics();
    Random random = new Random();
    //设置背景和大小
    g.setColor(getRandColor(200, 250));
    g.fillRect(0, 0, width, height);
    //设置字体和颜色
    g.setFont(new Font("Times New Roman", Font.BOLD, 20));
    g.setColor(getRandColor(120, 200));
    for (int i = 0; i < 50; i++) {   
    int x = random.nextInt(width);
    int y = random.nextInt(height);
    int xl = random.nextInt(5);
    int yl = random.nextInt(5);
    g.drawLine(x, y, x + xl, y + yl);
    String sRand = "";
    for (int i = 0; i < 4; i++) {
    String chose="0123456789";
    String rand = String.valueOf(chose.charAt(random.nextInt(chose.length())));
    sRand += rand;
    g.setColor(new Color(20 + random.nextInt(110), 20 + random.nextInt(110), 20 + random.nextInt(110)));
    g.drawString(rand, 15 * i + 6, 16);
    session.setAttribute("rand", new String(sRand));
    g.dispose();
    g=null;
    ImageIO.write(image, "JPEG", os);
    os.flush();
    os.close();
    os = null;
    response.flushBuffer();
    out.clear();
    out = pageContext.pushBody();
    } catch (IllegalStateException e) {   
    System.out.println(e.getMessage());
    e.printStackTrace();
    %>

  • Javax.imageio.ImageIO

    Hello,
    I have recently installed Fedora Core 2 to a dell dimension 8100 and I am trying to compile the program and get this error each time javac runs. error:
    Class or interface `javax.imageio.ImageIO' not found in import.
    import javax.imageio.ImageIO;
    ^
    Is linux installed with an sdk native to the system? If so how do I uninstall it? Would it conflict if I installed another Java SDK I found that the package jdk 1.5.0_05fcs was installed so I did a rpm -e command on it and reinstalled a fresh copy but this did not help. Thanks!-signol

    Ok, I got this error
    gcj: unrecognized option `-version'
    gcj: no input files
    I originally put j2sdk 1.4.2_09 on thinking there was no java to begin with, could this cause some of the errors? Also how would i go about uninstalling the package?-Signol

  • Using javax.imageio in JSP

    Hi
    I have a simple code snippet that I use to read in JPG/GIF image from a file and create a new image that is upside down . Here is my snippet.
    //create upside down image
    try { 
    String imgPath = "\\images\\AINCC.gif";
    File fImg = new File(imgPath);
    BufferedImage imgREG = ImageIO.read(fImg);
    int iW = imgREG.getWidth(null);
    int iH = imgREG.getHeight(null);
    // Flip the image vertically and horizontally (equivalent to rotating the image 180 degrees)
    AffineTransform tx = AffineTransform.getScaleInstance(-1.0,-1.0);
    tx.translate(-iW, -iH);
    //tx.scale(0.8,0.8);
    AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
    BufferedImage imgUSD = op.filter(imgREG, null);
    // write flipped image to a file
    File fUSD = new File("images\\USD_image.tmp");
    ImageIO.write(imgUSD,"jpg",fUSD);
    catch (Exception e) {
    e.printStackTrace();
    If I use this in a stand alone Java app it works fine but it will not work from the JSP page....
    I have updated my server.policy file to give /images directory read, write, delete priviledges and I tried all the variations of the path (relative, absolute, direct....)...
    I get the following error from the server log:
    [#|2004-05-17T13:47:56.173-0400|WARNING|sun-appserver-pe8.0|javax.enterprise.system.stream.err|_ThreadID=11;|
    javax.imageio.IIOException: Can't read input file!
    at javax.imageio.ImageIO.read(ImageIO.java:1263)
    at org.apache.jsp.ecards.mailcard_jsp._jspService(mailcard_jsp.java:125)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
    Can someone tell me what am I missing....
    My JSP page is mailcard.jsp and images are under it in the images subdirectory....
    Thanks
    Amir

    Hi,
    Replace the following lines:
    try{
    String imgPath = "\\images\\AINCC.gif";
    with
    <%String contextPath = request.getContextPath();%>
    try{
    String imgPath = <%=contextPath%> + "\\images\\AINCC.gif";
    You may also need to set the web application context root.
    Regards,
    bazooka.

  • ImageIO - javax.imageio.IIOException: Can't get input stream from URL

    Hi,
    I'm developing a program which accesses a given URL of an image and saves it to a file. However when I try this I get the following error:
    javax.imageio.IIOException: Can't get input stream from URL!
         at javax.imageio.ImageIO.read(Unknown Source)
         at ImageSave.main(ImageSave.java:12)
    Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at java.net.URL.openStream(Unknown Source)
         ... 2 moreThe internet connection I am using uses a proxy server and I think this is where the problem lies. I'm using Eclipse version 3.3 and I've tried changing the network settings to use the proxy's hostname and port but this still isn't working. I've also tried using System.setProperty("http.proxyHost", "hostname") and System.setProperty("http.proxyPort", "port") but that hasn't worked for me either. Below is my class in full.
    import java.awt.image.*;
    import javax.imageio.*;
    import java.io.*;
    import java.net.*;
    public class ImageSave
         public static void main(String args[])
              try {
                   URL url = new URL("http://www.example.com/image.jpg");
                   BufferedImage image = ImageIO.read(url);
                   ImageIO.write(image, "JPG", new File("image.jpg"));
              catch (Exception e) {
                   e.printStackTrace();
    }The error occurs with the line: BufferedImage image = ImageIO.read(url);
    I have tried looking for a way to change how this specific method accesses the internet (e.g: a Proxy parameter with URLConnection) but there doesn't seem to be any.
    Any help or suggestions would be greatly appreciated.
    -Robert

    Ah, that worked fine. I had thought of using that earlier but I was under the impression that the input stream would be HTML rather than an actual image. Not sure why.. Anyway, thanks very much for your help!
    Here is the new code with your suggested revisions and a URLConnection to get the input stream:
    import java.awt.image.*;
    import javax.imageio.*;
    import java.io.*;
    import java.net.*;
    public class ImageSave
        public static void main(String args[])
            try {
                 // This is where you'd define the proxy's host name and port.
                 SocketAddress address = new InetSocketAddress(hostName, port);
                 // Create an HTTP Proxy using the above SocketAddress.
                 Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
                 URL url = new URL("www.example.com/image.jpg");
                 // Open a connection to the URL using the proxy information.
                 URLConnection conn = url.openConnection(proxy);
                 InputStream inStream = conn.getInputStream();
                 // BufferedImage image = ImageIO.read(url);
                 // Use the InputStream flavor of ImageIO.read() instead.
                 BufferedImage image = ImageIO.read(inStream);
                 ImageIO.write(image, "JPG", new File("image.jpg"));
            catch (Exception e) {
                 e.printStackTrace();
    }Edited by: Ragnarob on Apr 21, 2009 2:49 AM

  • Problems with javax.imageio.ImageIO (cannot be resolved) *Urgent*

    I was trying to import javax.imageio.ImageIO into my project but it cannot work... I am using Websphere Application 5.1.2 and using JDK 1.4.2_07... I try to import external jar containing javax.image but it still can't solve my problem... So can anyone help me... Thank alot...

    There is no exception, the javax.imageio.ImageIO.read(InputStream input) method simply returns null, indicating that the stream can't be decoded with any of the registered ImageReaders.
    BufferedImage bi = javax.imageio.ImageIO.read(new ByteArrayInputStream(wr2.getData()))
    wr2 is of a class that I have written myself, and the method getData() returns a byte[] array consisting of the bytes previously read from the .gif-file...
    there is nothing wrong with the data stored in the byte[] array, I have even compared it to the original file byte by byte... and it's all the same.
    this works though:
    BufferedImage bi = javax.imageio.ImageIO.read(new FileInputStream("img/iconOnlineDark.gif"))
    Strange problem, in my opinion... but I'm not an expert in streams... so it might not be as strange as it seems to me...? Anyway, I must find a solution to this.
    /erik

  • Javax.Imageio Help Needed!

    Basically, I found a site with a Javax.Imageio applet used to take screenshots with the click of a button.
    The problem is that I know nothing about compiling Java, and I would like some assistance. This applet is a necessary addition to a webpage gaming site browser (Basically it's a framed page which goes to the different game's servers to play the game) so that the users can easily take screenshots of what's happening in the game.
    The example script they have is located at:
    http://schmidt.devlib.org/java/save-screenshot.html
    But I need it to be compiled and changed a bit... The output only allows output of one file, which isn't good... It saves as out.png, and rewrites over it if you go to take a 2nd screenshot. The problem with this is that many users will need to take multiple screenshots. I need this example applet changed to do something like "screen1.png" then "screen2.png" then "screen3.png", and so on... If possible, I'd like it to save to Desktop/Screenshots/screen(x).png
    Could I get a bit of assistance?
    Thanks a lot, I appreciate any help I could get VERY much.
    Please post the finished applet if you're able to help as a response to here, preferably in the format of a zip or rar with the files inside.

    But I need it to be compiled and changed a bit... The output only allows output of one file, which isn't good...
    It saves as out.png, and rewrites over it if you go to take a 2nd screenshot.
    The problem with this is that many users will need to take multiple screenshots.
    I need this example applet changed to do something like "screen1.png" then "screen2.png" then "screen3.png", and so on...
    If possible, I'd like it to save to Desktop/Screenshots/screen(x).pngDid you even read the documentation on that web page, or the source code itself? From the statements you made, it would appear that you didn't read it very closely. If that directory already exists (Desktop/Screenshots), you don't have to change the code to save files as you want them (it won't auto-increment the number, though--auto-incrementing would require a change).
    When you have downloaded and installed the Java SDK, re-read the web page, and give the program a shot.

  • Tax jurisdiction 0 has incorrect length

    Hi All,
    I am getting following error whil posting billing document in to accounting.could any one suggest this how to resolve.(we are maintaining condition type UTXJ Value is zero)
    ERROR;Tax jurisdiction 0 has incorrect length.

    Hello;
    Please be aware that if shipping from the US to a non juristiction        
    country the system should take a dummy jurisdiction code from the OBCL    
    transaction.                                                                               
    You have the situation that the product will be delivered from 'US'       
    to country 'BR'. If both countries are using the tax jurisdiction         
    functionality then it could be that the length is different in these      
    countries    as a solution in that export case the default tax            
    jurisdiction code from OBCL will be taken. Please check this.                                                                               
    Please also check the tax configuration in transaction FTXP.                                                                               
    Please ensure however that for each revenue line passed to accounting     
    that a tax line exists also otherwise error FF805 will be generated.      
    The tax code will be transferred to the conditions according to the       
    description of note 112609 - - therefore statistical items will not be    
    passed to accounting, and conditions with condition base value that is 0  
    are not passed to FI either.                                                                               
    IN SUMMARY:                                                               
    -> There must be at least a revenue line for each tax line.               
    -> For each revenue line containing a certain tax indicator there         
       must be a tax line with this indicator.                                
    -> If a tax condition has base value = 0  OR is inactivated OR is         
       statistical => then it is not passed to FI.     
    I hope it can help you.
    Regards
    Ruy Castro

  • Javax.jms.InvalidDestinationException: Destination has invalid type "class

    Dear Sirs,
    I am trying to send a JMS message from an application deployed to AS 10.1.3.3 to a destination (Queue), that was described with help of Oracle Enterprise Manager. This desination is working correctly if I send message from ESB by it's adapter. But my class refuses to execute method "createProducer": I have an exception:
    "javax.jms.InvalidDestinationException: Destination has invalid type "class oracle.jms.AQjmsDestination" and cannot be used with OC4J JMS".
    What is the case?
    Thanks.

    Thank You, Gera!
    My mistake was: I tryed to use oficially registed QueueConnectionFactory. But, indeed, AS notes that "connection factories are only needed for in-memory and file based persistence destinations. Destinations that use database persistence do not require connection factories to be specified - these are created dynamically by the JMS connector (adapter) used for database persistence."
    So, I found ra.xml file in directory of generated adapter, fetched queue factory name that seems correct for me, and use it.
    Now it works!
    Спасибо, Гера.

  • Javax.imageio.IIOException: Can't read input file!

    That is the error I get every time I try to run the .jar file. Yet when I run it in the compiler it works just fine. I'm not sure what to make of this, here is the code any help you can provide will be appreciated.public void setGraphic(String image) {
            String fileLoc = getClass().getResource("/com/siteName/Graphics/" + image).getPath();
            try {
                fileLoc = URLDecoder.decode(fileLoc,"UTF-8");
            } catch (UnsupportedEncodingException ex) {
                ex.printStackTrace();
            File file = new File(fileLoc);
            try {
                this.image = ImageIO.read(file);
            } catch (IOException ex) {
                ex.printStackTrace();
    }

    Is your image in the jar? If so, use URL, not File:
    URL url = getClass().getResource("/com/siteName/Graphics/" + image);
    this.image = ImageIO.read(url );

  • Does SSL or HTTPS has some length limitation ?

    Hei :)!!!
    I am using an https protocol in order to send in a safe way a contanance of a form which contains information like user credit card number, his details and etc.
    The problem is that when i am sending this form by HTTP protocol the form is being sent correctly, but when i am sending it by HTTPS some form fields contenense are lost.
    My question is: does HTTPS or SSL protocols has some size limitation on the information that is being sent by them?
    Does some one dealed whith this kind of problem? help me:( i am quite desperate:(

    there is no any size limitation for this.U can send as much length of data.BTW which API r u using for the SSL comm'n.
    Anand

  • Need to download a file which si space delimted and has fixed length char

    Hi,
    I have a custom report which downloads an output file in text format.I need the contents to be space delimited.My file data contains numbers as well as characters.I ahve pased the parameter WRITE_FIELD_SEPARATOR = ' ' in the FM.Hwoever the space is introduced only oif the column value is a character.If its a number/digit,the columns are not seperated by space.
    Now my data appears like that:
    0000101310179.28 +0827200808 DHLBSRF VISA AUG 2008US021SW111 RYAN,BICOVNY
    I want my data to be like this :
    0000101310 179.28 + 0827200808 DHLBSRF VISA AUG 2008 US02 1SW111 RYAN,BICOVNY
    DO I need to pass any additinal parametre?Also for fixed length characrets,do i need to pack/unpack data before passing to the FM ?
    Thanks.

    Hi,
    try this way.
    REPORT ztest_notepad.
    DATA: BEGIN OF it_download OCCURS 0,
           data TYPE string,
          END OF it_download.
    DATA: BEGIN OF it_vbrk OCCURS 0,
            vbeln TYPE vbrk-vbeln,
            fkart TYPE vbrk-fkart,
            fktyp TYPE vbrk-fktyp,
            netwr TYPE vbrk-netwr,
          END OF it_vbrk.
    DATA : l_netwr TYPE char21.
    "START-OF-SELECTION.
    START-OF-SELECTION.
      SELECT  vbeln
              fkart
              fktyp
              netwr
       FROM vbrk
       INTO CORRESPONDING FIELDS OF TABLE it_vbrk
       UP TO 100 ROWS.
      LOOP AT it_vbrk.
        l_netwr = it_vbrk-netwr.
        CONCATENATE it_vbrk-vbeln
                    it_vbrk-fkart
                    it_vbrk-fktyp
                    l_netwr
            INTO it_download-data
            SEPARATED BY space.
        APPEND it_download.
        CLEAR  it_download.
      ENDLOOP.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                filename = 'C:\test.txt'
                filetype = 'ASC'
           TABLES
                data_tab = it_download.
    Thanks
    Venkat.O

  • Bad index in constant pool #1      Code segment has wrong length

    java.lang.ClassFormatError: nz/net/quickstep/uiobjects/Cba2efkSflctl (Bad index in constant pool #1)

    From your code..
    Here is a suggestion
    try {
    for (int i=0; i<b.length; i++) b[ i ]=0; // zero the array
    Class c = defineClass(name, b, 0, b.length);
    } catch (ClassFormatError cfe) {
    System.out.println("Error trying to load class "+name); //print the name....
    for (int i=0; i<b.length; i++) b[ i ]=0; // zero the array
    Class c = defineClass(name, b, 0, b.length);This make all bytes to '0'. So how would it create class??

  • Class javax.faces.el.ValueBinding has been deprecated

    I am trying to re-write the following code using ValueExpression which has re-placed ValueBinding. But I can't seem to get it to work. Please help. Thanks for any help
        public String editLinkAction()
                /* pull out the currently selected service request */
                Requests editReq =
                (Requests)this.getDataTable1().getRowData();
                FacesContext ctx = FacesContext.getCurrentInstance();
                    ValueBinding binding =
                    ctx.getApplication().createValueBinding("#{backing_req_Request2.requests}");
                    binding.setValue(ctx,editReq);
                    return "reqDetail";
            }

    The method name editLinkAction() suggests that you rather need a MethodExpression instead of ValueExpression, is this true?
    Anyway, you can find here examples:/**
    * Create ValueExpression object based on the given value expression string and value type.
    * This is to be used in UIComponent#setValueExpression().
    * @param valueExpression The value expression string, e.g. "#{myBean.someValue}".
    * @param valueType The actual value object type, e.g. String.class.
    * @return The ValueExpression object to be used in UIComponent#setValueExpression().
    private ValueExpression createValueExpression(String valueExpression, Class<?> valueType) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        return facesContext.getApplication().getExpressionFactory().createValueExpression(
            facesContext.getELContext(), valueExpression, valueType);
    * Create MethodExpression object based on the given action expression string and return type.
    * This is to be used in UICommand#setActionExpression().
    * @param actionExpression The action expression string, e.g. "#{myBean.action}".
    * @param returnType The actual return type of the action, e.g. String.class or null (void).
    * @return The MethodExpression object to be used in UICommand#setActionExpression().
    private MethodExpression createActionExpression(String actionExpression, Class<?> returnType) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        return facesContext.getApplication().getExpressionFactory().createMethodExpression(
            facesContext.getELContext(), actionExpression, returnType, new Class[0]);
    }Use examples:dataTable.setValueExpression("value", createValueExpression("#{myBean.dataList}", List.class));
    saveButton.setActionExpression(createActionExpression("#{myBean.saveDataList}", String.class));

Maybe you are looking for

  • Why can I not open my e-mails on hotmail using firefox?

    I cant open my hotmail e-mails in firefox. This has been happening for about 3 days now.

  • I have the most recent/current version of firefox, but my gmail says I do not. Please help!

    I have version 19.0, but when I try and open out gmail, it keeps sayting we do not have the lates browser and to please update it. I HAVE the latest firefox. The same thing happens when we try and open our msn mail as well

  • Folders won't open in last closed

    For some reason when I open Bridge (CS4) folders do not open in the last folder open when bridge was closed. Folders just shows Desktop and My Computer when opened I found where Bridge CS3 is defaulted to opening to the last folder open. Any ideas? T

  • Powerpoint 2007 with Acrobat X Standard

    Hi all, my Acrobat version is 10.1.4. now my problem is I want save my ppt in pdf with encrytion, current ppt got 194 slide, when converting at slide 111, ms office ppt pop out appcrash. I tries reinstall ms office and acrobat and both program update

  • Booting clients from Sun/Solaris

    We have a Sun X2100 server running Solaris 10 and 4 clients (HP dx2009) on RHEL5 connected thro an 8-port switch. Is there a way to boot solaris from the clients bypassing RHEL ? We want to use the clients as 'dumb' terminals.