[transfer-dev] Re: No records returned: CF7 and oracle SOLVED

2011-01-04 Thread pedrobl

I found it!!! The problem was that the token field was defined as CHAR
36, and the token generated was 35 characters long. The token was
being stored with an space at the end.

What I still don't understand is why when transfer runs the query
"select PERSON_ID from NW_SESSIONS where SESSION_TOKEN = (param 1)",
and param1 is 35 characters long, it returns no rows, but when I run
the query directly in SQL Developer "select PERSON_ID from NW_SESSIONS
where SESSION_TOKEN = '4B85F89A-D1AF-E4E2-13148E6984C1271F';", it
returns one row...

Oh well!, thank you Mark, and sorry for wasting your valuable time,

Pedro

-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en


[transfer-dev] Re: No records returned: CF7 and oracle

2011-01-04 Thread pedrobl

This is getting weirder and weirder. I modified the table and transfer
config changing the field name to session_token, instead of token. No
luck, same results.

I then tried to see the sql being sent to oracle when using
listByProperty, and readByProperty. To do this I modified transfer
configuration to point to the wrong table and provoke a "table or view
does not exist" error that shows the sql that failed.

- For the readByProperty method, the query is:
select PERSON_ID from NW_SESSIONS where SESSION_TOKEN = (param 1)
- For the listByProperty method, the query is:
select SESSION_TOKEN as SessionToken, PERSON_ID as PersonId from
NW_SESSIONS where SESSION_TOKEN = (param 1)

The param 1 in both cases is just fine:
(param 1) = [type='IN', class='java.lang.String', value='4B85F89A-D1AF-
E4E2-13148E6984C1271F', sqltype='cf_sql_varchar']

If I run both queries directly, they both work as expected, both
return 1 row, on the other hand if transfer runs them, they return no
rows... WTF?

I am at a loss here, I don't know what else to try. This doesn't make
any sense!!

Pedro.

On Jan 4, 12:30 pm, pedrobl  wrote:
> On Jan 4, 12:18 pm, Mark Mandel  wrote:
>
> > So that doesn't make sense... If the sql debug says that nothing is
> > returned, but it returns values when you copy and paste it into a sql
> > editor?
>
> > Is that right?
>
> Exactly, it does not make sense. I do similar things all over the
> application. I don't understand why this is not working... I'm
> changing the field name "TOKEN" to "SESSION_TOKEN", maybe that has
> something to do with it. I'll post the results in a minute.
>
> Thanks for your patience,
>
> Pedro.

-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en


[transfer-dev] Re: No records returned: CF7 and oracle

2011-01-04 Thread pedrobl



On Jan 4, 12:18 pm, Mark Mandel  wrote:
> So that doesn't make sense... If the sql debug says that nothing is
> returned, but it returns values when you copy and paste it into a sql
> editor?
>
> Is that right?

Exactly, it does not make sense. I do similar things all over the
application. I don't understand why this is not working... I'm
changing the field name "TOKEN" to "SESSION_TOKEN", maybe that has
something to do with it. I'll post the results in a minute.

Thanks for your patience,

Pedro.

-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en


Re: [transfer-dev] No records returned: CF7 and oracle

2011-01-04 Thread Mark Mandel
So that doesn't make sense... If the sql debug says that nothing is
returned, but it returns values when you copy and paste it into a sql
editor?

Is that right?

Mark
On 04/01/2011 9:59 PM, "Pedro Bezunartea López" 
wrote:
> Hi Mark,
>
>> So in the debug output - when you see the Transfer generated SQL, how
many
>> rows does it return?
>>
>
> None.
>
> The table actually has just one row, that I dump using the
> transfer.list("...Session") query. But none using the listByQuery method
> (after the proper setParam, of course), or listByProperty.
>
> Still researching...
>
> Pedro.
>
> 2011/1/3 Mark Mandel 
>
>> So in the debug output - when you see the Transfer generated SQL, how
many
>> rows does it return?
>>
>> Mark
>>
>> On Tue, Jan 4, 2011 at 2:35 AM, pedrobl  wrote:
>>
>>>
>>> Happy new year everyone!
>>>
>>> I left last year with a strange problem that probably has an easy
>>> solution which I fail to see. I'm using Coldbox, Coldspring, Transfer
>>> and Oracle 10g. I have stumbled upon a few driver issues, and this
>>> probably has something to do with it.
>>>
>>> First, the table: sessions, which just has the following fields:
>>> PersonId (CHAR 32), Token (CHAR 36).
>>>
>>> The use case is simple, a user wants to be authenticated and doesn't
>>> remember her password. She accesses a form where she enters her email
>>> address, the system checks that the email exists, generates a token
>>> using CreateUUID(), persists the session object to the database, and
>>> sends an email with a link containing the token just created. The link
>>> takes the user to a page where all the system has to do is search the
>>> database for the token, and generate a user session accordingly...
>>> pretty simple.
>>>
>>> Second, transfer.xml:
>>> 
>>> >> >
>>> >> column="TOKEN" />
>>> 
>>>
>>> Amazingly, the record is never found. I have tried many transfer
>>> methods, all unsuccessfully, among others:
>>>
>>> - readByProperty: "SessionToken", and the generated token.
>>> - readByPropertyMap: the map consists of a struct with a
>>> "SessionToken" key, and the token as its value.
>>> - listByQuery: the query is simple "FROM ...Session
>>> WHERE ...Session.SessionToken=:sessionToken"
>>> - Change the TOKEN field to varchar2.
>>>
>>> The first two return a new object, and the third returns an empty
>>> query. I also cfdump the whole table, to check that the record exists,
>>> and the sql sent to oracle, and all look just fine... as they do in
>>> many other parts of the application. If I run the query generated
>>> directly in SQLDeveloper, it works fine. I have also tried the same
>>> code using postgresql instead of Oracle, and it works!!
>>>
>>> Sorry for the long post. What else could I try to debug this? Any
>>> ideas? TIA,
>>>
>>> Pedro.
>>>
>>> --
>>> Before posting questions to the group please read:
>>>
>>>
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
>>>
>>> Try out the new Transfer ORM Custom Google Search:
>>> http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
>>>
>>> You received this message because you are subscribed to the Google
Groups
>>> "transfer-dev" group.
>>> To post to this group, send email to transfer-dev@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> transfer-dev+unsubscr...@googlegroups.com

>
>>> For more options, visit this group at
>>> http://groups.google.com/group/transfer-dev?hl=en
>>>
>>
>>
>>
>> --
>> E: mark.man...@gmail.com
>> T: http://www.twitter.com/neurotic
>> W: www.compoundtheory.com
>>
>> cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
>> http://www.cfobjective.com.au
>>
>> Hands-on ColdFusion ORM Training
>> www.ColdFusionOrmTraining.com
>>
>> --
>> Before posting questions to the group please read:
>>
>>
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
>>
>> Try out the new Transfer ORM Custom Google Search:
>> http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
>>
>> You received this message because you are subscribed to the Google Groups
>> "transfer-dev" group.
>> To post to this group, send email to transfer-dev@googlegroups.com
>> To unsubscribe from this group, send email to
>> transfer-dev+unsubscr...@googlegroups.com

>
>> For more options, visit this group at
>> http://groups.google.com/group/transfer-dev?hl=en
>>
>
> --
> Before posting questions to the group please read:
>
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
>
> Try out the new Transfer ORM Custom Google Search:
> http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
>
> You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
> To post to this group, send email to transfer-dev@googlegroups.com
> To unsubscribe from this group, send email to
transfer-dev+unsubscr...@googlegroups.com
> For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl

Re: [transfer-dev] No records returned: CF7 and oracle

2011-01-04 Thread Pedro Bezunartea López
Hi Mark,

> So in the debug output - when you see the Transfer generated SQL, how many
> rows does it return?
>

None.

The table actually has just one row, that I dump using the
transfer.list("...Session") query. But none using the listByQuery method
(after the proper setParam, of course), or listByProperty.

Still researching...

Pedro.

2011/1/3 Mark Mandel 

> So in the debug output - when you see the Transfer generated SQL, how many
> rows does it return?
>
> Mark
>
> On Tue, Jan 4, 2011 at 2:35 AM, pedrobl  wrote:
>
>>
>> Happy new year everyone!
>>
>> I left last year with a strange problem that probably has an easy
>> solution which I fail to see. I'm using Coldbox, Coldspring, Transfer
>> and Oracle 10g. I have stumbled upon a few driver issues, and this
>> probably has something to do with it.
>>
>> First, the table: sessions, which just has the following fields:
>> PersonId (CHAR 32), Token (CHAR 36).
>>
>> The use case is simple, a user wants to be authenticated and doesn't
>> remember her password. She accesses a form where she enters her email
>> address, the system checks that the email exists, generates a token
>> using CreateUUID(), persists the session object to the database, and
>> sends an email with a link containing the token just created. The link
>> takes the user to a page where all the system has to do is search the
>> database for the token, and generate a user session accordingly...
>> pretty simple.
>>
>> Second, transfer.xml:
>> 
>> > >
>> > column="TOKEN" />
>> 
>>
>> Amazingly, the record is never found. I have tried many transfer
>> methods, all unsuccessfully, among others:
>>
>> - readByProperty: "SessionToken", and the generated token.
>> - readByPropertyMap: the map consists of a struct with a
>> "SessionToken" key, and the token as its value.
>> - listByQuery: the query is simple "FROM ...Session
>> WHERE ...Session.SessionToken=:sessionToken"
>> - Change the TOKEN field to varchar2.
>>
>> The first two return a new object, and the third returns an empty
>> query. I also cfdump the whole table, to check that the record exists,
>> and the sql sent to oracle, and all look just fine... as they do in
>> many other parts of the application. If I run the query generated
>> directly in SQLDeveloper, it works fine. I have also tried the same
>> code using postgresql instead of Oracle, and it works!!
>>
>> Sorry for the long post. What else could I try to debug this? Any
>> ideas? TIA,
>>
>> Pedro.
>>
>> --
>> Before posting questions to the group please read:
>>
>> http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
>>
>> Try out the new Transfer ORM Custom Google Search:
>> http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
>>
>> You received this message because you are subscribed to the Google Groups
>> "transfer-dev" group.
>> To post to this group, send email to transfer-dev@googlegroups.com
>> To unsubscribe from this group, send email to
>> transfer-dev+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/transfer-dev?hl=en
>>
>
>
>
> --
> E: mark.man...@gmail.com
> T: http://www.twitter.com/neurotic
> W: www.compoundtheory.com
>
> cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
> http://www.cfobjective.com.au
>
> Hands-on ColdFusion ORM Training
> www.ColdFusionOrmTraining.com
>
> --
> Before posting questions to the group please read:
>
> http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
>
> Try out the new Transfer ORM Custom Google Search:
> http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
>
> You received this message because you are subscribed to the Google Groups
> "transfer-dev" group.
> To post to this group, send email to transfer-dev@googlegroups.com
> To unsubscribe from this group, send email to
> transfer-dev+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/transfer-dev?hl=en
>

-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en