Andrea De Gaetano

Greenhorn
+ Follow
since Mar 26, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrea De Gaetano


Finally I've found the solution!
There was two problem:
- in my enviroment Realm+Oracle OCI miserally crash! I don't know why, I will investigate but it's not releated with this topic and I don't have problem in another enviroment that I can use! I produced a first example program whit only realm and oci for test it.
- like stupid , I forgot to remove ojdbc14.jar from a directory INSIDE the war. I thought this wasn't a problem to have inside a subdirectory a jar...

At least, thanks again Bauke Scholtz.

You can close this topic.
11 years ago
Hi ,
one month past but I don't go so far from the last time I wrote here
Thanks to Bauke Scholtz for his support.

I'm investigating again on the problem and I found that is present only with Realm e OCI driver.
Now I have a new Tomcat enviroment, clean, with only one application installed.
This application use JDBCRealm with Oracle driver for jdbc for authentication and it display simple jsp page containing text messagges..

Again everything works with the "Thin" Driver, instead with OCI driver, after the login procedure the java virtual machine crash with some memory dump messagges...
The ojdbc14.jar is in $TOMCAT_HOME/common/lib
The ORACLE_HOME is set.
I don't use other library ...

Any suggestion ?
Thanks you
12 years ago

Bauke Scholtz wrote:

Andrea De Gaetano wrote:
So the library must be in common/lib directory of tomcat.

To be more precise: in the classpath.



you mean that:
- I have to change the classpath (or catalina.sh)
or
- common/lib is in tomcat classpath , so the library is too
?

Thanks you again
12 years ago

Bauke Scholtz wrote:Your classpath is a mess.
Remove all duplicate JAR files.



Thanks you for the answer.
So the library must be in common/lib directory of tomcat.

I'm using eclipse, and I put the library in the build path for compile the application (it points on $TOMCAT_HOME/common/lib/ojdbc14.jar").
Is this wrong?

Thanks in advance
12 years ago
Hi,
I hope this is the right place to post..
I've got a web application that use Oracle OCI driver for connecting to an Oracle Database.
This application use Realm with OCI driver for servlet authentication and ALSO (I know the problem is here) is used again from the application to read some data from the same database.
With this situation the application throw a Servlet Exception: Native Library "already loaded in another classloader".
The oci library "ojdbc14.jar" is in the common/lib directory is it the right place?
Where should I put it?

The same application with the THIN driver doesn't make problem but I can't use it and I must use OCI driver instead.
Any solution to this problem?
Thanks you in advance


This is the tomcat error message:

org.apache.jasper.JasperException: Native Library /usr/lib/oracle/10.2.0.3/client/lib/libocijdbc10.so already loaded in another classloader
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

javax.servlet.ServletException: Native Library /usr/lib/oracle/10.2.0.3/client/lib/libocijdbc10.so already loaded in another classloader
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.seltronco_jsp._jspService(seltronco_jsp.java:286)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.UnsatisfiedLinkError: Native Library /usr/lib/oracle/10.2.0.3/client/lib/libocijdbc10.so already loaded in another classloader
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1716)
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
java.lang.Runtime.loadLibrary0(Runtime.java:822)
java.lang.System.loadLibrary(System.java:993)
oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3135)
java.security.AccessController.doPrivileged(Native Method)
oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3131)
oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
12 years ago
In my experience this is not a thing that you can do with a midlet.
Maybe on a Symbian device you could create an apps that call the midlet at the startup (I'm not really sure you can) on other device I don't think it is possible something similar.
13 years ago
I found....
there was a stupid bug in the Master servlet..
Thanks a lot to everyone who contribute to help me.
I'm a newbie in servlet tecnology but I will try to contribute to the community.
13 years ago

Originally posted by Ben Souther:
I'm not sure what you're asking but did notice a bug in your code:



There is no close quote to your src attribute.



it is right in the code

this is the code of the imageGenerator
13 years ago

Originally posted by Ben Souther:
By building img tags (as you have done) you are causing the browser to make the requests (one for each img tag).



so you said, the problem is in another point... right?
It's really strange because if I put a simple

System.out.println("call "+image);
(where image is the param received)


in the doGet(doPost call doGet) method of ImageGenerator it prints only the first sentence and not the other 2.

I have to find the problem...
Thanks for your attention.
13 years ago

Originally posted by Jigar Naik:
make 3 different request.



mm ok . but How can I regenerate the request?
Thanks you
13 years ago
HI,
I've got a servlet called Master that call another servlet ImageGenerator with different parameter.
ImageGenerator is a servlet that use the "png/image" content-type to produce some chart image for Master.
In the code of the Master there are multiple sentence like:

out.println("<img src=\"ImageGenerator?image=1 >");
out.println("<img src=\"ImageGenerator?image=2 >");
out.println("<img src=\"ImageGenerator?image=3 >");

The obvious problem is that only the first call to ImageGenerator works good accordingly to the Servlet Lifecycle.

So , how can I find a way to call ImageGenerator multiple times?
Or, how can I find another way to handle this problem?
Thanks you
[ March 26, 2008: Message edited by: Andrea De Gaetano ]
13 years ago