Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,284 of 2,288    |
|    Matt to All    |
|    Inconsistent behaviour creating java sto    |
|    15 Apr 04 14:34:34    |
   
   From: not@this.address.com   
      
   I'm new to Java but experienced with PL/SQL. I've found what appears to be   
   strange behaviour (a bug?) when attempting to create java stored objects   
   using the UNIX version of Oracle SQL*PLUS 8.1.7.3.0 with JServer 8.1.7.3.0.   
   The reason it seams strange is that the problem only occurs with the UNIX   
   version of SQL*PLUS, not the PC client version running on Windows 2000 but   
   connected to the same database and schema. Can anyone shed any light on   
   this? Details below.   
      
   The class below appears to be valid Java because it compiles without error   
   using the Sun JDK 1.4.   
      
   public class Mathematics {   
    public static long lbitand (long Number1, long Number2) {   
    try {   
    long iReturn = Number1 & Number2;   
    return iReturn; }   
    catch (Exception e) {   
    return -1; }   
    }   
   };   
      
   If I attempt to create this java class as a stored object in the database I   
   can do this using the PC client SQL*PLUS running Windows 2000 and connect to   
   the database running UNIX on a Sun machine. The code is:   
      
   CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Mathematics" AS   
   public class Mathematics {   
    public static long lbitand (long Number1, long Number2) {   
    try {   
    long iReturn = Number1 & Number2;   
    return iReturn; }   
    catch (Exception e) {   
    return -1; }   
    }   
   };   
      
   I have tested this and the java works as intended in a PL/SQL application.   
      
   However, when I attempt to complile the same script using the UNIX version   
   of SQL*PLUS connected to the same database and schema it fails. I have   
   attempted to find out why it fails in the UNIX version of SQL*PLUS. When I   
   modify the script to attempt to isolate the problem the error messages from   
   the UNIX SQL*PLUS vary but appear unhelpful (for example
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca