Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems deploying to Tomcat

wo441337enMay 1 2006 — edited May 8 2006
Hi,


In the past few days I have tried to deploy an UIX application generated by JHeadstart 10.1.2.1 (build 27) to a Tomcat 4 server running on JDK 1.4.2_10. First I followed the instructions found in the JDeveloper help (search for Tomcat and choose "Deploying to the Apache Tomcat Application Server "). Installing the ADF Runtime Libraries went without any problems.
Next I followed the steps in "Configuring Tomcat for UIX Deployment". I copied the uix2.jar, regexp.jar and share.jar from <tomcat>/webapps/webapp/WEB-INF/lib to <tomcat>/common/lib. I then unzipped the <jdev>/jdev/redist/uix2-install.zip into <tomcat>/webapps so it created the cabo directory. I then created an "empty" web.xml file in <tomcat>/webapps/cabo/WEB-INF containing

<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
</web-app>

Leaving it completely empty generated XML parsing errors. I then added the line

<DefaultContext crossContext="true"/>

and started Tomcat.
In JDeveloper I created an Application Connection to my Tomcat 4 webapps directory and deployed my application as a WAR file to it. Tomcat unpacked and deployed it and I logged into it.
The app showed up ok but there was a problem. One of my ViewObjects has a bind parameter which struts should pass. However, I get a "Parameter IN of UIT missing at index.: 2" error. Checking the Tomcat logs I found a stacktrace originating at line 3387 in the applyIterBindParams method in JhsDataAction. This line is

ViewObject vo = ib.getRowSetIterator().getRowSet().getViewObject();

In my subclass I created an overriden version of this method replacing the above line with

RowSetIterator ri = ib.getRowSetIterator();
RowSet rs = ri.getRowSet();
ViewObject vo = rs.getViewObject();

showing the error occures at the "RowSet rs = ri.getRowSet();" line. This means that it looks like on Tomcat, the IteratorBinding instance ib is non-zero but not bound to a RowSetIterator. When I click the corresponding tab again, the error is not shown and all rows in the ViewObject are displayed correctly.
However, when I then try to add a new entry, I get the error again and the logs show a JBO-25020 error for a ViewRow with key oracle.jbo.Key[null null 100050 ]. In this Key, the number 100050 is the primary key for the main table which is generated by a sequence. The first "null" should contain the value of the bind parameter for this ViewObject and the second "null" depends on the bind parameter.

So, it looks like for some reason things are going wrong on Tomcat 4. Please note I am using JDeveloper 10.1.2.1.0 (build 1913) and that the application runs without any problems on the embedded OC4J server using the same database connection.
Also, I have tried to run the application without inzipping the uix2-install.zip file and without modifying the server.xml file which results in exactly the same errors.
Finally, I deployed this app on both Tomcat 5.0 and Tomcat 5.5 giving exactly the same errors again. The JDeveloper support matrix states that only Tomcat 4 is supported, so that's why I tried deploying on Tomcat 4.

Would anyone have a suggestion for me as to what may be going on?


Thanks in advance,

Wouter van Reeven
AMIS
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2006
Added on May 1 2006
16 comments
2,479 views