Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 49486 invoked from network); 22 Apr 2009 15:02:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Apr 2009 15:02:21 -0000 Received: (qmail 4867 invoked by uid 500); 22 Apr 2009 15:02:21 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 4838 invoked by uid 500); 22 Apr 2009 15:02:21 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 4828 invoked by uid 99); 22 Apr 2009 15:02:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2009 15:02:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of imavroukakis@gameaccount.com designates 83.244.222.83 as permitted sender) Received: from [83.244.222.83] (HELO mail1.gameaccount.com) (83.244.222.83) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2009 15:02:15 +0000 Received: from localhost ([127.0.0.1] helo=[192.168.30.116]) by mail1.gameaccount.com with esmtp (Exim 4.66) (envelope-from ) id 1Lwdvm-0003lB-EG for users@directory.apache.org; Wed, 22 Apr 2009 16:00:10 +0100 Received: from [192.168.30.116] ([192.168.30.116] helo=[192.168.30.116]) by ASSP.nospam; 22 Apr 2009 16:00:10 +0100 Message-ID: <49EF3121.9090307@gameaccount.com> Date: Wed, 22 Apr 2009 16:00:49 +0100 From: Yiannis Mavroukakis Organization: GameAccount User-Agent: Thunderbird 2.0.0.18 (X11/20090224) MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: classcast on ApacheDS References: <49EF13CA.7070604@gameaccount.com> <49EF19D8.9000602@gameaccount.com> <49EF2408.3060204@gameaccount.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-9; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Sorry I meant build off of the SVN branch, this is what I am using. Mert �al��kan wrote: > 1.5.5? > latest downloads are only for 1.5.4, no? > http://directory.apache.org/apacheds/1.5/downloads.html > > 2009/4/22 Yiannis Mavroukakis > > >> Have you tried this with 1.5.5 ? >> >> >> Mert �al��kan wrote: >> >> >>> yes, when that method executes, my ApacheDS server (standalone working >>> one) >>> throws that error. >>> >>> >>> 2009/4/22 Yiannis Mavroukakis >>> >>> >>> >>> >>>> Are you getting the same ClassCastException as the root cause of the >>>> search? >>>> >>>> >>>> Mert �al��kan wrote: >>>> >>>> >>>> >>>> >>>>> Hey, >>>>> >>>>> via jdni calls I guess, seam's ldap-identity-store is taking care of... >>>>> lemme elaborate the case, >>>>> >>>>> Actually before creating a user, the seam framework is doing a search >>>>> with >>>>> userExists method. >>>>> >>>>> public boolean userExists(String name) >>>>> { >>>>> InitialLdapContext ctx = null; >>>>> try >>>>> { >>>>> ctx = initialiseContext(); >>>>> >>>>> String[] userAttr = {getUserNameAttribute()}; >>>>> >>>>> SearchControls controls = new SearchControls(); >>>>> controls.setSearchScope(searchScope); >>>>> controls.setReturningAttributes(userAttr); >>>>> controls.setTimeLimit(getSearchTimeLimit()); >>>>> >>>>> StringBuilder userFilter = new StringBuilder(); >>>>> >>>>> Object[] filterArgs = new Object[getUserObjectClasses().length]; >>>>> for (int i = 0; i < getUserObjectClasses().length; i++) >>>>> { >>>>> userFilter.append("("); >>>>> userFilter.append(getObjectClassAttribute()); >>>>> userFilter.append("={"); >>>>> userFilter.append(i); >>>>> userFilter.append("})"); >>>>> filterArgs[i] = getUserObjectClasses()[i]; >>>>> } >>>>> >>>>> NamingEnumeration answer = ctx.search(getUserContextDN(), >>>>> userFilter.toString(), filterArgs, controls); >>>>> while (answer.hasMore()) >>>>> { >>>>> SearchResult sr = (SearchResult) answer.next(); >>>>> Attributes attrs = sr.getAttributes(); >>>>> Attribute user = attrs.get(getUserNameAttribute()); >>>>> >>>>> for (int i = 0; i < user.size(); i++) >>>>> { >>>>> Object value = user.get(i); >>>>> if (name.equals(value)) >>>>> { >>>>> answer.close(); >>>>> return true; >>>>> } >>>>> } >>>>> } >>>>> answer.close(); >>>>> return false; >>>>> } >>>>> catch (NamingException ex) >>>>> { >>>>> throw new IdentityManagementException("Error getting users", ex); >>>>> } >>>>> finally >>>>> { >>>>> if (ctx != null) >>>>> { >>>>> try >>>>> { >>>>> ctx.close(); >>>>> } >>>>> catch (NamingException ex) {} >>>>> } >>>>> } >>>>> } >>>>> >>>>> and this is throwing out, >>>>> >>>>> Caused by: >>>>> org.jboss.seam.security.management.IdentityManagementException: >>>>> Error getting users >>>>> at >>>>> >>>>> >>>>> org.jboss.seam.security.management.LdapIdentityStore.userExists(LdapIdentityStore.java:1235) >>>>> at >>>>> >>>>> >>>>> org.jboss.seam.security.management.IdentityManager.userExists(IdentityManager.java:172) >>>>> 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:597) >>>>> at >>>>> org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335) >>>>> ... 79 more >>>>> Caused by: javax.naming.CommunicationException: Request: 2 cancelled; >>>>> remaining name 'ou=people,o=mycompany' >>>>> at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60) >>>>> at com.sun.jndi.ldap.Connection.readReply(Connection.java:411) >>>>> >>>>> M >>>>> >>>>> >>>>> On Wed, Apr 22, 2009 at 3:55 PM, Yiannis Mavroukakis < >>>>> imavroukakis@gameaccount.com> wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> How are you creating this new person? Via JNDI calls or through the DS >>>>>> API? >>>>>> >>>>>> Y. >>>>>> >>>>>> >>>>>> Mert �al��kan wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I'm integrating the seam framework's user management module with >>>>>>> ApacheDS >>>>>>> ldap. For creating a new user (person objectClass) in the DS I got the >>>>>>> error >>>>>>> below, >>>>>>> So apacheDS is forcing the client to close the conn since it gets a >>>>>>> classcast. I'm on 1.5.4 version. How to debug & solve this? Any clues? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> M >>>>>>> >>>>>>> Trace: >>>>>>> >>>>>>> [15:39:46] WARN [org.apache.directory.server.ldap.LdapProtocolHandler] >>>>>>> - >>>>>>> [/ >>>>>>> 127.0.0.1:2453] Unexpected exception forcing >>>>>>> session to close: sending disconnect notice to client. >>>>>>> *org.apache.mina.filter.codec.ProtocolDecoderException: >>>>>>> java.lang.ClassCastException: org.apache.directory.shared.ldap.co >>>>>>> dec.search.AttributeValueAssertionFilter cannot be cast to >>>>>>> org.apache.directory.shared.ldap.codec.search.ConnectorFilter* >>>>>>> (Hexdump: 30 81 82 02 01 02 63 60 04 17 6F 75 3D 70 65 6F 70 6C 65 2C >>>>>>> 6F >>>>>>> 3D >>>>>>> 6F 6E 74 6F 6D 65 74 72 69 63 73 0A 01 02 0 >>>>>>> A 01 03 02 01 00 02 01 0B 01 01 00 A3 15 04 0B 6F 62 6A 65 63 74 43 6C >>>>>>> 61 >>>>>>> 73 >>>>>>> 73 04 06 70 65 72 73 6F 6E A3 18 04 0B 6F 6 >>>>>>> 2 6A 65 63 74 43 6C 61 73 73 04 09 75 69 64 4F 62 6A 65 63 74 30 05 04 >>>>>>> 03 >>>>>>> 75 >>>>>>> 69 64 A0 1B 30 19 04 17 32 2E 31 36 2E 38 3 >>>>>>> 4 30 2E 31 2E 31 31 33 37 33 30 2E 33 2E 34 2E 32) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:6 >>>>>>> 48) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264) >>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown >>>>>>> Source) >>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown >>>>>>> Source) >>>>>>> at java.lang.Thread.run(Unknown Source) >>>>>>> Caused by: java.lang.ClassCastException: >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter >>>>>>> can >>>>>>> not be cast to >>>>>>> org.apache.directory.shared.ldap.codec.search.ConnectorFilter >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.ldap.codec.search.SearchRequest.addCurrentFilter(SearchRequest.java:356) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.ldap.codec.actions.InitEqualityMatchFilterAction.action(InitEqualityMatchFilterAc >>>>>>> tion.java:70) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.asn1.ber.grammar.AbstractGrammar.executeAction(AbstractGrammar.java:153) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.asn1.ber.Asn1Decoder.treatTLVDoneState(Asn1Decoder.java:620) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.asn1.ber.Asn1Decoder.decode(Asn1Decoder.java:796) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.ldap.codec.TwixDecoder.decode(TwixDecoder.java:110) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.ldap.message.MessageDecoder.decode(MessageDecoder.java:150) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.directory.shared.asn1.codec.Asn1CodecDecoder.decode(Asn1CodecDecoder.java:53) >>>>>>> at >>>>>>> >>>>>>> >>>>>>> >>>>>>> org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158) >>>>>>> ... 8 more >>>>>>> [15:39:46] WARN [org.apache.directory.server.ldap.LdapProtocolHandler] >>>>>>> - >>>>>>> Null LdapSession given to cleanUpSession. >>>>>>> [15:39:46] WARN [org.apache.directory.server.ldap.LdapProtocolHandler] >>>>>>> - >>>>>>> Null LdapSession given to cleanUpSession. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>> > >