Code returning NULL

T1 (Table and columns & data ) used in my example
create table T1 (col1 number,col2 number);
col1 col2
1 5
2 5
3 5
4 5
11 6
12 6
13 6
14 6
CREATE OR REPLACE FUNCTION TEST (par NUMBER) RETURN VARCHAR2 IS
l_concat VARCHAR2(32767) ;
BEGIN
select wm_concat(col1) into l_concat from t1 where col2=par;
RETURN l_concat;
END;
select TEST(5) from dual;
The above example always returns a NULL as opposed to (1,2,3,4);
CREATE OR REPLACE FUNCTION TEST (par NUMBER) RETURN VARCHAR2 IS
l_concat VARCHAR2(32767) ;
l_str varchar2(32767);
BEGIN
l_str:='select wm_concat(col1) from t1 where col2=:b';
execute immediate l_str into l_concat using par;
RETURN l_concat;
END;
select TEST(5) from dual;
This returns the correct answer .i.e. (1,2,3,4);
My question is why my first code returning NULL? Is there any restriction using aggregate functions inside
plsql code ?

BluShadow wrote:
The in paramter has the same name as one of the column . Thus the select query was not taking the filtering predicate as the in parameter col1 ,rather it was
using the column's value for filtering each row and hence the wm_concat was not getting any row to concatenate .That's why you should use a good coding standard and perhaps prefix parameters with "p" or "p_" and local variables with "v" or "v_" etc.Smacks too much of archaic Hungarian notation. :-)
Explicit scope definition is supported by PL/SQL. So why invent a new manual standard for scope, when there exists one already?
SQL> create or replace procedure FooProc( empNo emp.empno%Type ) is
  2          empRow  emp%RowType;
  3  begin
  4          select
  5                  e.* into empRow
  6          from    emp e
  7          where   e.empno = FooProc.empNo;
  8 
  9          dbms_output.put_line(
10                  'Employee '||empNo||' is '||empRow.ename||
11                  ', and employed as '||empRow.job
12          );
13  end;
14  /
Procedure created.
SQL>
SQL>
SQL> exec FooProc(7369)
Employee 7369 is SMITH, and employed as CLERK
PL/SQL procedure successfully completed.
SQL> Personally, I find the v_ and p_ prefix approach quite silly - attempting to address an issue that is already solved by explicit PL/SQL scope.
Never mind that the approach of using different prefixes, attempts to identify scope - and goes down the exact same slippery scope that Hungarian notation did. Which resulted in the death of this misguided standard, many years ago.
Frustrates me to no end to see the exact SAME mistakes made in PL/SQL that were made a decade or more ago - where lessons learned since then are conveniently ignored when it comes to PL/SQL programming.
It is still seems to be the Dark Ages when it comes to PL/SQL development.... :-(

Similar Messages

  • Code returns "null" and "0"s in main module - why?

    I am coding a program that is in two modules. The main module serves it's standard function. The inventory class/module has three functions - 1) request stock input on 4 data points (1 String and 3 integers, one of which is a double) - 2) calculate the value of the inventory, and - 3) return string which reads out the 4 data points and the calculation showing the total value of the inventory. I've created the 3 functions in the inventory class/module, but obviously don't have them referring to each other correctly because when we come to the end of the program the output is null for the String and "0"s for the int/doubles. The code is below - any ideas about how to overcome the empty output? The code compiles fine and acts like it is going to work, but when it comes to the final command line it outputs
    "null, which is item number 0, has 0 currently in stock at a price of 0.00 each. The total value of inventory in stock is 0.00"
    Main module:
    public class Main {
        @SuppressWarnings("static-access")
        public static void main(String[] args) {
            Inventory inventory = new Inventory(); //call Inventory class
            inventory.inventoryInput();
            Inventory results = new Inventory();
            results.inventoryResults(); //call for inventoryResults in Inventory class
    }Inventory module:
    import java.util.Scanner;
    import static java.lang.System.out;
    public class Inventory
      //declare and initialize variables
       int itemNumber = 0;
       String productName;
       int stockAmount = 0;
       double productCost = 0;
       double totalValue = 0;
       String inventoryResults;
       //initialize scanner
       Scanner input = new Scanner(System.in);
       public void inventoryInput ()
       out.println("Please enter item number: "); //prompt for item number
          itemNumber = input.nextInt();
       out.println( "Enter product name/description: "); //prompt for product name
          productName = input.next();
       out.println("Quantity in stock: ");
          stockAmount = input.nextInt(); // prompt for stock quantity
       out.println("What is the product cost for each unit? ");
          productCost = input.nextDouble(); // prompt for product cost
        } // end inventoryInput
        public double totalValue( double stockAmount, double productCost )
          totalValue = stockAmount * productCost;
          return totalValue; // return stock value
        } // end totalValue
        public void inventoryResults()
        out.printf("%s, which is item number %d, has %d currently in stock at a " +
         "price of %.2f each. The total value of inventory in stock is " +
         "%.2f\n.", productName, itemNumber, stockAmount, productCost, totalValue);
        } // end inventoryResult
    }// end method

    justStartingOut wrote:
    Actually my final solution was quite simple - I moved the calculation and final formated print text statements into the body of Inventory's class code. It now works. "Works" scares me a bit.
    Someone cooking dinner might rummage about in the fridge and the cupboards to see what's there. Do imaginative things with what they come up with. And, with a bit of luck come up with something tasty or, at any rate edible.
    A physician deciding on a medical treatment would do well to try a more cautious approach. A specific aim would be a good thing. And a calculated appreciation of the documented effects of each medicine. And how they interact.
    It's up to you to determine which approach your coding should resemble. But it seems to me that your original Main class had a perfectly good reason to exist. It was a driver class whose purpose seemed to be to create and use an Inventory. (And using an Inventory is a very different thing from being an Inventory, so it made perfect sense to have two different classes.) To me it works or not, depending on whether it fufills that purpose. And what you have done is not so much solve the problem of it not working, as avoid that problem.
    (If by "moved" you mean that the outputting now occurs as part of - or is called from - inventoryInput() then that is not a good thing. The input method should input: just input.)
    I think that is because once the original input was loaded into the program (when I entered product number, name, price and value), the entries were dropped when the code switched to the next step. I think your intuition is entirely correct. In particular look at what your original main() method does (my comments replacing yours):
    Inventory inventory = new Inventory(); // (A) Create an inventory...
    inventory.inventoryInput(); // ... and put stuff into it
        // (B) Create some new entirely different (and empty) inventory...
    Inventory results = new Inventory();
    results.inventoryResults(); // ... and print its contentsInstead of creating a second inventory, try printing the results of the first one.
    Edited by: pbrockway2 on Apr 22, 2008 12:37 PM
    Whoops ... just read reply 2.
    It might sense, though to call totalValue() at the end your input method (because at that point the total value has changed). Or do away with that method - which you worked on getting right in your other thread ;)

  • Why this line of code returns null always??

    Dear All,
    Just a question.
    I have this snippet of code where a user is required to input a number.
    <af:panelGroupLayout layout="vertical" id="pgl1">
      <af:inputText label="number" id="it1"
                        value="#{MyBean.number}" immediate="true"/>
      <af:commandButton text="Submit" id="cb1" partialSubmit="true"
                        immediate="true"
                        actionListener="#{MyBean.handleAction}"/>
    </af:panelGroupLayout>The immediate attribute at both inputtext and button are needed as I am bypassing validation on the other form components.
    Here is my bean defined in request scope.
    public class MyBean
      private String number;
      public void handleAction(ActionEvent actionEvent)
        AdfFacesContext ctx = AdfFacesContext.getCurrentInstance();
        Map<String, Object> pageFlowMap = ctx.getPageFlowScope();
        pageFlowMap.put("number", getNumber());               //Problem line getNumber is always null
      public void setNumber(String number)
        this.number = number;
      public String getNumber()
        return number;
    }I am having problem on the above line. I always get a null value on the number input text.
    Why is that so as I think I have already place a value on my Bean.
    For completeness sake, here's how I defined my managed bean
      <managed-bean id="__12">
        <managed-bean-name id="__9">MyBean</managed-bean-name>
        <managed-bean-class id="__11">com.testing.MyBean</managed-bean-class>
        <managed-bean-scope id="__10">request</managed-bean-scope>
      </managed-bean>Not sure but any workaround to this?
    Thanks
    Jdev 11G PS4

    Mohammad Jabr wrote:
    try to bind your input text to a property in your bean and use getValue() method.
    check this nice post [url http://adfpractice-fedor.blogspot.com/2012/02/understanding-immediate-attribute.html]Understanding the Immediate Attribute
    Edited by: Mohammad Jabr on Feb 22, 2012 8:25 AM
    Hi, Apparently this does work. Putting a binding on the input components.
    But somehow, I am reluctant to make use of any bindings as I am encountering issues when I expose this Taskflow as portlet in a Webcenter Application.
    But, as I have read the article, I made changes with the code. I am not using any bindings but just making use of the valuechangelistener.
    From the article, I have realized that the reason why the setter method of the bean was not called is because the Update Model Values was skipped.
    Very nice article.
    Thanks.

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

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

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

  • Need Help ::  Current row attribute value returning null

      Hi Frds,
    I am facing the problem that
    Current row attribute value returning null............ even though value is there..... plz.. he
    This is the code in PFR
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
        String  pPersonId = pageContext.getParameter("ctrlPersonId");
         String rowReference = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
         OptionsVORowImpl curRow = (     OptionsVORowImpl) am.findRowByRef(rowReference);
        String dtlsItem =  (String)curRow.getFlexValue();   /*  this is returning null value */
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks & Regards,
    jaya
    Message was edited by: 9d452cf7-d17f-4d1e-8e0e-b22539ea8810

    Hi Jaya,
    You want to catch Flexfield values?
    Try below code for catch value.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
    OADescriptiveFlexBean dfb = (OADescriptiveFlexBean)webBean.findChildRecursive("flexDFF"); //get the DFF bean
    OAWebBean dffbean = (OAWebBean)dfb.findChildRecursive("flexDFF0"); //get the field that applies to the attribute1 column that is being rendered
    OAMessageStyledTextBean Stylebean = (OAMessageStyledTextBean)dffbean;
    String dtlsItem  = (String)Stylebean.getText(pageContext);
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks,
    Dilip

  • A getName method allways returns null, why?

    I have an
    ArrayList<Animals> array_list = new ArrayList<Animals>();
    LinkedList<Animals> linked_list = new LinkedList<Animals>();
    I want the getName() method in class NewListener to be accessed from the class NextListener which extends NewListener, and therefor should get access to the method. But when I run the program, it allways returns null. Why?
    class NewListener implements ActionListener
              public String name;
              public void actionPerformed(ActionEvent e)
                   String str_name = showInputDialog(this,"Animal name: ",null);
                   if(str_name == null)
                        return;
                   for(int i=0; i<array_list.size(); i++)
                        if(array_list.get(i).getName().equalsIgnoreCase(str_name))
                             setName(str_name);                   // set the name with the setName() method
                             linked_list.add(array_list.get(i));
              public void setName(String name)
                   this.name=name;
              public String getName()
                   return name;        // this line returns "null"
                         // return "Hello";    // this line works and returns "Hello"
         class NextListener extends NewListener implements ActionListener
              public void actionPerformed(ActionEvent e)
                   try
                        linked_list .removeFirst();
                   }catch(NoSuchElementException er)
                        System.out.println("Numerical value");
                   String info =  getName()+" is in line";   // Why does the getName() method in the NewListener allways return a null?
                   showMessageDialog(this, info, "Notice", INFORMATION_MESSAGE);
         }{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Roxxor wrote:
    Ok, I changed the name to private and I also tried with
    public void setName(String name)
    System.out.println("setting name on " + this + " to " + name); // <--- ADD THIS LINE
    this.name=name;
    }and it works. So this.name SHOULD get the value of name, but it doesn�t.
    So the question is: why does getName() return null?Your code is doing exactly what you're telling it to do. One or more of your assumptions is wrong. Keep digging. Add more print statements.
    Above all, you must drop the attitude that "it should work." There's a bug in your code. You have to find it. Repeating the mantra "It should work" is simply going to put blinders on and make it almost impossible to find your error. Instead, you have to think, "What did I do wrong?" and "If getName is returning null, then setName was never called or was called with null."

  • Count(1) returns null in group by

    hi gems..good afternoon..
    I read that the COUNT() function always returns 0 (zero) if there is no matching rows in the table.
    The following code returns the 0 as expected:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686But when I used the GROUP BY clause with the query, then it returned nothing:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686
    group by client_id,book_id,book_sub_id,amountWhy this is happening..please suggest...

    gogol wrote:
    But Ranit...
    Again I am thinking...the COUNT() is an aggregate function. Now a function should return something(as per my plsql knowledge) and in this case the return datatype is integer. So why isnt it returning zero..Don't think like that sandy.
    The Group By is actually done on an empty result set, so the result is neither 0 nor NULL
    It is an empty result set.
    Check this -- http://stackoverflow.com/questions/2552086/does-count-always-return-a-result
    >
    The "return value of the 'count' function" is ALWAYS a non-null integer, without exception. By mentioning "group by", you're referencing the containing query and changing the subject of "return value" from "count function" to "query's result set". A non-grouped count query produces a result set of a single record containing the return value of count. Alternatively, a grouped count query produces a result set where each record contains a count value. In that case, if there are no groups for count to run on, count is never run and the "query return value" is an empty set.
    >
    Hope this Helps.
    Ranit B.
    Edited by: ranit B on Nov 23, 2012 5:25 PM

  • Naming.lookup() returns null???? Why??

    I read about this in a previous forum but there was no answer given to someones question about it. Sometimes Naming.lookup() returns null and a later call will succeed. Is there a recognised reason for this? Is it a recognised bug or undocumented feature?
    I have seen some sample RMI source on the Internet and sometimes the code checks for null and gives and error. The sample programs from Sun regarding RMI don't check for null.
    Has anyone ever encountered this and found a way around it?
    Thanks for you help,
    Anthony

    hi
    are you using an Activatable object??
    then, it can happens, since you won't have your object until the ActivationSytem is running.
    And it takes little time for the activation system to run.
    If u are using an 'Activatable object, i will suggest to write a loop in which you check if hte ActivationSystem was started.
    something like this
    boolean display = false;
    ActivationGroupID agi = null;
    while(true) {
    try {
    if(!display) {
    System.err.println("Trying to connect to ActivationSystem...");
    display = !display;
    agi = ActivationGroup.getSystem().registerGroup(exampleGroup);
    break;
    } catch(Exception e) {
    continue;
    }

  • GetDocumentBase returns null in Update 40

    The change to make getCodeBase() and getDocumentBase() return null has broken our FindinSite-CD signed applet which is out in the field on many data CDs and similar, ie running locally.  It doesn't provide any more security as our all-permissions applet can still access the same information (once it knows where it is).  The trouble is, the CD may be run from anywhere so I do not know the absolute path in advance. I have found that I can add code so that JavaScript is used to pass the current URL as a PARAM to the APPLET.  However this should not be necessary.
    Can you provide a better fix that does not break all our existing users who update to Update 25 or 40?
    I would be happy for our applet to have access restricted to its own directory or lower.
    Or for an all-permissions applet, make getCodeBase() and getDocumentBase() return the correct values.
    Please see the second link below for a further discussion.
    Bug ID: JDK-8019177 getdocument base should behave the same as getcodebase for file applets
    Oracle's Java Security Clusterfuck
    PS  There is a separate Firefox 23 issue stopping access to local Java applets - this should be fixed this week in version 24.
    Chris Cant
    PHD Computer Consultants Ltd
    http://www.phdcc.com/fiscd/

    Our company uses the above FindinSite-CD software to provide search functionality on our data CDs and we have done so successfully for many years.  These latest changes in Update 40 have now broken this vital component on our product and will cost us considerably in technical support time and replacing the discs when a fix comes out. Just an end user's perspective!

  • RisPort returns NULL in Response

    Hi all,
    I'm trying to write a little Java application that fetches information about phones currently registered on a CUCM 6.1 cluster.
    I've generated Java classes from the WSDL using AXL 1.4's WSDL2JAVA tool.
    The code below is using these classes to fetch phone information. My problem is that the response is giving just 0. getTotalDevicesFound() returns 0, getCmNodes() returns NULL.
    Any ideas?
    Thanks
    Jörg
    public static void main(String[] args) {
    try {
    System.out.println("---------Starting---------");
    URL url = new URL("https://192.168.38.151:8443/realtimeservice/services/RisPort");
    RISServiceLocator loc = new RISServiceLocator();
    RisPortType port = loc.getRisPort(url);
    ((RisBindingStub) port)._setProperty(Call.USERNAME_PROPERTY, "ccmadministrator");
    ((RisBindingStub) port)._setProperty(Call.PASSWORD_PROPERTY, "sbh7113");
    StringHolder stateInfo = new StringHolder("1");
    CmSelectionCriteria cmSelectionCriteria = new CmSelectionCriteria();
    cmSelectionCriteria.setStatus("Any");
    cmSelectionCriteria.set_class(DeviceClass._Phone);
    cmSelectionCriteria.setSelectBy("Name");
    cmSelectionCriteria.setModel(new UnsignedInt(255));
    cmSelectionCriteria.setMaxReturnedDevices(new UnsignedInt(100));
    SelectCmDeviceResult res = port.selectCmDevice(stateInfo, cmSelectionCriteria);
    UnsignedInt number = res.getTotalDevicesFound();
    CmNode[] nodes = res.getCmNodes();
    System.out.println("---------Listing result---------");
    System.out.println(number.intValue());
    System.out.println(nodes.length);
    System.out.println("---- DONE ----");
    } catch(Exception e) {
    e.printStackTrace();

    Hi:
    How did you compile and build the package using WSDL2JAVA. I tried under UCM 6.1 environment but receiving error message on 2 of the classes that, too large object.
    axisbuild:
    compiling 1007 source files
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:4026:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    Error
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:18:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    static {
    Error
    2 Errors
    Please let me know if you have any thoughts on this.
    Thank You
    Ramesh Vasudevan

  • GetConnectionURL returns null in Bluetooth Application

    Hi,
    I am trying to make my first steps with the JSR-82 API on mobile phones
    (Nokia 6680 and Sony Ericsson W800i). I have written a simple program
    (see code below), which is supposed to discover near-by devices, search
    for a given service (UUID) on a chosen (previously discovered) device
    (=server) and then to connect to the server and send a byte (n) to it. The
    server should then in turn send n+1 back. All this should be done using
    RFCOMM.
    The code works fine in the emulator as well as on two Nokia phones and
    on two SE phones. It further works, when using a Nokia phone as the
    server and a SE phone as the client. However, when using a SE as the
    client and a Nokia as the server, the call to getConnectionURL() returns
    null instead of a valid URL that can be used to set up the connection
    (you can find this piece of code in the ClientThread class). Can somebody
    explain me what I am doing wrong?
    Thanks,
    Michael
    P.S.:At first I thought it might be a compatibility problem, but in the
    BluetoothDemo program that comes with WTK2.2 the correct URL ist
    returned by getConnectionURL() (have other problems with this example
    though, when it comes to download images, in particular...).
    import java.io.IOException;
    import java.util.Vector;
    import javax.bluetooth.BluetoothStateException;
    import javax.bluetooth.DataElement;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.DiscoveryAgent;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.LocalDevice;
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.ServiceRecord;
    import javax.bluetooth.UUID;
    import javax.microedition.io.StreamConnectionNotifier;
    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.AlertType;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.List;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    public class MessageTest2 extends MIDlet
          implements CommandListener, DiscoveryListener {
          private final int START = 0;
          private final int SERVER_IDLE = 1;
          private final int CLIENT_START = 2;
          private final int CLIENT_DEVICES_DISCOVERED = 3;
          private final int CLIENT_SERVICES_DISCOVERED = 4;
          private final String MY_UUID = "F0E0D0C0B0A000908070605040302010";
          private final Command EXIT_CMD = new Command("Exit", Command.EXIT, 1);
          private final Command OK_CMD = new Command("Ok", Command.OK, 1);
          private List startList = new List("Select Type", List.IMPLICIT);
          private List deviceList = null;
          private List serviceList = null;
          private Form mainForm = new Form("Message Test 2");
          private int state;
          private ServerThread serverThread = null;
          private LocalDevice local = null;
          private DiscoveryAgent agent = null;
          StreamConnectionNotifier server = null;
          private Vector devicesFound = null;
          private ServiceRecord[] servicesFound = null;
          public MessageTest2() {
                super();
                mainForm.addCommand(EXIT_CMD);
                mainForm.addCommand(OK_CMD);
                mainForm.setCommandListener(this);
                startList.addCommand(EXIT_CMD);
                startList.addCommand(OK_CMD);
                startList.append("Server", null);
                startList.append("Client", null);
                startList.setCommandListener(this);
          protected void startApp() throws MIDletStateChangeException {
                state = START;
                Display.getDisplay(this).setCurrent(startList);
          protected void pauseApp() {
                // TODO Auto-generated method stub
          protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
                // TODO Auto-generated method stub
          public void commandAction(Command c, Displayable d) {
                if (c == EXIT_CMD) {
                      if (server != null) {
                            try {
                                  server.close();
                            } catch (IOException e) {
                      notifyDestroyed();
                if (c == OK_CMD) {
                      if (state == START) {
                            if (startList.getSelectedIndex() == 0) {
                                  startServer();
                            } else {
                                  startClient();
                      } else if (state == CLIENT_START) {
                            doDeviceDiscovery();
                      } else if (state == CLIENT_DEVICES_DISCOVERED) {
                            doServiceDiscovery();
                      } else if (state == CLIENT_SERVICES_DISCOVERED) {
                            communicate();
          public void deviceDiscovered(RemoteDevice dev, DeviceClass devClass) {
                devicesFound.addElement(dev);
          public void servicesDiscovered(int transID, ServiceRecord[] serviceRecs) {
                servicesFound = serviceRecs;
          public void serviceSearchCompleted(int transID, int respCode) {
                switch(respCode) {
                case DiscoveryListener.SERVICE_SEARCH_COMPLETED:
                      showServices();
                      break;
                case DiscoveryListener.SERVICE_SEARCH_DEVICE_NOT_REACHABLE:
                      System.err.println("Device not reachable");
                      break;
                case DiscoveryListener.SERVICE_SEARCH_ERROR:
                      System.err.println("Service search error");
                      break;
                case DiscoveryListener.SERVICE_SEARCH_NO_RECORDS:
                      System.err.println("No records");
                      break;
                case DiscoveryListener.SERVICE_SEARCH_TERMINATED:
                      System.err.println("Service search terminated (cancelled)");
                      break;
          public void inquiryCompleted(int param) {
                switch (param) {
                case DiscoveryListener.INQUIRY_COMPLETED:
                      showDevices();
                      break;
                case DiscoveryListener.INQUIRY_ERROR:
                      System.err.println("Inquiry error");
                      Display.getDisplay(this).setCurrent(mainForm);
                      break;
                case DiscoveryListener.INQUIRY_TERMINATED:
                      System.err.println("Inquiry terminated (cancelled)");
                      Display.getDisplay(this).setCurrent(mainForm);
                      break;
          public void setServer(StreamConnectionNotifier server) {
                this.server = server;
          private void startServer() {
                state = SERVER_IDLE;
                mainForm.deleteAll();
                mainForm.append("Server");
                Display.getDisplay(this).setCurrent(mainForm);
                String connectionURL = "btspp://localhost:" + MY_UUID + ";"
                      + "authenticate=false;encrypt=false;name=RFCOMM Server";
                try {
                      local = LocalDevice.getLocalDevice();
                      local.setDiscoverable(DiscoveryAgent.GIAC);
                } catch (BluetoothStateException e) {
                      System.err.println(e);
                serverThread = new ServerThread(this, connectionURL);
                serverThread.start();
                System.out.println("Server thread started");
          private void startClient() {
                state = CLIENT_START;
                mainForm.deleteAll();
                mainForm.append("Discover?");
                Display.getDisplay(this).setCurrent(mainForm);
          private void doDeviceDiscovery() {
                Form discoveringForm = new Form("discovering");
                try {
                      local = LocalDevice.getLocalDevice();
                } catch (BluetoothStateException e) {
                      System.err.println(e);
                agent = local.getDiscoveryAgent();
                devicesFound = new Vector();
                try {
                      if (!agent.startInquiry(DiscoveryAgent.GIAC, this)) {
                            System.err.println("Inquiry not started...");
                } catch (BluetoothStateException e) {
                      System.err.println(e);
                Display.getDisplay(this).setCurrent(discoveringForm);
          private void doServiceDiscovery() {
                if (devicesFound.size() <= 0) return;
                int[] attributes = {0x100, 0x101, 0x102};
                UUID[] uuids = new UUID[1];
                uuids[0] = new UUID(MY_UUID, false);
                int index = deviceList.getSelectedIndex();
                RemoteDevice rd = (RemoteDevice)devicesFound.elementAt(index);
                try {
                      agent.searchServices(attributes, uuids, rd, this);
                } catch (BluetoothStateException e) {
                      System.err.println(e);
          private void showDevices() {
                state = CLIENT_DEVICES_DISCOVERED;
                deviceList = new List("Discovered Devices", List.IMPLICIT);
                deviceList.addCommand(EXIT_CMD);
                deviceList.addCommand(OK_CMD);
                deviceList.setCommandListener(this);
                for (int i = 0; i < devicesFound.size(); i++) {
                      RemoteDevice rd = (RemoteDevice)devicesFound.elementAt(i);
                      String str = rd.getBluetoothAddress();
                      try {
                            str = str + " " + rd.getFriendlyName(false);
                      } catch (IOException e) {
                      deviceList.append(str, null);
                Display.getDisplay(this).setCurrent(deviceList);
          private void showServices() {
                state = CLIENT_SERVICES_DISCOVERED;
                if (servicesFound.length <= 0) {
                      mainForm.deleteAll();
                      mainForm.append("no services found");
                      mainForm.append("discover devices?");
                      state = CLIENT_START;
                      Display.getDisplay(this).setCurrent(mainForm);
                      return;
                serviceList = new List("Services Found", List.IMPLICIT);
                serviceList.addCommand(EXIT_CMD);
                serviceList.addCommand(OK_CMD);
                serviceList.setCommandListener(this);
                for (int i = 0; i < servicesFound.length; i++) {
                      String str;
                      ServiceRecord sr = (ServiceRecord)servicesFound;
    DataElement de = sr.getAttributeValue(0x100);
    str = (String)de.getValue();
    serviceList.append(str, null);
    Display.getDisplay(this).setCurrent(serviceList);
    private void communicate() {
    int index = serviceList.getSelectedIndex();
    ServiceRecord sr = (ServiceRecord)servicesFound[index];
    ClientThread clientThread = new ClientThread(this, sr);
    clientThread.start();
    public void showResult(int n) {
    Form resultForm = new Form("End");
    resultForm.addCommand(EXIT_CMD);
    resultForm.setCommandListener(this);
    resultForm.append("Received: " + n);
    Display.getDisplay(this).setCurrent(resultForm);
    public void showMessage(String msg) {
    Displayable d = Display.getDisplay(this).getCurrent();
    Alert al = new Alert("Info", msg, null, AlertType.INFO);
    al.setTimeout(Alert.FOREVER);
    Display.getDisplay(this).setCurrent(al, d);
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.microedition.io.Connector;
    import javax.microedition.io.StreamConnection;
    import javax.microedition.io.StreamConnectionNotifier;
    public class ServerThread extends Thread {
          private MessageTest2 parent;
          private StreamConnectionNotifier server;
          private String connectionURL = null;
          public ServerThread(MessageTest2 parent, String connectionURL) {
                this.parent = parent;
                this.connectionURL = connectionURL;
          public void run() {
                StreamConnection conn = null;
                try {
                      server = (StreamConnectionNotifier) Connector.open(connectionURL);
                } catch (IOException e) {
                      System.err.println(e);
                parent.setServer(server);
                try {
                      conn = server.acceptAndOpen();
                } catch (IOException e) {
                      System.err.println(e);
                InputStream in = null;
                int n = -1;
                try {
                      in = conn.openInputStream();
                      n = in.read();
                } catch (IOException e) {
                      System.err.println(e);
                if (in != null) {
                      try {
                            in.close();
                      } catch (IOException e) {
                            System.err.println(e);
                try {
                      OutputStream out;
                      out = conn.openOutputStream();
                      out.write(n + 1);
                      out.flush();
                } catch (IOException e) {
                      System.err.println(e);
                try {
                      conn.close();
                } catch (IOException e) {
                      System.out.println(e);
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.bluetooth.ServiceRecord;
    import javax.microedition.io.Connector;
    import javax.microedition.io.StreamConnection;
    public class ClientThread extends Thread {
          private MessageTest2 parent;
          private ServiceRecord sr;
          public ClientThread(MessageTest2 parent, ServiceRecord sr) {
                this.parent = parent;
                this.sr = sr;
          public void run() {
            StreamConnection conn = null;
            String url = null;
            int n = 0;
            try {
                url = sr.getConnectionURL(
                        ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
                if (url == null) {
                      parent.showMessage("URL null");
                      return;
                conn = (StreamConnection) Connector.open(url);
            } catch (IOException e) {
                System.err.println("Note: can't connect to: " + url);
            try {
                OutputStream out = conn.openOutputStream();
                out.write(n);
                out.flush();
                out.close();
                InputStream in = conn.openInputStream();
                n = in.read();
            } catch (IOException e) {
                System.err.println("Can't write to server for: " + url);
            try {
                  conn.close();
            } catch (IOException ee) {
                  System.err.println(ee);
            parent.showResult(n);

    Hi:
    How did you compile and build the package using WSDL2JAVA. I tried under UCM 6.1 environment but receiving error message on 2 of the classes that, too large object.
    axisbuild:
    compiling 1007 source files
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:4026:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    Error
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:18:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    static {
    Error
    2 Errors
    Please let me know if you have any thoughts on this.
    Thank You
    Ramesh Vasudevan

Maybe you are looking for

  • Aufgabenleiste Acrobat Pro 9.0

    Früher gab es eine "Aufgabenleiste"(?) mit weiteren Funktionen, die rechts im Bildschirm sichtbar war. Seit dem Umstieg auf WIN 8.0 ist diese "verschwunden". Wie kann ich diese wieder einblenden? Ich brauche unter anderem die Funktion "Inhalt bearbne

  • Problem for using oracle xml parser v2 for 8.1.7

    My first posting was messed up. This is re-posting the same question. Problem for using oracle xml parser v2 for 8.1.7 I have a sylesheet with <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">. It works fine if I refer this xsl file in xml fil

  • Import CD not working after iTunes Upgrade

    I just upgraded to iTunes 6.0.4.2 and now I can't import any CD's. My system is freezing, my CPU is pegged at 100% and the CD Rom is not even spinning. However, my HardDrive light is lit solid. Any ideas?

  • Goods issue for the CO Order

    Hello everybody. I have some problems in issuing goods for the CO order(moving type 261) in MIGo transaction. Message no. C6001          "Order XXXXXXX not found or not permitted for goods movement" Please, help me..... Thanks in advance P.S. I am a

  • Exporting Each question to LMS

    Hello, Is there a way that we can export each question within a captivate presentation to a LMS system. I do know that we can export the results pass/fail etc.. Our issue is that we can't view the errors in the questions or be able to review the prob