GetAttribute returning null

I'm encountering a rather perplexing issue when using the getAttribute method of the Row interface.
I have a view object defined and it returns 13 columns worth of data.
Once I have executed the query and attempt to read the results using the getAttribute method, I receive a null on a field that I know is not blank.
The following is the query that is executing for the view:
ViewObject vPri = getDBTransaction().getRootApplicationModule().findViewObject("Priority_WRST_View");
vPri.setWhereClause("WucstormPr.PRIORITY >= " + nPri);
vPri.executeQuery();
System.out.println(vPri.getQuery());
SELECT wucstormpr.CALL, wucstormpr.priority, wucstorm.locdescription,
wucstorm.CALL AS call1, wucstorm.quadrant, wucstorm.codetype,
wucstorm.idplant, wucstorm.circuit, wucstorm.feeder,
wucstorm.transformer, wucstorm.MAP, wucstorm.description,
wucstorm.status
FROM wucstorm_pr wucstormpr, wucstorm wucstorm
WHERE (wucstormpr.CALL = wucstorm.CALL)
AND wucstorm.status = 'WRST'
AND (wucstormpr.priority >= 10)
ORDER BY wucstormpr.priority
The query returns 6 rows of data.
When I attempt to run the following code, the value returned is a null, which I know is not true since the query is limiting the records based on this field.
Row rPri = null;
while (vPri.hasNext())
rPri = vPri.next();
Object oOldNum = rPri.getAttribute("Priority");
String sOldNum = String.valueOf(oOldNum);
System.out.println("***** " + sOldNum);
When I run the above code for any one of the other 12 fields, the anticipated value is returned. It just doesn't seem to work for the "Priority" field. I've verified that the Attribute name is correct and I've also tried to access the value using its' index instead of the name...with the same result.
Does anyone have any ideas why this would be occuring?
Thanx in advance,
Elder

Here is the stack trace being generated when I attempt to retrieve the value in the Priority field using the appropriate accessor method.
Does anyone have any ideas on why this is occurring?
oracle.jbo.AttrSetValException: JBO-27020: Set method for attribute "Status" in Wucstorm could not be resolved.
     at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:863)
     at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:952)
     at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:873)
     at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1011)
     at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:988)
     at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:753)
     at oracle.jbo.uicli.binding.JUCtrlValueBinding.setAttributeInRow(JUCtrlValueBinding.java:469)
     at oracle.jbo.uicli.binding.JUCtrlValueBinding.setAttribute(JUCtrlValueBinding.java:552)
     at oracle.jbo.uicli.jui.JUTextFieldBinding.setDataValueAt(JUTextFieldBinding.java:209)
     at Wucstorm_app.Wucstorm_Main_Panel.MaxButton_Status_actionPerformed(Wucstorm_Main_Panel.java:706)
     at Wucstorm_app.Wucstorm_Main_Panel.access$5000371(Wucstorm_Main_Panel.java:39)
     at Wucstorm_app.Wucstorm_Main_Panel$4.actionPerformed(Wucstorm_Main_Panel.java:356)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
     at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
     at java.awt.Component.processMouseEvent(Component.java:5100)
     at java.awt.Component.processEvent(Component.java:4897)
     at java.awt.Container.processEvent(Container.java:1569)
     at java.awt.Component.dispatchEventImpl(Component.java:3615)
     at java.awt.Container.dispatchEventImpl(Container.java:1627)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
     at java.awt.Container.dispatchEventImpl(Container.java:1613)
     at java.awt.Window.dispatchEventImpl(Window.java:1606)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
## Detail 0 ##
java.lang.NumberFormatException: For input string: "null"
     at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
     at java.lang.Integer.parseInt(Integer.java:468)
     at java.lang.Integer.valueOf(Integer.java:574)
     at Wucstorm_bcPack.WucstormImpl.setStatus(WucstormImpl.java:213)
     at Wucstorm_bcPack.WucstormImpl.setAttrInvokeAccessor(WucstormImpl.java:801)
     at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:816)
     at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:952)
     at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:873)
     at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1011)
     at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:988)
     at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:753)
     at oracle.jbo.uicli.binding.JUCtrlValueBinding.setAttributeInRow(JUCtrlValueBinding.java:469)
     at oracle.jbo.uicli.binding.JUCtrlValueBinding.setAttribute(JUCtrlValueBinding.java:552)
     at oracle.jbo.uicli.jui.JUTextFieldBinding.setDataValueAt(JUTextFieldBinding.java:209)
     at Wucstorm_app.Wucstorm_Main_Panel.MaxButton_Status_actionPerformed(Wucstorm_Main_Panel.java:706)
     at Wucstorm_app.Wucstorm_Main_Panel.access$5000371(Wucstorm_Main_Panel.java:39)
     at Wucstorm_app.Wucstorm_Main_Panel$4.actionPerformed(Wucstorm_Main_Panel.java:356)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
     at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
     at java.awt.Component.processMouseEvent(Component.java:5100)
     at java.awt.Component.processEvent(Component.java:4897)
     at java.awt.Container.processEvent(Container.java:1569)
     at java.awt.Component.dispatchEventImpl(Component.java:3615)
     at java.awt.Container.dispatchEventImpl(Container.java:1627)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
     at java.awt.Container.dispatchEventImpl(Container.java:1613)
     at java.awt.Window.dispatchEventImpl(Window.java:1606)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Similar Messages

  • Session.getAttribute returning null

    i set the session attribute in one jsp file using session.setAttribute() and retrieve it in another using session.getAttribute..The return value for session.getAttribute is null,
    I also tried using HTTP session,the result is same.
    First jsp file
    <%@ page import="database.DBFunctions" %>
    <%@ page import="java.sql.ResultSet" %>
    <%@ page import="java.io.PrintWriter" %>
    <%@ page import="javax.servlet.http.HttpSession" %>
    <%@ page import="read.Create" %>
    <%@ page language="java" %>
    <%
        PrintWriter writer = response.getWriter();
        //HttpSession varSession = request.getSession();
        String uname = request.getParameter("UserName");
        String pword = request.getParameter("PassWord");
        DBFunctions func = new DBFunctions();
        int bool = func.validate(uname);
        if(bool==1){
            func.insertLogin(uname, pword);
            ResultSet rs = func.getUid(uname, pword);
            if(rs.next()){
                int userid = rs.getInt("uid");
                writer.println(userid);
                System.out.println("adduser"+userid);
                session.setAttribute("uid",userid);
                //varSession.setAttribute("uid", new Integer(userid));
                Create cnew = new Create();
                cnew.createUser(userid);
           writer.println(bool);
        else{
            writer.println(bool);
    %>2nd jsp file:
    <%@ page import="read.Json" %>
    <%@ page import="read.Create" %>
    <%@ page import="org.json.JSONObject" %>
    <%@ page import="java.io.PrintWriter" %>
    <%@ page language="java" session="true" %>
    <%
        PrintWriter writer = response.getWriter();
        //HttpSession varSession = request.getSession();
        //Object uid1 = session.getAttribute("uid");
        /*if(varSession.isNew()){
            System.out.println("new user");
        }else{
        String a = (String) session.getAttribute("uid");
        writer.println(a);
        //Object uid1 = varSession.getAttribute("uid");
        Object uid1 = session.getAttribute("uid");
        String sheetName = request.getParameter("SheetName");
        String bookName = request.getParameter("WorkBook");
        writer.println(bookName);
        writer.println((String)uid1);
        Create cdoc = new Create();
        int docid1 = cdoc.createDoc(uid1,bookName,sheetName);
        session.setAttribute("docid", new Integer(docid1));
        //varSession.setAttribute("docid", new Integer(docid));
        writer.println(bookName);
    %>I used the suggestions given in a similar thread:
    http://forum.java.sun.com/thread.jspa?threadID=219818&messageID=767466
    It didnt work for me...
    please help!!!!1

    i tried converting it into integer before setting it.. and retrieving in the form of Integer, the result remains the same.
    AddUser.jsp(setting userid attribute of session here)
    <%@ page import="database.DBFunctions" %>
    <%@ page import="java.sql.ResultSet" %>
    <%@ page import="java.io.PrintWriter" %>
    <%@ page import="javax.servlet.http.HttpSession" %>
    <%@ page import="read.Create" %>
    <%@ page language="java" session="true" %>
    <%
        PrintWriter writer = response.getWriter();
        //HttpSession varSession = request.getSession();
        String uname = request.getParameter("UserName");
        String pword = request.getParameter("PassWord");
        DBFunctions func = new DBFunctions();
        int bool = func.validate(uname);
        if(bool==1){
            func.insertLogin(uname, pword);
            ResultSet rs = func.getUid(uname, pword);
            if(rs.next()){
                int userid = rs.getInt("uid");
                //writer.println(userid);
                System.out.println("adduser"+userid);
                session.setAttribute("uid",new Integer(userid));
                //varSession.setAttribute("uid", new Integer(userid));
                Create cnew = new Create();
                cnew.createUser(userid);
                func.insertInActiveusers(userid, uname);
           writer.println(bool);
        else{
            writer.println(bool);
    %>Create.jsp (Getting attribute from session in integer)
    <%@ page import="read.Json" %>
    <%@ page import="read.Create" %>
    <%@ page import="org.json.JSONObject" %>
    <%@ page import="java.io.PrintWriter" %>
    <%@ page language="java" session="true" %>
    <%
        PrintWriter writer = response.getWriter();
        //HttpSession varSession = request.getSession();
        //Object uid1 = session.getAttribute("uid");
        /*if(varSession.isNew()){
            System.out.println("new user");
        }else{
        Integer a = (Integer) session.getAttribute("uid");
        System.out.println("getAttribute a value : " + a);
        //Object uid1 = varSession.getAttribute("uid");
        Integer uid1 = (Integer) session.getAttribute("uid");
        String sheetName = request.getParameter("SheetName");
        String bookName = request.getParameter("WorkBook");
        writer.println(bookName);
        writer.println((Integer)uid1);
        Create cdoc = new Create();
        int docid1 = cdoc.createDoc(uid1,bookName,sheetName);
        session.setAttribute("docid", new Integer(docid1));
        //varSession.setAttribute("docid", new Integer(docid));
        writer.println(bookName);
    %>

  • Session.getAttribute("somekey") returning  NULL in SessionDestroyed

    Hi all,
         session.getAttribute("somekey") is returning null  in SessionDestroyed() method of flex listener.
    Below are the steps I am following
    1) I am adding flexLister in contextInitialized method of ServletContextListener
       FlexSession.addSessionCreateListener(myListener)
    2) In sessionCreate method
         sessionCreated(FlexSession session) {
                session.addSessionDestroyListener(this)
    3) some where in applicaion I am putting a key vlaue pair in session like this
    FlexContext.getSession().setAttribute("somekey" , someVlue)  ;
    The issue is when I try to retreive vale from session
    her is how I m retreiving value
       sessionDestroyed(FlexSession session) {
              session.getAttribute("somekey");     this return null WHY ?
    This is always returning me null
    Pls note that I am RTMP channel and  version of LCDS is 2.6
    I also tried RTMPFlexSession
      RTMPFlexSession.addSessionCreateListener(myListener)
    but no luck  , still got null
    Am I doing anything wrong  ?
    One more doubt, how to explicitly put data in RTMPFlexSeesion. FlexContex.getSession () always return HttpSession and I always hence I always end up putting attribute in unintended place.
    Thanks ,
    Dharmendra

    Hi,
    I really apologize for posting irrelevant question. I was not really aware of what do you mean by Lingo Director..
    Thanks for suggestions and reply.
    Regards,
    Dharmendra

  • GetAttribute() method of a view object is returning NULL

    Hi ,
    I am trying to implement PPR in one of my OAF page and I have taken the following approach.
    I have declared the follwing transient boolean attribute in the VO() apart from the existing attribute "Meaning" .
    1.MfgEnttity
    2.MfgAcct
    3.MfgSubAcct
    4.MfgCc
    5.MfgProj
    In the page I have used these attributes in the rendered property as "${oa.XXR2RMfgproSegVO.MfgSubAcct}" like this.
    Now in the CO I have written the following code.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("initializeXXR2RMfgproSegVO");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String event = pageContext.getParameter(EVENT_PARAM);
    String source = pageContext.getParameter(SOURCE_PARAM);
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    am.invokeMethod("handleSegmentChangeEvent");
    And the AM code is as follows:
    public void initializeXXR2RMfgproSegVO()
    OAViewObject vo = getXXR2RMfgproSegVO();
    if(!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    public void handleSegmentChangeEvent()
    OAViewObject pVO = (OAViewObject)findViewObject("XXR2RMfgproSegVO");
    OARow hdrRow = (OARow)pVO.getCurrentRow();
    String status = (String)hdrRow.getAttribute("Meaning");
    System.out.println("poRow "+ hdrRow.toString());
    System.out.println("value of the status is "+ status);
    if("Entity".equals(status))
    hdrRow.setAttribute("MfgEnttity", Boolean.TRUE);
    hdrRow.setAttribute("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute("MfgProj", Boolean.FALSE);
    } else
    if("Account".equals(status))
    hdrRow.setAttribute("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute("MfgAcct", Boolean.TRUE);
    hdrRow.setAttribute("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute("MfgProj", Boolean.FALSE);
    }else
    if("Subaccount".equals(status))
    hdrRow.setAttribute("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgSubAcct", Boolean.TRUE);
    hdrRow.setAttribute("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute("MfgProj", Boolean.FALSE);
    }else
    if("Cost Center".equals(status))
    hdrRow.setAttribute("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgCc", Boolean.TRUE);
    hdrRow.setAttribute("MfgProj", Boolean.FALSE);
    } else
    if("Project".equals(status))
    hdrRow.setAttribute("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute("MfgProj", Boolean.TRUE);
    else
    hdrRow.setAttribute("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute("MfgProj", Boolean.FALSE);
    Now when in the page I am changing the value of the attribute "Meaning" it is always getting into the else part i.e. where all the attributes are "False".
    The two System.out.Println statements are returning the follwing values.
    10/03/22 15:41:08 poRow [email protected]3
    10/03/22 15:41:08 value of the status is null
    Can you please suggest why this "Status" is returning NULL and how I can get the current row selected in the page?
    Thanks
    Subhabrata

    Hi Pratap,
    Thanks a lot for your reply.
    Can you please suggest how can I rectify the code.I have tried commenting the AM code as follows
    public void initializeXXR2RMfgproSegVO()
    OAViewObject vo = getXXR2RMfgproSegVO();
    if(!vo.isPreparedForExecution())
    vo.executeQuery();
    //Row row = vo.createRow();
    //vo.insertRow(row);
    //row.setNewRowState(Row.STATUS_INITIALIZED);
    But in the page when I am selecting any segment its throwing Null pointer Exception.
    I am new in OAF and this is an urgent client requirement.Please suggest me Where exactly I need to make change in my code.
    Thanks in advance...
    Thanks
    Subhabrata

  • ViewLink Accessor returning null when VO has a BindParameter

    I have DeptView and EmpView that is link with a DempEmpViewLink. the link is two way so DeptView has a RowIterator Viewlink accessor and EmpView has a Row ViewLInk accessor.
    However inside the employeViewRow code, I always get a Null value when I access the Dept accessor.
    //inside Employee View Row.java
    Row row = this.getDeptView(); //returns null
    ...This happens when The DeptView has a bindvariable because I need to filter the DeptView so I have a where clause on the SQL statement. However, when I remove the whereclause and the bindvariable, the Dept ViewLInk accessor returns the correct row.
    regards,
    Anton

    Hi Chris,
    My scenario is actually a Invoice Header and Details screen.
    I have a HeaderView, DetailsView, and a HeaderDetailLink defined by a Composition Assoc. The headerView has a BindParameter on it. So on my page, I can view/navigate invoices and its details. but at the same time using the same viewobjects and same page, I need to be able to create and save a record on the header and details at the same time by just one Commit/Save. (Similar to a Forms application (header Form, and Details table).
    On pageload i execute a methodaction that inserts a row on the header and the detail at the same time. Then on the jsp page, I put some values on the header. Next i put a value on a fieldA on the detail. But when I put a value on fieldA, I need to compute the value of fieldB on the detail based on fieldA and a field of the Header row, fieldHeader.
    So to compute fieldB, I put a code on the settermethod of fieldA in the DetailRowImpl.java file:
    //detailRowImp.java, setFieldA()
    public void setFieldA(Number value) {
    setAttributeInternal(FIELDA, value);
    ... Row row = getHeaderRow(); //returns null
    Number fieldbValue = compute(value, row.getAttribute("FieldC")); //NullPointerException
    }What are your thoughts? any suggestions?
    regards,
    Anton

  • SelectedItem return null when hit the NEXT page or Submit

    Hello All,
    I try to add the paging to the open source Alfresco content management. We need to process a large dataset (e.g. > 50K files) so after we gather a list of data files we display them with the checkbox and each checkbox has default checked status.
    If the value="#{FixItemList.selectedItems} is omitted in the <h:selectManyCheckbox> then the paging is fine when hitting the NEXT page or Submit button. If we set the value in the selectManyCheckbox then it returns null for selectedItems.
    Would please point out what I have done wrong? Appreciate for all yours helps.
    This is the managed bean object.
    public class ToolsContext
         private FixItemList fixItemList;
         private ToolsContext()
              this.fixItemList = new FixItemList();
         public void addFix(Fix fix) {
              if(fix != null) {               
                   fixItemList.addFixItem(new SelectItem(fix, fix.getPath(), fix.getDetails(), false));
                   fixItemList.addFixSelectedItems("" + fix + "");
    public class FixItemList implements Serializable
         private static final long serialVersionUID = 123784764562L;          
         private List<SelectItem> items;
         private List<String> selectedItems;
         private int displayItemPerPage;
         public FixItemList() {
              displayItemPerPage = 100;
              items = new ArrayList<SelectItem>();
              selectedItems = new ArrayList<String>();
         public void setItems(List<SelectItem> items) {
              this.items = items;
         public List<SelectItem> getItems() {
              return this.items;          
         public int getItemsSize() {
              return this.items.size();
         public int getDisplayItemPerPage() {
              return this.displayItemPerPage;
         public void setDisplayItemPerPage(int displayItemPerPage) {
              this.displayItemPerPage = displayItemPerPage;
         public void addFixItem(SelectItem selectItem) {          
              items.add(selectItem);
         public List<String> getSelectedItems() {
              return selectedItems;
         public void setSelectedItems(List<String> selectedItems) {
              this.selectedItems = selectedItems;
         public void addFixSelectedItems(String selectedItem) {          
              selectedItems.add(selectedItem);
    }My faces-config.xml
        <managed-bean>
         <description>
            This bean is to display in the Web Project tool as the pagination. HOPEFULLY SO
         </description>
         <managed-bean-name>FixItemList</managed-bean-name>
         <managed-bean-class>org.alfresco.module.websitetools.util.FixItemList</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>The JSP page.
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
    <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
    <%@ taglib uri="/WEB-INF/wcm.tld" prefix="w" %>
    <w:avmList id="files-list" viewMode="details" pageSize="#{FixItemList.displayItemPerPage}" styleClass="recordSet"
    headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
    value="#{FixItemList.items}" var="row">
    <%-- checkbox column --%>
    <a:column id="col1" primary="true" width="5" style="padding:2px;text-align:left">
       <h:selectManyCheckbox id="wpt" value="#{FixItemList.selectedItems}">
            <f:selectItem itemLabel="#{row.label}" itemValue="#{row.value}" />
       </h:selectManyCheckbox>
    </a:column>
    <%-- file name column --%>
    <a:column id="col2" primary="true" width="50%" style="padding:2px;text-align:left">
         <h:outputText value="#{row.description}" />
    </a:column>
    <a:dataPager id="pager1" styleClass="pager" />
    </w:avmList>When I hit the NEXT page the #FixItemList.selectedItem return null. We use myface version 1.1.5. And below is the stack error
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.NullPointerException
         at javax.faces.component._SelectItemsIterator.hasNext(_SelectItemsIterator.java:73)
         at javax.faces.component.UISelectMany.validateValue(UISelectMany.java:268)
         at javax.faces.component.UIInput.validate(UIInput.java:354)
         at javax.faces.component.UISelectMany.validate(UISelectMany.java:297)
         at javax.faces.component.UIInput.processValidators(UIInput.java:184)
         at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627)
         at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627)
         at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627)
         at javax.faces.component.UIForm.processValidators(UIForm.java:73)
         at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:149)
         at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:32)
         at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)Appreciate for all yours helps,
    Anh

    I put the print out statement in the _SelectItemsIterator and found out that the selected item's value doesn't binding. How would I be able to select an item? Attached is the code with debug print out in the SelectItemsIterator.
    Would some one please point me a direction? Appreciate.
        public boolean hasNext()
            if(_nextItem != null)
                return true;
            if(_nestedItems != null)
                if(_nestedItems.hasNext())
                    return true;
                _nestedItems = null;
            if(_childs.hasNext())
                UIComponent child = (UIComponent)_childs.next();
                getLogger().debug("-----_SelectItemsIterator---child is UIComponent---" + child.getChildCount());
                getLogger().debug("-----_SelectItemsIterator---child is UIComponent---" + child.getAttributes());
                Map m = child.getAttributes();
                Set s = m.keySet();
                Iterator i= s.iterator();
                while (i.hasNext()) {                 
                     getLogger().debug("value  = " + m.get(i.next()));
                if(child instanceof UISelectItem)
                     UISelectItem uiSelectItem = (UISelectItem)child;
                    Object item = uiSelectItem.getValue();
                    getLogger().debug("-----_SelectItemsIterator---child is UISelectItem---getValue()--" + item);
                    if(item == null)
                        Object itemValue = ((UISelectItem)child).getItemValue();
                        String label = ((UISelectItem)child).getItemLabel();
                        String description = ((UISelectItem)child).getItemDescription();
                        boolean disabled = ((UISelectItem)child).isItemDisabled();
                        if(label == null)
                            label = itemValue.toString(); //////////////////////IT THROWS THE EXCEPTION HERE, BECAUSE THE
                                                                 ///itemValue is null
                        item = new SelectItem(itemValue, label, description, disabled);
                        getLogger().debug("-----_SelectItemsIterator---create item - label---" + label);
                        getLogger().debug("-----_SelectItemsIterator---create item - descp---" + description);
                        getLogger().debug("-----_SelectItemsIterator---create item - disable---" + disabled);
                        getLogger().debug("-----_SelectItemsIterator---create item - itemValue--" + itemValue);
                    }

  • EjbFindByPrimaryKey returns null

    Hello,
    We are writing an BMP in 6.1 SP 2. The ejbLoad perfectly loads the data.
    From the Remote using the getPrimaryKey() to get the PrimaryKey. That key
    is passed to the findByPrimaryKey(PK) call. But, it returns the following.
    I have the db-is-shared to false in weblogic-ejb-jar.xml. It looks like it
    is returning null and I don't understand why it is doing like this. Whether
    it is because, it is not able to find the object through the
    findByPrimaryKey or I am making any mistakes.
    I even system.out.println inside the ejbFindByPrimaryKey and the key is not
    null, it is having the value. Any help is greatly appreciated.
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 1
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - refresh - 1 : PFINA - false
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@e5a5f - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    Start server side stack trace:
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    at
    weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.
    java:443)
    at
    weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityMa
    nager.java:376)
    at
    weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:33
    2)
    at
    mcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl.findByPrimaryKey(RBMCustomBean_oc
    yn82_HomeImpl.java:99)
    at mcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :93)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
    at
    weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:166)
    at
    weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
    at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :262)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :229)
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
    at $Proxy80.findByPrimaryKey(Unknown Source)
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:173)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    <<no stack trace available>>
    JSP Exception : java.lang.NullPointerException
    java.lang.NullPointerException
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Thanks,
    Ganesh

    Sentence fragments.
    Missing predicates.
    It's a bit hard trying to understand your questions.
    In BMP you write the ejbFindByPrimaryKey method. Your job in that method is
    to verify that it exists in the DB and throw an ObjectNotFoundException if
    not. You return the valid PK (the one passed in) if it does exist. So, what
    exactly is returning null?
    "Ganapathy Sankaran" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    We are writing an BMP in 6.1 SP 2. The ejbLoad perfectly loads the data.
    From the Remote using the getPrimaryKey() to get the PrimaryKey. That key
    is passed to the findByPrimaryKey(PK) call. But, it returns thefollowing.
    I have the db-is-shared to false in weblogic-ejb-jar.xml. It looks like it
    is returning null and I don't understand why it is doing like this.Whether
    it is because, it is not able to find the object through the
    findByPrimaryKey or I am making any mistakes.
    I even system.out.println inside the ejbFindByPrimaryKey and the key isnot
    null, it is having the value. Any help is greatly appreciated.
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 1
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - refresh - 1 : PFINA - false
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@e5a5f - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    Start server side stack trace:
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    at
    weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.
    java:443)
    at
    weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityMa
    nager.java:376)
    at
    weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:33
    2)
    at
    mcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl.findByPrimaryKey(RBMCustomBean_oc
    yn82_HomeImpl.java:99)
    atmcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :93)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
    at
    weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:166)
    at
    weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
    at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :262)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :229)
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
    at $Proxy80.findByPrimaryKey(Unknown Source)
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:173)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    <<no stack trace available>>
    JSP Exception : java.lang.NullPointerException
    java.lang.NullPointerException
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Thanks,
    Ganesh

  • FindNode returning Null And XML Not Accepting Special Characters

    Hi All,
    i am trying the get the attribute value in the element "ns4:InfoCFDi" using FindNode method, but the method is returning NULL. I used the same code for other sample as well and was successfull. but for this specific XML file(which is below) I am getting a Null.
    i can get till S:Body, but when i try to use FindNode for ":Body/s4:ResponseGeneraCFDi" I get Null value.
    And I used "S:Body/*[local-name()=" | "ns4:ResponseGeneraCFDi" | "]";
    as mentioned in other post but still no success.
    ==>I Have one more question relating to special characters. I need to use characters such as - ó in my XML to read as well as write. When I try to read i am getting XML parse error and when writing, i cannot open the file properly.
    Your help is much appreciated.
    My code is here:
    Local XmlDoc &inXMLDoc, &reqxmldoc;
    Local XmlNode &RecordNode;
    &inXMLDoc = CreateXmlDoc();
    &ret = &inXMLDoc.ParseXmlFromURL("D:\Agnel\Mexico Debit Memo\REALRESPONSE.xml");
    If &ret Then
    &RecordNode = &inXMLDoc.DocumentElement.FindNode("" );
    If &RecordNode.IsNull Then
    Warning MsgGet(0, 0, "Agnel FindNode not found.");
    rem MessageBox(0, "", 0, 0, "FindNode not found");
    Else
    &qrValue = &RecordNode.GetAttributeValue("asignaFolio ");
    Warning MsgGet(0, 0, "asignaFolio." | &qrValue);
    End-If;
    Else
    Warning MsgGet(0, 0, "Error. ParseXmlString");
    End-If;
    XML File:
    - <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    - <S:Body>
    - <ns4:ResponseGeneraCFDi xmlns="http://www.xxl.com/ns/xsd/bf/rxx/52" xmlns:ns2="http://www.sat.gob.mx/cfd/3" xmlns:ns3="http://www.xx/ns/bf/conector/1&quo t; xmlns:ns4="http://www.xx/ns/xsd/bfxx/xx/32&qu ot; xmlns:ns5="http://www.xxcom/ns/xsd/bf/xxxxx&q uot; xmlns:ns6="http://wwwxx.com/ns/referenceID/v1">
    - <ns3:Result version="1">
    <ns3:Message message="Proceso realizado con exito." code="0" />
    </ns3:Result>
    - <ns4:InfoCFDi noCertificadoSAT="20001000000100003992" refId="STORFAC20121022085611" fechaTimbrado="2012-10-22T08:56:45" qr=" "
    uuid="a37a7d92-a17e-49f4-8e4d-51c983587acb" version="3.2" tipo="XML" archivo="xxx" sello="B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=" fecha="2012-10-22T08:56:44" folio="281" serie="IICC">
    <InfoEspecial valor="Este documento es una representacin impresa de un CFDI." atributo="leyendaImpresion" />
    <InfoEspecial valor="||1.0|a37a7d92-a17e-49f4-8e4d-51c983587acb|2012-10-22T08:56:45|B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=|20001000000100003992||" atributo="cadenaOriginal" />
    <InfoEspecial valor="Doscientos dieciocho mil cuatrocientos setenta y cinco pesos 00/100 M.N." atributo="totalConLetra" />
    </ns4:InfoCFDi>
    </ns4:ResponseGeneraCFDi>
    </S:Body>
    </S:Envelope>
    TIA

    First of all you have to supply a value you want to search for and this has to be the complete path to the value. You're saying you already tried that, but can you paste the code which you used for that? I don't see the path mentioned in the code you posted.
    *FindNode*
    Syntax
    FindNode(Path)
    Description
    Use the FindNode method to return a reference to an XmlNode.
    The path is specified as the list of tag names, to the node that you want to find, each separated by a slash (/).
    Parameters
    Path
    Specify the tag names up to and including the name of the node that you want returned, starting with a slash and each separated by a slash (/). This is known as the XPath query language.>
    Another option would be this snippet of code:
    &InfoCFDiArray = GetElementsByTagName("ns4:InfoCFDi");
    &InfoCFDiNode = &InfoCFDiArray [1];
    &attValue = &InfoCFDiNode.GetAttributeValue("noCertificadoSAT")
    Warning(&attValue);
    It creates an array of XML Nodes which match the name "ns4:InfoCFDi". Since there's only one in the XML it's safe to assume it will be the one and only node in the array. I've assigned that node to the variable &InfoCFDiNode and use that to retrieve the attribute "noCertificadoSAT" value. The warning message should display the value supplied there.
    Concering the special characters; you will have to change the encoding of the XML. Peoplecode sets this to UTF-8 by default, but doesn't include this in the header. There's a little hack for that somewhere on the web, I'll see if I can find it.

  • Kff.where returns 'null'  and causes sql error - looking for a work around

    Hello,
    I am using BI 5.6.3 in EBS (11.5.10.2)
    I have created a kff.where as follows:
    <lexical
    type="oracle.apps.fnd.flex.kff.where"
    name="lp_location_where_clause"
    comment="Comment"
    application_short_name="OFA"
    id_flex_code="LOC#"
    id_flex_num=":lp_location_flex_structure"
    code_combination_table_alias="loc"
    segments="ALL"
    operator="BETWEEN"
    operand1=":p_location_low"
    operand2=":p_location_high"/>
    </lexicals>
    Everything works fine, as long as I have a values for the p_location_low and p_location_high. However, this is a parameter that comes in from a concurrent program and is optional. When the user doesn't pick a value, :p_location_low is the concatenated delimiters for the location '..'.
    When this runs, the kff.where is returning null which causes 'Invalid Relational Operation error' because 'AND null' is not valid.
    Warning in the log is :[091910_025232517][][STATEMENT] !!Warning: FlexAPI returns null for 'x_where_expression' lexical definition...
    Does anyone have a workaround for this since making the parameter required is not an option for my users?
    Thanks for reading.

    In your SQL*Plus session, make sure you
    SQL> set define offbefore trying to create the Java stored procedure. SQL*Plus assumes that any string that begins with an & is a substitution variable unless you tell it that you have no substitution variables (via set define off).
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • HelpSet.findHelpSet() returns null, and trapping ID errors

    I was having a problem initializing JavaHelp. HelpSet.findHelpSet() was returning null. I searched the forum, and found it was a common problem, but the answers were unhelpful. The answers pointed to a problem with CLASSPATH, but offered little in the way of advice for a newbie like myself on how to deal with it.
    A second issue concerns HelpBroker.enableHelpOnButton(). If you feed it a bogus ID, it throws an exception, and there's no way to trap it and fail gracefully. JHUG doesn't provide much in the way of alternatives.
    Now, having done a bit of research and testing, I'm willing to share a cookbook formula for what worked for me.
    I'm working in a project directory that contains MyApp.jar and the Help subdirectory, including Help/Help.hs. My first step is to copy jh.jar to the project directory.
    Next, in the manifest file used to generate MyApp.jar, I add the line:
        Class-Path: jh.jar Help/I'm working with Eclipse, so in Eclipse, I use Project - Properties - Java Build Path - Libraries to add JAR file jh.jar, and Class Folder Tony/Help
    I define the following convenience class:
    public class HelpAction extends AbstractAction
        private static HelpBroker helpBroker = null;
        private String label = null;
        public HelpAction( String name, String label )
            super( name );
            this.label = label;
        public void actionPerformed( ActionEvent event )
            displayHelp( label );
        public static boolean displayHelp( String label )
            if ( helpBroker == null )
                Utils.reportError( "Help package not initialized!" );
                return false;
            try
                helpBroker.setCurrentID( label );
                helpBroker.setDisplayed( true );
                return true;
            catch ( Exception e )
                Utils.reportError( e, "Help for " + label + " not found" );
                return false;
        public static boolean initialize( String hsName )
            URL hsURL = HelpSet.findHelpSet( null, hsName );
            if ( hsURL == null )
                Utils.reportError( "Can't find helpset " + hsName );
                return false;
            try
                HelpSet helpSet = new HelpSet( null, hsURL );
                helpBroker = helpSet.createHelpBroker();
            catch ( HelpSetException e )
                Utils.reportError( e, "Can't open helpset " + hsName );
                return false;
            return true;
    }If you use this class in your own code, you'll want to replace Utils.reportError() with something of your own devising.
    Finally, in my GUI class, I use the following:
        JPanel panel = ...
        JMenu menu = ...
        JToolbar toolbar = ...
        HelpAction.initialize( "Help.hs" )
        Action gsAction = new HelpAction( "Getting Started Guide", "gs.top" );
        menu.add( gsAction );
        JButton helpButton = new HelpAction( "Help", "man.top" );
        toolbar.add( helpButton );
        InputMap imap = panel.getInputMap( JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
        imap.put( KeyStroke.getKeyStroke( "F1" ), "F1help" );
        ActionMap amap = panel.getActionMap();
        amap.put( "F1help", new HelpAction( null, "man.top" ) );

    Sorry, the sixth-from-last line of my example should read,
        JButton helpButton = new JButton( new HelpAction( "Help", "man.top" ) );

  • Why does getParameter("uri") returns null ???

    Hi !
    JAVA can be rather frustrating and I have run of of dukes. How about IOU ?
    Unfortunately none of the previous questions in the db shed light on my problem.
    I am trying to get at the "uri" and I have the following code fragment :
    package com.developer;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    public class proptest extends HttpServlet
      public void doGet( HttpServletRequest req,  HttpServletResponse resp)
        throws ServletException, IOException
        PrintWriter out = resp.getWriter();
        out.println("Parameter Name: " + req.getParameter("uri"));
      public void init() throws ServletException
        // initialie the servlet here. Use ServletConfig object to get
        //    initialization parameters...
        ServletConfig config = getServletConfig();
        // ... more stuff ...
      }

    Hi!
    In case anyone stumbles upon this in the database, I worked aroung it by using req.getRequestURI().
    However I still do not know why getParameter() returns null. It would be useful e.g. if you want to display a list of all request params e.g.:
    // stub code follows...
    java.util.Enumeration enum = rea.getParameterNames();
    while (enum.hasMoreElements())
    String name = (String) enum.nextElement();
    System.out.println("Parameter "+name + " " + req.getParameter(name))
    ...For me, nope, all nulls. If it works for you , do tell me.
    Also if you look at the "bugs db" there seems to be a number of issues concerning getParameter().

  • Why ResultSet getDate() method returns null when querying .csv file?

    Here is the full code:
    import java.sql.*;
    import java.sql.Types;
    import java.sql.Date;
    import myjava.support.CachedRowSetMaker;
    import javax.sql.rowset.CachedRowSet;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    class jdbc2{
    final private String s1="SELECT top 10 [DATE], [ADJ CLOSE] FROM [vwo-1.csv]";
    private ResultSet result=null;
    private Connection conn=null;
    public static void main(String[] args) throws SQLException{
    jdbc2 db=new jdbc2();
    try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              db.conn = DriverManager.getConnection("jdbc:odbc:STOCK_DATA");
              PreparedStatement sql=db.conn.prepareStatement(db.s1);
              db.result=sql.executeQuery();
    // check column names and types using the ResultSetMetaData object.
              ResultSetMetaData metaData = db.result.getMetaData();
         System.out.println("Table Name : " + metaData.getTableName(2));
         System.out.println("Field\t\tDataType");
         for (int i = 0; i < metaData.getColumnCount(); i++) {
         System.out.print(metaData.getColumnName(i + 1) + "\t");
         System.out.println(metaData.getColumnTypeName(i+1));
         System.out.print(metaData.getColumnName(1) + "\t"+metaData.getColumnName(2)+"\n");
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    catch (Exception e) {
    System.out.println("Error: " + e.getMessage());
         finally {
              db.result.close();
              db.conn.close();
    Everything works well, until getting to the block
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    The getDate("DATE", Calendar.getInstance())); always returns null, instead of the date value in the vwo-1.csv.
    Even though I change it to
    java.sql.Date d=db.result.getDate("DATE") and convert to String using .toString(), I still gets nulls. The dollar amount in "Adj Close" field is fine, no problem.
    The .csv fils is downloaded from YahooFinace.
    Can anyone review the code and shed some light as to what I did wrong?
    Thanks alot.

    CREATE TABLE `login` (
    `username` varchar(40) DEFAULT NULL,
    `password` varchar(40) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `amount` (
    `amountid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `amount` bigint(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `paymentid` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`amountid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `applicationfee` (
    `applicationfeeid` int(11) DEFAULT NULL,
    `applicationamount` int(11) DEFAULT NULL,
    `applicationfee` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `category` (
    `categoryid` int(11) DEFAULT NULL,
    `categoryname` varchar(40) DEFAULT NULL,
    `categorydescription` varchar(500) DEFAULT NULL,
    `cattype` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `commission` (
    `commissionid` int(11) DEFAULT NULL,
    `bussiness` int(11) DEFAULT NULL,
    `commission` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `customer` (
    `cacno` int(11) NOT NULL DEFAULT '0',
    `name` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `cphone` varchar(40) DEFAULT NULL,
    `cmobile` varchar(40) DEFAULT NULL,
    `caddress` varchar(500) DEFAULT NULL,
    `cstatus` varchar(20) DEFAULT NULL,
    `cphoto` longblob,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`cacno`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `daybook` (
    `closingbal` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `extraincome` (
    `categoryid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `employee` (
    `empno` int(11) DEFAULT NULL,
    `empname` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `sal` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `image` (
    `id` int(11) DEFAULT NULL,
    `image` blob
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `loan` (
    `loanid` int(11) NOT NULL DEFAULT '0',
    `loanamt` varchar(40) DEFAULT NULL,
    `payableamount` double DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `payableinstallments` int(11) DEFAULT NULL,
    `monthlyinstallment` varchar(20) DEFAULT NULL,
    `surityname` varchar(20) DEFAULT NULL,
    `applicationfeeid` int(11) DEFAULT NULL,
    `interestrate` float DEFAULT NULL,
    `issuedate` date DEFAULT NULL,
    `duedate` date DEFAULT NULL,
    `nextduedate` date DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(20) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    `interestamt` double DEFAULT NULL,
    `pendingamt` float DEFAULT NULL,
    PRIMARY KEY (`loanid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `md` (
    `mdid` int(11) NOT NULL DEFAULT '0',
    `mdname` varchar(40) DEFAULT NULL,
    `mdphoto` varchar(100) DEFAULT NULL,
    `mdphone` varchar(40) DEFAULT NULL,
    `mdmobile` varchar(40) DEFAULT NULL,
    `mdaddress` varchar(500) DEFAULT NULL,
    PRIMARY KEY (`mdid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partner` (
    `pid` int(11) NOT NULL DEFAULT '0',
    `pname` varchar(40) DEFAULT NULL,
    `paddress` varchar(500) DEFAULT NULL,
    `pphoto` varchar(100) DEFAULT NULL,
    `pphone` varchar(40) DEFAULT NULL,
    `pmobile` varchar(40) DEFAULT NULL,
    `pstatus` varchar(20) DEFAULT NULL,
    `mdid` int(11) DEFAULT NULL,
    `mdname` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `nextpaydate` date DEFAULT NULL,
    PRIMARY KEY (`pid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partnerinvested` (
    `pid` int(11) DEFAULT NULL,
    `pname` varchar(20) DEFAULT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountinvested` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `payments` (
    `paymentid` int(11) NOT NULL,
    `categoryid` int(11) DEFAULT NULL,
    `particulars` varchar(100) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `paymentdate` date DEFAULT NULL,
    PRIMARY KEY (`paymentid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `receipts` (
    `receiptid` int(11) DEFAULT NULL,
    `paiddate` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(40) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

  • Why getResource of jar in classpath returns null?

    When i iterate through the jars in the classpath and try to turn them into URL's via the getResources(), they all return null. What am I doing wrong?
    (NOTE: It does print out the classpath properly when i print that out)
    String classPath = System.getProperty( "java.class.path" );
    String delim = System.getProperty( "path.separator" );
    String[] locations = classPath.split( delim );
    for ( int i = 0; i < locations.length; i++ )
          /* ** It doesn't work with either of these statments: ** */
          //This one tries the full path (e.g. /home/me/test/some.jar)
          //Enumeration en = getClass().getClassLoader().getResources( locations[ i ].substring( locations[ i ] );
          //This one tries to use just the local name of the jar (e.g. test.jar)
          Enumeration en = getClass().getClassLoader().getResources( locations[ i ].substring( locations[ i ].lastIndexOf( '/' ) + 1 ) );
          //This just prints null
          while (  en.hasMoreElements(); ) System.out.println( en.nextElement() );
    }Edited by: 6tr6tr on Dec 4, 2008 5:46 PM
    Edited by: 6tr6tr on Dec 4, 2008 5:47 PM

    What you are doing doesn't make sense. The resource locations within a JAR file are relative to the package directory structure within the JAR file, not to its own absolute location on the disk. And you seem to be expecting to retrieve a JAR file from within a JAR file. This makes no sense either.

  • Request.getCookies() returns null, not 0 length array

    (reposted from J2EE forum)
    Just upgraded to 9ias with Embedded OC4J and we were getting a NullPointerException.
    Our previous calls to request.getCookies() AKA http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpServletRequest.html#getCookies()
    would return an an array of Cookie Objects or an array of zero length if there are no cookies.
    When we upgraded to 9ias, we got the NPE.
    Know why?
    OC4J implementation of HttpServletRequest doesn't return a zero length array, it returns a null object when there are no cookies!!!
    So we had to change our code to catch this.
    Not a big problem, and it's fixed now, but it was a problem nonetheless.
    Any reason/rationale for why this was done this way? Anyone? Bueller?

    Josh,
    According to Servlet Spec 2.3 (page 193) SRV 15.1.3.2 Methods for (HttpServletRequest SRV.15.1.3) getCookies() returns null if no cookies present. So we are compliant to the spec.
    regards
    Debu Panda
    Oracle That's strange that the NPE problem didn't occurr until deleting cookies on OC4J, then.
    Thanks for responding!

  • Get textFrame by label returns null and anchored objects

    I have the following two functions:
    function getByLabel(page, label)
        for(var i=0; i < page.allPageItems.length; i++)
            if( page.allPageItems[i].label == label )
                return page.allPageItems[i];
    and
    Object.prototype.findItems = function(/*obj*/props)
        if( !('everyItem' in this) )
            throw new Error("Error: " + this + " is not a collection.");
        var ret = this.everyItem().getElements(),
            i = ret.length,
            e, p;
        while( i-- && e=ret[i] )
            for( p in props )
                if( (p in e) && e[p]===props[p] ) continue;
                ret.splice(i,1);
        return ret;
    In my page structure, I got one main text frame (the content area) and two vertical text fromes on the sides of the page. There is also a small box textframe on top of the page. All these textboxes EXCEPT the main text frame are ALL "ANCHORED objects". I had to make them anchored objects, eitherwise after importing data, the boxes would jump around. (Example, the small box textframe that is on the top would get moved to the content area textframe etc). Not sure if using anchored objects is the proper way to fix this.
    When I try to get the small box text frame, it does not work using the findItems (returns null) but it works fine with the getByLabel method. Why is that?
    The calling syntax is:
    for( i=0 ; i < doc.pages.length ; ++i )
            var page = doc.pages.item(i);
            var textFrame = getByLabel(page, 'lblSection' ); //This works
            //   var textFrame = page.textFrames.findItems({ label:  'lblSection' })[0]; This does not work, returns null
            if( textFrame != null )
                textFrame.parentStory.contents = "";

    (function () {
        // Per the InDesign Scripting Guide, app.activeScript is only
        // valid when a script is directly executed from InDesign, not
        // from the ESTK, so a try/catch block is recommended to handle
        // it.
        var d;
        try {
            d = app.activeScript.parent.parent.fsName;
        } catch (e) {
            d = Folder.appPackage.parent.fsName+"/Scripts";
            return d;

Maybe you are looking for

  • Error while creating a TO for Delivery

    Hi Experts , Can any one advise me what can be the possible solution for this kind of internal Error. An internal error has occurred (L03T 0152 H ) Message no. L3705 Diagnosis No screen sequence control is defined for the argument enclosed in parenth

  • F-53 Outgoing Payment

    Hi, I am not getting the reference of Purchase Order Number while making an outgoing Payment against an INVoice Document number . in case of Advance Payment - For payment document against Purchase order is fetching but incase of Invoice verification

  • PDO Layer Error in change version PO

    Hi, We are in SRM7.0 , EC Scenario In SAP SRM system am experiencing a workflow issue , second level approver is not able to approve/receive the workitem of a changed PO. Moment 1st approver approve it and when requester try to open the PO (changed v

  • CMYK vs RGB

    Dear all: I have this strange problem affecting my work. I'm doing a new portfolio, and I place the background images (in RGB) fine. But when I place my works, they all F#%&%&/% appear in CMYK! This is very bad, since most my works were web-based, s

  • Adobe Premiere Pro Keyframes.

    Hi, I've been having some problems with animating photos in Adobe Premiere Pro CS4. I want to slide an image in from the right so I set the horizontal position value for the first so the photo starts out of the frame (roughly 2500) For the first keyf