IllegalArgumentException using selectManyCheckbox

Hello
I am have problems using selectManyCheckbox in my JSPs. I can get the checkboxes to be displayed correctly, and set correctly with values from the database.
But if I try to navigate off the page, or save the page when there are values set in the checkboxes, I get an IllegalArgumentException thrown in the validation.
The JSP looks like this:
<h:selectManyCheckbox value="#{role.selectedPrivileges}" layout="pageDirection">
  <f:selectItems value="#{role.privileges}" />
</h:selectManyCheckbox>The backing bean has these in it:
private SelectItem[] privileges;
private String[] selectedPrivileges;...with the usual getters and setters.
The privileges array of SelectItem objects is initially set up in an action with this:
public SelectItem[] getPrivilegesAsSelectItems()
  List<Privilege> privileges = cache.getPrivileges();
  SelectItem[] result = null;
  if (privileges != null)
    int n =  privileges.size();
    if (n > 0)
      result = new SelectItem[n];
      for (int i = 0; i < n; i++)
        Privilege each = privileges.get(i);
        result[i] = new SelectItem(each.getId().toString(), each.getName());
  return result;
}...and the selectedPrivileges String array is set like this:
List<RolePrivilegeLink> rvls = roleProfile.getRolePrivilegeLinks();
String[] values = new String[rvls.size()];
int i = 0;
for (RolePrivilegeLink each: rvls)
  values[i] = each.getPrivilegeId().toString();
roleBean.setSelectedPrivileges(values);Sorry if this seems a bit boring, but I'm including this stuff because it shows I am using Strings as the values; I read somewhere that selectManyCheckbox tags only work with string values.
The error stack I get in the browser is:
500 Internal Server Error
java.lang.IllegalArgumentException
  at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:166)
  at javax.faces.component.UISelectMany.matchValue(UISelectMany.java:421)
  at javax.faces.component.UISelectMany.validateValue(UISelectMany.java:390)
  at javax.faces.component.UIInput.validate(UIInput.java:665)
  at javax.faces.component.UIInput.executeValidate(UIInput.java:869)
  at javax.faces.component.UIInput.processValidators(UIInput.java:432)
  at javax.faces.component.UIForm.processValidators(UIForm.java:190)
  at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
  at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:362)
  at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:98)
  at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
  at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
...I would be grateful for any help, or if anyone knows of a good online tutorial about selectManyCheckbox tags.
Thanks very much
Matt West.

Hi
The privileges array ("roleBean" backing bean "privileges" property) is set in an action by calling the getSelectedPrivilegesAsSelectItems method.
roleBean.setPrivileges(cacheBean.getPrivilegesAsSelectItems());Thanks BalusC.
Matt.

Similar Messages

  • How to get data from bean using selectmanycheckbox

    Am not able to understand how to get selectmanycheckbox data of datatable from backing bean
    help me on this
    thanks

    hi balu,
    Am getting the error in running the jsp. the error is like
    org.apache.jasper.JasperException: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    root cause
    java.lang.IllegalArgumentException: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.
         com.sun.faces.util.Util.getSelectItems(Util.java:642)
         com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer.encodeEnd(SelectManyCheckboxListRenderer.java:115)
         javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
    can u seggest me on this
    can u give the example code for setters And getters of selecteditems, selectitems
    thanks

  • IllegalArgumentException using the MacBinary toolkit

    all,
    i'm using the MacBinary Toolkit 2 in my applet code to support resource forks on a MAC system. The IE on MAC OS X raises an error while loading the applet:
    java.lang.IllegalArgumentException: Illegal access: glguerin.io.imp.mac.ten.TenForker
    the error happens here:
    FileForker.SetFactory( Common.selectFactoryName( "macbinary.forker" ) );
    Please help!
    thanx

    And what makes you think you should ask ppl here instead of who created that code, ding-bat?

  • Double value 'infinity' causes IllegalArgumentException

    Trying to bind the value Double.POSITIVE_INFINITY in a prepared statement causes an IllegalArgumentException using ojdbc6 11.2.0.4.0 but it works fine in version 11.2.0.3.0:
    Exception in thread "main" java.lang.IllegalArgumentException: Overflow
        at oracle.jdbc.driver.OraclePreparedStatement.setDoubleInternal(OraclePreparedStatement.java:7605)
        at oracle.jdbc.driver.OraclePreparedStatement.setDouble(OraclePreparedStatement.java:7513)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.setDouble(OraclePreparedStatementWrapper.java:494)
        at DoubleOverflow.main(DoubleOverflow.java:26)
    Source:
    import java.sql.*;
    import oracle.jdbc.pool.OracleDataSource;
    public class DoubleOverflow
      public static void main (String[] args) throws SQLException {
        OracleDataSource ods = new OracleDataSource();
        ods.setUser(System.getProperty("DB_USER"));
        ods.setPassword(System.getProperty("DB_PASSWORD"));
        ods.setURL(System.getProperty("JDBC_URL"));
        Connection conn = ods.getConnection();
        PreparedStatement pstmtCreateTable = conn.prepareStatement("create table ojdbc6test (d BINARY_DOUBLE)");
        try {
            pstmtCreateTable.execute();
        } catch (Exception ex) {
            if (ex.getMessage().contains("ORA-00955")) {
                System.err.println("Test table already created - ignore SQL error and continue");
            } else throw ex;
        pstmtCreateTable.close();
        PreparedStatement pstmt = conn.prepareStatement ("insert into ojdbc6test (d) VALUES (?)");
        // This will cause an IllegalArgumentException in ojdbc6 11.2.0.4.0 but not in 11.2.0.3.0
        pstmt.setDouble(1, Double.POSITIVE_INFINITY);
        pstmt.execute ();
        pstmt.close();
        conn.close();
    The database used is 'Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production'. I don't see any mention regarding changes to this in the 11.2.0.4.0 change log. Is this a bug in the driver or is there some other explanation?

    Thanks -
    Testing shows that the driver code was changed to check for underflow/overflow but doesn't appear to take the two INFINITY constant values into account properly.
    Whether that was done INTENTIONALLY or not I don't know.
    I suspect it is a bug in the new driver code.
    If you have a MOS account you shouild submit a bug report to Oracle and include the example code you posted above.
    I doubt if there is any workaround.

  • Relationship through SelectManyCheckbox

    Hi:
    I am trying to implement a relation for a User than can have several Roles, through a UserRole table that implements the relationship
    The idea is present an interface that displays several checkboxes representing the Roles, so the administrator can give a single user the number of roles he needs. I assume that this can be acomplished using SelectManyCheckbox control, so, for each checkbox selected, a new UserRole registry is added.
    How can i do this using ADF ??? Is there any example available ???
    Honestly, the examples provided in the Jdev official site, are too much simple for a real world application, wich is very annoying
    Thanks

    Hi,
    I just finished implementing a function exactly the same as you want.
    Here is what I did
    in backing bean (the most important part)
    1) declare variables to support the selection and of course add the accessor method for the first two variables
    private String[] selectedItems; to store list of selected roles
    private List items; to store master role list that is available
    private int maxSelectedItems = 0; to store total of role available
    2) initialize items with full role list in your bean
    setItems(new ArrayList());
    for each of your master role list record (I retrieved this via a view object from database)
    getItems().add(new SelectItem(yourRoleID, yourRoleName));
    maxSelectedItems = total number of your master role list
    setSelectedItems(new String[maxSelectedItems]); (if you don't do this, you will hit IndexOutBound exception)
    optional: if you need to pre-check some roles (e.g. in case of editing an existing user record), then you need to
    for (int i=0; i<noOfpreCheckedBox; i++) {
    selectedItems = what ever your Role is
    3) saveButton method
    noOfItemSelected = getSelectedItems().length;
    for (int i=0; i<noOfItemSelected; i++) {
    create a new row in your target view object
    set role id attribute to selecteditems[i]
    set user id to whatever user id is
    Of course, for existing user record it is more complicated.
    You may need to compare whether the role exists in database or not (I check it from a view object). create row only if it does not exist.
    You also need to check whether a role shown in your user's role view object exists in your selecteditems list. if not, it means user has unchecked it, then you need to delete it from the view.
    Finally, do a commit. I pre-created an action binding in my PageDef for this, so I can simply call getOperationBinding("Commit").execute()
    in jsp
    <af:selectManyCheckbox label="Assign user to Role(s)"
    requiredMessageDetail="You must select at least one role"
    value="#{backingbean.selectedItems}"
    required="true">
    <f:selectItems value="#{backingbean.items}"/>
    </af:selectManyCheckbox>
    Hope this help.

  • Help on polymorphism in my code

    Hi, I'd be glad if anyone could explain why java compiler gives errors
    compiling a class of a simple application.
    This is the scenario: class Point is meant to simplicistically abstract the
    concept of 2D point (x and y are the coordinates). Class Point3D extends Point,
    adding z coordinate. Attributes x, y and z are encapsulated (private and each
    one with setter and getter methods).
    There is a third class, called Ruler, its aim is to set the distance between
    two 2D points or two 3D points using the polymorphic method
    computeDistance(Point p1, Point p2).
    The compiler fails compiling the class Ruler with this message:
    Ruler.java:21: p1 is already defined in computeDistance(Point,Point)
    Point3D p1 = (Point3D) p1;
    ^
    Ruler.java:22: p2 is already defined in computeDistance(Point,Point)
    Point3D p2 = (Point3D) p2;
    ^
    2 errors
    This is the relevant part of the class:
    public class Ruler
        private double distance;
        public void computeDistance(Point p1, Point p2)
            if (p1 instanceof Point && p2 instanceof Point)
                // This is a 2D points case.
                // Obtain x1, x2, y1, y2 via getX() and getY() then  compute the
                // distance.
            else if (p1 instanceof Point3D && p2 instanceof Point3D)
                // This is a 3D points case.
                // Obtain x1, x2, y1, y2, z1, z2 using getX() and getY(), getZ().
                // BUT, in order to obtain z1, z2 it is needed a casting between
                // objects, because Point objects don't provide getZ(), while
                // Point3D do.
                Point3D p1 = (Point3D) p1;
                Point3D p2 = (Point3D) p2;
            else
                // This case is not valid.
    }If this piece of code is not enough I'll write in another post all the three
    classes exactly as they are.
    Thanks for any help!

    In Point, declare a computeDistance:
    public double computeDistance(Point other)
       // compute and return distance from this point to other point;
    }Override it in Point3D to account for the Z values:
    public double computeDistance(Point other)
       if (other instanceof Point3D)
          // Cast to Point3D
         // compute and return distance from this point to other point;
       else
           // decide how to handle (throw IllegalArgumentException, use Z=0, etc.)
    }Or, just try the cast, and allow the ClassCastException to fail [instead of explicitly throwing IllegalArgumentException]. Just document whatever it should do.
    In Ruler, do this, and it will do the polymorphism without instanceof:
    public void computeDistance(Point p1, Point p2)
       distance = p1.computeDistance(p2);
    }

  • Dependent VO Issue

    Hi All,
    Jdev Version 11.1.1.6.0
    We have VO1 with 11 - Language Name and Code like English(En), Spanish(es) etc.
    We have VO2 with 15 attributes in which 1 attribute is Language which store Language for each Product. A product can belong to multiple language like English, Spain, French etc.
    We created ADF Table is based on VO2, Editing the table opens popup, which also contain MulitSelectCheckBox dropdown for language. User can select or deselect more language and save records.
    Issue:
    1.We have created MulitSelectCheckBox Drop Down in Edit Popup using VO1. How should we capture the selection/modification and update VO2, since our table is based on VO2.
    2. When user Edit, the language present in VO2 should be check in in drop down. How to handle this since drop down is based on VO1.
    Please suggest some approach to handle this situation.
    Thanks
    Ankur
    Edited by: ankurmdh on Dec 30, 2012 11:51 AM

    Ankur,
    There is another blog post to use SelectManyCheckBox component in a table: http://umeshagarwal24.blogspot.in/2012/06/selectmanycheckbox-component-in-table.html
    Check this if its useful
    I have not created View Link for between 2 VOs, so should i go ahead and create view link?This is not required for your use case.
    Also when I click edit for table record based on PatchDetailsVO a popup should open which also contains MultiSelectCheckbox for language,language already present should be check marked in drop down. How to achieve this ?For this you can refer the SelectManyCheckBox component in table blog. If you see there are two methods which you can use resolveExpression()+ and getSelectedRoles()+. In getSelectedRoles method you can get hold of PatchDetailsVO row and get the languages field and convert to a List as mentioned in the method. +//I assume in PatchDetailsVO, the languages value is being stored as comma separated values.+
    User can select or deselect more language. I have drag LanguageVO on popup to create this drop down. So on save I should update PatchDetailsVO. For this should I use the method provided in your blog?For this you can refer onRoleChange+ method in the above blog.
    Hope this resolve your issues.

  • JAR file updating project config file error. Help needed!

    Hi all,
    I got a problem when I want to use an existed jar file. There is a method called setConfig which can read and update the properties inside a property file which will be located inside the deployed jar file. But when the other project want to use this jar file. It causes the following error:
    Property 'configfile' threw exception; nested exception is java.lang.IllegalArgumentException: URI is not hierarchical
    The code might cause this error is like:
    String temp = configfile.substring(CLASSPATH_IND.length()).trim();
    URL url = BaseConfigureFactory.class.getClassLoader().getResource(temp);
    try {
    tempcfg = (new File(url.toURI())).getAbsolutePath();
    } catch(URISyntaxException use) {
    throw new IllegalArgumentException(use);
    It seems like the url is wrong so that the program can not find the configfile. Does anyone give some suggestions? Thanks

    I have all of e.printStackTrack( ) in my try - catch block. But i also think the blank screen appears because the class can not find my resources. Maybe it's my fault, because i create by hand a folder name "res" in project folder, then put all my resource in this folder. And in Eclipse when i try to get these resource, i wrote something like this:
         Image robot1N, robot1E, robot1S, robot1W;
         private void initResources() {               
              try {               
                   String sb = "car1";
                   robot1N = ImageIO.read(new File("res\\img\\unit\\" + sb +"_N.png"));
                   robot1E = ImageIO.read(new File("res\\img\\unit\\" + sb +"_E.png"));
                   robot1S = ImageIO.read(new File("res\\img\\unit\\" + sb +"_S.png"));
                   robot1W = ImageIO.read(new File("res\\img\\unit\\" + sb +"_W.png"));
              catch(Exception e) {
                   e.printStackTrace();
         }Maybe the string of path to resource is right in Eclipse but wrong in Window?

  • SCJP 5.0 About Exceptions

    Here's an exercise from a book?
    How is IllegalArgumentException used? (Choose all correct options.)
    A. It is thrown by the JVM when a method is called with incompatible argument types.
    B. It is thrown by the JVM to indicate arithmetic overflow.
    C. It is thrown by certain methods of certain core Java classes to indicate that preconditions have been violated.
    D. It should be used by programmers to indicate that preconditions of public methods have been violated.
    E. It should be used by programmers to indicate that preconditions of nonpublic methods have been violated.
    The correct answers are C and D. But in my opinion, A and E seems to be correct too. Is a RuntimeException the same as "the JVM" throw the exception? Can someone give its opinion?

    A is not a correct option because the JVM does not throw this exception for incompatible arguments. It will throw some subclass of java.lang.Error
    The option E sounds incorrect to me because preconditions for non-public methods should not be generating Runtime exceptions, in my opinion. Those should be handled by the methods using them.

  • SelectManyCheckCheckBox

    Hi,
    I am developing a simple application using JHeadstart 10.1.3.I want to display multiple checkboxes for values which will be fetched from some table.For ex. ChkBox1 - Value A
    ChkBox2 - Value B
    ChkBox3 - Value C
    ChkBox4 - Value D.
    Since these values A.B.C.D are not the database fields but they are the values in the DB Table.
    I have an idea to use SelectManyCheckbox for this but I dont know how to use it.As after placing that SelectManyCheckbox on .jspx page it prompts me to enter Binding and values etc.
    Please help me out of this if somebody knows how to use SelectManyCheckbox ?
    If i have wrong idea then please do correct me or late me know.
    Many Thanks.

    I referred the same document but the example cited over there is comparitively easier since the tables involved are only two .Actually I am using three DB tables. Out of that From one table my values for Facility field will get displayed like Car Parking,Canteen etc[Only Display purpose].Furthermore these values will be stored in some other table[used Updatable VO] like CAR for Car Parking,LAB for Laboratory etc.So I used the Domain for Unselected values and FacilityVo[updatable] with parent-shuttle layout.But after running the page its giving me error as Id is Required in FacilityVO[updatable].And also the values which are getting displayed as checkboxes are again getting unchecked after clicking on save button
    Please help me or suggest some way for this!

  • Singleton problem

    Hi,
    I have a Singleton and I want it to behave like this:
    First time it's called it must receive a String parameter in the constructor in order to set class variable. Subsequent calls, just return the created instance. Something like this
    public class LogParser extends MainParser {
      private static LogParser logParser = null;
      private String pathToLogXmlFile;
      //First time call
      public static LogParser getFirstTimeInstance(String pathToLogXmlFile) {
        if (logParser == null)
          return new LogParser(pathToLogXmlFile);
        else
          return logParser;
      //Subesequent calls use this one
      public static LogParser getInstance() throws WrongInstanceCallException {
        if (logParser == null)
          throw new WrongInstanceCallException() ;
        else
          return logParser;
      }but I don't think this is a good design! Can you give me some notes?
    thanks in advance,
    Manuel Leiria

    try this
    package forums;
    public class LogParser {
      private static LogParser theInstance = null;
      private String logfilename = null;
      private LogParser(String logfilename) {
        this.logfilename = logfilename;
      public static LogParser getInstance(String logfilename) {
        if (theInstance == null)
          theInstance = new LogParser(logfilename);
        return theInstance;
      public static LogParser getInstance() throws IllegalArgumentException {
        if(theInstance == null) throw new IllegalArgumentException("Use LogParser.getInstance(logfile) to Initialise LogParser");
        return theInstance;
      public String getLogfilename() {
        return this.logfilename;
      public static void main(String[] args) {
        LogParser lOne = LogParser.getInstance("my.log");
        LogParser lTwo = LogParser.getInstance();
        System.out.println(lTwo.getLogfilename());
    }... and yeah there really is no way (that I know of) to do this "cleanly"... you're allways gonna be left with an Exception case somewhere... I use an unchecked exception for this, because I believe any "uninitialised" errors should be found in the very first unit test execution... probably before you've even finished programming your program.
    keith.

  • Error IllegalArgumentException in java.sql.Date used PreparedStatement

    I'm found bug (probably). I have a table with column DATA type. Now I connect do database use JDBC in Java, and create PreparedStatement:
    PreparedStatement stmt = conn.prepareStatement("insert into \"Appuser\" (\"IDUser\", \"createAccountDate\") values (?,?)");
    Column createAccountDate is a DATA type. And now I invoke:
    stmt.setInt(1, 1);
    stmt.setInt(2, new java.sql.Date(-2508265596206959779));
    stmt.execute();
    and last line return exception:
    java.lang.IllegalArgumentException
    at sun.util.calendar.ZoneInfo.getOffset(ZoneInfo.java:368)
    at oracle.jdbc.driver.DateCommonBinder.zoneOffset(OraclePreparedStatement.java:15423)
    at oracle.jdbc.driver.DateCommonBinder.setOracleCYMD(OraclePreparedStatement.java:15561)
    at oracle.jdbc.driver.DateBinder.bind(OraclePreparedStatement.java:15641)
    at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:2866)
    at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2151)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3280)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390)
    at // line stmt.execute();
    Another values of Data are OK. Probably value -2508265596206959779 cause that error.
    It's a bug? Better will be SQLException if it is a bug.
    My configuration:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Windows XP SP3, Java 1.6.0_20,
    ojdbc14.jar, Oracle JDBC Driver version - "10.2.0.1.0XE

    Probably value -2508265596206959779 cause that errorMaybe, whatever that .date( -ReallyLotsOfmSec ) date values is, pretty sure its outside the valid values for a date column, 4712BC to 9999AD is the min/max.
    Perhaps the java code can handle it, an oracle date type can not.

  • IllegalArgumentException when using Introspector to get bean info

    hi all
    i have a bean class that has two strings and one vector. when i use introspector to read and write bean value to a new object of same type, i got an IllegalArgumentException :
    Exception in thread "main" java.lang.IllegalArgumentException: argument type mis
    match
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at IntrospectTest.copy(IntrospectTest.java:61)it happens when it tried to access the vector which contains two string values. here is my method
         public static Object copy(Object o)
              System.out.println("in copy...");
              Object newObject = null;
              System.out.println("object : "+o);
              try
                   Class c = o.getClass();
                   System.out.println("Class from o : "+c);
                   newObject = c.newInstance();
                   System.out.println("newObject : "+newObject);
                   PropertyDescriptor p[] = null;
                   p = Introspector.getBeanInfo(o.getClass()).getPropertyDescriptors();          
                   Object[] args = new Object[1];
                   System.out.println("p has "+p.length+" elements");
                   for (int i = 0; i < p.length; i++)
                        String name = p.getName();
                        System.out.println("name : "+name);
                        if(!"class".equals(name))
                             Object value = p[i].getReadMethod().invoke(o, new Object[0]);
                             System.out.println("value : "+value);
                             args[0] = name;
                             p[i].getWriteMethod().invoke(newObject, args);
              }catch (IntrospectionException ie)
                   System.out.println("IntrospectionException : "+ie.getMessage());
              }catch (InvocationTargetException ite)                     
                   System.out.println("InvocationTargetException : "+ite.getMessage());
              }catch (IllegalAccessException ile)
                   System.out.println("IllegalAccessException : "+ile.getMessage());
              }catch(InstantiationException ine)
                   System.out.println("InstantiationException : "+ine.getMessage());
              return newObject;
    does anyone know how i can read and write vector object in a bean? thanks.

    Normally I would be happy to help you, but after several years of trying to help here, I've decided not to contribute anymore because of the piss-poor way in which this site is being administered.
    Others are still helping, but more may leave if things don't improve. May I recommend devshed or javaranch?
    http://www.devshed.com/
    http://www.javaranch.com/
    If you would like to complain to the admins of this forum, either click the "Report Abuse" link or the "Feedback" link.
    The forum denizen formerly known as jverd

  • When i use oracle vwp give this error (java.lang.IllegalArgumentException:

    sir i use oracle with vwp
    sir see my code this code goto catch (Exception e) section and give this code in textfield
    " java.lang.IllegalArgumentException: luser.username "
    when i use mysql that give right result but when use oracel that give me this error
    try {
    RowKey userRowKey = luserDataProvider.findFirst
    (new String[] { "luser.username" },
    new Object[] { textField4.getText()});
    if (userRowKey == null) {
    textField3.setText("11111");
    return null;
    } else {
    textField3.setText("22222");
    return null;
    catch (Exception e) {
    log("Cannot perform login for userid " + textField3.getText(), e);
    error("Cannot perform login for userid " + textField3.getText() + ": " + e);
    textField3.setText(e);
    return null;
    please give me idea how i get right result
    thank you

    please check Article-ID "Positions Hierarchy Edittor Shows Error Your Userarea Applet Has Caused A Runtime Exception [ID 1151488.1]" in MOS...
    HTH

  • Throws IllegalArgumentException when use BufferedReader.readLine()

    hi
    when i use BufferedReader.readLine() to read a html file of Internet,it throws IllegalArgumentException like blow:
    java.lang.IllegalArgumentException
    at java.nio.Buffer.position(Buffer.java:218)
    at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:575)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:442)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)
    but it occured sometimes or occured never in a long time!
    Why?

    It does it because of this bit of code in java.nio.Buffer.position
    if ((newPosition < 0) || (newPosition > limit))
          throw new IllegalArgumentException ();So for some reason a bit of the java code has tried to set the position to either less than zero or greater than the limit of the buffer. Not a good idea in either case.
    Since this is not your code you can't really do much about it. Try catching the exception and handling it.

Maybe you are looking for

  • How can I have two devices with separate iTunes accounts on the same computer without sharing libraries?

    I have an iPhone 3s and my sister has an iPhone 3.  We use them only as iPods.  We each have our own iTunes account, but we have to share a computer.  How can we both syn our devices without sharing our music and app libraries?

  • Itunes Match wont upload new songs... keeps refreshing...Help!

    On my mac, I open Itunes, and I add a new song, then my itunes match starts the process of uploading. it will get half way through step two then stop and restart and it will continue doing this until, I get frustrated enough to just delete it. Now, I

  • Problem with HP LJ M177fw scan set up

    I have done something that caused my printer to stop scanning & sending to my photo gallery with windows 7. I am not computer smart. I have used the HP Print & Scan Doctor ... I get the notice with 2 yellow triangles. .. one says.. ∆ WINDOWS (WIA) SC

  • Problem with the bone tool in FLash CS4

    I cannot get this bone to connect with the lower part of the leg. I am doing a standard rough draft character walking. please help me p.s. if you have a vid or solution please post it in the topic ^_^ http://www.youtube.com/watch?v=TX8lDhbT7ig I post

  • Leopard and Epson R2400

    I installed Leopard in December on my MBP and have had some frustrations with printing. I've been trying to print from Photoshop CS3 and have not been able to print borderless and the prints are often poor quality despite choosing higher resolutions/