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

Similar Messages

  • 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

  • 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 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

  • Refresh browser causes to increment results

    Hi,
    I have a servlet that is using a database to query results from a survey. The survey has 3 questions and each one of them has 4 possible answers. The query runs fine and displays in the web browser, but once I do a refresh some of the data increments its value at a constant rate.
    Here is the code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.StringTokenizer;
    public class Survey extends HttpServlet {
    private Connection con = null;
    private Statement stmt = null;
    private String url = "jdbc:odbc:survey";
    private String table = "results";
    private int numQues = 3;
    private int [] numAns = {4,4,4};
    private int num = 0;
    public void init() throws ServletException {
    try {
    // loading the jdbc-odbc bridge
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    // making a connection
    con = DriverManager.getConnection(url,"anonymous","guest");
    } catch (Exception e) {
    e.printStackTrace();
    con = null;
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    String [] results = new String[numQues];
    for (int i=0;i<numQues;i++) {
    results = req.getParameter("q"+i);
    // test if the user has answered all the question
    String resultsDb = "";
    for (int i=0;i<numQues;i++) {
    if (i+1!=numQues) {
    resultsDb += "'" + results + "',";
    else {
    resultsDb += "'" + results + "'";
    boolean success = insertIntoDb(resultsDb);
    // print a thank you message
    res.setContentType("text/html");
    PrintWriter output = res.getWriter();
    StringBuffer buffer = new StringBuffer();
    buffer.append("<HTML>");
    buffer.append("<HEAD>");
    buffer.append("</HEAD>");
    buffer.append("<BODY BGCOLOR=\"#FFFFFF\">");
    buffer.append("<P>");
    if (success) {
    buffer.append("Thank you for participating!");
    else {
    buffer.append("An error has occurred. Please press the back button of your browser");
    buffer.append(" and try again.");
    buffer.append("</P>");
    buffer.append("</BODY>");
    buffer.append("</HTML>");
    output.println(buffer.toString());
    output.close();
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException {
    // get info from file
    res.setContentType("text/html");
    PrintWriter output = res.getWriter();
    StringBuffer buffer = new StringBuffer();
    buffer.append("<HTML>");
    buffer.append("<HEAD>");
    buffer.append("</HEAD>");
    buffer.append("<BODY BGCOLOR=\"#FFFFFF\">");
    buffer.append("<P>");
    try {
    stmt = con.createStatement();
    // find the number of participation
    for (int i=0;i<1;i++) {
    String query = "SELECT q" + i + " FROM " + table;
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next()) {
    rs.getInt("q"+i);
    num++;
    // loop thru each question
    for (int i=0;i<numQues;i++) {
    int [] results = new int[num];
    String query = "SELECT q" + i + " FROM " + table;
    ResultSet rs = stmt.executeQuery(query);
    int j=0;
    while (rs.next()) {
    results[j]=rs.getInt("q"+i);
    j++;
    //call method
    int[] total = percent(results,4);
    buffer.append("Question" + i + ":<BR>");
    for (int k=0;k<4;k++) {
    buffer.append(" > Answer " + k + ":" + total[k]);
    buffer.append("<BR>");
    buffer.append("\n");
    } catch (SQLException ex) {
    ex.printStackTrace();
    // display the results
    buffer.append("</P>");
    buffer.append("</BODY>");
    buffer.append("</HTML>");
    output.println(buffer.toString());
    output.close();
    public void destroy() {
    try {
    con.close();
    } catch (Exception e) {
    System.err.println("Problem closing the database");
    public boolean insertIntoDb(String results) {
    String query = "INSERT INTO " + table + " VALUES (" + results + ");";
    try {
    stmt = con.createStatement();
    stmt.execute(query);
    stmt.close();
    } catch (Exception e) {
    System.err.println("ERROR: Problems with adding new entry");
    e.printStackTrace();
    return false;
    return true;
    public int [] percent(int [] array, int numOptions) {
    System.out.println("==============================================");
    int [] total = new int[numOptions];
    // initialize array
    for (int i=0;i<total.length;i++) {
    total=0;
    for (int j=0;j<numOptions;j++) {
    for (int i=0;i<array.length;i++) {
    System.out.println("j="+j+"\t"+"i="+i+"\ttotal[j]="+total[j]);
    if (array==j) {
    total[j]++;
    System.out.println("==============================================");
    return total;
    Thanks!

    Hi,
    I do encounter similar problem. The root cause was that URL at the location bar of the browser still pointing to the same servlet (which handle the HTTP POST/GET request to update the database) after the result was returned by the servicing servlet.
    For example, in your case the "Survey" servlet URL.
    The scenario is like this.
    1.Browser (HTML form) ---HTTP post ---> Survey Servlet (service & update database)
    2.Survey Servlet -- (Result in HTML via HttpServletResponse)---> Browser (display the result)
    Note that after step 2, the browser's location bar value still pointing to the Survey Servlet URL (used in the HTML form's action value). So if the refresh is performed here, the same action will be repeated, as the result, 2 identical records have been created in your database table instead of one.
    A way to work around this is to split the servlet in to two, one performing the update of database and one responsible to display the result.
    Thing become as follow:
    1.Browser (HTML form) ---HTTP post ---> Survey Servlet (service & update database)
    2.Survey Servlet -- (Redirect the Http request)---> Display Result ServletBrowser
    3.Display Result Servlet --(Acknowledgement in HTML via HttpServletResponse) ---> Browser (display the result)
    Note that now the browser's location bar will point to the Display Result Servlet. Refresh action will be posted to Display Result Servlet which will not create duplication of database update activity.
    to redirect the request to another servlet, use the res.sendRedirect(url); where res is the HttpServletResponse object and url is the effective url of calling the target servlet.
    Hope that this help.

  • With the latest release of Firefox some webpages load as text only, refresh then causes some to load properly

    some still fail to load properly after a refresh.
    This has been occurring over about the last two days or so.
    The one listed below still fails to load properly

    Which security software (firewall, anti-virus) do you have?
    Try to reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    See also:
    *http://kb.mozillazine.org/Error_loading_websites

  • Refresh applet sqlj NullPointerException URGENT!

    I have the following sqlj code in an applet to retrive data from an oracle database. After this the code goes onto draw the data in the applet using AWT (that code isn't shown here). My trouble is that when I get to the following line Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection(); I get a Null Pointer exception only after refreshing the page using F5.
    So to overcap I get a NullPointerException only when I refresh the applet. It runs perfectly the first time. The applet need to be refreshed because the data in the table get updated and the applet need to be refreshed to show the data changes.
    public void getFlowSpaceData() throws SQLException {
    // MyIter iter;
    String strUserName = getParameter("paramUserName");
    String strFlowName = new String();
    Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection();
    strQuery = "select FLOWNAME FROM FLOWMANAGER.TMP_FLOWNAMES WHERE USERNAME ='" + strUserName +"'";
    PreparedStatement pstmt0 = con.prepareStatement(strQuery);
    ResultSet rs0 = pstmt0.executeQuery();
    while (rs0.next()) {
    strFlowName = rs0.getString(1);
    rs0.close();
    pstmt0.close();
    strQuery = "select FLOWNAME, USERNAME, PANELROW, PANELCOL, RELATEROW, RELATECOL, OBJTYPE, BASECODE, INDUSTRYID, PANELNUM, BUSINESSPROCESSID FROM flows WHERE flowname ='" + strFlowName + "' AND username ='" + strUserName +"' ORDER BY PANELNUM";
    PreparedStatement pstmt1 = con.prepareStatement(strQuery);
    ResultSet rs1 = pstmt1.executeQuery();
    int r = 0;
    int c = 0;
    while (rs1.next()) {
    intObjType[r][c]= rs1.getInt(7);
    strID[r][c] = rs1.getString(11);
    //strIDQuery = strIDQuery + 'or ID =' + strinID
    intRowRelation[r][c] = rs1.getInt(5);
    intColRelation[r][c] = rs1.getInt(6);
    c++;
    if(c > 4) {
    r++;
    c = 0;
    rs1.close();
    pstmt1.close();
    PreparedStatement pstmt2 = con.prepareStatement(strQuery);
    ResultSet rs2 = pstmt2.executeQuery();
    r = 0;
    c = 0;
    int i = 0;
    int intSTRLENGTH = 0;
    while(i < 24){
    strQuery = "select name, descr, role from BUSINESSPROCESS WHERE ID = '" + strID[r][c] + "'";
    pstmt2 = con.prepareStatement(strQuery);
    rs2 = pstmt2.executeQuery();
    rs2.next();
    intSTRLENGTH = rs2.getString(1).length();
    if (intSTRLENGTH > 17){
    strLabel1[r][c] = rs2.getString(1).substring(0,17);
    strLabel2[r][c] = rs2.getString(1).substring(18,intSTRLENGTH);
    }else {
    strLabel1[r][c] = rs2.getString(1).substring(0,intSTRLENGTH);
    strLabel2[r][c] = " ";
    intSTRLENGTH = rs2.getString(2).length();
    if (intSTRLENGTH > 17){
    strDescr1[r][c] = rs2.getString(2).substring(0, 17);
    strDescr2[r][c] = rs2.getString(2).substring(18,intSTRLENGTH);
    }else{
    strDescr1[r][c] = rs2.getString(1).substring(0,intSTRLENGTH);
    strDescr2[r][c] = " ";
    c++;
    i++;
    if(c > 4) {
    r++;
    c = 0;
    rs2.close();
    pstmt2.close();
    con.close();
    con = null;
    Thanks for you Assistance! It's greatly appreciated!
    Chris Wallace

    After further research I notice that if I Clear classload cache after every load before I refresh the applet it works fine. I can't have the user brining up the the consule windows and pressing x to clear classloader. Just thought I would give this futher information to help limit what the problem could be.

  • Report Viewer refresh event causing window event problems

    I have a winform with a report viewer control and a couple of grids.  When a cell in one of the grids is edited the report gets refreshed (when focus is lost from the cell) this refresh appears to empty the event stack for the whole window.
    For example if I edit the cell then click the ok button the report refreshes and the button click event is lost.
    Also if I edit the cell and click on the report viewer then the grid itself stops firing events outside its control.
    Can anyone explain this behaviour so I can work around it?

    I am handling the celledited event on the grid (janus gridEX control) which fires when the focus is lost from the grid and the user has edited something.
    The event code calls viewer.RefreshReport() which successfully updates the report with the new data (via the common dataset both use as a data source).
    This is all running in a dialog box.
    The problem occurs when the user edits the grid and then immediately clicks the ok button.  The call to RefreshReport seems to stop the button click event firing.
    The second problem occurs when the user edits the cell then clicks on the report viewer to cause the celledited event to fire and the report to refresh.  Everything seems to work fine however if the user tries to edit a cell again the celledited event does not fire anymore unless you click on another row in the grid itself.  This behaviour only happens when clicking on the CR viewer when clicking any other control the behaviour is as expected.
    Whilst the CR viewer may not directly be the problem something is occuring when it is refreshed and I would like to understand what is happenening to cause the strange behaviour.

  • Bug: The message list doesn't refresh SOLVED caused by HWA (hardware assist)

    I am using the latest Thunderbird from the beta channel, v38. I was seeing this in the stable release channel as well, so I thought I'd try the beta channel to see if it was fixed there, but it was not.
    The issue is that the message list doesn't refresh all the time when switching folders. If I an in my Inbox folder, for example, and then select my Junk folder, the message list will not update/refresh, until I drag my mouse over the message list. Then, it will refresh line-by-line as the mouse enters each line.
    I am on Windows 7 64-bit, with an i5 processor and 8 GB RAM. Nothing else on my system is running slow. This will happen when Thunderbird is the only app running. I also have a skin applied to my UI. I've tried a few different skins, and this behavior happens with all of them.
    A second issue I noticed this morning was that when I received a new email, the entire app seemed to freeze momentarily while the notification for this new email was spawned. As soon as the notification became visible, the app because responsive again. Perhaps a threading issue here.

    Hi Matt,
    Thanks for the quick reply.
    "The last issue is probably your anti virus diving in an scanning the new mail as it is added to a very large mail file. Right click the folder and select properties. What is the size on disk?"
    Folder properties on my Inbox folder says:
    Number of messages: 1038
    Size on disk: 90.9 MB
    "With regard to your first problem, I am seeing that on the daily built as well, on an intermitent basis, but not on change of folder, only on dragging the mouse over the existing list."
    Yes, it is intermittent for me as well. I just recalled that the last time I saw it was when I changed folders. It may not be limited to that situation.
    "What Video card do your have?"
    Invidia GeForce GT 740, w/4GB dedicated video memory.
    "Please go to the trouble shooting information on the help menu (alt+H) and copy and paste the graphics section to a message here."
    Graphics
    Adapter Description NVIDIA GeForce GT 740
    Vendor ID 0x10de
    Device ID 0x0fc8
    Adapter RAM 4095
    Adapter Drivers nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
    Driver Version 9.18.13.4475
    Driver Date 11-12-2014
    Direct2D Enabled true
    DirectWrite Enabled true (6.2.9200.16571)
    ClearType Parameters ClearType parameters not found
    WebGL Renderer false
    GPU Accelerated Windows 1/1 Direct3D 11
    AzureCanvasBackend direct2d 1.1
    AzureSkiaAccelerated 0
    AzureFallbackCanvasBackend cairo
    AzureContentBackend direct2d 1.1

  • 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

  • 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,

  • Clicking page refresh icon causing automatic logout.

    Hi,
    There is some strange issue related to a Live dashboard page. There is a multi parameter prompt and a couple of reports linked to the prompt on this dashboard page.
    When I change prompt parameter values, and click Go button the report is displayed. However, if I click the page refresh button or try to change parameter value after the page refresh, OBI EE is logging me out and comes back to the Login Page.
    OBI EE version is 10.1.3.4.1. Could you please give me any clues regarding how I can analyse the issue? Are there any log files I can refer to?
    Thanks and regards,
    Manoj.

    Hi,
    It looks like if I rename the page, then it's okay.
    I would still like to know whether or not there are any web catalog logs (not referring to SQL Query Logs) that I can go through to identify the issue. Also, I can not keep different page names in different environments.
    So, experts, please could you give me some hints?
    Thanks.
    Manoj.
    PS.: An update. I have referred to the Presentation Services log file. It has got the following contents.
    An error occurred during execution of "send". An unknown error occurred in the sockets library. [Socket:1104]
    Type: Warning
    Severity: 40
    Time: Thu Dec 01 18:36:29 2011
    File: project/webcomm/rpcserver.cpp Line: 591
    Properties: ThreadID-5876
    Location:
         saw.rpc.server.responder
         saw.rpc.server
         saw.rpc.server.handleConnection
         saw.rpc.server.dispatch
         saw.threadPool
         saw.threads
    Socket error on app responder
    Type: Error
    Severity: 40
    Time: Thu Dec 01 18:36:29 2011
    File: project/webcomm/socketrpcserver.cpp Line: 544
    Properties: ThreadID-5876
    Location:
         saw.rpc.server.handleConnection
         saw.rpc.server.dispatch
         saw.threadPool
         saw.threads
    Edited by: mandix on 01-Dec-2011 10:47

  • Refreshing DataControl causes OutOfMemory Stack Overflow

    The basic question is “How can I programtically refresh a DC so that it ‘re-reads’ in the values from an underlying managed bean in session that was returned by a web service proxy”?
    In trying to solve this first question we saw hints on the forums to get a handle to the binding and call executeQuery() to force a refresh. We tried this during the invokeApplication phase just after we called our WS Proxy service that returned a POJO (e.g. DataRequest) which we placed into session. We have a DataRequestWrapper object that exposes a getDataRequest() method. We expose the DataRequestWrapper as a DataControl so as to bind the object hierachy of the DataRequest to our UI Views. The DataRequestWrapper.getDataRequest() method returns the reference to the DataReuquest stored in session (i.e. Java RefID=1).
    So as we start our sequence we create an new DataRequest, put it into session and as users enter data, the data control pushes the values into the session bean RefID=1. Works as expected, then the user hits save and we have a method-action that calls the wrapper method who gets the session bean and calls the WS.save(). That service returns a decorated DataRequest object (i.e. RefID=2). We place that into session, but on rendering of the view the DC are still firing agains RefID=1.
    We set all the CacheResult = false on the bindings in the pages. We see the DC refreshing, but (as expected) its occuring prior to the InvokeApplication phase which is before we've called our service to get RefID=2.
    So in our wrapper, after updating the session reference with RefID=2, we access the binding and call executeQuery(). We see the getters start firing against the DataReuqest RefID=2 which we assume is the DC refreshing itself. The thread continues on as the view rendering presumably is occuring, but it never completes......stack dump in JRockit...a portion of the stack below.... There seems to possibly be a recursive loop problem here, not sure if its because of something we did (we can't find any where that we might be calling ourself...hiearchy has a strict parent-child relationships...no cross tree references). The refresh of the tree obviosuly works in other phases....so not sure where to go with this.
    Should the executeQuery() be expected to work and the overflow be a potential defect? Should we not be calling executeQuery()? Should we be calling the exectureQuery() somewhere else (we also tried in a beforePhase listener prior to renderResponse with the same stack dump)? Should we being using the BindingContainer.refresh() (which seems to have no affect)? Are we looking at this the wrong way?
    Oracle ADF 11.1.1.0.1 & WL 10.3.0 (we are working on migrating to the 11g GA version as we speak...but have't gotten to testing this scenario on the latest yet)
    Thread Stack Trace:
    at RJNI_jrockit_vm_Locks_monitorEnterUnmatched+17(rnilocks.c:65+17)@0x00598DD1
    -- Java stack --
    at jrockit/vm/Locks.monitorEnterUnmatched(Ljava/lang/Object;)V(Native Method)
    at oracle/jbo/server/ViewRowSetIteratorImpl.next(ViewRowSetIteratorImpl.java:1690)
    at oracle/jbo/server/ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1548)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]
    at oracle/jbo/server/ViewRowSetImpl.first(ViewRowSetImpl.java:3202)
    at oracle/jbo/server/ViewObjectImpl.first(ViewObjectImpl.java:8123)
    at oracle/adf/model/bean/DCBeanDataControl.executeIteratorBinding(DCBeanDataControl.java:791)
    at oracle/adf/model/binding/DCIteratorBinding.doExecuteQuery(DCIteratorBinding.java:2117)
    at oracle/jbo/uicli/binding/MyIteratorBinding.executeQuery(JUAccessorIteratorDef.java:695)
    at oracle/jbo/uicli/binding/MyIteratorBinding$MasterListener.navigated(JUAccessorIteratorDef.java:436)
    at oracle/jbo/common/RowSetHelper.fireNavigationEvent(RowSetHelper.java:268)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyNavigationToRow(ViewRowSetIteratorImpl.java:3624)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyNavigation(ViewRowSetIteratorImpl.java:3595)
    at oracle/jbo/server/ViewRowSetIteratorImpl.internalSetCurrentRow(ViewRowSetIteratorImpl.java:3378)
    at oracle/jbo/server/ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1551)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]
    at oracle/jbo/server/ViewRowSetImpl.first(ViewRowSetImpl.java:3202)
    at oracle/jbo/server/ViewObjectImpl.first(ViewObjectImpl.java:8123)
    at oracle/adf/model/binding/DCIteratorBinding.setupRSIstate(DCIteratorBinding.java:755)
    at oracle/adf/model/binding/DCIteratorBinding.refreshControl(DCIteratorBinding.java:655)
    at oracle/jbo/uicli/binding/JUIteratorBinding.refreshControl(JUIteratorBinding.java:475)
    at oracle/adf/model/binding/DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:861)
    at oracle/jbo/common/RowSetHelper.fireRangeRefreshed(RowSetHelper.java:179)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyRangeRefreshed(ViewRowSetIteratorImpl.java:3559)
    at oracle/jbo/server/ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2776)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]
    at oracle/jbo/server/ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2996)
    at oracle/jbo/server/ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2453)
    at oracle/jbo/server/ViewRowSetImpl.refreshRowSet(ViewRowSetImpl.java:6106)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyDetailRowSets(ViewRowSetIteratorImpl.java:3493)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyRangeRefreshed(ViewRowSetIteratorImpl.java:3569)
    at oracle/jbo/server/ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2776)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]
    at oracle/jbo/server/ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2996)
    at oracle/jbo/server/ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2453)
    at oracle/jbo/server/ViewRowSetImpl.refreshRowSet(ViewRowSetImpl.java:6106)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyDetailRowSets(ViewRowSetIteratorImpl.java:3493)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyRangeRefreshed(ViewRowSetIteratorImpl.java:3569)
    at oracle/jbo/server/ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2776)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]
    at oracle/jbo/server/ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2996)
    at oracle/jbo/server/ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2453)
    at oracle/jbo/server/ViewRowSetImpl.execute(ViewRowSetImpl.java:1047)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]
    at oracle/jbo/server/ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1162)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]
    at oracle/jbo/server/ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1082)
    at oracle/jbo/server/ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1076)
    at oracle/jbo/server/ViewObjectImpl.executeQuery(ViewObjectImpl.java:5601)
    at oracle/adf/model/bean/DCBeanDataControl.executeIteratorBinding(DCBeanDataControl.java:789)
    at oracle/adf/model/binding/DCIteratorBinding.doExecuteQuery(DCIteratorBinding.java:2117)
    at oracle/jbo/uicli/binding/MyIteratorBinding.executeQuery(JUAccessorIteratorDef.java:695)
    at oracle/jbo/uicli/binding/MyIteratorBinding$MasterListener.navigated(JUAccessorIteratorDef.java:436)
    at oracle/jbo/common/RowSetHelper.fireNavigationEvent(RowSetHelper.java:268)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyNavigationToRow(ViewRowSetIteratorImpl.java:3624)
    at oracle/jbo/server/ViewRowSetIteratorImpl.notifyNavigation(ViewRowSetIteratorImpl.java:3595)
    at oracle/jbo/server/ViewRowSetIteratorImpl.internalSetCurrentRow(ViewRowSetIteratorImpl.java:3378)
    at oracle/jbo/server/ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1551)
    ^-- Holding lock: oracle/jbo/JboSyncLock@0x0F9BA508[recursive]

    Thanks Frank, let me take step bkacwards in our implementation choice of the DC and managed bean....that might be where we took a wrong step? So we saw 2 POJOs being instantiated as you described, and we began to try and figure out how to get a handle to the POJO instantiated by the DC so that we could pass it to our page-flow method actions since it had the captured user data. The service implementations are in a different set of facade classes...so we've been thinking/treating the DC more as a model and maybe the service interfaces should actually be invoked on the DC POJO and then reference 'this' in the service method invocations parameters?
    So is the implied scope of the POJO DC at the session level? Is there a way to reference the instance handled by the DC through EL?
    As a follow up on the stack trace I reference, I think we found the conflict. We have a parent page bound to the DC and that view has a region to other pages which support different page flows for entering data on the child hierarchy under the root object. Both pages bind to the same DC object hierarcy and so iterators by the same name were created on each page def. What we found was that the 2 iterators that manage the root object were not set consistently. So in the parent page the 'requestIterator' and the child page's 'requestIterator' were both set to CacheResult=false but we had missed the combination of setting both Refresh settings to renderModel. So the read-only fields are now being refreshed.
    However a further investigation showed that the writable fields were not because the source view and targer view for the page flow are the same view in this case and the lifecycle is different here. So we added the executeQuery invocation back in after our service and the OOM is gone. The OOM happened when the region page Refresh was set to deferred. Goes away when both set to renderModel.

  • 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?

Maybe you are looking for