cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Zamorski <ram...@tenbit.pl>
Subject Re[2]: ESQL problem: Insert statement
Date Fri, 03 Nov 2000 17:10:00 GMT
Hello Tako,

Friday, November 03, 2000, 8:10:07 AM, you wrote:

Don't you guys think it just won't work, as in esql taglib file there
is java routine going like this:

statement.executeQuery(blah,blah,here);

??? At last it is in my version [1.8] and I think it needs to be
changed into executeUpdate to work. I've made quick and dirty hack,
and added new tag esql:executeupdate with this line changed [and
with removed resultset part] and now it works.

TM> The generated .java file is attached to this mail.
TM> Hope it sheds some light on the problem.


TM> Tako Molanus

>> Sure, see below. I also included the source of the
TM> xml
>> (test) file.
>> 
>> What I failed to mention in my original posting is
>> that the row is actually inserted. But I don't like
>> receiving the error message, especially since I want
>> to embed a second insert statement that makes use of
>> the Oracle sequence called in the first statement.
>> And the error will probably cause the script to
TM> ignore
>> the embedded statement (although I haven't actually
>> tried this yet).

TM> hmm... now, can you post the generated java source
TM> code?

TM> - donald

>> Tako Molanus
>> 
>> > Hi there,
>> > 
>> > When I try to insert a row through into a table
>> > through ESQL I get an error message from my Oracle
>> > database:
>> > ORA-01007: variable not in select list 
>> > 
>> > This does not happen when I use SQL.
>> 
>> can you post a full stacktrace?
>> 
>> - donald
>> 
>> 
>> ORA-01007: variable not in select list
>> java.sql.SQLException: ORA-01007: variable not in
>> select list at
>>
TM> oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:181)
>> at
>> oracle.jdbc.ttc7.Odscrarr.receive(Odscrarr.java:241)
>> at
>>
TM> oracle.jdbc.ttc7.TTC7Protocol.describe(TTC7Protocol.java:467)
>> at
>>
TM> oracle.jdbc.driver.OracleStatement.describe(OracleStatement.java:2537)
>> at
>>
TM> oracle.jdbc.driver.OracleResultSetMetaData.<init>(OracleResultSetMetaData.java:23)
>> at
>>
TM> oracle.jdbc.driver.OracleResultSet.getMetaData(OracleResultSet.java:506)
>> at
>>
TM> _C_._Apache._cocoon_1_8._cocoon_1_8._samples._Tako._ESQLtest_ins._esql_execute_query_N6025e7(_ESQLtest_ins.java:98)
>> at
>>
TM> _C_._Apache._cocoon_1_8._cocoon_1_8._samples._Tako._ESQLtest_ins.populateDocument(_ESQLtest_ins.java:258)
>> at
>>
TM> org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
>> at
>>
TM> org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:494)
>> at org.apache.cocoon.Engine.handle(Engine.java:359)
TM> at
>> org.apache.cocoon.Cocoon.service(Cocoon.java:167) at
>>
TM> javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
>> at
>>
TM> org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
>> at
>>
TM> org.apache.jserv.JServConnection.run(JServConnection.java:188)
>> at java.lang.Thread.run(Thread.java:484)
>> 
>> 
>> 
>> XML file:
>> 
>> <?xml version="1.0"?>
>> <?cocoon-process type="xsp"?>
>> <?cocoon-process type="xslt"?>
>> <?xml-stylesheet href="esqltest.xsl"
type="text/xsl"?>>
>> 
>> 
>> <xsp:page
>>   language="java"
>>   xmlns:esql="http://apache.org/cocoon/SQL/v2"
>>   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>> >
>> 
>> <page>
>> <test>fsdtt</test>
>> <esql:execute-query>
>>   <esql:use-connection>wpf</esql:use-connection>
>>   <esql:query>insert into esqltest (a) values
>> (8)</esql:query>
>>   <esql:results>
>>   </esql:results>
>>   <esql:no-results>
>>     <error>no results were found</error>
>>   </esql:no-results>
>>   <esql:error-results>
>>     <message><esql:get-message/></message>
>>     <stacktrace><esql:get-stacktrace/></stacktrace>
>>   </esql:error-results>
>> </esql:execute-query>
>> 
>> </page>
>> 
>> </xsp:page>
>> 


TM> __________________________________________________
TM> Do You Yahoo!?
TM> From homework help to love advice, Yahoo! Experts has your answer.
TM> http://experts.yahoo.com/




-- 
Best regards,
 Roman                            mailto:ramzam@tenbit.pl



Mime
View raw message