Topic
  • 3 replies
  • Latest Post - ‏2014-08-08T17:12:35Z by mburati
dmelby
dmelby
131 Posts

Pinned topic Empty integer value on Create screen causes "not found in class" error

‏2014-07-27T15:36:10Z |

I have a create screen using the DSUI builder which has integer values defined in the create schema as well as the associated java LJO object as an inbound parameter. This integer value is not a required field. When the user doesn't fill in the integer fields and presses the submit button, it causes an exception error:

An error has occurred.
The error message returned was: "Error in method TeamTestDSUICreate_NextAction. Error in method TeamTestDSUIFinishCreate. Error in method TeamTestCreateProject. Error in method TeamTest.executeOperation. Error in method CreateProjectExecute. Error in method TeamManagerLJO.CreateProject. Method CreateProject(java.lang.String "", java.lang.String "", null, java.lang.String "", null, java.lang.String "", java.lang.String "", java.lang.String "") or CreateProject(com.bowstreet.webapp.engine.WebAppAccessImpl, java.lang.String "", java.lang.String "", null, java.lang.String "", null, java.lang.String "", java.lang.String "", java.lang.String "") not found in class com.winnebagoind.teammanager.services.TeamManagerServices.". 

In the above example, I pressed the submit button with no inputs and as you can see were the strings were submitted as empty values. The integers (parms 3 & 5) on the other hand were submitted as null values. Aside from having the users enter a 0 in the fields, is there a way to default the values to 0?

  • mburati
    mburati
    2560 Posts

    Re: Empty integer value on Create screen causes "not found in class" error

    ‏2014-07-28T03:19:17Z  

    First, check to be sure that it's treating your numeric fields as numeric/integer and not strings.   Check the schema for the service operation inputs to see what it thinks the field type(s) are.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • dmelby
    dmelby
    131 Posts

    Re: Empty integer value on Create screen causes "not found in class" error

    ‏2014-08-05T19:34:02Z  
    • mburati
    • ‏2014-07-28T03:19:17Z

    First, check to be sure that it's treating your numeric fields as numeric/integer and not strings.   Check the schema for the service operation inputs to see what it thinks the field type(s) are.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    The schema and LJO are both defined as int for the fields id_proj_ref and hrs_est_new:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://wpf.ibm.com/2002/10/createprojectrequest" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://wpf.ibm.com/2002/10/createprojectrequest">
    <xsd:element name="Row">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:name"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:empl_id"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:id_proj_ref"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:date_due_new"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:hrs_est_new"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:date_begin"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:note_desc_t"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:note_rsn_t"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="empl_id" type="xsd:string"/>
    <xsd:element name="id_proj_ref" type="xsd:int"/>
    <xsd:element name="date_due_new" type="xsd:date"/>
    <xsd:element name="hrs_est_new" type="xsd:int"/>
    <xsd:element name="date_begin" type="xsd:date"/>
    <xsd:element name="note_desc_t" type="xsd:string"/>
    <xsd:element name="note_rsn_t" type="xsd:string"/>
    </xsd:schema>

    LJO call:

    public String CreateProject(WebAppAccess webAppAccess, String name, String empl_id, int id_proj_ref, String date_due_new, int hrs_est_new, String date_begin, String note_desc_t, String note_rsn_t) {

  • mburati
    mburati
    2560 Posts

    Re: Empty integer value on Create screen causes "not found in class" error

    ‏2014-08-08T17:12:35Z  
    • dmelby
    • ‏2014-08-05T19:34:02Z

    The schema and LJO are both defined as int for the fields id_proj_ref and hrs_est_new:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://wpf.ibm.com/2002/10/createprojectrequest" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://wpf.ibm.com/2002/10/createprojectrequest">
    <xsd:element name="Row">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:name"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:empl_id"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:id_proj_ref"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:date_due_new"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:hrs_est_new"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:date_begin"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:note_desc_t"/>
    <xsd:element maxOccurs="1" minOccurs="0" ref="tns:note_rsn_t"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="empl_id" type="xsd:string"/>
    <xsd:element name="id_proj_ref" type="xsd:int"/>
    <xsd:element name="date_due_new" type="xsd:date"/>
    <xsd:element name="hrs_est_new" type="xsd:int"/>
    <xsd:element name="date_begin" type="xsd:date"/>
    <xsd:element name="note_desc_t" type="xsd:string"/>
    <xsd:element name="note_rsn_t" type="xsd:string"/>
    </xsd:schema>

    LJO call:

    public String CreateProject(WebAppAccess webAppAccess, String name, String empl_id, int id_proj_ref, String date_due_new, int hrs_est_new, String date_begin, String note_desc_t, String note_rsn_t) {

    Sorry, I don't have time to try this myself at the moment, and I don't see a simple sample here to reproduce it so I'll just provide a couple thoughts/suggestions that may help:

     - Since these actions are called via reflection, it may help to make the method take an Integer (which can be null) instead of a primitive int?

     - You could pre-initialize numeric fields on the input form to 0  (I believe there's another very recent thread in this forum on pre-initializing input fields on create forms).

     

    I hope that info helps,

    ..Mike Burati

    http://www-10.lotus.com/ldd/pfwiki.nsf/

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.