Discussion Groups
  Oracle JVM
  mod_ose trouble

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   mod_ose trouble
Ivan Urosov (iva@kase.kz)
unregistered
posted December 20, 2000 12:31 AM              Reply w/Quote
Hello!

Can't rigth configure the access to
servlets via mod_ose.
In error log of apache follow errors:
--------
LISTENER not found or address description longer than 4096 chars
Cannot bind JIP service to LISTENER
--------

Try to configure both, whith MTS configuration and without it, error not
changed.

What the probably reason whith this trouble?
Oracle for Linux.
Help, please

WBR,
Ivan.

IP: Logged

Ravi,Oracle Support Core Tech (rreddy@in.oracle.com)
unregistered
posted January 09, 2001 08:41 PM              Reply w/Quote
Please follow the procedure below for mod_ose
configuration with oracle 8.1.7.

This procedure tested on Sun Solaris and Windows NT.

The same should work on other unix platforms also.


1. In the init.ora set the
mts_dispatchers = "(PROTOCOL=tcp)"
and restart the database.

2. Invoke the sess_sh tool.
sess_ss -u sys/change_on_install -s jdbc:oracle:oci8@

3. $ createwebservice -root /testRoot testService

3. $ chown -R SCOTT /testRoot

4. $ chmod -R +rwx SCOTT /testRoot

5. Create a directory /tmp/test (on UNIX)

$createwebdomain -docroot /tmp/test /testRoot

on NT

Create a directory c:\test

$createwebdomain -docroot c:\test /testRoot

5. $createcontext -virtualpath /testing -docroot /tmp/test /testRoot testContext

on NT

$ createcontext -virtualpath /testing -docroot c:\test /testRoot testContext

6. addendpoint -port 2020 -register testService main

7. $ chmod -R +rwx SCOTT /testRoot

8. Come out of the session shell.

9. Now invoke sql*plus and connect as sys user and run the DBMS_JAVA.grant_permission.

On UNIX

exec dbms_java.grant_permission('SCOTT','SYS:java.io.FilePermission','/tmp/test/test.txt','read');
commit;

On NT

exec dbms_java.grant_permission('SCOTT','SYS:java.io.FilePermission','c:\test\test.txt','read');
commit;

Now create a file say test.txt in /tmp/test (On UNIX) or c:\test (On NT) and try to
acess it from the browser.

http://machine.com:2020/test.txt

This should return the test.txt on the browser. If it gives ant java exceptions please check
for the DBMS_JAVA.GRANT_PERMISSION arguments.

10. Create a java file Hello.java

import javax.servlet.*;
import javax.servlet.http.*;

public class Hello extends HttpServlet {
int i =0 ;
public void doPost ( HttpServletRequest req, HttpServletResponse res )throws ServletException, java.io.IOException {
res.setContentType("text/html");
java.io.PrintWriter out = new java.io.PrintWriter(res.getOutputStream());
i++;
out.println("<HTML>");
out.println("<BODY>");
out.println("This is the Servlet from Database Hit is "+ i);
out.println("</BODY>");
out.println("</HTML>");
out.flush();
out.close();
}
public void doGet( HttpServletRequest req, HttpServletResponse res )throws ServletException, java.io.IOException {
doPost( req,res);
}
}



11. Complie it

12. loadjava -r -v -user SCOTT/TIGER Hello.class

13. Invoke ths session shell tool again.
sess_ss -u sys/change_on_install -s jdbc:oracle:oci8@

14. $ publishservlet -virtualpath /Hello /testRoot/contexts/testContext Hello SCOTT:Hello

15. $ chmod -R +rwx SCOTT /testRoot

16. Now from the browser invoke the servlet by using
http://machine.com:2020/testing/Hello

Mod_ose configuration:
======================

17. In the tnsnames.ora file :


inst1_http =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sunappsdemo.in.oracle.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = V817)
(PRESENTATION = http://testService)
)
)


Where V817 is the database and testService is the web serice created using
createwebservice -root /testRoot testService.

19. Invoke the session shell tool again.

sess_ss -u sys/change_on_install -s jdbc:oracle:oci8@

20. $ addendpoint -net8 -register testService testServiceNet8


21. Create a mod__ose.conf (Rename the original file ) in $ORACLE_HOME/Apache/Apche/conf
directory.

## On Unix
LoadModule ose_module libexec/libjipa8i.so


## On NT
## LoadModule ose_module modules/orajipa8i.dll
##

#
# Apache configuration
# Domain: /webdomains
#
# o/p generated by
# exportwebdomain -format apache -netservice inst1_http -nodocs -nodefault /webdomains
#

<IfModule mod_ose.c>

AuroraService inst1_http

#
# Context for VPATH /context-test/
#

<Location /testing/Hello >
SetHandler aurora-server
</Location>

</IfModule>

21. Now restart the Apache web lisetener.

and access the mod_ose using Apache web server port i.e port 80 or 7777.
http://machine.com:7777/testing/Hello
or http://machine.com/testing/Hello


IP: Logged

Serg Kolomoyets (sk@rvfb.donpac.ru)
unregistered
posted January 10, 2001 04:01 AM              Reply w/Quote
I have tries it all. But it stop works after server reboot or oracle restart.
It seems like I need to add some to configuration files : listener.ora, tnsnames.ora...
but I don know what I have to add...

if yo have any ideas, please help.

Serg

IP: Logged


Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Oracle Technology Network - Oracle AppsNet


Ultimate Bulletin Board 5.45c