Intermediary bean causing NullPointerException

Hi all,
I wonder if someone could help me with an issue I'm having.
I've got a JTable bound to database fields, and when the user selects a field and clicks an "Edit" button, I'm generating an object using ConvertRowIndexToModel() method, and passing the Object to a JDialog form, using an intermediary bean object called currentPigment.
The currentPigment object is bound to various fields in the JDialog, and the bound properties are showing up correctly in the JTextField boxes. If I try to access the bean properties from the JFrame class where my JTable exists, everything is fine. However If I try to access the intermediary bean from within the JDialog, I'm getting a NullPointerException.
Here is the code from the JFrame holding the JTable linked to the database:
@Action(enabledProperty = "recordSelected")
    public void editPigment()
        PigmentEditor pe = new PigmentEditor(this, false);
        pe.setCurrentPigment(pigmentList.get(pigmentTable.convertRowIndexToModel(pigmentTable.getSelectedRow())));
        pe.setVisible(true);and here is the bean code in the JDialog class:
    protected Pigment currentPigment;
    public Pigment getCurrentPigment()
        return currentPigment;
    public void setCurrentPigment(Pigment currentPigment)
        Pigment oldCurrentPigment = this.currentPigment;
        this.currentPigment = currentPigment;
        propertyChangeSupport.firePropertyChange("currentPigment", oldCurrentPigment, currentPigment);
    }I need to access the properties of the currentPigment object so I can automatically select an item from a JTable, however if I try to access the objects getters/setters, I get a NullPointerException.
If someone could explain why this is, or how I can get round it, I'd be greatful.
Thanks in Advance.

Okay I figured out what the problem was / is - When the JTable is bound to the nested entity class, because no item is selected, it's removing the nested entity class creating a null value. I also tried changing to a JList and this does the same thing. However if I use a JComboBox, my item renders correctly and the nested entity class displays the correct value without being erased.
Is it possible to make a JTable select an item, before the bean binding removes the value making it null?
Many thanks,

Similar Messages

  • Command_link rendered value binding causes NullPointerException

    command_link is put in a data_table. Intiailly, data_table has no rows. The command_link's render attribute is binded to a property of a row bean. e.g.
    <h:data_table id="resourcesTable"
      value="#{mainPubFormBean.resources}"
      binding="#{mainPubFormBean.dataUI}"
      var="resourceDataLine">
        <h:column>
          <h:command_link id="goToFolder"
          action="#{mainPubFormBean.goToResource}"
          rendered="#{resourceDataLine.folder}"
          title="#{resourceDataLine.localizedResourceName}">
           <h:output_text   value="#{resourceDataLine.abbreviatedResourceName}"
              styleClass="time-table-text"/>
           </h:command_link>
        </h:column>
    </h:data_table>It causes NullPointerException,
    java.lang.NullPointerException
            at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:415)
            at javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:777)
            at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:447)
            at com.sun.faces.taglib.BaseComponentTag.doStartTag(BaseComponentTag.java:929)
            at org.apache.jsp.main_jsp._jspx_meth_h_command_link_6(main_jsp.java:1954)
            at org.apache.jsp.main_jsp._jspx_meth_h_column_0(main_jsp.java:1834)
            at org.apache.jsp.main_jsp._jspx_meth_h_data_table_0(main_jsp.java:1498)Here is the UIComponentBase.isRendered code fragment:
        public boolean isRendered()
            if(renderedSet)
                return rendered;
            ValueBinding vb = getValueBinding("rendered");
            if(vb != null)
                Boolean value = (Boolean)vb.getValue(getFacesContext());
                return value.booleanValue();  <----- value can be null
            } else
                return rendered;
        }The code should test if the value if null or not before calling booleanValue().

    Thanks. Good news: we already nailed this bug.
    -- Adam Winer

  • Refresh methodIterator cause NullPointerException

    HI Guys,
    I am using JDeveloper 10.1.3 and experiencing a strange problem with JSF Faces. I have a tree model defined in the pagedef.xml file. Every time I try to refresh the iterator binding, the NullPointerException occurs. It only happens when refreshing, not the first time. acccording to the trace stack, the exception occurs when ADF framework tries to refresh the iterator.
    Here is the code to refresh the iterator:
    DCIteratorBinding loansBinding = (DCIteratorBinding) bindings.get("findLoansIter");
    loansBinding.executeQuery();
    The following is the
    <methodIterator id="findLoansIter" Binds="findLoans.result"
    DataControl="PEPublicLocal" RangeSize="-1"
    BeanClass="pe.datamodule.beans.Loan" Refresh="renderModel"
    RefreshCondition="${adfFacesContext.postback}"/>
    <nodeDefinition DefName="pe.datamodule.beans.Loan" id="LoanNode">
    <AttrNames>
    <Item Value="dueDate"/>
    <Item Value="total"/>
    </AttrNames>
    <Accessors>
    <Item Value="loanextraCollection"/>
    </Accessors>
    </nodeDefinition>
    <nodeDefinition DefName="pe.datamodule.beans.Loanextra"
    id="LoanextraNode">
    <AttrNames>
    <Item Value="amount"/>
    <Item Value="loanExtraID"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    The exception is
    09/12/17 22:13:17 java.lang.NullPointerException
    09/12/17 22:13:17      at oracle.adf.model.generic.RowImpl.internalGetAttributeValue(RowImpl.java:154)
    09/12/17 22:13:17      at oracle.adf.model.generic.RowImpl.getAttribute(RowImpl.java:130)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetAttributeValueFromRow(JUCtrlValueBinding.java:702)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:470)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributes(JUCtrlValueBinding.java:901)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.refresh(JUCtrlHierNodeBinding.java:504)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.updateValuesFromRow(JUCtrlHierNodeBinding.java:523)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUIteratorBinding.updateValuesFromRows(JUIteratorBinding.java:315)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:695)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:737)
    09/12/17 22:13:17      at oracle.jbo.common.RowSetHelper.fireRangeRefreshed(RowSetHelper.java:172)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyRangeRefreshed(DCRowSetIteratorImpl.java:1570)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.buildProviderIterator(DCRowSetIteratorImpl.java:465)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.fetchDataSource(DCRowSetIteratorImpl.java:394)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCGenericRowSetIteratorImpl.notifyNavigationEvent(DCGenericRowSetIteratorImpl.java:331)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:258)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:651)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:737)
    09/12/17 22:13:17      at oracle.jbo.common.RowSetHelper.fireRangeRefreshed(RowSetHelper.java:172)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyRangeRefreshed(DCRowSetIteratorImpl.java:1570)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.buildProviderIterator(DCRowSetIteratorImpl.java:465)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.fetchDataSource(DCRowSetIteratorImpl.java:394)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.getRowAtAbsoluteIndex(DCRowSetIteratorImpl.java:1008)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:225)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.restoreCurrency(DCRowSetIteratorImpl.java:1821)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.rebuildIteratorUpto(DCRowSetIteratorImpl.java:190)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCDataControl.rebuildIteratorIfNeeded(DCDataControl.java:1696)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCGenericDataControl.executeIteratorBindingIfNeeded(DCGenericDataControl.java:581)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.executeQueryIfNeeded(DCIteratorBinding.java:1825)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding.executeQueryIfNeeded(JUMethodIteratorDef.java:289)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding$1.afterInvokeMethod(JUMethodIteratorDef.java:221)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCInvokeMethod.notifyAfterInvokeMethod(DCInvokeMethod.java:667)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:228)
    Please help! This has bother me for more than a week!
    Thanks in advance

    Hi Juan,
    What do you mean by removing the query? I have the same idea like you do. I tried to close or clear or remove or release the previous query result and it did not work. I did not know whether I did not close the result properly or the refresh did not go properly. Anyway, the exception still show up. I even tried to release the rowSetIterator behind the IteratorBinding, not working.
    ( this is another question I have. I don't know how to release the query result for a page. I don't want to have the previous page query result show up when I navigate back to the same page. any idea?)
    I think the problem is where the framework tries to apply the new query result on the top of the old result and that's why it called refreshControl. The whole problem happend during that refresh control.
    If I switch the tree to table, it works immediately. If I adjust the tree to one level, it works immediately. If I only put one attribute at the first level, it works immediately.
    Also, I am using JSF/ADF with Toplink and web service. I don't know how to verify whether the model lay works or not. but like I said, the first time work always. or if I intentionally make the query result to be no record, then trying it again always works.
    Please help!
    thanks
    Steven

  • Dynamic af:inputListOfValues causes NullPointerException

    Hi Gurus,
    We are using JDeveloper 11.1.3. Currently we are building a dynamic LOV (sort of) based on an existing listOfValuesModel in PageDef.xml.
    The existing af:inputListOfValues was built at design time with the listOfValuesModel. The goal is to share this listOfValuesModel #{bindings.LOV} with dynamic LOVs. The code snippet from jspx works flawlessly:
    +<af:inputListOfValues id="nameId"+
    +popupTitle="Search and Select: #{bindings.LOV.hints.label}"+
    +value="#{bindings.LOV.inputValue}"+
    +label="#{bindings.LOV.hints.label}"+
    +model="#{bindings.LOV.listOfValuesModel}"+
    +required="#{bindings.LOV.hints.mandatory}"+
    +columns="#{bindings.LOV.hints.displayWidth}"+
    +shortDesc="#{bindings.LOV.hints.tooltip}"+
    +launchPopupListener="#{viewScope.FaParamConfigBean.onLaunchLov}">+
    +<f:validator binding="#{bindings.LOV.validator}"/>+
    +</af:inputListOfValues>+
    We have no problem to manually duplicate more +<af:inputListOfValues id="nameId1" model="#{bindings.LOV.listOfValuesModel}" .../>+ (under +nameId2+, +nameId3+, ...) based on the same +model="#{bindings.LOV.listOfValuesModel}"+. All these LOVs share the same binding variable.
    Then in our java code, we dynamically generate RichInputListOfValues for our form and set the model to #{bindings.LOV}.
    +private ListOfValuesModel lovModel = null;+
    +if ( this.lovModel == null) {+
    +//lovModel = (ListOfValuesModel) JSFUtils.resolveExpression(this.LOV_MODEL); // returns same result+
    +FacesCtrlLOVBinding lovBinding = (FacesCtrlLOVBinding) JSFUtils.resolveExpression("#{bindings.LOV}");+
    +lovModel = lovBinding.getListOfValuesModel();+
    +}+
    +RichInputListOfValues inputLOV = new RichInputListOfValues();+
    +inputLOV.setImmediate(false);+
    +inputLOV.setModel(lovModel);+
    +inputLOV.setValue(lovValue);+
    +inputLOV.setLabel(displayLabel);+
    +inputLOV.setId(randomLovUid);+
    +FacesContext fctx = FacesContext.getCurrentInstance();+
    +ELContext elctx = fctx.getELContext();+
    +Application application = fctx.getApplication();+
    +ExpressionFactory exprFactory = application.getExpressionFactory();+
    +MethodExpression methodExpr = exprFactory.createMethodExpression(elctx, "#{viewScope.FaParamConfigBean.onLaunchLov}",null,new Class[] {LaunchPopupEvent.class});+
    +inputLOV.setLaunchPopupListener(methodExpr);+
    +this.form.getChildren().add(inputLOV);+
    From here I exam the ListOfValuesModel instance.
    +public void onLaunchLov(LaunchPopupEvent launchPopupEvent) {+
    +FacesCtrlLOVBinding lovBinding = (FacesCtrlLOVBinding) JSFUtils.resolveExpression("#{bindings.LOV}");+
    +ListOfValuesModel lovModel2 = lovBinding.getListOfValuesModel();+
    +System.out.println("lovModel2=["+lovModel2);+
    +};+
    I notice every time I click pre-defined LOV components, they get a different address (i.e., oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ListOfValuesModelImpl@48ab7b) but the popup window always works fine. If I click dynamic LOVs, the popup will throw NPE. Compare the properties of static LOVs against dynamic LOVs, I also notice the following
    -_searchBinding is null for dynamic LOVs while static LOV's has PageDef._lovSearch_LOV of class *FaceCtrlSearchBinding* ;
    -_tableModel is null for both types of LOVs.
    So I conclude since I miss FaceCtrlSearchBinding in dynamic LOVs to cause this NPE issue. What we don't understand is, sharing the same #{bindings.LOV} works fine for static LOVs but not for dynamic LOvs. Can you help me to fix this?
    More interestingly, I would always get NPE if I set listOfValues's StaticList="true" in the binding file.
    +<listOfValues StaticList="false" IterBinding="ItasCompaniesVO1Iterator"+
    +Uses="LOV_Name" id="LOV"/>+
    Thanks a lot!
    Sam
    Edited by: user719281 on Nov 4, 2010 11:31 PM
    Edited by: user719281 on Nov 5, 2010 10:15 AM

    @sudipto : I have verified the scenerio by creating few components in a panelFormLayout and set the property(Visible-false). Then i make the comopents visible programmatically,but it does not rearrange itself rather it gets visible on the screen on the location it was created.
    @Timo : I need to arrange the LOV components that need to be added horizontally in a panelFormLayout. Therefore I have created a 4columns/1Row panel form Layout . There are two such panelFormLayouts created as i have six components that is to be added in a horizontal manner . The order in which the components are to be added cannot be determined at design time as it depends purely on the end user which components he wants to make visible on the screen , also in the order he wish to add. Hence adding the components in the panelFormLayout and using the switcher does not seem to be a feasible solution and creating the components programatically looks to be the only way as of now. Please suggest if i am missing something.
    Edited by: 907302 on Feb 7, 2012 2:11 AM

  • Af:form cause NullPointerException

    I am using JDeveloper 11g and ADF. I use dynamic region with page fragments to view different pages.
    I am trying to make a submit form, but jdeveloper throws NullPointerException as soon I add af:form to my jsff.
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:234)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2572)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1066)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1501)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:771)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
         at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)Here is my code from the jsff page
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
                  <af:form id="f1">
                    <af:inputFile label="File" id="inputFile" autoSubmit="true"
                                  columns="30" required="true"
                                  valueChangeListener="#{Arkiv.inputFileValue}"
                                  binding="#{Arkiv.inputFile}"/>
                      <af:commandToolbarButton text="Save file" id="ctb2" actionListener="#{Arkiv.onUploading}"/>
                      <af:commandToolbarButton text="Cancel" id="ctb3" immediate="true"/>
                  </af:form>
    </jsp:root>If i remove the form the page loads, but then i cant use the inputFile component.
    Any ideas?
    Regards in advance.
    -Thomas

    If you are using regions, then you have af:form component in the mainpage.
    You can not have more then one af:form in a page as far as i know, or at least you can not have nested.
    Why do you need the af:form at all? It should work without it just fine.
    Edited by: Valhery on 2010-4-15 5:36
    Edited by: Valhery on 2010-4-15 5:36

  • ADF Faces refresh conditions cause NullPointerException

    We are developping an ADF faces web application. For the jspx pages we use EJB3 data controls to display data from the database and other legacy systems.
    Most values in our application are read-only and some take some time to be provided by the database. To increase performance of our web application we decided to change the refresh condition from Refresh="ifNeeded" to Refresh="renderModelIfNeeded". The parameters of the bindings should not change so this seemed to be o.k. for our needs. To avoid the call during postbacks we added RefreshCondition="${!adfFacesContext.postback}".
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.41.57" id="app_pagePageDef"
    Package="web.pageDefs"
    EnableTokenValidation="false">
    <methodIterator id="findSomething"
    Binds="findSomething.result"
    DataControl="GatewayLocal" RangeSize="-1"
    BeanClass="entities.MyObject"
    RefreshCondition="${!adfFacesContext.postback}"
    Refresh="renderModelIfNeeded"/>
    Performance is now really good and all data is displayed.
    On the other hand we now experience a strange behaviour and from time to time we get the following error message:
    07/10/30 14:02:37 java.lang.NullPointerException
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.findListIndex(JUCtrlListBinding.java:1096)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.setValueAt(JUCtrlListBinding.java:1726)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.updateValuesFromRow(JUCtrlListBinding.java:1339)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUIteratorBinding.navigated(JUIteratorBinding.java:282)
    07/10/30 14:02:37 at oracle.jbo.common.RowSetHelper.fireNavigationEvent(RowSetHelper.java:261)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyNavigationEvent(DCRowSetIteratorImpl.java:1611)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCGenericRowSetIteratorImpl.notifyNavigationEvent(DCGenericRowSetIteratorImpl.java:313)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:258)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:649)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:735)
    07/10/30 14:02:37 at oracle.jbo.common.RowSetHelper.fireRangeRefreshed(RowSetHelper.java:172)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyRangeRefreshed(DCRowSetIteratorImpl.java:1570)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.buildProviderIterator(DCRowSetIteratorImpl.java:465)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.fetchDataSource(DCRowSetIteratorImpl.java:394)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.getRowAtAbsoluteIndex(DCRowSetIteratorImpl.java:1008)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:225)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:1919)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:1866)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.prepareCurrentRow(DCIteratorBinding.java:548)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:683)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:3499)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.refreshExecutables(DCBindingContainer.java:2637)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2568)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareRender(PageLifecycleImpl.java:534)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareRender(FacesPageLifecycle.java:99)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.Lifecycle$1.execute(Lifecycle.java:297)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:29)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$1.before(ADFPhaseListener.java:426)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:77)
    07/10/30 14:02:37 at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:192)
    07/10/30 14:02:37 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    07/10/30 14:02:37 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    07/10/30 14:02:37 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    07/10/30 14:02:37 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    07/10/30 14:02:37 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    07/10/30 14:02:37 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    07/10/30 14:02:37 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:436)
    07/10/30 14:02:37 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    07/10/30 14:02:37 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    07/10/30 14:02:37 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    07/10/30 14:02:37 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    07/10/30 14:02:37 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
    07/10/30 14:02:37 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
    07/10/30 14:02:37 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    07/10/30 14:02:37 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/10/30 14:02:37 at java.lang.Thread.run(Thread.java:595)
    Has anyone seen this error before or can anyone explain this error? This problem is mission criticle to us so any help is appreciated. Without the boost of performance and unnecessary callbacks the application is just unusable.
    Thanks in advance,
    Robert

    Hi Frank,
    it seems that this issue is dependent to the renderModelIfNeeded phase. I still have no explanation for this behaviour. For now I've changed our implementation to use the prepareModel phase but I'm still not happy with the ADF phase implementation and documentation. Some methods that we use in the backend are called many times.
    I'll keep on trying to find a solution...
    Thanks
    Robert

  • Refresh of table causes NullpointerException

    We have the following situation (JDev 11.1.1.3):
    A table with lots of rows, and multiselect. A link opening a dialog and in the dialogListener code to check something and maybe update the selected rows. When the dialog closes we want to refresh the table, to show the updated values.
    When we scroll down in the table so that the iterator has had to requery for a few times (range is 25 on the iterator), we get the following error:
    <UIXInclude><tearDownVisitingContext> Vernietiging van context include-component is mislukt vanwege een niet-afgehandelde uitzondering.
    java.util.NoSuchElementException
         at java.util.ArrayDeque.removeFirst(ArrayDeque.java:251)
         at java.util.ArrayDeque.pop(ArrayDeque.java:480)
         at oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl.popContextChange(ApplicationContextManagerImpl.java:66)
         at oracle.adf.view.rich.component.fragment.UIXInclude.tearDownVisitingContext(UIXInclude.java:206)
         at oracle.adf.view.rich.component.fragment.UIXPageTemplate.tearDownVisitingContext(UIXPageTemplate.java:248)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.encodeEnd(ContextSwitchingComponent.java:157)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PageTemplateRenderer.encodeAll(PageTemplateRenderer.java:69)and
    <ApplicationPoolMessageHandler><doPoolMessage> [6541] **** PoolMessage REQ DETACH LWS
    <RegistrationConfigurator><handleError> Server Exception during PPR, #1
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.model.binding.RowDataManager.getRowIndex(RowDataManager.java:191)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.getRowIndex(FacesCtrlHierBinding.java:597)
         at org.apache.myfaces.trinidad.component.UIXIterator._fixupFirst(UIXIterator.java:416)
         at org.apache.myfaces.trinidad.component.UIXIterator.__encodeBegin(UIXIterator.java:394)
         at org.apache.myfaces.trinidad.component.UIXTable.__encodeBegin(UIXTable.java:168)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:519)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1499)I tried the following code but nothing seems to work. We don't really need to keep the selection:
    FacesUtils.getRRAppModuleImpl().getAanvragenRO().executeQuery();
    aanvragenRoTable.getSelectedRowKeys().removeAll();
    FacesUtils.findIterator("AanvragenROIterator").setCurrentRowIndexInRange(0);
    AdfFacesContext.getCurrentInstance().addPartialTarget(aanvragenRoTable);aanvragenRoTable is a RichTable bound to the af:table with all the rows.
    Can anyone help us?

    Never mind. This solved it!
    http://jobinesh.blogspot.com/2010/02/common-mistake-while-iterating-through.html

  • Why my refrencing value of  selectOneMenu to HashMap bean cause error?

    i use HashMap bean in my face-config xml to generate HashMap Bean and refrence it to my selectOneMenu , field "value" of selectedItems .
    evry thing is true and my combo box fill with my hashmap.
    but when i submit a form this error generate :
    java.lang.IllegalArgumentException
         javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:124)
         javax.faces.component.UISelectOne.matchValue(UISelectOne.java:141)
         javax.faces.component.UISelectOne.validateValue(UISelectOne.java:114)
         javax.faces.component.UIInput.validate(UIInput.java:634)
         javax.faces.component.UIInput.executeValidate(UIInput.java:838)
         javax.faces.component.UIInput.processValidators(UIInput.java:412)
         javax.faces.component.UIForm.processValidators(UIForm.java:170)
         javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
         javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
         com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    my jsf file is have thise source :
    <f:view>
         <f:loadBundle basename="lables" var="bundle"/>
         <f:loadBundle basename="global" var="global"/>
         <h:form id="forms2">      
                        <h:selectOneMenu id="lang" styleClass="textbox2" >
                                            <f:selectItems value="#{langs}" />
                        </h:selectOneMenu>
                        <h:commandButton value="ok" type="submit" />
                   </h:form>
    </f:view>
    and my face-config has this config :
         <managed-bean>
              <display-name>langs</display-name>
              <managed-bean-name>langs</managed-bean-name>
              <managed-bean-class>java.util.HashMap</managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
              <map-entries>
                   <map-entry>
                        <key>fa</key>
                        <value>persian</value>
                   </map-entry>
              </map-entries>
              <map-entries>
                   <map-entry>
                        <key>en</key>
                        <value>english</value>
                   </map-entry>
              </map-entries>
         </managed-bean>
    can anybody help me ? i cann't solve this problem yet .
    thanx a lot

    Did you get this resolved? I've been working on this same problem. I haven't been able to get the HashMap to work, but using the selectItems (as mentioned above) DOES work!
    I used this site as a reference:
    http://jsf.iatp.org.ua/components/jsf_htmlselectmanylistbox.html
    I'll post some of the code in case the link goes bad (future) and someone would still like to see it...
    Static items .jsp page:
    <f:view>
         <h:selectManyListbox value="#{staticPageBean.selectedItems}" size="5">
              <f:selectItem itemValue="firstName" itemLabel="First Name" />
              <f:selectItem itemValue="lastName" itemLabel="Last Name" />
              <f:selectItem itemValue="age" itemLabel="Age" />
              <f:selectItem itemValue="sex" itemLabel="Sex" />
         </h:selectManyListbox>
         <h:commandButton value="Show Selected" actionListener="#{staticPageBean.showSelected}" />
         <h:outputText binding="#{staticPageBean.selItemsOutput}" />
    </f:view>
    The bean for that page
    public class StaticPageBean {
         //array of values of selected items
         private String[] selectedItems;
         private HtmlOutputText selItemsOutput;
         public void setSelectedItems(String[] items) {
              this.selectedItems = items;
         public String[] getSelectedItems() {
              return selectedItems;
         public void setSelItemsOutput(HtmlOutputText component) {
              selItemsOutput = component;
         public HtmlOutputText getSelItemsOutput() {
              return selItemsOutput;
         public void showSelected(ActionEvent actionEvent) {
              String str = "";
              int length = selectedItems.length;
              for(int i=0; i<length; i++) {
                   str += selectedItems[ i ]+"   ";
              selItemsOutput.setValue(str);
    To dynamically populate the select Items
    <h:selectManyListbox value="#{dynamicPageBean.selectedItems}" size="5">
         <f:selectItems value="#{dynamicPageBean.items}" />
    </h:selectManyListbox>
    Code behind that
    public class DynamicPageBean {
         //List of SelectItem instances
         private List items;
         public DynamicPageBean() {
              items = new ArrayList();
              SelectItem item = new SelectItem("firstName", "First Name");
              items.add(item);
              item = new SelectItem("lastName", "Last Name");
              items.add(item);
              item = new SelectItem("sex", "Sex");
              items.add(item);
              item = new SelectItem("ssn", "SSN");
              items.add(item);
         public void setItems(List items) {
              this.items = items;
         public List getItems() {
              return items;
    }

  • Alt key causes NullPointerException

    I am getting a NullPointerException in a Swing based GUI application when I use the 'Alt' key with JButtons containings mnemonics.
    There was an earlier topic of the same issue traced to either setLookAndFeel() or using a Frame instead of JFrame. I am using a JFrame and not using setLookAndFeel() is not under consideration.
    Anybody have any ideas?

    Mine too! I'm not using setLookAndFeel(0 and am using JFrame! Here's my codeimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame {
      public Test() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        JButton jb = new JButton("Hello, McFly!");
        jb.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            if ((ae.getModifiers()&ae.ALT_MASK)!=0) throw new NullPointerException();
        jb.setMnemonic('b');
        content.add(jb, BorderLayout.SOUTH);
        setSize(300, 275);
        setVisible(true);
      public static void main(String args[]) { new Test(); }
    }Any ideas?

  • NullPointerException during the deployment of ejb

    From JDeveloper, I rebuild the twoEjbHotelSample without any problem, but the deploying of HotelEjb bean caused the following exception. Any idea? Btw, I can depoly the ejb sample from javavm/demo/ejb without any problem. Thanks.
    java.lang.NullPointerException
    java.lang.Object java.util.Hashtable.put(java.lang.Object, java.lang.Object)
    void oracle.aurora.server.tools.sess_iiop.WindowsFSContext.<init>(java.util.Hashtable)
    void oracle.aurora.server.tools.sess_iiop.LocalWorkingDirectory.<init>(java.util.Properties)
    void oracle.aurora.server.tools.sess_iiop.ToolImpl.initializeLocal()
    java.lang.String[] oracle.aurora.server.tools.sess_iiop.ToolImpl.parseStdArgs(java.lang.String[])
    void oracle.aurora.server.tools.sess_iiop.ToolImpl.invoke(java.lang.String[], java.io.InputStream, java.io.PrintStream, java.io.PrintStream)
    void oracle.jdeveloper.wizard.deployment.EJBDeployMonitor.run()
    void oracle.jdeveloper.wizard.common.ProgressDialog.run()
    void java.lang.Thread.run()
    null

    Hi,
    the WebCenter forum is at: WebCenter Portal
    Frank

  • NullPointerException with CachedRowSet

    Hi,
    I am using the com.inet.tds.CachedRowSet from Inet in webLogic 7.0/8.1 versions
    and am getting the following error stack trace attached below.
    I am also enclosing the piece of code that is in the StatelessSession Bean causing
    the problem.
    It gets the result set and i get the error occurs when i call the populate the
    resultSet
    Venu
    /****** CODE that is causing the problem STARTS ******/
    ctx = new InitialContext(ht);
    DataSource ds = (DataSource) ctx.lookup("jdbc/TASDataSource");
    conn = ds.getConnection();
    // You can now use the conn object to create
    // a Statement object to execute
    // SQL statements and process result sets:
    stmt = conn.createStatement();
    stmt.execute("select * from sysObjects");
    rs = stmt.getResultSet();
    CachedRowSet crs = new CachedRowSet();
    crs.populate(rs); // THE Problem is here and a null pointer exception is
    thrown while calling the populate method
    System.out.println("CachedRowSet crs = " + crs);
    /****** CODE that is causing the problem ENDS ******/
    java.lang.NullPointerException      at com.inet.tds.CachedRowSet.populate(Unknown
    Source)      at testwls81prj.TestSLSBean.test(TestSLSBean.java:61)      at testwls81prj.TestSLSBean.untitledMethod1(TestSLSBean.java:35)
         at testwls81prj.TestSLSBean_kizoxs_EOImpl.untitledMethod1(TestSLSBean_kizoxs_EOImpl.java:45)
         at testwls81prj.TestSLSBean_kizoxs_EOImpl_WLSkel.invoke(Unknown Source)      at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:407)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:356)      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:123)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:351)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

    venu wrote:
    Hi,
    I am using the com.inet.tds.CachedRowSet from Inet in webLogic 7.0/8.1 versions
    and am getting the following error stack trace attached below.
    I am also enclosing the piece of code that is in the StatelessSession Bean causing
    the problem.
    It gets the result set and i get the error occurs when i call the populate the
    resultSet
    Venu
    /****** CODE that is causing the problem STARTS ******/
    ctx = new InitialContext(ht);
    DataSource ds = (DataSource) ctx.lookup("jdbc/TASDataSource");
    conn = ds.getConnection();
    // You can now use the conn object to create
    // a Statement object to execute
    // SQL statements and process result sets:
    stmt = conn.createStatement();
    stmt.execute("select * from sysObjects");
    rs = stmt.getResultSet();
    CachedRowSet crs = new CachedRowSet();
    crs.populate(rs); // THE Problem is here and a null pointer exception is
    thrown while calling the populate method
    System.out.println("CachedRowSet crs = " + crs);
    /****** CODE that is causing the problem ENDS ******/
    java.lang.NullPointerException at com.inet.tds.CachedRowSet.populate(Unknown
    Source) at testwls81prj.TestSLSBean.test(TestSLSBean.java:61) atIf you can send me the com.inet.tds.CachedRowSet class file, I can tell you more.
    At the very least, the CachedRowSet class is coded in a brittle way, and it is
    likely to be a bug.
    There is a minute chance you got a null result set from getResultSet(), because that
    call is allowed to return a null. Try this:
    stmt = conn.createStatement();
    rs = stmt.executeQuery("select * from sysObjects"); // cannot return null
    CachedRowSet crs = new CachedRowSet();
    crs.populate(rs);
    testwls81prj.TestSLSBean.untitledMethod1(TestSLSBean.java:35)
    at testwls81prj.TestSLSBean_kizoxs_EOImpl.untitledMethod1(TestSLSBean_kizoxs_EOImpl.java:45)
    at testwls81prj.TestSLSBean_kizoxs_EOImpl_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:407)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:356) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:123)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:351)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

  • NullPointerException - Create New Attachment to Message Payload

    in PI 7.1, I am trying to add a new attachment to the Message using the following code.
    A NullPointerException is recieved when statement <msg.addAttachment(text);> is executed.
    Message msg = (Message) inputModuleData.getPrincipalData();
    TextPayload text = msg.createTextPayload();
    text.setContentType("text/plain;filename=\"Instrucoes.txt\"");
    text.setContent(message.getBytes("UTF-8"));
    text.setText("Set Text");
    text.setDescription("Set Description");
    text.setName("Set Name");
    msg.addAttachment(text);
    Has anybody experienced this problem? Or have any clues to what is causing the problem.
    Thanks,
    Tijo

    Yes. Even with the following statement to build up the new payload. It is undefined causing NullpointerException.
    TextPayload text = msg.createTextPayload();
    text.setContentType("text/plain;filename=\"Instrucoes.txt\"");
    text.setContent(message.getBytes("UTF-8"));
    text.setText("Set Text");
    text.setDescription("Set Description");
    text.setName("Set Name");

  • Remove on stateless session bean

    Will failing to call remove on a stateless session bean cause it to be
    passivated rather then removed when it is no longer used? I have read
    for a statefull bean failing to remove a bean can cause a peformance
    hit since passivate takes a bigger system resource hit over remove.
    Jeff

    No, remove() on stateless session bean doesn't do anything.
    Jeffrey Ellin <[email protected]> wrote:
    Will failing to call remove on a stateless session bean cause it to be
    passivated rather then removed when it is no longer used? I have read
    for a statefull bean failing to remove a bean can cause a peformance
    hit since passivate takes a bigger system resource hit over remove.
    Jeff--
    Dimitri

  • ImapFolder.getAttributes() throws NullPointerException

    When we call ImapFolder.getAttributes() we sometimes get NullPointerException. We we dig in the source code of javamail and we saw that it will be possibly a bug ;
    Here is code block of getAttributes method:
        public String[] getAttributes() throws MessagingException {
         if (attributes == null)
             exists();          // do a LIST to set the attributes     
         return (String[])(attributes.clone());
        }Here when attributes attribute is null exists() method is called to fill this attribute but at exist() method;
         } else {
             exists = opened;
             attributes = null;
    .this else block says that even if we call exists() method attributes attribute can be null!
    after calling exists() method our attributes attribute is null and when it is called "attributes.clone()" it causes NullPointerException.

    The exists() method will fail to fill in attributes only if the LIST command
    returns no information about the folder, which should only happen if the
    folder doesn't exist. I'd love to see a protocol trace from your server
    showing the response to the LIST command. What server are you using?
    How are you sure that the folder exists? Is it a folder that always exists?
    Is the folder never removed and recreated? Is getAttributes being called
    on an open folder?
    Again, I agree that getAttributes should detect this case, but when it detects this case
    it would would throw a FolderNotFoundException rather than a NullPointerException.
    On some servers it may be possible for the folder to be open (and thus "exist"),
    but have been removed, so that LIST shows no evidence of the folder. In this case
    getAttributes should return an empty String array.
    But again, I'd still like to know what conditions are causing this problem for you,
    to make sure I fix all the possible cases correctly.

  • Hide name space of generated xml from xml bean

    Hi,
    how can i hide the namespace of the generated xml from xml bean, cause im having problems with jaxb parses.

    The targetNamespace is for webservice and not for the user defined classes.
    Sorry for the confusion
    Ajay
    "Ajay" <[email protected]> wrote in message
    news:[email protected]..
    There is a targetNamespace attribute in the autotyp ant task. But there
    was a bug in 8.1. Contact the support for a patch.
    The following mail explains that
    This looks like a bug. There is an undocument, not officially
    supported workaround: add the following java doc
    to yours source code -
    * @wlws:webservice targetNamespace="http://foo.bar"
    public class MyService {
    Details here:
    http://www.manojc.com/tutorial/sample3/source2wsdd.html
    Regards,
    -manoj
    http://manojc.com
    "Mark Fine" <[email protected]> wrote in message
    news:[email protected]..
    The attribute targetNamespace (of the autotype task) doesn't seem to putany
    information into the types file and later my deployment descriptor (viathe
    source2wsdd task) contains an invalid targetNamespace attribute with a
    http://tempuri.org:
    eg.
    <web-services>
    <web-service name="IndexService"
    targetNamespace="http://tempuri.org/"
    uri="/IndexWebService">
    I don't think this causes any problems but there should be a way tospecify
    the namespace.
    Has anyone else seen this is WLS8.1?
    "Siva" <[email protected]> wrote in message
    news:[email protected]..
    By default the autotype or the servicegen ant task seem to be creating anamespace
    from the java package name (like java:com.ventaso.external.common) for
    xml
    mapping
    of user defined java classes. Is there a way to change this to name
    space
    I want
    ? Specifying the targetnamespace doesn't seem to help.
    Thanks,
    Siva

Maybe you are looking for

  • Video playback in separate window

    I used to have Video playback in iTunes to play in a seperate window. the 10.4 update seems to have reset this to play in main iTunes window. I can't see the option/proference for altering it back. Has this feature been removed from iTunes? Des

  • IChat issue

    Hi Am having issue with iChat on my iMac, in which iChat wndow pop-ups everttime I log into the iMac. I have checked the User & Groups --> LoginItems and the iChat application is unchecked. Am not having similar issue with Macbook Pro. Can anyone hel

  • Antivirus/Internet Security recommendations

    Any suggestions/recommendations on antivirus / internet security for my L505D-S5983. Norton comes with the system for 30 days  .. however Best Buy suggested and gave me (6) months of Trend Micro's antivirus and AntiSpyware at no charge  ... Any thoug

  • PS 32 bit or 64 bit - ?

    I'm on the latest edition of 27" iMac (purcahsed a year ago January), running OSX 10.8.5. I installed PS CS6 a year ago, I don't remember if it was 32 or 64 or both... I don't even know how to check it... I installed lately some PS filters that crash

  • IPod Classic will not download/sync Video Podcasts

    I have an 80G iPod Classic. It has worked great for the last two years. All of a sudden, it will not download or sync video podcasts that I have downloaded directly from iTunes. I have done everything I can think of to fix this problem to include res