Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6288044

NamingEnumeration.next() throwing NoSuchMethodError in SearchResult.setNameInNameSpace(String)

    XMLWordPrintable

    Details

      Description

      Origonal Email included:

      From: Jonathan (Engineering) Lee
      To: ###@###.###
      Subject: Re: (Incident Review ID: 324063) NamingEnumeration.next() throwing NoSuchMethodError in SearchResult.setNameInNam

      Hi Michael Ayotte,

      Thank you for following up on this issue.

      This bug reporting site generally handles the bug reports that come in from non-paying external customers. As you are internal to Sun, you can receive a more direct response by filing a bug through BugTraq 2. Using BugTraq allows you to set the severity and priority of the bug, and establishes a channel to notify you when someone modifies the bug.

      More information about BugTraq 2 is at

      http://bugtraq.sfbay/bugtraq/

      Bugster is the standard client for BugTraq 2.

      We have not done anything with this report, because we usually require more information to file a new change request and you are a Sun employee who can use Bugster. If you cannot use Bugster, please let me know.

      Thank you for taking the time to report this problem.

      Regards,
      Jonathan


      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


      ----------------------------------------------------
      2005-01-25 11:51:14.295 UPDATE RECEIVED FROM CUSTOMER
      ----------------------------------------------------
      Trying to check on the status of this bug report?

      Sun Microsystems wrote:
      >
      ----------------------------------------------------
      2004-12-02 14:17:31.234 EMAIL SENT BY ###@###.###
      ----------------------------------------------------

      From: Jonathan (Engineering) Lee
      To: ###@###.###
      Subject: Re: (Incident Review ID: 324063) NamingEnumeration.next() throwing NoSuchMethodError in SearchResult.setNameInNam

      Hi Michael Ayotte,

      Thank you for reporting this issue.

      This bug reporting site generally handles the bug reports that come in from non-paying external customers. As you are internal to Sun, you can receive a more direct response by filing a bug through BugTraq 2. Using BugTraq allows you to set the severity and priority of the bug, and establishes a channel to notify you when someone modifies the bug.

      More information about BugTraq 2 is at

      http://bugtraq.sfbay/bugtraq/

      Bugster is the standard client for BugTraq 2.

      Thank you for taking the time to report this problem.

      Regards,
      Jonathan

      --------------------- Report ---------------------

            category : jndi
         subcategory : ldap
             release : 1.4
                type : bug
            synopsis : NamingEnumeration.next() throwing NoSuchMethodError in SearchResult.setNameInNam
       customer name : Michael Ayotte
       customer mail : ###@###.###
              sdn id : ayotte-sun
            language : en
             company : Sun Microsystems, Inc.
            hardware : sparcv9
                  os : solaris_9
              bug id : 0
        date created : Fri Oct 29 11:24:07 MDT 2004
      date evaluated : Thu Jun 16 14:09:55 MDT 2005
         description :
      FULL PRODUCT VERSION :
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Server VM (build 1.5.0-b64, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      SunOS nwk10-2069-dev1 5.9 Generic_117171-12 sun4u sparc SUNW,Ultra-80
      SunOS ayotte 5.9 Generic_117171-12 sun4u sparc SUNW,Ultra-60

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      System.getProperty("java.version") = 1.5.0
      (Java 1.5 was not an option in the bug report pull down menu)

      Apache Tomcat/4.0.5

      A DESCRIPTION OF THE PROBLEM :
      Web application (Tomcat 4.0.5) attempting to look up user information from LDAP database:

      It appears that LdapSearchEnumeration is calling a method in SearchResult that does not exist. I am not aware of any improper coding I could have done to cause this. It appears that perhaps a change was implimented in LdapSearchEnumeration without a corresponding change in SearchResult (or vice versa.)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the above code under Java5 (doesn't seem to matter what version you compile under, only the version you run it under.)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      You should get a SearchResult back. Then you can get a Properties file representing the user's information.
      ACTUAL -
      StackTrace shown below:

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Caused by: java.lang.NoSuchMethodError: javax.naming.directory.SearchResult.setNameInNamespace(Ljava/lang/String;)V
      at com.sun.jndi.ldap.LdapSearchEnumeration.createItem(LdapSearchEnumeration.java:155)
      at com.sun.jndi.ldap.LdapNamingEnumeration.nextAux(LdapNamingEnumeration.java:256)
      at com.sun.jndi.ldap.LdapNamingEnumeration.nextImpl(LdapNamingEnumeration.java:236)
      at com.sun.jndi.ldap.LdapNamingEnumeration.next(LdapNamingEnumeration.java:184)
      at com.sun.tie.util.user.LDAPSearch.search(LDAPSearch.java:90)
      at com.sun.tie.util.user.LDAPUser.getLDAP(LDAPUser.java:64)
      at com.sun.tie.util.user.LDAPUser.setUid(LDAPUser.java:55)
      at com.sun.tie.dat.user.User.setUid(User.java:298)
      ... 44 more

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      NamingEnumeration<SearchResult> nenum = null ;
      SearchResult searchresult = null ;
      try {
        nenum = initialdircontext.search( basedn, search, searchcontrols ) ;
         while ( nenum.hasMore() ) {
               searchresult = nenum.next() ; // This is LDAPSearch.java:90
               // Do some stuff
           }
      } catch( NamingException ne ){
           ne.printStackTrace();
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Run tomcat under Java 1.4.2_04-b05.




      -----------------------------------------------------
      Update, problem also exists on a freshly set up Sol10 system:
      @tie-302 [944]$ uname -a
      SunOS tie-302 5.10 s10_74l1 sun4u sparc SUNW,Ultra-80
      @tie-302 [987]$ java -version
      java version "1.5.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
      Java HotSpot(TM) Server VM (build 1.5.0_01-b08, mixed mode)

      Development system is often up at:
      http://tie-302.sfbay/dat/test2.jsp

      Utilizes SunIT Component Object Reuse Environment modules:
      http://sirww.central:8080/component/SunUserProfile
      http://sirww.central:8080/component/JavaApplicationAuthe

      ###@###.### 2005-06-20 15:31:45 GMT

      -----------------------------------------------------------------------------
      Update: 6/21/2005 @ 6:50AM PST

      Machine currently experiencing problem is basically a stock Solaris 10 system, with the bundled Tomcat and Java 5. Catalina.sh has no reference to '-Xbootclasspath/p' (or 'Xboot' for that matter.) Startup messages show:

      Using CATALINA_BASE: /var/apache/tomcat
      Using CATALINA_HOME: /usr/apache/tomcat
      Using CATALINA_TMPDIR: /var/tmp
      Using JAVA_HOME: /usr/java
      Using CLASSPATH: /usr/java/lib/tools.jar:/usr/apache/tomcat/bin/bootstrap.jar


      ###@###.### 2005-06-21 13:51:37 GMT

        Attachments

          Activity

            People

            Assignee:
            jhangalsunw Jayalaxmi Hangal (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: