Re: Bcrypt.class error

2014-12-19 Thread Dean Lawrence

Well, this ended up not working, as it failed again first thing this
morning. I tried re-initing my app and it still did threw the error. What
also found out though, was that instead of rebooting CF, I could get it to
work by renaming the webservice CFC, making a call to the webservice (which
generated and error) and then renaming the CFC back to the original name.
After I did this, the app was able to authenticate again.

So this tells me that the CFC is cached somewhere, but I do not know where.
I tried emptying both the template and component caches from the CF admin,
but this did not resolve the issue. Does anyone know how/where CF would be
caching this and how to programmatically refresh it?

On Thu, Dec 18, 2014 at 2:52 PM, Russ Michaels  wrote:
>
>
> that is a pretty generic error, but as it only happens after a while you
> might solve the problem by caching your object in application scope so it
> doesn;t have to be instan tiated every time.
>
> application.bcrypt = CreateObject("java", "BCrypt");
>
> obviously check that it exists before creating it , or you are just doing
> the same thing.
>


-- 

  [image: profile picture]  *Dean Lawrence*
*President*
Internet Data Technology
*Phone:* 888-438-4381 x701
*Web:* www.idatatech.com
*Email:* d...@idatatech.com
  Programming | Database | Consulting | Training


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359861
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Bcrypt.class error

2014-12-19 Thread Dean Lawrence

Thanks Byron,

Yes, the error is being generated by the checkpw method. Since the method
is working as written, I don't think that moving the checkpw call to a set
statement will alleviate the issue. When it decides to fail, it fails using
the exact same credentials call from the client side, so I know that it is
not an issue of incorrect values being passed in. Also, even with the more
granular error checking, if the checkpw method decided to start failing, I
would ultimately receive the ambiguous NullPointerException error. I may
add the additional tests once the app goes live, since I won't be dealing
with controlled data, but I don't think that it will benefit me with this
current issue.

I am trying the application scoped suggestion as offered by Russ, since I
know that I can refresh that variable even if the webservice is cached
somewhere else. So far it has not failed again, so I am hoping that it
solved the issue.

Thanks again for you input Byron.

On Thu, Dec 18, 2014 at 3:21 PM, Byron Mann  wrote:
>
>
> Based on your description, I think this is the line causing an error.
>
> bcrypt.checkpw(lcase(password),Member.getMemberPassword())
>
> I might just add some more granular logging before the statement that would
> maybe nail down what is amiss.
>
> try {  writeoutput(lcase(password)); } catch (any e) {  write error 1 }
> try {  writeoutput(Member.getMemberPassword()); } catch (any e) {  write
> error 2 }
> try {  writeoutput(bcrypt.checkpw('test','test')); } catch (any e) {  write
> error 3 }
> try {  writeoutput(bcrypt.checkpw(lcase(password),Member.
> getMemberPassword())); } catch (any e) {  write error 4 }
> bcrypt.checkpw(lcase(password),Member.getMemberPassword())
>
> Could maybe also pull out the checkpw function from inside the if an set to
> a variable.
>
> var chkResult = bcrypt.checkpw(lcase(password),Member.getMemberPassword())
> if(isDefined("chkResult") and !isNull(chkResult) and isBoolean(chkResult)
> and chkResult){.
>
> if statement might be a bit overkill, but may handle the error more
> gracefully.
>
>
-- 

  [image: profile picture]  *Dean Lawrence*
*President*
Internet Data Technology
*Phone:* 888-438-4381 x701
*Web:* www.idatatech.com
*Email:* d...@idatatech.com
  Programming | Database | Consulting | Training


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359860
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Picasa and CF

2014-12-19 Thread John M Bliss

Starting point...?  http://picasacfc.riaforge.org

On Thu, Dec 18, 2014 at 4:37 PM, Les Irvin  wrote:
>
>
> I'm trying to write a CF script to automate the creation of a photo
> slideshow video in Picasa. I want to programatically take, say, a folder of
> JPGs, convert them to a slideshow video, and upload the result to YouTube -
> without any human intervention. Has anyone had any experience with the
> Picasa api to know if this is possible?
>
> Thanks in advance for any help,
> Les
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359859
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm