- This topic has 15 replies, 2 voices, and was last updated 18 years, 9 months ago by Martin Burkert.
-
AuthorPosts
-
Martin BurkertMemberHello!
My Configuration
Windows XP SP1
Tomcat 5.5.15
JDK 1.5.0.06
Eclipse SDK 3.1
Myeclipse 4.1.1
Oracle Standard Edition 9.2.0.6I developed a Webapplication using Hibernate (OCI to Oracle), Struts and JSTL. Everything works fine.
After exporting the whole Webapplication to a .war-file, and installing to the same Applicationserver, the Program fails during accessing a ref-cursor from Oracle (this feature is working after Myeclipse-deployment). All the other features work normaly.
The exception:
2006-03-03 08:24:38 ApplicationDispatcher[/rochembdb]: Servlet action is currently unavailable 2006-03-03 09:02:05 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.UnsatisfiedLinkError: make_statement at oracle.jdbc.oci8.OCIDBAccess.make_statement(Native Method) at oracle.jdbc.oci8.OCIDBAccess.RefCursorBytesToDBStatement(OCIDBAccess.java:2373) at oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.java:3670) at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:5792) at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:5622) at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:698) at com.roche.hibernate.Defekt.getDefectRepHistory(Defekt.java:469) at com.roche.struts.awm.action.DefectDescriptionAction.execute(DefectDescriptionAction.java:118) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.roche.struts.filter.LoginFilter.doFilter(LoginFilter.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source) .
Are there any differences between the automated deployment of Myeclipse and a manual deployment with a war-file? First I guessed, that the jdbc-Component has a bug (ojdbc14) – but I’m using always the same file.
Anyideas what’s going wrong?
greetings
Martin
Riyad KallaMemberMartin,
The issue is that I believe the OCI driver requires a DLL to be used by the JDBC driver. In that case you need to navigate to Window > Preferences > MyEclipse > App Servers > (YOUR APP SERVER) > Paths, then use the last box “Append to Library Path” to add the directory that contains your DLL file in it.
Martin BurkertMemberHi Riyad,
Thanks for answering, and Sry for my delay. The directory of the required DLL’s was already appended to the libary in the preferences.
However, the application runs fine, when deploying it out of myeclipse to the local tomcat server. But the application fails partialy, when deploying it on the SAME locally tomcat server with the “export to warfile” function of Myeclipse, and installing this warfile with the tomcat-manager.
And one fact is confusing me: the application fails, when accessing an Oracle recordset (is possible to access Strings(varchar2), integers(number), …). But before the error occurs, I’m accessing the database in many different ways (hibernate HSQL, Hibernate native, Plain old Java Stlye [JAAS], and so on….). And that is working fine. So I can’t imagine, that the Application Server is missing a file, because the issue is too spezific.
And again: the application works (with accessing the recordset) on the same applicationserver, when it was deployed with myeclipse.I need to deploy the application on a Server, and would be glad, not to install the whole developmentkit on a production system. 😉
Hope, you can help me….
greetings Martin
Riyad KallaMemberMartin,
Try to create a “packaged deployment” instead of using File > Export, and then put that WAR in Tomcat, does that work?
Martin BurkertMemberHi!
No, that does not work… 🙁
greetings
Martin
Riyad KallaMemberOk so to clarify, when you do an exploded deployment, everything works. But then if you do a packaged deployment OR use File > Export > J2EE WAR, your app will not work on the *same* machine, correct?
Martin BurkertMemberthats correct
Riyad KallaMemberWhat error do you get when you use a Package Deployment (forget File > Export for now)? The only difference between packaged and exploded deployment is that we run a ZIP on the exploded deployment to create the WAR, so there should be no differences.
Martin BurkertMemberI got the same error I discribed in my first posting – this cryptic “make_statement” error, when accessing via pl/sql the returncursor. In both cases!
greetings
Martin
Martin BurkertMemberAdditionally I would like to send the code, where the exception occurs (at getObject):
public static Collection getDefectRepHistory(MeCISObjectForm mecisObject, boolean bDBOrd) { Session session = null; Connection con = null; CallableStatement cstmt; ResultSet cursor; String query; String matNr = null; String serNr = null; if (mecisObject != null && mecisObject.getMatNr() != null) { matNr = mecisObject.getMatNr(); serNr = mecisObject.getSerNr(); }else return null; // the query uses showRepDefectHistory of package AWM, which returns a cursor query = "begin ? := mecis_owner.awm.showRepDefectHistory(?,?); end;"; try { session = SessionFactory.currentSession(); // load the defect con = session.connection(); cstmt = con.prepareCall(query); cstmt.registerOutParameter(1, OracleTypes.CURSOR); cstmt.setString(2, matNr); cstmt.setString(3, serNr); cstmt.execute(); =============>cursor = (ResultSet)cstmt.getObject(1); EXCEPTION!!! Vector defRepHistory = new Vector(); while (cursor.next()) { [........]
Riyad KallaMemberMartin,
Technically this doesn’t make sense so let’s try this. Shut down Tomcat, remove all your deployments then make an exploded deployment. Now start tomcat, confirm that it works, now shut down Tomcat. Go into the Tomcat\webapps directory and zip the directory for your webapp, then rename the zip to .war, now go back into MyEclipse and remove the deployment, double check the directory under webapps is done and just the .war file is there. Now start Tomcat again (do not re-create the deployment), make sure it deploys the WAR it found in your webapps dir (should give you a message in console) and then try the app and see if it works.
Martin BurkertMember@support-rkalla wrote:
Martin,
Technically this doesn’t make sense so let’s try this. Shut down Tomcat, remove all your deployments then make an exploded deployment. Now start tomcat, confirm that it works, now shut down Tomcat.Hi Rkalla,
Sorry for my delay again – had a lot of work at the university…
I tried to follow your steps, but when deploying the project again out of eclipse (exploded deployment), I tried to start tomcat with the Tomcat Configuration Tool – and it did not work too!!!
So again: not the deployment is different, the method of starting up tomcat seems to be problem. I did not realise the real cause of the issue. When installing the .war-file manually, I always started up tomcat manually, when deploying form myeclipse, I started tomcat out of myeclipse. So the problem is the same, but the cause is different 😉In Myeclipse my Tomcat-Configuration is as following:
* tomcat-Server enabled and directory set to tomcat-location (of course, there is only one tomcat installed)
* JDK set to the installed jdk1.5.0_06 (the only one installed on my system)
* Optional JVM Arguments: -Djava.security.auth.login.config==C:\temp\jaas.config (the configfile for the jaas-login)
* Launch: Debug Mode
* Paths: ojdbc14.jar – c:\temp\ojdbc14.jar
* Append to libarypath: temp – c:\tempThis configuration works…
When starting the tomcat manually with the Tomcat Configurator, I set following parameters (in Timcat Configurator):
* Java VM: C:\Program Files\Java\jdk1.5.0_06\jre\bin\client\jvm.dll
* Java Classpath: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\bootstrap.jar
* Java Options:
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 5.5\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\logging.properties
-Djava.security.auth.login.config==C:\temp\jaas.config
(except the jaas config the other options are defaultsettings)
Startupmode: JVM (not JAVA)Environment Variables of the System:
PATH contains C:\Program Files\Java\jdk1.5.0_06\bin; C:\temp (so it should find the oracle-dll and jaas.config and so on…)
JAVA_HOME: C:\Program Files\Java\jdk1.5.0_06But when starting up with this configuration, it is not possible to fetch results form an Oracle-Cursor. However, the other features (hibernate, Jaas-Login, Struts, ….) work. Sorry for thinking, that my problem is caused by deployment….
Any ideas what I’m doing wrong?
greetings Martin
Martin BurkertMemberHi!
Additionally I tried following
1. Deleted all deployments
2. Started myeclipse and tomcat OUT OF Myeclipse
3. Exported a war file out of myeclipse (export -> J2EE War…..)
4. Installed this warfile manually – and it works!But how is it possible, to start tomcat without myeclipse (I know, that this question is not your business, but I would be very very glad if anybody can helb me).
It is very frustrating, that my problem is so specific – when nothing works, or tomcat is not able to start, the situation is clear – but in my case, a specific feature, which seems to use the same resources as many other working features (JDBC-driver, DB-Connection, hibernate, …) does not work…greetings Martin
Riyad KallaMemberMartin,
I am starting to think something is goofed on your Tomcat install. If I were you, I would redownload a fresh copy of Tomcat ZIP file, then unzip it to a new location. Then I would deploy my app and run it using the default startup.bat script (don’t change anything). Then I would work from there until my app worked.You might have changed a strange setting in your old install that caused it to die.
Martin BurkertMembermhhh – the software was installed on a new machine, and I’ve got the same problem on an other machine. But I will give it a try to install it again.
I will report if I got it to work or not.thx
greetings
Martin -
AuthorPosts