Bug? Ambiguous error on overloaded varargs

Hi!
I don't understand why the following code throws an ambigous error.
I simply create two same-named methods using varargs, one time for int, one time for float.
If I call it I would suppose that it is resolved in the same way as always on overloaded methods, i.e. the first example should call the int... - version, the third the float...
But Java throws an ambiguous error at compile-time, though an implicite cast from int to float is not neccessary if all parameters are pure int. Further no error is thrown when passing an int[]-array.
This seems to me like a kind of bug. I'm using version 1.5.0_06
public class TempTest {
     public static int getFirst(int... A) {
          return A[0];
     public static float getFirst(float... A) {
          return A[0];
     public static void main(String args[]) throws Exception
          System.out.println(getFirst(1,2,3)); // throws ambiguous-error during compilation
          System.out.println(getFirst(new int[]{1, 2, 3})); // works as suspected for int
          System.out.println(getFirst(1f,2,3)); // works as suspected for float
          System.out.println(getFirst(new float[]{1, 2, 3})); // works as suspected for float
}

Ok, I read the chapter but I don't see the reason for this behaviour. Let's assume another more clear example:
There are simply two methods for finding the maximum of the passed parameters, either passed as int or float
public class TempTest {     
     public static int max(int... a) {
          int max=a[0];
          // find the max of all
          return max;
     public static float max(float... a) {
          float max=a[0];
          // find the max of all
          return max;
     public static void main(String args[]) throws Exception
          max(1,2,3,4,5); // ambiguous, though calling int[] suspected
}I understood the section 15.12 as follows:
1. find accessible and applicable methods, here both max(int...a) and max(float...a) will do it
2. try to find a most specific of them:
Assuming that an implicite cast is handled as e.g. int <: float in 15.12.2.5 it is that int[] <: float[] but NOT that float[] <: int[].
Therefore max(int...a) is strictly more specific and maximally specific, so it should be used, and no ambiguous error thrown.
So it seems that my assumption that implicite type-casting is handled in the same manner as e.g. int <: float is wrong, though I don't know why.
In my opinion the whole varargs-concept is more or less useless, if you cannot overload a method with them like e.g. max(int... a) and max(float... a), though intuitively it is absolutely clear, that calling max(1,2,3,4) or e.g. explicitely max((int) 1, (int) 2, (int) 3) should call the int-version or any other that is nearest in implicite type-casting.
So at least pragmatically I cannot be reasonable as long as I don't see any clear reason for that methodcall being ambiguous.
[EDIT]
I think I got the problem now:
Though int <: float it is NOT true that int[] <: float[]. Simple because:
int i = 3;
float f = i; // ok
int[] iarr = new int[4];
float[] farr = (float[]) iarr; // not possibleThis seems to be the problem when finding the most specific method, because it is neither int[] <: float[] nor float[] <: int[], so ambiguous.
I see the problem now:
It is (nearly) impossible to convert between arrays of primitives when passing them by reference. Imagine: changes to the converted referenced array should have to be written back to original array of other primitive type!
But then there >should< have be done any other trick when implementing varargs, because as mentioned before it is just a silly feature if it is not possible to overload in such a simple manner as max(int... a) with max(float... a)
[EDIT]
Message was edited by:
wagalaweia

Similar Messages

  • LV 8.0.1 Bug, no error when unflattening mis-matched data type

    When unflattening a string and wiring a "type" that does not match the original format of the data, sometimes I don't get an error and I get no data. I've attached a VI written in 8.0.1 that illustrates 2 examples of this. In LV 7.1 these cases did return an error, but not in 8.0.1. Can anyone offer some insight or global solution?
    Thanks, Chip
    Attachments:
    LV 8 Bug, no error trapped on mismatched type when unflattening string.vi ‏23 KB

    Good afternoon,
    Well, this certainly is an interesting situation.  In the example “Unflatten string returns data
    from previous iterations”, the second iteration of the for loop unflattens a
    string as an array of strings type, this is obviously a type mismatch so if any
    data is returned I wouldn’t expect it to be valid.  What is even more interesting, is that if you
    don’t use the auto indexing, but rather explicitly index the array there is no
    error, but the data returned is like it was in 7.x.  I tried to use the flatten function’s
    “convert 7.x data function with no luck in either case.  I filed a bug report on this issue (number
    3X0CBC3A), but it seems to me the only workaround for now is going to be just
    making sure the types match.  I know this
    is going to be inconvenient for you, and for that I apologize.
    Incidentally, in many cases I wouldn’t necessarily expect an
    error to be generated if the types don’t match. 
    This is because the flatten to string function takes your data and
    converts it to a string which is nothing more than a byte[ ] of data with some
    size information.  When you “unflatten”
    the function takes the string it is given, and attempts to reconstruct the data
    in the format that is specified by the “type” input.  If it can reconstruct the data from type,
    regardless of the data returned I wouldn’t expect it to generate an error.  Sometimes, however, an error can be detected
    – if you flatten a double-precision number and unflatten to a single precision
    number LabVIEW can detect that the incoming data represents something much
    larger than a single precision number.  I
    suppose that LabVIEW 7 did a better job checking the size of the sting before
    deciding whether or not to generate an error.
    Again, I apologize for the problems this may cause.  Please let me know if there is anything else
    I can help with.
    Travis M
    LabVIEW R&D
    National Instruments

  • Time Machine - ambiguous error message, cannot backup

    I've been without use of Time Machine for sometime (months) now.  I've been getting the following error:
    My backup drive (Seagate FreeAgent GoFlex - 320GB) was a attached to my Airport Extreme, but in desperation I moved it to being directly attached to my MBP.  I've also excluded large number of files from the back up (reduced the full backup size to half the size of the backup disk).  Also, I've erased and reformatted the back up disk - twice.  No errors on it either.
    What would be really helpful, was if there was some indication as to WHAT the problem actually is.  This is a rather ambiguous error message, which does little to help a person to troubleshooot.  It seems like the backup is being hung up on a file or files...but I'm just guessing.
    Has anybody out there run into this?  If so, what was your solution?

    [edit] is just that....
    May 14 14:48:17 [edit]-MacBook-Pro com.apple.backupd[1764]: Starting standard backup
    May 14 14:48:17 [edit]-MacBook-Pro com.apple.backupd[1764]: Backing up to: /Volumes/ExternalDrive/Backups.backupdb
    May 14 14:48:17 [edit]-MacBook-Pro com.apple.backupd[1764]: Ownership is disabled on the backup destination volume.  Enabling.
    May 14 14:51:04 [edit]-MacBook-Pro com.apple.backupd[1764]: Backup content size: 245.6 GB excluded items size: 137.7 GB for volume Macintosh HD
    May 14 14:51:04 [edit]-MacBook-Pro com.apple.backupd[1764]: 129.53 GB required (including padding), 297.57 GB available
    May 14 14:51:04 [edit]-MacBook-Pro com.apple.backupd[1764]: Waiting for index to be ready (101)
    May 14 15:02:46 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Library/Printers/EPSON/EPSON PIC Folder/EPPICPattern126.dat to (null)
    May 14 15:31:49 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/7b8a42966b914320a4db3ac5eddaa32064d29fcc to (null)
    May 14 15:32:04 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/86871b8b230c5a0ca23ec5789cac825a1e7026ee to (null)
    May 14 15:32:15 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/86d83f36949ec4330f43bc2af1adddfd19e52056 to (null)
    May 14 15:32:27 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/86f96503cca926e69f0c2f8cf372171727749536 to (null)
    May 14 15:32:38 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/873122ebefa3dd47cffcb054df63bd3a35791916 to (null)
    May 14 15:32:50 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/87510b15fb7fc3d3e7032b143d3de4e5e87c05ff to (null)
    May 14 15:33:01 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/876fb2d3a73264a6c081b320e7f47071da0637b2 to (null)
    May 14 15:33:13 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/87843f0b63a7e5c3538844828dc4536b56b10e54 to (null)
    May 14 15:33:25 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/878ad7fc28317553ffc49b4a08c8e514019700b0 to (null)
    May 14 15:33:37 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/87d14e27e2f738ff1a6e39c08e064e5dbcc3e26f to (null)
    May 14 15:33:48 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/88dd812d4e95170a8a5fcaac47af473556b51e1f to (null)
    May 14 15:34:00 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/8999862e4421fe066253d175b6026b16f03b1657 to (null)
    May 14 15:34:12 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/89bcb0705dc484e7bcd2e7bdebe3fd66357d27a5 to (null)
    May 14 15:34:32 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/ae530ff4961a820911be360b64d8300327d01bae to (null)
    May 14 15:34:43 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/ae767b8458cc53ed334e27a0100d1172ceff1272 to (null)
    May 14 15:34:55 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/ae79df406dc5da5e53f72ce7816f7f654507b294 to (null)
    May 14 15:35:06 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/aefea7b028355af5ade04018c304884413d7d12c to (null)
    May 14 15:35:18 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/af0536e1b8ba4cfa4ec3353e41bbdf803fbde764 to (null)
    May 14 15:35:29 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/af2dea9017f80796663317a0daa77aa72f243315 to (null)
    May 14 15:35:41 [edit]-MacBook-Pro com.apple.backupd[1764]: Stopping backup.
    May 14 15:35:41 [edit]-MacBook-Pro com.apple.backupd[1764]: Error: (-36) SrcErr:YES Copying /Users/[edit]/Library/Application Support/MobileSync/Backup/68a48479fa6e73fdbacc33daf3c003dcbfab9c3e-20120509-095 758/af59c8a32e747af22d90fdf3b108745b1d99fef1 to (null)
    May 14 15:35:42 [edit]-MacBook-Pro com.apple.backupd[1764]: Copied 411032 files (19.7 GB) from volume Macintosh HD.
    May 14 15:35:42 [edit]-MacBook-Pro com.apple.backupd[1764]: Copy stage failed with error:11
    May 14 15:35:52 [edit]-MacBook-Pro com.apple.backupd[1764]: Backup failed with error: 11
    ...so, what's up with the "Error: (-36)" on all the "MobileSync" entries...???
    Message was edited by: CalgaryRyan

  • Bug in error handling.

    I found something wich seems a bug in error handling.
    I created a JClient application and I declared my error handler using JUMetaObjectManager.setBaseErrorHandler.
    It works normaly.
    I created a method wich I connected to the WindowClosing event.
    In that method I throw a JBOException in order to inform the user the operation can't be executed.
    However I see that message only into the console and my error handler (wich shows a Dialog) is not used.
    What's the problem ?
    Tks
    Tullio

    Repost

  • Finder's Nasty Inherited ACL Bug (aka Error -41)

    CNET, MacFixit, and a few other technical blogs recently reported on an apparent ACL issue which seems to have existed in OS X Snow Leopard since OS X 10.6.0, but has gotten particularly bad in OS X 10.6.5, 10.6.6, and 10.6.7 (both client and server versions). The symptom is that when inherited ACLs are present in an OS X 10.6.x system, it's possible to overflow the ACLs with "crud" (unwarranted extraneous ACEs) by performing simply copy / clone operations in the Finder, AppleScript and other "Finder-like" programs that can eventually overflow the 128 entry limit per ACL.
    In reading the original posters postings (www.brunerd.com/blog/2011/03/22/finders-nasty-inherited-acl-bug-aka-error-41/ and openradar.appspot.com/9160099) I got really worried about our production OS X servers, but after some experimentation discovered a happy accident: it’s quite easy to overflow ACLs when performing repeated copy or duplicate operations on folder hierarchies on locally attached filesystems (whether attached on a client or server), but in actually it's much harder to make that happen with AFP-mounted filesystems having to do with a slower growth curve of the "crud" that develops as users copy / duplicate folders.
    Since ACLs tend to be fairly rarely deployed on OS X client systems, you also don't tend to run into the problem (I point out Drop Boxes as a possible exception), but IT administrators can run into this problem quite easily when cloning fairly deep server-side folder hierarchies in the Finder on an OS X Server.
    If your users are encountering "Finder -41" errors when performing seemingly simple operations in the Finder, this type of ACL overflow may be explanation. You might want to read up on the thread developing at www.brunerd.com/blog/2011/03/22/finders-nasty-inherited-acl-bug-aka-error-41/ for further details.

    This has been an ongoing issue since 10.6.5. See this thread: http://discussions.apple.com/thread.jspa?threadID=2686643&tstart=0
    The only real fix is to downgrade the clients to 10.6.4. What I've been doing is reapplying the ACL's from the server admin tool after each tape rotation. That way I'm not using up extra tapes since NetVault will back up the files again if the ACL has changed. The other thing I have some users doing is opening up the file they want to copy and doing a save as to the destination. That way doesn't seem to duplicate the permissions.

  • Some small bugs and errors

    Hi,
    In the meantime, waiting for the DPS network fix, I have some small bugs and errors to post:
    #1: When signed ot from the folio builder panel, the click to create new folio message isn't useful, as it doesn't work. You must be signed in.
    #2: "System Status" cut off on the DPS Status Website:

    Hi Bob,
    Just tested again. but nope, it doesn't work for me anymore. Since one of the latest updates, I can only create folios, when I'm signed in. Here is my video proof:
    This is the case for me on two (tested) computers running CS5.5 and CS6!
    That's why I thought this feature has been removed.

  • Ambiguous Error

    Hi i m getting Ambiguous Error in my program, can ne one tel me plz wats that mean?
    Error:
    java.beans.Statement > Ambiguous Error

    it is because ur program is earlier in 1.3 n now ur running in 1.4 or higher..............
    In 1.4 java.bean.Statement class is introduced where as java.sql.Statement Interface was earlier there, so the compiler is confused about which statement object to take.
    Just write java.sql.Statement where u r using Statement n write me if still problem wil come
    Sumit

  • Overloading ambiguity errors

    Any suggestions on how to resolve the error below?
    "/opt/SUNWspro/current-compiler/include/CC/Cstd/./vector", line 1131: Error: Overloading ambiguity between
    "std::distance<std::vector<bool, std::allocator<bool>>::const_iterator, unsigned>(std::vector<bool,
    std::allocator<bool>>::const_iterator, std::vector<bool, std::allocator<bool>>::const_iterator, unsigned&)"
    and "distance<std::vector<bool, std::allocator<bool>>::const_iterator, unsigned>(std::vector<bool,
    std::allocator<bool>>::const_iterator, std::vector<bool, std::allocator<bool>>::const_iterator, unsigned&)".
    Sometimes the subsequent "Where: While instantiating ...." helps locate the ambiguity.
    (None in this case. ) If this error were coming from user code, specifying '::' or 'std::' helps.
    But when it is in one of the CC include files, is there a recommended approach?
    Any input is appreciated.
    % CC -V
    CC: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
    Thanks.

    If you have copied the error message correctly, it appears you have declared your own "distance"function template outside namespace std, which is causing the ambiguity.
    If you haven't done that, you might have run into a compiler bug. C++ 5.2 is obsolete and is no longer supported, but you can download the most recent patches for it here
    http://wwws.sun.com/software/products/studio/patches/index.html
    and see if that fixes the problem. (In your case, select the link for Forte Developer 6 update 1. The most recent patches are from about 2002.)
    If patches don't help, see if you can post a small compilable code sample that shows the problem.

  • Non-existent overloading ambiguity error on valid code

    $ cat >test.cxx
    #include <string>
    template <typename C, typename X>
    void
    f (std::basic_string<C> const&, X& );
    template <typename C>
    void
    f (std::basic_string<C> const&, unsigned char& );
    template<typename X>
    struct S
      template <typename C>
      S (std::basic_string<C> const& str)
        f (str, x_); // Error
      X x_;
    void
    g ()
      std::string str;
      unsigned char uc;
      f (str, uc); // Ok
      S<unsigned char> s (str);
    $ CC -V
    CC: Sun C++ 5.8 2005/10/13
    $ CC -c test.cxx
    "test.cxx", line 17: Error: Overloading ambiguity between "f<char, unsigned char>(const std::string &, unsigned char&)" and "f<char>(const std::string &, unsigned char&)".BTW, is there a no-nonsense (like paying Sun to report bugs in Sun's products) bug-tracking system where I can report things like this directly?
    hth,
    -boris

    Yes, it's a compiler bug. I have filed bug report 6370669 for you.
    If you have a service contract with Sun, you can monitor progress on fixing the bug and get early access to a fix before a patch is released. Otherwise, you can check the Sun Studio patch page from time to time to see if a new patch is available that fixes the bug.
    http://developers.sun.com/prodtech/cc/downloads/patches/
    We do not currently have a mechanism to allow customers to file or track Sun Studio bug reports directly.

  • Wrong overloading ambiguity error

    Hi,
    The following compiles on Studio 7, but not on Studio 11, where an error is reported:
    Error: Overloading ambiguity between "myString::operator char*&()" and "myString::operator char*()"
    However, when myStr is defined const, then the code compiles.
    Why this difference in the behaviour of the compilers? Is it intended? Should unaccesible operators be checked for ambiguity? Why does the compiler check for ambiguity of methods which it obviously should not select in this case?
    #include <string.h>
    class myString {
      private:
         char * content;
      public:
         myString(const char * str) { content = new char[strlen(str)+1]; strcpy(content,str);};
         operator char*&() { char * cpy = new char[strlen(content)+1]; strcpy(cpy,content); return cpy;};
         operator const char* () const {return content;};
      private:
         operator char*() { char * cpy = new char[strlen(content)+1]; strcpy(cpy,content); return cpy;};
    int main() {
         myString myStr = "MyString Test String"; // COMPILE ERROR HERE
         const char * str = myStr;
         return 0;
    };

    The error is not on the marked line, but on the next
    line:
    const char * str = myStr;Yes, you are right, I marked the wrong line.
    >
    The rule for resolving overloaded functions is that
    all visible functions that can be called with the
    given arguments ("viable functions" in the
    terminology of the standard) are checked, and the
    best match is looked for.
    If there is no single best match, the call is
    ambiguous, an error.
    Only if there is a best match is accessibility
    checked. If the best match is not accessible, the
    call is in error.In this case, wouldn't the const operator be the best match?
    >
    The reason for checking accessibility last is to
    prevent changes in accessibility from changing the
    result of operator overload resoution. One can
    imagine different rules, but that is the C++ rule.
    (C++ Standard, section 13.3)This should only apply here if the compiler decided not to select the constant operator over the other operators. That would mean that doing two conversions (MyString -> char*/& -> const char*) would be preferred over doing one conversion (MyString -> const char *).
    Does this conform to the C++ standard rules?

  • Ical bug/spurious error

    iCal gives me an error about having been invited to a meeting using an email address that is not in my address book entry (not true!) when I attempt to import (by clicking on the .ics file attachment in Mail.app) them to my calendar.
    Specifically teh dialog box says:
    "There was a problem receiving this event invitation
    Someone invited you to an event using an emaila ddress that isn't on your "me" card in Address Book. Find your email address in teh following list and add it to your card in Address Book
    [cancel][clear notification][open address book]
    ie. no list of email addresses to find.
    However, I've just found that the offending line in the .ics file is nothing to do with email address, it's this one:
    RECURRENCE-ID;TZID="GMT -0000 (Standard) / GMT +0100 (Daylight)":20070313T1 10000
    take it out and the event goes in fine, leave it in and you get the error above which is totally spurious.
    please fix, Apple!
    imac 20"   Mac OS X (10.4.8)   ical 2.0.4 (1058)

    Hi,
    This is a problem with receiveing modifications to meeting invites from Outlook/Exchange users. iCal does not understand the format that the timezone info is presented as. This (for some strange reason) results in this error.
    I'm working on a bridging utility that fixes this (along with other issues). See http://www.nhoj.co.uk/youreinvited.
    To report a bug to Apple go to http://bugreport.apple.com. You will need an Apple Developer Membership (there is a free online option), see http://connect.apple.com.
    Best wishes
    John M

  • BUG - ADF error when deploying to 10.1.3 AS Preview 4 on Linux

    I am using JDeveloper 10.1.3 EA on a Windows machine and am deploying to Oracle Application Server 10g 10.1.3 Preview 4 on a Linux box. I'm deploying an ADF Struts web project that is having troubles displaying my sceens. When I try to view any one of my JSPs, I get this error:
    java.lang.NoSuchMethodError: oracle.adf.share.http.ServletADFContext.setVariableResolver(Ljava/lang/Object;)V
         at oracle.adf.share.http.ServletADFContext.initialize(ServletADFContext.java:222)
         at oracle.adf.share.http.ServletADFContext.initThreadContext(ServletADFContext.java:211)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 4].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:699)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 4].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:397)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 4].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:833)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 4].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:430)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 4].server.http.AJPRequestHandler.run(AJPRequestHandler.java:290)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 4].server.http.AJPRequestHandler.run(AJPRequestHandler.java:179)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:215)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:232)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$1000(ServerSocketAcceptHandler.java:35)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:819)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 4].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:534)
    I have created a very simple project with nothing but a JSP and it works. So I'm led to believe that there is some ADF JAR file that is not quite right. My ADF Struts web project worked using the same app server on Windows 2003. However I ran into a different problem with that: BUG - Connection pooling with 10g 10.1.3 Preview 4 App Server
    So we have decided to make the move to Linux but I can't get past this error. I have updated the ADF Runtime Libraries and I've swapped out the JDK and JRE with 1.5. I just can't figure out what else I'm missing.

    The adfshare.jar does not get included with my app. I've checked my WAR file and this JAR is not found there. I'm completely stumped at this point. Have you had success using Oracle App Server 10.1.3 Preview 4 on Linux?
    I have made some progress narrowing down where the error occurs. When I add data bindings to a JSP, the following code gets added to my web.xml:
       <filter>
         <filter-name>ADFBindingFilter</filter-name>
         <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
         <init-param>
           <param-name>encoding</param-name>
           <param-value>windows-1252</param-value>
         </init-param>
       </filter>
       <filter-mapping>
         <filter-name>ADFBindingFilter</filter-name>
         <url-pattern>*.jsp</url-pattern>
       </filter-mapping>
       <filter-mapping>
         <filter-name>ADFBindingFilter</filter-name>
         <url-pattern>*.jspx</url-pattern>
       </filter-mapping>
       <filter-mapping>
         <filter-name>ADFBindingFilter</filter-name>
         <servlet-name>action</servlet-name>
       </filter-mapping>
    If I delete this code out of my web.xml file, that error message goes away. The ADFBindingFilter class is also included in the error stacktrace. So I'm thinking that this class is the culprit. I'm convinced this is a BUG with Oracle ADF and Linux.
    Another idea perhaps is that the error occurs because I'm developing in JDeveloper on Windows and then deploying to an app server on Linux. My embedded server on Windows runs my app just fine. I have the same OS setup for JDev 10.1.2 and the app server 10.1.2 and I have no problems with that. But I really don't want to have to go back to 10.1.2.

  • Column in field list is ambiguous error

    i am using jdbc in my program with a query statement that retrieve holdingsID by querying different tables. when i run the program it has an error saying
    Column HoldingsID in field list is ambiguous, what does this mean? How can i solve it?
    here is my code, included is my sql select statement please check it.
            String key=request.getParameter("key");  
              Connection conn = null;
              String[][] a=new String[10][3];          
              int r=0;
              String qstr="";
              ResultSet rs=null;          
              try{     
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              conn = DriverManager.getConnection("jdbc:mysql://localhost/scitemp?user=scinetadmin&password=A1kl@taN");
              Statement stmt=conn.createStatement();
                qstr="SELECT DISTINCT HoldingsID FROM tblHoldings, tblHoldingsAuthorName," +
                         "tblHoldingsSubject, tblHoldingsPublisherName"+
                      " WHERE (tblHoldings.Title LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR "+
                     "(tblHoldings.Contents LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR " +
                     "(tblHoldingsAuthorName.AuthorName LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR " +
                    "(tblHoldingsSubject.SubjectHeadings LIKE "+"'"+"%"+key+"%"+"'"+")"+" OR " +
                   "(tblHoldingsPublisherName.PublicationDate = "+"'"+key+"'"+")"+
                         " ORDER BY HoldingsID";                              
              rs  = stmt.executeQuery(qstr);
              while ( rs.next() && r <10) {                     
                        a[r][0]=rs.getString("HoldingsID");     
                        a[r][1]="1";
                        a[r][2]="SILMS";  
                        r++;      
              }catch(Exception e){out.println("error:"+e.getMessage());}-----
    thanks in advance for your help

    Actually, this is probably going to be a bit more efficient on large scale data. (I'm guessing, if it matters then test...)
    SELECT DISTINCT HoldingsID FROM
      SELECT HoldingsID
      FROM tblHoldings
      WHERE tblHoldings.Title LIKE '%key%'
           OR tblHoldings.Contents LIKE '%key%'
    UNION ALL
      SELECT HoldingsID
      FROM tblHoldingsAuthorName
      WHERE tblHoldingsAuthorName.AuthorName LIKE '%key%'
    UNION ALL
      SELECT HoldingsID
      FROM tblHoldingsSubject
      WHERE tblHoldingsSubject.SubjectHeadings LIKE  '%key%'
    UNION ALL
      SELECT HoldingsID
      FROM tblHoldingsPublisherName
      WHERE tblHoldingsPublisherName.PublicationDate = 'key'
    ORDER BY HoldingsIDThe diffence is when the sort(s) to create distinct rows is done. In the first version, UNION must produce only distinct values, so three sorts must be performed, one to create each UNION intermediate result. In the 2nd version, UNION ALL doesn't produce
    distinct values, we delay the sorting until the last minute and sort all candidates once, instead of one sub-set once, one sub-set twice and two sub-sets 3 times. If this is a school project, the difference probably doesn't matter.
    By the way, many databases implement the DISTINCT keyword in such a way that it creates sorted result sets, sorted by the resulting column values. As far as I know, this is not guaranteed by the SQL standard, so the additional ORDER BY clause is still needed for rigourous portability to databases that don't work that way. If that's not a concern and speed is, in many situations you can drop the ORDER BY; however for small result sets the difference is nearly invisible, and even for moderately large result sets, sorting an already sorted result set is usually an Order(n) in-memory operation. For really big results, the database will be swapping results to disk as it sorts and this sort of optimization matters then. This also applies to the use of GROUP BY.

  • Bug or error............

    HI!
    I want to add to Creator 2.1 (Windows version) an EJB module that I have created with Netbeans 4.1 using the Facade approach.
    To do this I have perfectly verified and deployed the EJB module on deployement server, but when I try to add the ejb module (add set of session ejb) Creator throws the exception that I put below.
    Can anybody help me?
    Is this an error or a bug?
    Thanks!
    Regards..
    Aldo
    CREATOR EXCEPTION
    java.lang.reflect.UndeclaredThrowableException
         at $Proxy15.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         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:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.Dialog.show(Dialog.java:536)
         at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:800)
         at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:843)
         at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:831)
         at org.openide.util.Mutex.doEventAccess(Mutex.java:1044)
         at org.openide.util.Mutex.readAccess(Mutex.java:170)
         at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:816)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at com.sun.rave.ejb.ui.AddEjbGroupDialog.showDialog(AddEjbGroupDialog.java:94)
         at com.sun.rave.ejb.actions.AddEjbGroupAction.performAction(AddEjbGroupAction.java:40)
         at org.openide.util.actions.NodeAction$3.run(NodeAction.java:450)
         at org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116)
         at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:448)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:383)
         ... 64 more
    Caused by: java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel$1.getTreeCellRendererComponent(ConfigureMethodsPanel.java:56)
         at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2693)
         at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1469)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
         at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:725)
         at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
         at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:400)
         at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3384)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
         at java.awt.Component.firePropertyChange(Component.java:7159)
         at javax.swing.JTree.setModel(JTree.java:710)
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel.setEjbGroup(ConfigureMethodsPanel.java:81)
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel.<init>(ConfigureMethodsPanel.java:73)
         at com.sun.rave.ejb.ui.AddEjbGroupDialog$ConfigureMethodWizardPanel.getComponent(AddEjbGroupDialog.java:312)
         at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:577)
         at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:691)
         at org.openide.WizardDescriptor.access$500(WizardDescriptor.java:63)
         at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1296)
    [catch] ... 69 more
    ==>
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:383)
         at $Proxy15.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         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:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.Dialog.show(Dialog.java:536)
         at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:800)
         at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:843)
         at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:831)
         at org.openide.util.Mutex.doEventAccess(Mutex.java:1044)
         at org.openide.util.Mutex.readAccess(Mutex.java:170)
         at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:816)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at com.sun.rave.ejb.ui.AddEjbGroupDialog.showDialog(AddEjbGroupDialog.java:94)
         at com.sun.rave.ejb.actions.AddEjbGroupAction.performAction(AddEjbGroupAction.java:40)
         at org.openide.util.actions.NodeAction$3.run(NodeAction.java:450)
         at org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116)
         at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:448)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Caused by: java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel$1.getTreeCellRendererComponent(ConfigureMethodsPanel.java:56)
         at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2693)
         at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1469)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
         at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:725)
         at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
         at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:400)
         at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3384)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
         at java.awt.Component.firePropertyChange(Component.java:7159)
         at javax.swing.JTree.setModel(JTree.java:710)
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel.setEjbGroup(ConfigureMethodsPanel.java:81)
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel.<init>(ConfigureMethodsPanel.java:73)
         at com.sun.rave.ejb.ui.AddEjbGroupDialog$ConfigureMethodWizardPanel.getComponent(AddEjbGroupDialog.java:312)
         at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:577)
         at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:691)
         at org.openide.WizardDescriptor.access$500(WizardDescriptor.java:63)
         at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1296)
    [catch] ... 69 more
    ==>
    java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel$1.getTreeCellRendererComponent(ConfigureMethodsPanel.java:56)
         at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2693)
         at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1469)
         at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
         at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:725)
         at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
         at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:400)
         at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3384)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
         at java.awt.Component.firePropertyChange(Component.java:7159)
         at javax.swing.JTree.setModel(JTree.java:710)
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel.setEjbGroup(ConfigureMethodsPanel.java:81)
         at com.sun.rave.ejb.ui.ConfigureMethodsPanel.<init>(ConfigureMethodsPanel.java:73)
         at com.sun.rave.ejb.ui.AddEjbGroupDialog$ConfigureMethodWizardPanel.getComponent(AddEjbGroupDialog.java:312)
         at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:577)
         at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:691)
         at org.openide.WizardDescriptor.access$500(WizardDescriptor.java:63)
         at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1296)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:383)
         at $Proxy15.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         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:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.Dialog.show(Dialog.java:536)
         at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:800)
         at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:843)
         at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:831)
         at org.openide.util.Mutex.doEventAccess(Mutex.java:1044)
         at org.openide.util.Mutex.readAccess(Mutex.java:170)
         at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:816)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at com.sun.rave.ejb.ui.AddEjbGroupDialog.showDialog(AddEjbGroupDialog.java:94)
         at com.sun.rave.ejb.actions.AddEjbGroupAction.performAction(AddEjbGroupAction.java:40)
         at org.openide.util.actions.NodeAction$3.run(NodeAction.java:450)
         at org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116)
         at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:448)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
    [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    I got answer from j2ee forum.
    the bug number is 2700883

  • BUG: Warning/Error just refreshing page several times???

    Hi!
    I made a simple page:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document>
          <af:messages/>
          <af:form>
            <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx">
              <f:facet name="center">
                <af:panelGroupLayout layout="vertical">
                  <af:subform>
                    <dvt:graph graphType="LINE_VERT_ABS"
                               dynamicResize="DYNAMIC_SIZE"
                               value="#{bindings.SampleGraphDataRow.graphModel}"/>
                    <af:commandButton text="commandButton 1"/>
                  </af:subform>
                </af:panelGroupLayout>
              </f:facet>
              <f:facet name="header"/>
              <f:facet name="end"/>
              <f:facet name="start"/>
              <f:facet name="branding"/>
              <f:facet name="copyright"/>
              <f:facet name="status"/>
            </af:pageTemplate>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>First time I get a page without any problems (expect standard "WARNING: Header modification request was rejected. Because the setter method was called from included servlet. It is restricted by SRV.8.3 of Servlet Specification 2.4. : current-workspace-app" I'm getting with every single page).
    Then I was just refreshing this page a few times (clicking a refresh button in browser, without doing anything else in page – so no PPRs, actions etc. – so no client events should be produced by my acting beside page refresh).
    After several refreshes, strange WARNING (looking more like error than just warning) appeared in log window:
    WARNING: empty String
    java.lang.NumberFormatException: empty String
         at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:994)
         at java.lang.Double.parseDouble(Double.java:510)
         at java.text.DigitList.getDouble(DigitList.java:151)
         at java.text.DecimalFormat.parse(DecimalFormat.java:1303)
         at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1918)
         at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1264)
         at java.text.DateFormat.parse(DateFormat.java:335)
         at com.evermind.server.http.EvermindHttpServletRequest.getDateHeader(EvermindHttpServletRequest.java:1581)
         at com.evermind.server.http.EvermindHttpServletRequest.getDateHeader(EvermindHttpServletRequest.java:1379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.myfaces.trinidad.webapp.ResourceServlet.service(ResourceServlet.java:162)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:118)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
         at java.lang.Thread.run(Thread.java:619)
    May 11, 2008 8:16:21 PM com.evermind.server.ServerBase log
    WARNING: Application1-ViewController-webapp: Servlet error
    oracle.security.jazn.JAZNRuntimeException: empty String
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NumberFormatException: empty String
         at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:994)
    Why is this happening? The page renders (apparently) normally, the graph renders as it should, but I'm not sure if the page is going to work correctly because of this warning/error.
    I'm using TP4 on Vista x86, with JDK 1.6u5.
    Anyone, please take a look at this. It may be a bug somewhere...
    Regards,
    PaKo

    Pako,
    the message "java.lang.NumberFormatException: empty String" points to a missing data value. I'll file a bug and ask QA to verify this.
    Frank

Maybe you are looking for