Problem while connecting to mysql(Array Index Out Of Bound Exception)

hi...
java.sql.SQLException: Unable to connect to any hosts due to exception: java.lang.ArrayIndexOutOfBoundsException: 40
this is the exception which i got.. when iam connecting to mysql...
i alredy done googling...but....i didn't find any solution...
pls suggest me...
waiting 4r u r reply....

I got a similar error, but its different scenario.
vo=getVO;
vo.setApplyViewCreteria("ViewC");
vo.setQueryMode(Database_Rows | Entity_Rows );
vo.exceuteQuery();
for my case executequery() throws the same stacjk trace
after removing Entity_Rows i mean vo.setQueryMode(Database_Rows | Entity_Rows ); ---> vo.setQueryMode(Database_Rows );
I didn't get this error.
Some problem with adding entity rows.

Similar Messages

  • Array Index out of bound exception

    public Name[] getName() {
              Name[] retVal = new Name[0];
              retVal[0] = this.getNameInstance();
              return retVal;
         public void setName(Name[] theName) {
              theName[0]=this.getNameInstance();
         private Name myNameInstance = new Name();
         public void setNameInstance(Name theNameInstance) {
              if(isValidName(theNameInstance)){
              myNameInstance = theNameInstance;
         public Name getNameInstance() {
              return myNameInstance;
         }I am getting an array Index out of bound eception in the method setName, Can any one tell me where I am doing wrong?

    The array passed in must be empty. I suggest using the debugger for problems like these. If you don't know how to use the debugger, here's a start:
    (Assuming you have a debugger, any IDE you'd be using will)
    1. Set a breakpoint on or before your line of question. In this case, place it on the line of code in your setName() method. Set a breakpoint by either right clicking on that line and selecting "Add breakpoint," or simply click on the far left side of the editor window, right next to the line number. Either way, a little dot will appear to mark the breakpoint.
    2. Execute your code in Debug mode rather than release mode. This might mean clicking on the little bug-looking icon "Debug" rather than "Run."
    3. Your code will execute and you'll enter the debug perspective when that breakpoint is reached. There, in the variables window, you'll see your array and any information about it, particularly its size and contents.

  • Fusion Security, SearchResponse next returning array index out of bound

    I am trying to fetch all the roles under a search base and while iterating i am getting array index out of bound exception.
    SimpleSearchFilter filter=store.getSimpleSearchFilter(RoleProfile.NAME,SimpleSearchFilter.TYPE_EQUAL,null);
    String wildCardChar=filter.getWildCardChar();
    filter.setValue(wildCardChar);
    SearchParameters parameters=new SearchParameters(filter,SearchParameters.SEARCH_ROLES_ONLY) ;
    SearchResponse resp=store.searchRoles(Role.SCOPE_ANY, parameters);
    +while(resp.hasNext()){+
    Role role=(Role)resp.next();
    Can anybody kindly advise

    Hi..
    check this
    http://andrejusb.blogspot.com/2011/01/fusion-middleware-11g-security-retrieve.htmlhope this will helpful

  • Vector.get(0) Array Index out of bounds - Please Help

    Hi,
    I have a method, where i am accesing vector.get(0)
    and since it is a multi threaded application, somtimes i am getting
    Array Index out of bounds exception.
    I want to confirm that if i make that particular method synchronized, is it going to
    solve my problem.
    Please help me, since i am not able to reproduce the error very often, i want to make sure this will work.
    zraoz.

    It's a bit of both. The code you posted fails if two
    threads execute at the same time. He needs the
    synchronization, and the size check.Only if he is removes elements somewhere else. If not the code is safe.
    My guess is that he is trying to get the first element before it has been added.

  • Java Index Out Of Bounds Exception error

    In the Query Designer when I choose access type for Result value as Master data, and execute, I get the following java Index Out Of Bounds Exception error:
    com.sap.ip.bi.webapplications.runtime.controller.MessageException: Error while generating HTML
         at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2371)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.doServerRedirect(Page.java:2642)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:2818)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2293)
         at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.doProcessRequest(Controller.java:841)
         at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.processRequest(Controller.java:775)
         at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:412)
         at com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:21)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.ip.bi.base.exception.BIBaseRuntimeException: Error while generating HTML
         at com.sap.ip.bi.webapplications.ui.items.UiItem.render(UiItem.java:380)
         at com.sap.ip.bi.webapplications.runtime.rendering.impl.ContainerNode.render(ContainerNode.java:62)
         at com.sap.ip.bi.webapplications.runtime.rendering.impl.PageAssemblerRenderingRoot.processRendering(PageAssemblerRenderingRoot.java:50)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.processRenderingRootNode(Page.java:3188)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.processRendering(Page.java:2923)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:2877)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2293)
         ... 39 more
    Caused by: java.lang.IndexOutOfBoundsException: fromIndex = -7
         at java.util.SubList.<init>(AbstractList.java:702)
         at java.util.RandomAccessSubList.<init>(AbstractList.java:860)
         at java.util.AbstractList.subList(AbstractList.java:569)
         at com.sap.ip.bi.bics.dataaccess.base.impl.ModifiableList.remove(ModifiableList.java:630)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsDataCells.removeRows(RsDataCells.java:480)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.removeTuples(RsAxis.java:550)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1312)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1326)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1326)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1326)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1272)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1170)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.ResultSet.applyPostProcessing(ResultSet.java:282)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.ResultSet.refreshData(ResultSet.java:262)
         at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.QueryView.getResultSet(QueryView.java:267)
         at com.sap.ip.bi.webapplications.ui.items.analysis.control.AcPivotTableInteractive.checkResultSetState(AcPivotTableInteractive.java:368)
         at com.sap.ip.bi.webapplications.ui.items.analysis.control.AcPivotTableExport.validateDataset(AcPivotTableExport.java:249)
         at com.sap.ip.bi.webapplications.ui.items.analysis.control.AcPivotTableInteractive.buildUrTree(AcPivotTableInteractive.java:282)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:33)
         at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayoutItem.iterateOverChildren(FlowLayoutItem.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayout.iterateOverChildren(FlowLayout.java:69)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.MatrixLayoutCell.iterateOverChildren(MatrixLayoutCell.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.MatrixLayoutRow.iterateOverChildren(MatrixLayoutRow.java:56)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.MatrixLayout.iterateOverChildren(MatrixLayout.java:69)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.container.matrixlayout.control.AcMatrixControlGrid.iterateOverChildren(AcMatrixControlGrid.java:40)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.Group.iterateOverChildren(Group.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.container.group.control.AcGroupControl.iterateOverChildren(AcGroupControl.java:259)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayoutItem.iterateOverChildren(FlowLayoutItem.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayout.iterateOverChildren(FlowLayout.java:69)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.Group.iterateOverChildren(Group.java:63)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.container.group.control.AcGroupControl.iterateOverChildren(AcGroupControl.java:259)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.start(CompositeBuildUrTreeTrigger.java:59)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.ExtendedRenderManager.triggerComposites(ExtendedRenderManager.java:69)
         at com.sap.ip.bi.webapplications.ui.framework.base.impl.BICompositeManager.renderRoot(BICompositeManager.java:79)
         at com.sap.ip.bi.webapplications.ui.items.UiItem.render(UiItem.java:376)
    Any help in solving this error is highly appreciated. Points will be given
    Best Regards,
    Vidyut K Samanta

    Hi.
    Go to line 9 of your code.
    You are trying to use an array there.
    Suppose you have an array x[4] - this array has 4 elements indexed 0..3.
    you are trying to access an element with an index higher than 3.
    Nimo.

  • Please iam getting index out of bound exception can any body solve my probl

    Dear all
    iam doing aproject in swing in that one class iam using the below method. Iam getting index out of bound exception. Actually iam trying to access the more that 50mb file at that time its giving out of memory exception after that iam using this method now its giving index out of bound exception, when it is going second time in the while loop. can any body solve my problem. Please give me the solution . Ill be very thankful to you.
    public Vector getFileContent(File fileObj){
    FileInputStream fis = null;
    DataInputStream dis = null;
    Vector v = new Vector();
    byte[] data = null;
    int pos = 0;
    int chunk = 10000;
    int sizePos = 0;
    try{
    fis = new FileInputStream(fileObj);
    int size = (int)fileObj.length();
    dis = new DataInputStream(fis);
    int k = 1;
    if(size <10000){
    data = new byte[size];
    //v.addElement(dis.readFully(data));
    dis.readFully(data);
    v.addElement(data);
    else {
    while(pos < size){
    sizePos = size - chunk*k;
    if(sizePos > 10000){
    chunk = 10000;
    else{
    chunk = sizePos;
    data = new byte[chunk];
    dis.read(data, pos, chunk);
    v.addElement(data);
    System.gc();
    pos = pos + chunk + 1;
    regards,
    surya

    pos = pos + chunk + 1;Why the +1??

  • Array index out of bounds

    I have in my code a method, proceed(), and in the method main, which i called.
    however, the error msg:
    java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
    could someone please tell me what is wrong with my code?
    // in the code, 2 arrays (keeping the contents and the count are
    //declared
    public static boolean proceed(String[] data, int[] count, int count_c){
    for(int i=0; i<21; i++){
    if ((data[i] == null) || (count[i] != count[i+1])){
    return false;
    if (count_c != count[21] && data[21] == null)
    return false;
    else
    return true;
    public static void main(String[] args){
    Vector v=new Vector();
    //... do something...
    if(proceed(array, count, count_c)){
    cell.setParameters(0, "cellid", array[0])
    cell.setParameters(1, "sac", array[1]);                
         cell.setParameters(21,"tmr_cspu", array[21]);
    v.add(cell);
    count_c++;
    temp[0] = ((OneCell)v.get(0)).printParameters()[0];
    error     -->     java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0

    sorry, i hope that this is better now. thanks for your comment.
    in the code, 2 arrays (keeping the contents and the count) are declared
    temp is also an array of size 23
    i believe that the problem lies with the method proceedsince the method setParameters is correct...
    i hope that my question is now clearer. thx for the trouble taken to answer me...
    public static boolean proceed(String[] data, int[] count, int count_c){
        for(int i=0; i<21; i++){
            if ((data == null) || (count != count[i+1])){
                return false;
        if (count_c != count[21] && data[21] == null)
            return false;
        else
            return true;
    public static void main(String[] args){
        Vector v=new Vector();
        //... do something...
        if(proceed(array, count, count_c)){
            cell.setParameters(0, "cellid", array[0])
            cell.setParameters(1, "sac", array[1]);
            cell.setParameters(21,"tmr_cspu", array[21]);
            v.add(cell);
            count_c++;
        temp[0] = ((OneCell)v.get(0)).printParameters()[0];

  • Index out of Bounds Exception in for loop.

    Occasionaly with the code below, i get an index out of bounds error, index 1, size 1, however the for loop should ensure that it never calls the getActorLocation method if the index is the same size as the arrayList size.
    Im having one of those days, and i just cant see what error i have made.
    Perhaps i need coffee? lol
    Cheers
    James
    private void checkMemoryIntegrity(){
            Actor actor = actorList.get(actorIndex);
            ArrayList<Integer> inRangeList = getActorsInMemoryRange(actor, actor.getRange());
            inRangeList.trimToSize();
            for (int i = 0; i < inRangeList.size();i++){
                if (inRangeList.size() != 0){
                    actor = brainState.getActorLocation(i); //<<<<<<<<< problem line
                    if (!actorList.contains(actor)){
                        brainState.actorLocations.remove(i);
    public ArrayList <Integer> getActorsInMemoryRange(Actor actor, int range){
            int i = 0;
            int x = actor.getX();
            int y = actor.getY();
            ArrayList <Integer> inRangeList = new ArrayList <Integer> ();
            Actor compActor;
            while (i< brainState.actorLocations.size())
                compActor = brainState.getActorLocation(i);
                int xDist = x - compActor.getX();
                if ( (xDist >= (-1) * range) && (xDist <= range) ){
                    int yDist = y - compActor.getY();
                    if ( (yDist >= (-1) * range) && (yDist <= range) ){
                        inRangeList.add(i);
                i++;
            return inRangeList;
        }

    I was thinking it might be easier to do it this way:
    Iterator<Actor> i = actorLocations.iterator();
    while(i.hasNext())
        if (!actorList.contains(i.next())) {
            i.remove();
    }It sounds like you have an equals() method which compares the x and y locations of the actor. If not then you will have to enclose the remove in an if block which compares the actor location. Does that make sense?
    Edit: contains uses the equals method.
    Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that
    (o==null ? e==null : o.equals(e)).Edited by: Edward_Kimber on May 23, 2008 11:43 AM

  • Why am i getting an index out of bounds exception

    I just want to read some bytes at the end of an mp3 file.
    File file = new File(fd.getDirectory() + File.separator + fd.getFile());
                try {
                     FileInputStream fileInputStream = new FileInputStream(file);
                     byte[] fileSnippet = new byte[100];
                     int startPosition = (int)file.length() - 500;
                     fileInputStream.read(fileSnippet, startPosition, 100);

    fileInputStream.read(fileSnippet, startPosition, 100);This does not tell it to seek (hint, hint) to startPosition and read 100 bytes. It is telling it to read from the current position into the buffer starting at index "startPosition" in that buffer. If startPosition is >= 100, then that's clearly out of bounds.

  • Problem with an array (Array index out of bounds)

    Hey guys, i have a problem with an array, i just want to print a few things but it won't let me because of this error, here's my code
         public static void MosDat()
              int i;
              for(i=0 ; i<n ; i++);
                   Client [ i ].print1();
                   Client [ i ].print2();
              return;
         }//MosDat
    where "n" is a global variable, and client is .
    I pretty much know how it woks, so i tried it like this and gave "n" the value of "1":
    public static void MosDat()
              int i;
              for(i=0 ; i<n ; i++);
                   Client [ 0 ].print1();
                   Client [ 0 ].print2();
              return;
         }//MosDat
    the printing methods i created worked prefectly when i tried it like that... so i really don't know where the problem could be... thanks anyone who can help me.

    for(i=0 ; i < n ; i++);I spy with my little eye,
    one semicolon too many.Well-spotted. ;-)Practicing on those weird question marks is my secret training.

  • Array Index out of bounds error when rendering graph

    Hello,
    OBIEE 11.1.1.5 running on RHEL version 5.7
    I'm encountering a strange problem with graph rendering. I have a graph and a table that are tied to a list of values. The graph renders correctly for many of the values in the list, but for certain values the graph does not render while the table does. What is even more odd is that the graph renders correctly using BI mobile on an iPad for all values in the LOV.
    From the Weblogic fusion bipublisher.log, I see this log entry immediately after getting the rendering error:
    Message:     java.lang.ArrayIndexOutOfBoundsException: 124
    The above log entry is followed about a minute later with this:
    Message ID: ADF_FACES-60099
    Component: AdminServer
    Module: oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer
    Message: The region component with id: emTemplate:fmwRegion has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.
    Any ideas on how to fix this?

    Hi Ray,
    I cannot find an array.  The only one I see is ResultList.  This one seems to be in all Test Stand sequences.  I am not sure exactly how it's used.
    I have pulled the sub-sequence out of the main sequence and made a new main sequence with all of the same variables.
    Look at it and let me know what you think.
    Thanks
    Attachments:
    Excel - Set Cell Color.seq ‏59 KB

  • Array index out of bounds in oracle top links, jsf page

    Dear All,
    // This is my controller page //
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package jsfpack;
    import db.Addressmaster;
    import db.Partymaster;
    import db.Propertymaster;
    import db.RealEstateJSFBean;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Random;
    import java.util.StringTokenizer;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.annotation.Resource;
    import javax.faces.FacesException;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.PersistenceUnit;
    import javax.persistence.Query;
    import javax.transaction.SystemException;
    import javax.transaction.UserTransaction;
    import sysadmin.Admin;
    * @author siva.np
    public class RealEstatectrler {
    private RealEstateJSFBean realBean = null;
    private List<RealEstateJSFBean> realBeans = null;
    @Resource
    private UserTransaction utx = null;
    public int batchSize = 5;
    private int firstItem = 0;
    private int itemCount = -1;
    private Admin ma = null;
    @PersistenceUnit(unitName = "ReaEstatelJSFPU")
    private EntityManagerFactory emf = null;
    public EntityManager getEntityManager() {
    System.out.println("Siva 1 ");
    return emf.createEntityManager();
    public String create() {     
    //FacesContext fac = fac.getCurrentInstance().getExternalContext().getRequestMap().get("RealJSFProjBean");
    EntityManager em = getEntityManager();
    //RealEstateJSFBean RealEstBean = (RealEstateJSFBean) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("RealEstateJSFBean");
    RealEstateJSFBean RealEstBean = (RealEstateJSFBean) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("RealEstateJSFBean");
    Addressmaster am = null;
    Partymaster pm = null;
    Propertymaster ppm = null;
    try {                      
    Random rand = new Random();
    Long l = rand.nextLong();
    System.out.println("I am in the creat metyhod");
    utx.begin();
    am = new Addressmaster();
    am.setAddresscode("A"+l.toString());
    am.setPodoorno(RealEstBean.getPodoorno());
    am.setStreetname(RealEstBean.getStreetname());
    am.setPlace(RealEstBean.getPlace());
    am.setCity(RealEstBean.getCity());
    am.setState(RealEstBean.getStates());
    am.setCountry(RealEstBean.getCountry());
    am.setPhoneno(RealEstBean.getPhoneno());
    am.setMobileno(RealEstBean.getMobileno());
    am.setEmail(RealEstBean.getEmail());
    em.persist(am);
    ppm = new Propertymaster();
    ppm.setPropertycode("PP"+l.toString());
    ppm.setPropertytype(RealEstBean.getPropertytype());
    ppm.setPropertyage(RealEstBean.getPropertyage());
    ppm.setBuiltarea(RealEstBean.getBuiltarea());
    ppm.setPlotarea(RealEstBean.getPlotarea());
    ppm.setBhk(RealEstBean.getBhk());
    ppm.setTotalnofloors(RealEstBean.getTotalnofloors());
    ppm.setParkingrequired(RealEstBean.getParkingrequired());
    ppm.setPaymenttype(RealEstBean.getPaymenttype());
    ppm.setTotalamount(RealEstBean.getTotalamount());
    ppm.setPropaddress1(RealEstBean.getPropaddress1());
    ppm.setPropaddress2(RealEstBean.getPropaddress2());
    ppm.setPlace(RealEstBean.getPropplace());
    ppm.setCity(RealEstBean.getPropcity());
    ppm.setState(RealEstBean.getPropstates());
    ppm.setCountry(RealEstBean.getPropcountry());
    ppm.setRemarks(RealEstBean.getRemarks());
    em.persist(ppm);
    // Party Master table
    pm = new Partymaster();
    pm.setPartycode("P"+l.toString());
    pm.setPartyname(RealEstBean.getPartyname());
    pm.setUsertype(RealEstBean.getUsertype());
    pm.setUsername(RealEstBean.getUsername());
    pm.setPassword(RealEstBean.getPassword());
    // pm.setAddresscode(am.getAddresscode());
    // pm.setPropertycode(ppm.getPropertycode());
    em.persist(pm);
    // Admin Table
    ma = new Admin();
    ma.setCode("P"+l.toString());
    ma.setUsername(RealEstBean.getUsername());
    ma.setPassword(RealEstBean.getPassword());
    em.persist(ma);
    utx.commit();
    addSuccessMessage("Real Estate was successfully created.");
    } catch (Exception ex) {           
    try {
    ex.printStackTrace();
    utx.rollback();
    } catch (IllegalStateException ex1) {
    Logger.getLogger(RealEstatectrler.class.getName()).log(Level.SEVERE, null, ex1);
    } catch (SecurityException ex1) {
    Logger.getLogger(RealEstatectrler.class.getName()).log(Level.SEVERE, null, ex1);
    } catch (SystemException ex1) {
    Logger.getLogger(RealEstatectrler.class.getName()).log(Level.SEVERE, null, ex1);
    } finally {
    em.close();
    return listSetup();
    public String edit() {
    RealEstateConverter converter = new RealEstateConverter();
    String adminString = converter.getAsString(FacesContext.getCurrentInstance(), null, realBean);
    String currentAdminString = getRequestParameter("jsfcrud.currentRealJSF");
    Addressmaster am;
    Partymaster pm;
    Propertymaster ppm;
    EntityManager em = getEntityManager();
    try {
    utx.begin();
    am = em.find(Addressmaster.class, realBean.getAddresscode().trim());
    if(am != null){
    am.setAddresscode(realBean.getAddresscode().trim());
    am.setPodoorno(realBean.getPodoorno());
    am.setStreetname(realBean.getStreetname());
    am.setPlace(realBean.getPlace());
    am.setCity(realBean.getCity());
    am.setState(realBean.getStates());
    am.setCountry(realBean.getCountry());
    am.setPhoneno(realBean.getPhoneno());
    am.setMobileno(realBean.getMobileno());
    am.setEmail(realBean.getEmail());
    em.merge(am);
    // Property Master table
    ppm = em.find(Propertymaster.class, realBean.getPropertycode().trim());
    if(ppm != null){           
    ppm.setPropertytype(realBean.getPropertytype());
    ppm.setPropertyage(realBean.getPropertyage());
    ppm.setBuiltarea(realBean.getBuiltarea());
    ppm.setPlotarea(realBean.getPlotarea());
    ppm.setBhk(realBean.getBhk());
    ppm.setTotalnofloors(realBean.getTotalnofloors());
    ppm.setParkingrequired(realBean.getParkingrequired());
    ppm.setPaymenttype(realBean.getPaymenttype());
    ppm.setTotalamount(realBean.getTotalamount());
    ppm.setPropaddress1(realBean.getPropaddress1());
    ppm.setPropaddress2(realBean.getPropaddress2());
    ppm.setPlace(realBean.getPropplace());
    ppm.setCity(realBean.getPropcity());
    ppm.setState(realBean.getPropstates());
    ppm.setCountry(realBean.getPropcountry());
    ppm.setRemarks(realBean.getRemarks());
    em.merge(ppm);
    // Party Master table
    String Party = realBean.getPropertycode().replace("PP","P");
    pm = em.find(Partymaster.class, Party.trim());
    if(pm != null){
    pm.setPartycode(Party.trim());
    pm.setPartyname(realBean.getPartyname());
    pm.setUsertype(realBean.getUsertype());
    pm.setUsername(realBean.getUsername());
    pm.setPassword(realBean.getPassword());
    //pm.setAddresscode(am.getAddresscode());
    // pm.setPropertycode(ppm.getPropertycode());
    em.merge(pm);
    // Admin Table
    ma = em.find(Admin.class, Party.trim());
    if(ma != null){
    ma.setCode(Party.trim());
    ma.setUsername(realBean.getUsername());
    ma.setPassword(realBean.getPassword());
    em.merge(ma);
    utx.commit();
    addSuccessMessage("Real Estate was successfully updated.");
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    em.close();
    return detailSetup();
    public String destroy() {
    realBean = getRealFromRequest();
    if (realBean == null) {           
    String currentAdminString = getRequestParameter("jsfcrud.currentRealJSF");
    addErrorMessage("The Real Estate with id " + currentAdminString + " no longer exists.");
    String relatedControllerOutcome = relatedControllerOutcome();
    if (relatedControllerOutcome != null) {
    return relatedControllerOutcome;
    return listSetup();
    EntityManager em = getEntityManager();
    try {           
    utx.begin();
    em.remove(em.find(Addressmaster.class, realBean.getAddresscode()));
    em.remove(em.find(Propertymaster.class, realBean.getPropertycode().trim()));
    String Party = realBean.getPropertycode().replace("PP","P");
    em.remove(em.find(Partymaster.class, Party.trim()));
    em.remove(em.find(Admin.class, Party.trim()));
    utx.commit();
    addSuccessMessage("Real Edit User was successfully deleted.");
    } catch (Exception ex) {
    try {
    ensureAddErrorMessage(ex, "A persistence error occurred.");
    utx.rollback();
    } catch (Exception e) {
    ensureAddErrorMessage(e, "An error occurred attempting to roll back the transaction.");
    return null;
    } finally {
    em.close();
    String relatedControllerOutcome = relatedControllerOutcome();
    if (relatedControllerOutcome != null) {
    return relatedControllerOutcome;
    return listSetup();
    public RealEstateJSFBean getEstProjBean(){  
    System.out.println("Siva 12 ");
    if(realBean == null){
    //realBean = getEstProjBean();
    realBean = getRealFromRequest();
    if (realBean == null) {
    realBean = new RealEstateJSFBean();
    return realBean;
    public String listSetup() {
    System.out.println("Siva 13 ");
    reset(true);
    return "RealEst_list";
    public String detailSetup() {
    System.out.println("Siva 14 ");
    return scalarSetup("RealEst_detail");
    public String createSetup() {
    System.out.println("Siva 15 ");
    reset(false);
    realBean = new RealEstateJSFBean();
    return "RealEst_create";
    public String editSetup() {       
    System.out.println("EDit");
    return scalarSetup("RealEst_edit");
    private String scalarSetup(String destination) {
    System.out.println("Dest "+destination);
    reset(false);
    realBean = getRealFromRequest();
    if (realBean == null) {
    String requestAdminString = getRequestParameter("jsfcrud.currentRealJSF");
    addErrorMessage("The admin with sss id " + requestAdminString + " no longer exists.");
    String relatedControllerOutcome = relatedControllerOutcome();
    if (relatedControllerOutcome != null) {
    return relatedControllerOutcome;
    return listSetup();
    return destination;
    public int getFirstItem() {
    System.out.println("Siva 16 ");
    getItemCount();
    if (firstItem >= itemCount) {
    if (itemCount == 0) {
    firstItem = 0;
    } else {
    int zeroBasedItemCount = itemCount - 1;
    double pageDouble = zeroBasedItemCount / batchSize;
    int page = (int) Math.floor(pageDouble);
    firstItem = page * batchSize;
    return firstItem;
    public int getLastItem() {
    System.out.println("Siva 17 ");
    getFirstItem();
    return firstItem + batchSize > itemCount ? itemCount : firstItem + batchSize;
    public int getBatchSize() {
    System.out.println("Siva 18 ");
    return batchSize;
    public String next() {
    System.out.println("Siva 19 ");
    reset(false);
    getFirstItem();
    if (firstItem + batchSize < itemCount) {
    firstItem += batchSize;
    return "RealEst_list";
    public String prev() {
    System.out.println("Siva 20 ");
    reset(false);
    getFirstItem();
    firstItem -= batchSize;
    if (firstItem < 0) {
    firstItem = 0;
    return "RealEst_list";
    private Map<Object, String> asString = null;
    public Map<Object, String> getAsString() {
    System.out.println("Siva 21 ");
    if (asString == null) {
    asString = new HashMap<Object, String>() {
    @Override
    public String get(Object key) {
    if (key instanceof Object[]) {
    Object[] keyAsArray = (Object[]) key;
    if (keyAsArray.length == 0) {
    return "(No Items)";
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < keyAsArray.length; i++) {
    if (i > 0) {
    sb.append("<br />");
    sb.append(keyAsArray);
    return sb.toString();
    System.out.println("This is siva ");
    return new RealEstateConverter().getAsString(FacesContext.getCurrentInstance(), null, (RealEstateJSFBean) key);
    return asString;
    private String relatedControllerOutcome() {
    System.out.println("Siva 22 ");
    String relatedControllerString = getRequestParameter("jsfcrud.relatedController");
    String relatedControllerTypeString = getRequestParameter("jsfcrud.relatedControllerType");
    if (relatedControllerString != null && relatedControllerTypeString != null) {
    FacesContext context = FacesContext.getCurrentInstance();
    Object relatedController = context.getApplication().getELResolver().getValue(context.getELContext(), null, relatedControllerString);
    try {
    Class<?> relatedControllerType = Class.forName(relatedControllerTypeString);
    Method detailSetupMethod = relatedControllerType.getMethod("detailSetup");
    return (String) detailSetupMethod.invoke(relatedController);
    } catch (ClassNotFoundException e) {
    throw new FacesException(e);
    } catch (NoSuchMethodException e) {
    throw new FacesException(e);
    } catch (IllegalAccessException e) {
    throw new FacesException(e);
    } catch (InvocationTargetException e) {
    throw new FacesException(e);
    return null;
    private void reset(boolean resetFirstItem) {
    System.out.println("Siva 23 ");
    realBean = null;
    realBeans = null;
    itemCount = -1;
    if (resetFirstItem) {
    firstItem = 0;
    private RealEstateJSFBean getRealFromRequest() {
    System.out.println("Siva 24 ");
    String theId = getRequestParameter("jsfcrud.currentRealJSF");
    System.out.println("TEEE "+theId);
    return (RealEstateJSFBean) new RealEstateConverter().getAsObject(FacesContext.getCurrentInstance(), null, theId);
    private String getRequestParameter(String key) {
    System.out.println("Siva 25 ");
    return FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(key);
    public List<RealEstateJSFBean> getEstProjBeans() {
    if (realBeans == null) {
    System.out.println("Real JSF 1");
    realBeans = getEstProjBeans(false);
    return realBeans;
    public List<RealEstateJSFBean> getEstProjBeans(boolean all) {
    EntityManager em = getEntityManager();
    //ArrayList results = null;
    List results = new ArrayList();
    List resList = new ArrayList();
    RealEstateJSFBean[] test = null;
    RealEstateJSFBean srsiva = new RealEstateJSFBean();
    try {           
    // Query q = em.createQuery("select object(o) from Addressmaster as o");
    // Query q = em.createQuery("SELECT p.partyname, a.addresscode FROM Partymaster p LEFT JOIN p.Addressmaster a");
    // Query q = em.createQuery("SELECT p.partyname, a.addresscode FROM Partymaster p LEFT JOIN p.Addressmaster a");
    String strQuery = "select am.addresscode, pm.partyname,pm.propertycode, am.email, pm.username, am.podoorno,am.streetname, am.place, am.city, am.state, am.country, am.phoneno, am.mobileno, pm.usertype, ppm.propertytype,ppm.builtarea, ppm.plotarea, ppm.propertyage, ppm.bhk, ppm.TotalNoFloors, ppm.TotalAmount, ppm.PropAddress1, ppm.PropAddress2, ppm.place, ppm.city, " +
    " ppm.state,ppm.country,ppm.remarks, ppm.parkingrequired, pm.password from partymaster pm left outer join propertymaster ppm on pm.propertycode = ppm.propertycode left outer join addressmaster am on pm.addresscode = am.addresscode";
    Query q = em.createNativeQuery(strQuery);
    resList=q.getResultList();
    System.out.println("List Query "+resList);
    int sizeTest = resList.size();
    if (!all) {
    q.setMaxResults(batchSize);
    q.setFirstResult(getFirstItem());
    System.out.println("Count Query "+sizeTest);
    test=new RealEstateJSFBean[sizeTest];
    for(int i=0;i<sizeTest;i++)
    test[i]=new RealEstateJSFBean();
    String s=resList.get(i).toString();
    System.out.println("Res list"+s);
    StringTokenizer st=new StringTokenizer(s,",");
    while(st.hasMoreElements())
    String leave_id=st.nextElement().toString();
    StringTokenizer st1=new StringTokenizer(leave_id,"[");
    while(st1.hasMoreElements())
    test[i].setAddresscode(st1.nextElement().toString().trim());
    test[i].setPartyname(st.nextElement().toString().trim());
    test[i].setPropertycode(st.nextElement().toString());
    test[i].setEmail(st.nextElement().toString().trim());
    test[i].setUsername(st.nextElement().toString().trim());
    test[i].setPodoorno(st.nextElement().toString().trim());
    test[i].setStreetname(st.nextElement().toString().trim());
    test[i].setPlace(st.nextElement().toString().trim());
    test[i].setCity(st.nextElement().toString().trim());
    test[i].setStates(st.nextElement().toString().trim());
    test[i].setCountry(st.nextElement().toString().trim());
    test[i].setPhoneno(Long.parseLong(st.nextElement().toString().trim()));
    test[i].setMobileno(Long.parseLong(st.nextElement().toString().trim()));
    test[i].setUsertype(st.nextElement().toString().trim());
    test[i].setPropertytype(st.nextElement().toString().trim());
    test[i].setBuiltarea(Double.parseDouble(st.nextElement().toString().trim()));
    test[i].setPlotarea(Double.parseDouble(st.nextElement().toString().trim()));
    test[i].setPropertyage(st.nextElement().toString().trim());
    test[i].setBhk(Integer.parseInt(st.nextElement().toString().trim()));
    test[i].setTotalnofloors(Integer.parseInt(st.nextElement().toString().trim()));
    test[i].setTotalamount(Long.parseLong(st.nextElement().toString().trim()));
    test[i].setPropaddress1(st.nextElement().toString().trim());
    test[i].setPropaddress2(st.nextElement().toString().trim());
    test[i].setPropplace(st.nextElement().toString().trim());
    test[i].setPropcity(st.nextElement().toString().trim());
    test[i].setPropstates(st.nextElement().toString().trim());
    test[i].setPropcountry(st.nextElement().toString().trim());
    test[i].setRemarks(st.nextElement().toString().trim());
    test[i].setParkingrequired(st.nextElement().toString().trim());
    String firstname=st.nextElement().toString();
    StringTokenizer st2=new StringTokenizer(firstname,"]");
    while(st2.hasMoreElements())
    test[i].setPassword(st2.nextElement().toString().trim());
    results.add(test[i]);
    break;
    System.out.println("III "+i);
    return results;
    } finally {
    em.close();
    public RealEstateJSFBean getEstProjBeansEdit(String Propertycode) {
    EntityManager em = getEntityManager();
    try {           
    String strSQL = "select am.addresscode, pm.partyname,pm.propertycode, am.email, pm.username, am.podoorno,am.streetname, am.place, am.city, am.state, am.country, am.phoneno, am.mobileno, pm.usertype, ppm.propertytype,ppm.builtarea, ppm.plotarea, ppm.propertyage, ppm.bhk, ppm.TotalNoFloors, ppm.TotalAmount, ppm.PropAddress1, ppm.PropAddress2, ppm.place, ppm.city, " +
    " ppm.state,ppm.country,ppm.remarks, ppm.parkingrequired, pm.password from partymaster pm left outer join propertymaster ppm on pm.propertycode = ppm.propertycode left outer join addressmaster am on pm.addresscode = am.addresscode where ppm.propertycode = '"+Propertycode.trim()+"'";
    Query q = em.createNativeQuery(strSQL);
    if (!Propertycode.equals("")) {
    q.setMaxResults(batchSize);
    q.setFirstResult(getFirstItem());
    realBean=new RealEstateJSFBean();
    String s=q.getSingleResult().toString();
    StringTokenizer st=new StringTokenizer(s,",");
    while(st.hasMoreElements())
    String leave_id=st.nextElement().toString();
    StringTokenizer st1=new StringTokenizer(leave_id,"[");
    while(st1.hasMoreElements())
    realBean.setAddresscode(st1.nextElement().toString().trim());
    realBean.setPartyname(st.nextElement().toString().trim());
    realBean.setPropertycode(st.nextElement().toString());
    realBean.setEmail(st.nextElement().toString().trim());
    realBean.setUsername(st.nextElement().toString().trim());
    realBean.setPodoorno(st.nextElement().toString().trim());
    realBean.setStreetname(st.nextElement().toString().trim());
    realBean.setPlace(st.nextElement().toString().trim());
    realBean.setCity(st.nextElement().toString().trim());
    realBean.setStates(st.nextElement().toString().trim());
    realBean.setCountry(st.nextElement().toString().trim());
    realBean.setPhoneno(Long.parseLong(st.nextElement().toString().trim()));
    realBean.setMobileno(Long.parseLong(st.nextElement().toString().trim()));
    realBean.setUsertype(st.nextElement().toString().trim());
    realBean.setPropertytype(st.nextElement().toString().trim());
    realBean.setBuiltarea(Double.parseDouble(st.nextElement().toString().trim()));
    realBean.setPlotarea(Double.parseDouble(st.nextElement().toString().trim()));
    realBean.setPropertyage(st.nextElement().toString().trim());
    realBean.setBhk(Integer.parseInt(st.nextElement().toString().trim()));
    realBean.setTotalnofloors(Integer.parseInt(st.nextElement().toString().trim()));
    realBean.setTotalamount(Long.parseLong(st.nextElement().toString().trim()));
    realBean.setPropaddress1(st.nextElement().toString().trim());
    realBean.setPropaddress2(st.nextElement().toString().trim());
    realBean.setPropplace(st.nextElement().toString().trim());
    realBean.setPropcity(st.nextElement().toString().trim());
    realBean.setPropstates(st.nextElement().toString().trim());
    realBean.setPropcountry(st.nextElement().toString().trim());
    realBean.setRemarks(st.nextElement().toString().trim());
    realBean.setParkingrequired(st.nextElement().toString().trim());
    String firstname=st.nextElement().toString();
    StringTokenizer st2=new StringTokenizer(firstname,"]");
    while(st2.hasMoreElements())
    realBean.setPassword(st2.nextElement().toString().trim());
    System.out.println("SSS"+realBean.toString());
    return realBean;
    } finally {
    em.close();
    public int getItemCount() {
    System.out.println("Siva 27 ");
    if (itemCount == -1) {
    EntityManager em = getEntityManager();
    try {
    itemCount = ((Long) em.createQuery("select count(o) from Addressmaster as o").getSingleResult()).intValue();
    //itemCount = ((Long) em.createQuery("select count(partycode) from partymaster as pm left outer join propertymaster as ppm on pm.propertycode = ppm.propertycode left outer join addressmaster as am on pm.addresscode = am.addresscode").getSingleResult()).intValue();
    //itemCount = ((int) em.createQuery("select pm.partyname,pm.propertycode, am.email, pm.username, am.podoorno,am.streetname, am.place, am.city, am.state, am.country, am.phoneno, am.mobileno, ppm.propertytype,ppm.builtarea, ppm.plotarea, ppm.propertyage, ppm.bhk, ppm.TotalNoFloors, ppm.TotalAmount, ppm.PropAddress1, ppm.PropAddress2, ppm.place, ppm.city, ppm.state,ppm.country,ppm.remarks, ppm.parkingrequired, pm.password from partymaster pm left outer join propertymaster ppm on pm.propertycode = ppm.propertycode left outer join addressmaster am on pm.addresscode = am.addresscode").getResultList().size());
    } finally {
    em.close();
    return itemCount;
    private void ensureAddErrorMessage(Exception ex, String defaultMsg) {
    System.out.println("Siva 28 ");
    String msg = ex.getLocalizedMessage();
    if (msg != null && msg.length() > 0) {
    addErrorMessage(msg);
    } else {
    addErrorMessage(defaultMsg);
    public static void addErrorMessage(String msg) {
    Fac

    No one is going to read this. Please post only the code which caused the problem, not the whole project.
    Please try to create a test case which reproduces this problem and post it here. And last but not least,
    please use the CODE button in the message editor toolbar to get the tags. Paste code in there so
    that you get well-formatted (and thus well-readable) code.
    Please also carefully read this article: [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • OLT - multiple user load - Array Index Out of Bound error

    Hi,
    I am executing a load test with 12 users.
    All the 6 script scenarios are written in OpenScript editor. They all have databanks associated with them.
    When I run the test in OLT with 2 users per script scenario making that a total of 12 users, I see the following exceptions that have the wording as:
    + An unexpected exception occured in the script. Script section: Run. Caused by : ArrayIndexOutOfBoundsException occured. 71>=71
    + An unexpected exception occured in the script. Script section: Run. Caused by : ArrayIndexOutOfBoundsException occured. 206>=206
    + An unexpected exception occured in the script. Script section: Run. Caused by : ArrayIndexOutOfBoundsException occured. 206>=86
    Has anyone seen this error before, It is sporadic and does not always occur on the same scrip
    The version I am using is OLT 9.30.
    Thanks,
    Kranti.

    Thank You for your response.
    When I run with a single user using databank, I don't see this error.
    It apparently happens only when I use multiple users and it is quiet random so I cannot narrow down on a particular script to figure out the error.
    In one run scenario A shows this error in another run scenario A runs perfectly fine and some other scenarios shows this error.
    Also, I have around 100 values in the data bank and I see this error early on by around the 10th or 20th value in the data bank.
    Where can I check the resultIndex number?
    This is how I make my calls to the databank in the OpenScript script.
    getDatabank("ReinstatePolicyNumbers").getNextDatabankRecord();          
              getVariables().set("polNumber", "{{db.ReinstatePolicyNumbers.Var1}}");
              reinstatePolicy(userid, getVariables().get("polNumber"));
    Thanks,
    Kranti.

  • Array Index Out Of Bound

    java.lang.ArrayIndexOutOfBoundsException i got this error while installing Jboss on linux ubuntu7.04 can anybody tell me how to solve this? plz

    StackTrace please...

  • Index out of bound exception

    Hi All,
    I am using ESS/MSS. One of my user when try to open an item in the UWL, he gets the following error
    Critical error
    Index: 0, Size: 0
    Java.lang.Indexoutofboundexception:Index: 0, Size: 0
    Can anyone advise me in this?
    Thanks!
    Swarnaprakash

    For a given UWL/Workflow item, there should be an associated leave request item waiting for the manager to approve or reject.
    However, in some cases, the leave request item would not exist at the time of clicking on the UWL item. This is probably because the leave request was approved/completed from some where else (by a time administrator) and the workflow item is not aware of this change.
    If the workflow is not updated when the leave request was completed, then this could lead to the inconsistency.
    I would suggest you to check the status of the leave request that is creating the issue from transaction PTARQ. If the leave request is already completed, then you can just delete the work item from the backend system.
    There is no clear cut solution for this problem as it is more of a data inconsistency issue.
    Hope that helps !!
    - Shanti

Maybe you are looking for

  • Text Color in disabled text field

    Hi, In our application, The default rendered text in disabled fields is not visible properly. In order to improve the visibility we applied different color using content style for those fields. We did see the change in the fields after applying conte

  • Locale Settings lost on mobile client 7.8.2.14 after creation of BIP report

    Hi All, we went live with BI Publisher reports (Siebel 7.8.2.14) at the beginning of June. Now some of our users are having trouble with their mobile web client. For example our colleagues in Poland have their Windows XP regional settings set to "Pol

  • P6 R8.1.0 Web Access not loading EPS

    Hi, This is really weird situation. It started out of nowhere without any specific change to the app or the DB (SQL Server 2008 R2). Whenever i try to load the EPS (clicking on the tan Project) the Java bar for loading data shows starts and stays the

  • How is it possible to connect more than one SAP R/3 4.6c System to TREX 6.1

    Hi, I'm using SAP TREX 6.1 together with an 4.6c System. Now I want to connect the TREX to more than one R/3 System, so that every R/3 System has got its own Index-Category on the TREX Host. Does somebody know what I have to enter in the ini files --

  • Video capture from video camera to macbook

    I can't figure out how to capture my video off my video camera and transfer it to my macbook. I have QT pro and have attached the firewire, but when QT pro launches, there is no option to capture...any thoughts? Thanks