Warning: java.lang.NullPointerException

sathyadinesh_at_gmail.com
Date: 10/01/04

  • Next message: Phill: "Re: Office document upload to website (and inserting in MySQL if possible)"
    Date: 1 Oct 2004 04:53:36 -0700
    
    

    HI all,

    I am trying to use PHP / JAVA CLASS / MSSQL.

    When i am trying to call the class file thru php. It is thorwing me
    the following error:

    Warning: java.lang.NullPointerException in a.php line 3

    But, My PHP & Java integration is working fine.. i could able get the
    test page by using the below code.

    ###########################################################################
    <?php
      // get instance of Java class java.lang.System in PHP
      $system = new Java('java.lang.System');

      // demonstrate property access
      print 'Java version='.$system->getProperty('java.version').' <br>';
      print 'Java vendor=' .$system->getProperty('java.vendor').' <br>';
      print 'OS='.$system->getProperty('os.name').' '.
                   $system->getProperty('os.version').' on '.
                   $system->getProperty('os.arch').' <br>';

      // java.util.Date example
      $formatter = new Java('java.text.SimpleDateFormat',
                             "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");

      print $formatter->format(new Java('java.util.Date'));
     
    REsult of the above code:

    Java version=1.3.1_02
    Java vendor=Sun Microsystems Inc.
    OS=Linux 2.2.16-22 on i386
    Friday, October 01, 2004 at 4:59:32 PM GMT+05:30

    Pls Help....


  • Next message: Phill: "Re: Office document upload to website (and inserting in MySQL if possible)"

    Relevant Pages

    • java & php
      ... The script stucks in bottom frame. ... The java class is my ... I don't know where the problem is, but if I write the php code - the ...
      (comp.programming)
    • java & php
      ... The script stucks in bottom frame. ... The java class is my ... I don't know where the problem is, but if I write the php code - the ...
      (comp.lang.php)
    • use XMLRPC with PHP and JAVA
      ... I want to use PHP call to Java class with XMLRPC. ... I can't pass array from PHP to Java method. ... In documentation it use ...
      (comp.lang.php)
    • Re: [PHP] Re[2]: Path of the class file of an object
      ... I guess the word "meaningless" depends on what you are trying to do. ... to pass a php object to javascript via json and then back to php again ... but type casting would work if and only if I have class file of the object ...
      (php.general)
    • Re: [PHP] Oputting Forms Within a Class
      ... "Parse error: ... Your buildInt() function jumps directly from PHP into HTML output, without first closing the currently open PHP tag. ... I would strongly recommend that you make your class file do one of two things: ...
      (php.general)