Re: ColdFusion MX CFLDAP NullPointerException bug

2005-11-10 Thread Aaron Rouse
I did remove the timeout, actually that is what allowed me to get as much as
what I am getting. This is how the process is done right now and it is ugly.
 Query LDAP for the letter, if I know it has more than 3250 records I then
split it down to multiple queries such as A into AA, AB, AC, etc. Go through
the records and do changes where needed such as stripping out first and last
names into separate variables. Plug these into an array and when it gets to
a count of 75 then shoot that to a web service which inserts them. Then
trigger the java garbage collector and continue with loop.
 Surprisingly that method works, but in CF5 it was much more simple. We just
queried LDAP, did what ever stripping we needed done then inserted the
records.
 Before we did the web service we found that as it did more and more
inserts(either through a cfquery or a SP) the page would eat up more and
more of the server resources until it would just crash. It still ate up
resources so then found out about the garbage collector and that made it run
fine, tried removing the web service from the mix at that point but brought
us back to problems so left it. Then when we reached this point started to
notice the numbers between Dev(CF6.1) and Prod(CF5) were off by a large
amount. Began to run tests and found that CFLDAP would not return more than
around 3500-3600 records when using CF6.1
 I do not agree at all in even using CF for this process. However this was
in use long before I was hired on and many projects rely on it running
correctly every night. Managements solution has been just leave it on CF5
indefinately.

 On 11/10/05, Dawson, Michael <[EMAIL PROTECTED]> wrote:
>
> Aaron, try removing the TIMEOUT attribute from your CFLDAP tag. That
> has been known to cause these exact problems.
>
> I think these problems began with MX.
>
> M!ke
>
>


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223837
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: ColdFusion MX CFLDAP NullPointerException bug

2005-11-10 Thread Dawson, Michael
Aaron, try removing the TIMEOUT attribute from your CFLDAP tag.  That
has been known to cause these exact problems.

I think these problems began with MX.

M!ke

-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 09, 2005 9:41 PM
To: CF-Talk
Subject: Re: ColdFusion MX CFLDAP NullPointerException bug

Thanks, we have authentication issues sometimes, it is completely
random.
Where we also have big issues is getting CFLDAP in MX(works find in CF5)
to return things like large record sets. Today I was looking at one that
on the
CF5 server always returns 6200 records, on the MX it will return
3300-3600 records. Same code on both to the same server.

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223820
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: ColdFusion MX CFLDAP NullPointerException bug

2005-11-09 Thread Aaron Rouse
Thanks, we have authentication issues sometimes, it is completely random.
Where we also have big issues is getting CFLDAP in MX(works find in CF5) to
return things like large record sets. Today I was looking at one that on the
CF5 server always returns 6200 records, on the MX it will return 3300-3600
records. Same code on both to the same server.

On 11/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
>
> we have issues with CFLDAP also. We are 99% they have to do with the
> LDAP server. THe issues are timeout related. I wrote my own LDAP
> auth code in Java and tested that instead of CF's CFLDAP and got the
> same time out issues. Maybe you will have better luck.
>
> how your LDAP is used will vary, but here is a code snip for
> connecting and getting the DN
>
> some vars
> securityAuthentication = "simple"
> ldapHost=urltoyourldap
> username=someuserid <-- depends on your ldap
>
>
>
> Properties env = new Properties();
> env.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory
> ");
> env.put("java.naming.provider.url", ldapHost);
> env.put("java.naming.security.principal", "");
> env.put("java.naming.security.credentials", "");
> env.put("java.naming.security.authentication", securityAuthentication);
>
> try {
> DirContext ctx = new InitialDirContext(env);
> SearchControls ctls = new SearchControls();
>
> String[] returnAttribute = {"dn","cn","employeeNumber","uid"};
> ctls.setSearchScope(2);
> ctls.setReturningAttributes(returnAttribute);
> ctls.setCountLimit(2);
>
> NamingEnumeration answer = ctx.search("ou=people,o=YOURORG",
> "(&(objectClass=Person) (uid="+username+"))", ctls);
>
> if (answer.hasMore()) {
> SearchResult sr = (SearchResult)answer.next();
> Attributes attrs = sr.getAttributes();
> employeeNumber = (String)attrs.get("employeeNumber").get();
> userDn = "employeenumber=" + employeeNumber + ", ou=people, o=YOURORG";
> LoggerService.createDefaultLogger().logWarning(RB.getString(this,
> "got the DN", userDn));
>
> }
> ctx.close();
> } catch (NamingException e) {
> throw new LoginException(e.getMessage());
> } catch (Exception e ) {
> throw new LoginException(e.getMessage());
> }
>
> On 11/9/05, Aaron Rouse <[EMAIL PROTECTED]> wrote:
> > I would not mind seeing an example of that. We have certainy had our
> fair
> > share of LDAP issues since upgrading to 6.1 from 5.0
> >
> > On 11/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> > >
> > > workaround? write your LDAP call in Java...a bit of work but not too
> > > terribly difficult.
> > >
> > > DK
> > >
> > >
> >
> >
> >
>
> 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223778
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: ColdFusion MX CFLDAP NullPointerException bug

2005-11-09 Thread Douglas Knudsen
we have issues with CFLDAP also.  We are 99% they have to do with the
LDAP server.  THe issues are timeout related.  I wrote my own LDAP
auth code in Java and tested that instead of CF's CFLDAP and got the
same time out issues.  Maybe you will have better luck.

how your LDAP is used will vary, but here is a code snip for
connecting and getting the DN

some vars
securityAuthentication = "simple"
ldapHost=urltoyourldap
username=someuserid  <-- depends on your ldap



Properties env = new Properties();
env.put("java.naming.factory.initial", 
"com.sun.jndi.ldap.LdapCtxFactory");
env.put("java.naming.provider.url", ldapHost);
env.put("java.naming.security.principal", "");
env.put("java.naming.security.credentials", "");
env.put("java.naming.security.authentication", 
securityAuthentication);

try {
DirContext ctx = new InitialDirContext(env);
SearchControls ctls = new SearchControls();

String[] returnAttribute = 
{"dn","cn","employeeNumber","uid"};
ctls.setSearchScope(2);
ctls.setReturningAttributes(returnAttribute);
ctls.setCountLimit(2);

NamingEnumeration answer = 
ctx.search("ou=people,o=YOURORG",
"(&(objectClass=Person) (uid="+username+"))", ctls);

if (answer.hasMore()) {
SearchResult sr = 
(SearchResult)answer.next();
Attributes attrs = sr.getAttributes();
employeeNumber = 
(String)attrs.get("employeeNumber").get();
userDn = "employeenumber=" + 
employeeNumber + ", ou=people, o=YOURORG";

LoggerService.createDefaultLogger().logWarning(RB.getString(this,
"got the DN", userDn));

}
ctx.close();
} catch (NamingException e) {
throw new LoginException(e.getMessage());
} catch (Exception e )  {
throw new LoginException(e.getMessage());
}

On 11/9/05, Aaron Rouse <[EMAIL PROTECTED]> wrote:
> I would not mind seeing an example of that. We have certainy had our fair
> share of LDAP issues since upgrading to 6.1 from 5.0
>
> On 11/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> >
> > workaround? write your LDAP call in Java...a bit of work but not too
> > terribly difficult.
> >
> > DK
> >
> >
>
>
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223775
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: ColdFusion MX CFLDAP NullPointerException bug

2005-11-09 Thread Dave Watts
> I hit the CLDAP NullPointerException bug with ColdFusion MX 
> 6.1 (with Updater):
> 
> 
>  /threadid:1283>
> 
> I am running ColdFusion for J2EE with JVM 1.4.2_09 and I cannot 
> revert to an older JVM, since I am not the one in charge for the 
> system.

I haven't been able to use CFLDAP with any Sun JVM later than 1.4.2_05.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223755
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: ColdFusion MX CFLDAP NullPointerException bug

2005-11-09 Thread Aaron Rouse
I would not mind seeing an example of that. We have certainy had our fair
share of LDAP issues since upgrading to 6.1 from 5.0

On 11/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
>
> workaround? write your LDAP call in Java...a bit of work but not too
> terribly difficult.
>
> DK
>
>


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223729
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: ColdFusion MX CFLDAP NullPointerException bug

2005-11-09 Thread Douglas Knudsen
there were issues with CFLDAP and JVM versions.  For certain, CFLDAP
does not work with 1.4.2_07.look like not _09 either.

workaround?  write your LDAP call in Java...a bit of work but not too
terribly difficult.

DK

On 11/9/05, wolf2k5 <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I hit the CLDAP NullPointerException bug with ColdFusion MX 6.1 (with 
> Updater):
>
> 
> 
>
> I am running ColdFusion for J2EE with JVM 1.4.2_09 and I cannot revert
> to an older JVM, since I am not the one in charge for the system.
>
> Apparently Macromedia never released an hotfix for the bug.
> Do you have any info about it?
>
> Is there any workaround for the issue?
>
> Thanks a lot.
>
> 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223726
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54