You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Sonu Vijay <so...@yahoo.com> on 2003/12/06 01:02:15 UTC

Help Plsssssssssssss

Guys,
I"m about to go mad on this on, so pls give me ur
ideas. As some of you might know since yesterday I've
been trying to make the Torque generated Java Classes
to work with DB2400 and I can do selects and deletes
but can't do Inserts and I'm getting the following
exception every time I try an Insert:

java.sql.SQLException: [SQL0104] Token ) was not
valid. Valid tokens: DAY PATH YEAR LABEL MONTH OPTION
RESULT CONNECTION TRANSACTION.

Now I tried my level best to print the Insert queries
without getting into Torque code but it didn't work. I
also tried the spy programs suggested by some guys in
the list but still got nothing.

Maybe that was too much to handle for an Entry level
programmer.

So I downloaded the Torque code and messed around with
it. Then I downloaded all the village code and tried
to put debugging statements in it.

So here is what I have found. The actual queries are
being executed in the village code and I could get the
Insert query also. In the village code they check if a
column in read only ( resultSetMetaData.isReadOnly() )
and my columns come as readOnly, so that's where the
trouble is.

Now I can't see a damn reason why they are read only.
I can run SQL Inserts from my AS400 operations
navigator with the same USERID/PASSWORD that I'm
supplying to the Torque java classes.

So I would really really appreciate any ideas you
might have abt the situation. If you need any more
information I'll be happy to provide that.

Thanks

Vijay







__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Help Plsssssssssssss

Posted by Sonu Vijay <so...@yahoo.com>.
Hey Bill,

Could you try sending the attachment directly to me,
it seems it didn't come thru the torque list.

And is it a version of village latest than 1.5.3.
That's the latest one I could get from their site
althought torque uses another one which is 2.0 or
something.

thanks

vikas

--- Bill Leng <wl...@10.1.7.10> wrote:
> try the attached village.jar.
> 
> Sonu Vijay wrote:
> 
> >Guys,
> >I"m about to go mad on this on, so pls give me ur
> >ideas. As some of you might know since yesterday
> I've
> >been trying to make the Torque generated Java
> Classes
> >to work with DB2400 and I can do selects and
> deletes
> >but can't do Inserts and I'm getting the following
> >exception every time I try an Insert:
> >
> >java.sql.SQLException: [SQL0104] Token ) was not
> >valid. Valid tokens: DAY PATH YEAR LABEL MONTH
> OPTION
> >RESULT CONNECTION TRANSACTION.
> >
> >Now I tried my level best to print the Insert
> queries
> >without getting into Torque code but it didn't
> work. I
> >also tried the spy programs suggested by some guys
> in
> >the list but still got nothing.
> >
> >Maybe that was too much to handle for an Entry
> level
> >programmer.
> >
> >So I downloaded the Torque code and messed around
> with
> >it. Then I downloaded all the village code and
> tried
> >to put debugging statements in it.
> >
> >So here is what I have found. The actual queries
> are
> >being executed in the village code and I could get
> the
> >Insert query also. In the village code they check
> if a
> >column in read only (
> resultSetMetaData.isReadOnly() )
> >and my columns come as readOnly, so that's where
> the
> >trouble is.
> >
> >Now I can't see a damn reason why they are read
> only.
> >I can run SQL Inserts from my AS400 operations
> >navigator with the same USERID/PASSWORD that I'm
> >supplying to the Torque java classes.
> >
> >So I would really really appreciate any ideas you
> >might have abt the situation. If you need any more
> >information I'll be happy to provide that.
> >
> >Thanks
> >
> >Vijay
> >
> >
> >
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Free Pop-Up Blocker - Get it now
> >http://companion.yahoo.com/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> >For additional commands, e-mail:
> torque-user-help@db.apache.org
> >
> >  
> >
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
torque-user-help@db.apache.org


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Help Plsssssssssssss

Posted by Bill Leng <wl...@10.1.7.10>.
try the attached village.jar.

Sonu Vijay wrote:

>Guys,
>I"m about to go mad on this on, so pls give me ur
>ideas. As some of you might know since yesterday I've
>been trying to make the Torque generated Java Classes
>to work with DB2400 and I can do selects and deletes
>but can't do Inserts and I'm getting the following
>exception every time I try an Insert:
>
>java.sql.SQLException: [SQL0104] Token ) was not
>valid. Valid tokens: DAY PATH YEAR LABEL MONTH OPTION
>RESULT CONNECTION TRANSACTION.
>
>Now I tried my level best to print the Insert queries
>without getting into Torque code but it didn't work. I
>also tried the spy programs suggested by some guys in
>the list but still got nothing.
>
>Maybe that was too much to handle for an Entry level
>programmer.
>
>So I downloaded the Torque code and messed around with
>it. Then I downloaded all the village code and tried
>to put debugging statements in it.
>
>So here is what I have found. The actual queries are
>being executed in the village code and I could get the
>Insert query also. In the village code they check if a
>column in read only ( resultSetMetaData.isReadOnly() )
>and my columns come as readOnly, so that's where the
>trouble is.
>
>Now I can't see a damn reason why they are read only.
>I can run SQL Inserts from my AS400 operations
>navigator with the same USERID/PASSWORD that I'm
>supplying to the Torque java classes.
>
>So I would really really appreciate any ideas you
>might have abt the situation. If you need any more
>information I'll be happy to provide that.
>
>Thanks
>
>Vijay
>
>
>
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Free Pop-Up Blocker - Get it now
>http://companion.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-user-help@db.apache.org
>
>  
>


RE: Help Plsssssssssssss

Posted by Sonu Vijay <so...@yahoo.com>.
Thanks,

I'm so screwed up in this man, hence the subject.

I have manually modified the village code to set
readOnly = false where it was checking for it from the
resultSetMetaData.

Maybe its just the DB2400 thing so I'm giving up on it
for now. If reqd will keep working with this modified
village code.

But it took me hrs and hrs to find out what the
problem was and all the exceptions being thrown don't
give a clue abt what's going on. They were just
telling me the syntax errors. And the point in the
village code where the exception was arising from
doesn't seem to take care of that situation in a very
intelligent way. Well maybe it does now, cause I
couldn't get the latest village code from anywhere.

And I wanted to know the reason why you can't easily
print out the Insert SQL statements. Does that offer
some kind of a security or what's going on ?

Although I wrote my first professional java program
only like 6 months ago but I think being able to see
the actual SQL going to the database is a very useful
method of debugging database applications.

So what's the rationale behind preventing the printing
of Inserts in Torque.

Thanks



--- Ramesh Sabeti <rs...@reazon.com> wrote:
> Vijay,
> 
>
http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg03411.htm
> l may provide some pointers.
> 
> And please use a meaningful email subject :)
> 
> Ramesh
> 
> 
> > -----Original Message-----
> > From: Sonu Vijay [mailto:sonupv@yahoo.com]
> > Sent: Friday, December 05, 2003 4:02 PM
> > To: Apache Torque Users List
> > Subject: Help Plsssssssssssss
> > 
> > Guys,
> > I"m about to go mad on this on, so pls give me ur
> > ideas. As some of you might know since yesterday
> I've
> > been trying to make the Torque generated Java
> Classes
> > to work with DB2400 and I can do selects and
> deletes
> > but can't do Inserts and I'm getting the following
> > exception every time I try an Insert:
> > 
> > java.sql.SQLException: [SQL0104] Token ) was not
> > valid. Valid tokens: DAY PATH YEAR LABEL MONTH
> OPTION
> > RESULT CONNECTION TRANSACTION.
> > 
> > Now I tried my level best to print the Insert
> queries
> > without getting into Torque code but it didn't
> work. I
> > also tried the spy programs suggested by some guys
> in
> > the list but still got nothing.
> > 
> > Maybe that was too much to handle for an Entry
> level
> > programmer.
> > 
> > So I downloaded the Torque code and messed around
> with
> > it. Then I downloaded all the village code and
> tried
> > to put debugging statements in it.
> > 
> > So here is what I have found. The actual queries
> are
> > being executed in the village code and I could get
> the
> > Insert query also. In the village code they check
> if a
> > column in read only (
> resultSetMetaData.isReadOnly() )
> > and my columns come as readOnly, so that's where
> the
> > trouble is.
> > 
> > Now I can't see a damn reason why they are read
> only.
> > I can run SQL Inserts from my AS400 operations
> > navigator with the same USERID/PASSWORD that I'm
> > supplying to the Torque java classes.
> > 
> > So I would really really appreciate any ideas you
> > might have abt the situation. If you need any more
> > information I'll be happy to provide that.
> > 
> > Thanks
> > 
> > Vijay
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > http://companion.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
> 


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Help Plsssssssssssss

Posted by Ramesh Sabeti <rs...@reazon.com>.
Vijay,

http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg03411.htm
l may provide some pointers.

And please use a meaningful email subject :)

Ramesh


> -----Original Message-----
> From: Sonu Vijay [mailto:sonupv@yahoo.com]
> Sent: Friday, December 05, 2003 4:02 PM
> To: Apache Torque Users List
> Subject: Help Plsssssssssssss
> 
> Guys,
> I"m about to go mad on this on, so pls give me ur
> ideas. As some of you might know since yesterday I've
> been trying to make the Torque generated Java Classes
> to work with DB2400 and I can do selects and deletes
> but can't do Inserts and I'm getting the following
> exception every time I try an Insert:
> 
> java.sql.SQLException: [SQL0104] Token ) was not
> valid. Valid tokens: DAY PATH YEAR LABEL MONTH OPTION
> RESULT CONNECTION TRANSACTION.
> 
> Now I tried my level best to print the Insert queries
> without getting into Torque code but it didn't work. I
> also tried the spy programs suggested by some guys in
> the list but still got nothing.
> 
> Maybe that was too much to handle for an Entry level
> programmer.
> 
> So I downloaded the Torque code and messed around with
> it. Then I downloaded all the village code and tried
> to put debugging statements in it.
> 
> So here is what I have found. The actual queries are
> being executed in the village code and I could get the
> Insert query also. In the village code they check if a
> column in read only ( resultSetMetaData.isReadOnly() )
> and my columns come as readOnly, so that's where the
> trouble is.
> 
> Now I can't see a damn reason why they are read only.
> I can run SQL Inserts from my AS400 operations
> navigator with the same USERID/PASSWORD that I'm
> supplying to the Torque java classes.
> 
> So I would really really appreciate any ideas you
> might have abt the situation. If you need any more
> information I'll be happy to provide that.
> 
> Thanks
> 
> Vijay
> 
> 
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org