To me, the error message looked like the java program could not be
generated by the xsp generator. It looks to me like it could not find

update_bookmark_list_xsp which is I think the auto-generated file.

I also don't know where call bookmark.update_bookmark_list

comes from. But if that were the problem it would in the logs - somewhere, somelog.

And sorry for my wrong advice.

if you want you can send tomcat/work/cocoon/org/apache/.../update_bookmark_list_xsp.java
to my account and I'll look it over - you can see whether the code is like.


Christopher Painter-Wakefield wrote:



Carlos,

just for background, can you do a simple select or update query using ESQL?
I ask only because you aren't getting a compile error, which you would
normally expect when an appropriate class isn't available.  What this
reminds me of is what happens when the Oracle jdbc classes aren't loaded in
the web application.  The JDBC stuff (through some sort of black magic I
don't know a lot about) figures out which class to load based on your db
url and then goes to load it.  Maybe that is where the error is coming
from.  If so, then you shouldn't be able to do a simple query either.

If that is the case, then you need this section in your web.xml file:
     <init-param>
           <param-name>load-class</param-name>
           <param-value>
                 <!-- For Database Driver: -->
                 oracle.jdbc.driver.OracleDriver
           </param-value>
     </init-param>

I guess another possibility (which would also prevent simple queries) is if
your pool is not set up correctly, e.g., it has an incorrect db url.

If you are able to do simple queries, then it may be something more
specific to doing a stored procedure call, which unfortunately I have no
experience with (through ESQL, anyway).

-Christopher




|---------+----------------------------> | | "Carlos Dias" | | | <[EMAIL PROTECTED]>| | | | | | 04/15/2004 02:12 | | | PM | | | Please respond to| | | users | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: <[EMAIL PROTECTED]> | | cc: | | Subject: ESQl and Stored Procedures | >--------------------------------------------------------------------------------------------------------------|




Hi, I'm trying to use a stored procedure for making an update in an Oracle database. Here is the xsp+esql code: <?xml version="1.0" encoding="iso-8859-1"?>

<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp";
xmlns:xsp-request="http://apache.org/xsp/request/2.0";
xmlns:esql="http://apache.org/cocoon/SQL/v2";>

<xsp:structure>
 <xsp:include>java.lang.String</xsp:include>
</xsp:structure>

<update>
 <esql:connection>
  <esql:pool>sca</esql:pool>
  <xsp:logic>

   String   app_id                   = request.getParameter("app_id");
   String   user_id                  = request.getParameter("user_id");
   if (app_id != null || user_id != null) {

    <esql:call>
     {call bookmark.update_bookmark_list(<esql:parameter direction="in"
type="String">\
              <xsp:expr>user_id</xsp:expr></esql:parameter>,\
              <esql:parameter direction="in" type="String">\
              <xsp:expr>app_id</xsp:expr></esql:parameter>)}
    </esql:call>
    <esql:call-results>
    <esql:update-results>
     <number-of-rows><esql:get-update-count/></number-of-rows>
    </esql:update-results>
    </esql:call-results>
   }
   else {
    <exception>Parameters does not exists</exception>
   }

  </xsp:logic>
 </esql:connection>
</update>
</xsp:page>

I got the following result (in the web page):
XML document must have a top level element. Error processing resource 'http://rasputin:9090/adslV3/cubenavigator/update_bookmark'.





In the error.log: [core.program-generator] (/adslV3/cubenavigator/update_bookmark) http9090-Processor7/ProgramGeneratorImpl: The serverpage [file:/home/cdias/altaia/tomcat/webapps/adslV3/cubenavigator/generators/dynamic/xsp/update_bookmark_list.xsp] could not be preloaded, will be re-created (org.apache.cocoon.components.language.LanguageException: Unable to preload program org/apache/cocoon/www/cubenavigator/generators/dynamic/xsp/update_bookmark_list_xsp: org.apache.cocoon.components.language.LanguageException: Could not load class for program 'org/apache/cocoon/www/cubenavigator/generators/dynamic/xsp/update_bookmark_list_xsp' due to a java.lang.ClassNotFoundException: org.apache.cocoon.www.cubenavigator.generators.dynamic.xsp.update_bookmark_list_xsp)

Can anybody tell me what's going on?!

Thanks in advance,
Carlos Dias



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to