Pool error Web Server 6.1 SP4 solaris 10

I have a web instance with a pool defined in "JDBC Connection Pools", but, when I execute a servlet than find (lookup), the JNDI names, not find nothing (listContext method).
When I find by the exact name:
InitialContext ctx= new InitialContext();
datasource = (DataSource) ctx.lookup("jdbc/POOL");
Throws a exception:
javax.naming.NameNotFoundException: WEB3885: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:921)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:658)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:244)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
may be happening?
The web server is installed on SunOS 5.10 Generic_118833-36 sun4v sparc SUNW,SPARC-Enterprise-T2000
I need help,
Jorge
I have configured a pool in my web instance as following:
*** server.xml:
<RESOURCES>
<JDBCCONNECTIONPOOL name="mypool" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-committed" isolationlevelguaranteed="off">
<PROPERTY name="User" value="user"/>
<PROPERTY name="URL" value="jdbc:oracle:thin:@<ip>:<port>:<sid>"/>
<PROPERTY name="Password" value="passwd"/>
</JDBCCONNECTIONPOOL>
<JDBCRESOURCE jndiname="jdbc/POOL" poolname="mypool" enabled="on"/>
</RESOURCES>
*** web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"file:/C:/iPlanet/Servers/bin/https/dtds/web-app_2_2.dtd">
<web-app>
<resource-ref>
<description>example</description>
<res-ref-name>jdbc/POOL</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
*** sun-web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Web Server 6.1 Servlet 2.3//EN' 'http://www.sun.com/software/dtd/appserver/sun-web-app_2_3-1.dtd'>
<sun-web-app>
<resource-ref>
<res-ref-name>jdbc/POOL</res-ref-name>
<jndi-name>jdbc/POOL</jndi-name>
</resource-ref>
</sun-web-app>
*** Code at a servlet:
InitialContext ctx = new InitialContext();
listContext((Context) ctx, "");
     * Recursively exhaust the JNDI tree
     private static final void listContext(Context ctx, String ruta)
          try
               NamingEnumeration listanombresjndi = ctx.listBindings("");
               while (listanombresjndi.hasMore())
                    Binding item = (Binding) listanombresjndi.next();
                    String className = item.getClassName();
                    String name = item.getName();
                    System.err.println(ruta + className + " " + name);
                    Object o = item.getObject();
                    if (o instanceof javax.naming.Context)
                         listContext((Context) o, ruta + " ");
          catch (NamingException ex)
               System.err.println("JNDI failure: " + ex);
               ex.printStackTrace();
     }

Hi,
with these instructions work properly, why?
On a Sun Web Server SP11 windows is not necessary to realize that, and it works correctly without these indications
is a bug?
Thanks in advance
CesarJorge

Similar Messages

  • Java Web Server 6.1 SP4 Internal Server Error

    All,
    I have recently installed the Sun ONE Web Server 6.1 SP4 on a Windows XP Professional machine. The installation goes fine, and I receive no errors. I then start the admin server so that I may create a new instance and deploy my servlets. The server starts up without error, but when I try to access the admin console through
    http://mycomputername:adminportnumber I get an internal server error after entering my admin username and password. I red in aother forum that this error sometimes results if the Java Directory Server is running on the same machine, but I assure you that this is not the case in this scenario. Any help leading to the resolution of this problem would be greatly appreciated.

    This could happen if you have NSS DLLs like nss3.dll in your <windows>/system32 directory.
    Please check if this is the case.
    Installing Directory Server on the same machine is one of the ways in which these DLLs get into <windows>/system32 directory. There could be other ways.

  • Connecting to Oracle 9i with Sun One Web Server 6.1 SP4

    I have an application that connects to an Oracle 9i database. When I run iPlanet 4.1, I am able to login to the application and run it. Since I have migrated to Sun One Web Server 6.1 SP4, I have not been able to login. Through some built in error logging, I have been able to determine that my user validation routine is receiving a Null pointer when it trys to connect to the database. I have also determined that my login servlet is executing properly. When I receive the Null pointer error, I am redirected to a failed login page, which is what is supposed to happen in such a case. I believe that I do not have the web server configured properly to connect to the database and I am not sure how to do it! Below is an excerpt from my code where the database connection occurs and the exception is detected. Any help would be appreciated!
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              oracleConnect = DriverManager.getConnection("jdbc:oracle:thin:@" + chost + ":" + cport + ":" + csid ,u,p);
         enable = true;
    oracleConnect.close();
    }catch(java.sql.SQLException e){processError.logError("validateUser Invalue user" + e.getMessage()); enable = false;}
    catch(java.io.FileNotFoundException e){processError.logError("validate User error" + e.getMessage());}
    catch(java.io.IOException e){processError.logError("evalidateUser rror File Error " + e.getMessage());}
    catch(java.lang.NullPointerException e){processError.logError("validateUser error Null Pointer " + e.getMessage());}

    You are not using the server's built in JDBC Connection pooling, so there is no special WebServer configuration needed to connect to a database.
    If in the other hand, you want to use the built in connection pooling, then refer to this page to see how to create a connection pool
    http://docs.sun.com/source/817-1831-10/agjava.html#wp1085593
    Samples on how to configure and use JDBC connection pooling can be found in the sample apps
    http://docs.sun.com/source/817-1833-10/pwawap.html#wp40108

  • Unable to start sun java web server 6.1 SP4

    Hi,
    I have recently installed sun java web server 6.1 SP4 on solaris 10. The directory structure it created was completely different from the one mentioned in the documentation. I could not find the https-adminserv directory under the web server root directory. Instead the closest directory was bin/https/httpadmin/bin directory. On executing ./start it gave an error
    ld.so.1: start: fatal: libssl3.so: open failed: No such file or directory
    Killed
    Any help is welcome. Thanks.
    I had not installed the webserver in the standard location /opt/SUNWwbsrvr but in /BCP partition.

    also, you can do something like
    cd https-admserv
    sh -x start
    this will show as to what is the current LD_LIBRARY_PATH is pointing to and why ssl3.so is not getting loaded.
    if you don't see
    https-* under web server install root directory, then something wrong with your installation as well.
    yes, if u stand alone version of web server, then you shouldn't run into any dependencies issue. u can also get 6.1 sp6 version from web - http://www.sun.com/webserver

  • Thread number limitation on Sun One Web Server 6.1 on Solaris 9

    Hi.
    I am testing my servlet on Web Server 6.1 on Solaris 9 (SPARC). I am logging start of HTTPServlet.doPost() method and end of it, by calling GenericServlet.log() method for perfomance check.
    When I request more than two request(it takes long time) simultaneously from browser, my servlet logs like:
    doPost start
    doPost start
    doPost end
    doPost start
    doPost end
    doPost start
    :that is ,two requests is processed concurrent by threads, and another requests waiting, and after each running thread ends, waiting request is processed one by one.
    I think there is some limitation of thread or connections, so I checked magnus.conf. But RqThrottle is set to 128. And I cannot find any thread number settings.
    My magnus.conf is as follows.
    # The NetsiteRoot, ServerName, and ServerID directives are DEPRECATED.
    # They will not be supported in future releases of the Web Server.
    NetsiteRoot /export/home0/SUNWwbsvr
    ServerName test03
    ServerID https-test03
    RqThrottle 128
    DNS off
    Security off
    PidLog /export/home0/SUNWwbsvr/https-test03/logs/pid
    User webservd
    StackSize 131072
    TempDir /tmp/https-test03-8ac62f09
    UseNativePoll off
    PostThreadsEarly on
    KernelThreads off
    Init fn=flex-init access="$accesslog" format.access="%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] \"%Req->reqpb.clf-request%\" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length%"
    Init fn="load-modules" shlib="/export/home0/SUNWwbsvr/bin/https/lib/libj2eeplugin.so" shlib_flags="(global|now)"Why web server do not process more than two requests concurrent? Which server configuration should I check?
    Thanks in advance.

    I don't think I ever ran into that kind of a limit. Does the servlet use database connections (maybe the connection pool is empty) or other critical sections / large synchronized blocks?
    Try a minimal servlet that takes a while to execute:
        doGet(...)
            log("sleep starting " + Thread.currentThread().getName());
            try {
                Thread.sleep(30000);
            } catch (Exception e) { }
            log("sleep done " + Thread.currentThread().getName());
            response.getOutputStream().println("good morning");

  • I plan to upgrade the SSRS 2005 SP2 enterprise edition in our internal web server to 2005 SP4, the Reporting server database is hosted in another sql server in sql server 2005 SP4. Do I need to do anything on the reporting server database side?

    My question is what the steps do I need to take to upgrade SSRS from 2005 SP2 to SP4.  The web server that host the SSRS is in 2005 SP2, and the OS is in window 2003. 
    Our SSRS report server and report server database are in different servers.  The SSRS in the web server is in 2005 SP2 enterprise edition, the report server database is in sql server 2005 SP4 enterprise edition.
    To upgrade the SSRS in web server from 2005 sp2 to sp4, do I need to backup/restore the encryption key?  Nothing will be changed in the report server database.  We will still pointing to the same database in the current server, all
    I wanted to do is performing a inplace upgrade of SSRS from 2005 SP2 to SP4.  
    Any response will be greate appreciated.  Thank you!
    Li-hui Chen

    Hi Lihui Chen,
    According to your description, you want to install the Services Pack 4 for SQL Server. Right?
    In SQL Server, Services Packs are used for fixing issues of current version product. It's not an Upgrade, you don't have to backup/restore your encryption key. You just need to download the Service Pack 4 on:
    Microsoft SQL Server 2005 Service Pack 4 RTM  . Please make sure you have administrative rights on the computer to install SQL Server 2005 SP4. For more information, see links below:
    How to obtain the latest service pack for SQL Server 2005
    List of the issues that are fixed in SQL Server 2005 Service Pack 4
    SQL Server 2005 SP4, KBA 2463332, Installation Issues
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Configuring Sun One Web Server 6.1 SP4 to run JSPs

    I have a web application that uses HTML, Servlets, Javascript, and JSPs and accesses an Oracle 10g database. So far, I have configured the web server to run the HTML, Javascript, servlets, and Access the database. I have not been able to figure out how to execute the JSPs. I get an error stating the the JSPs cannot be compiled into servlets. My web browser displays a message indicating that this could be a misconfiguration of the web server. If anyone could provide some insight, I would greatly appreciate the help!

    This is the entry in the Web Server error log:
    [17/Mar/2005:14:55:55] failure (13130): for host 147.103.44.38 trying to GET /SI/NewSIForm.jsp, service-j2ee reports: StandardWrapperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: WEB4000: Unable to compile class for JSP /opt/SUNWwbsvr/https-fredricksburg/ClassCache/https-fredricksburg/default-webapp/_jsps/_SI/_NewSIForm_jsp.java:11: 'class' or 'interface' expected import javax.servlet.*; ^ /opt/SUNWwbsvr/https-fredricksburg/ClassCache/https-fredricksburg/default-webapp/_jsps/_SI/_NewSIForm_jsp.java:12: 'class' or 'interface' expected import javax.servlet.http.*; ^ /opt/SUNWwbsvr/https-fredricksburg/ClassCache/https-fredricksburg/default-webapp/_jsps/_SI/_NewSIForm_jsp.java:13: 'class' or 'interface' expected import javax.servlet.jsp.*; ^ /opt/SUNWwbsvr/https-fredricksburg/ClassCache/https-fredricksburg/default-webapp/_jsps/_SI/_NewSIForm_jsp.java:14: 'class' or 'interface' expected import org.apache.jasper.runtime.*; ^ 4 errors at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.loadJSP(JspServlet.java:764) at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.access$000(JspServlet.java:624) at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:401) at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363) at javax.servlet.http.HttpServlet.service(HttpServlet.java:908) at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509) at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161) at com.iplanet.ias.web.WebContainer.service(WebContainer.java:578)

  • Sun One Web Server 6.1 SP4 crashes when filters are built with CC ver. 5.6

    Hi All
    We are using NSAPI interfaces to develop the filter for Sun ONE 6.1 SP4 Web Server. Filter was working perfectly fine when it was built using Sun WorkShop 6.0, CC Compiler ver 5.2.
    After we upgarded to Sun WorkShop 9.0, CC Compiler ver. 5.6, it no longer works. The web server crashes with Core. Please see the snippet below. There was however no change of code required for the upgrade.
    Please let me know if some specific compiler/linker flags has to be used for building filters with CC Compiler ver. 5.6.
    bash-2.03$ ./start
    Sun ONE Web Server 6.1SP4 B01/20/2005 17:43
    warning: CORE3283: stderr: 6950: CSemCounter created a semaphore with ID 25 using key 990470909.
    warning: CORE3283: stderr: [10/Nov/2005:18:50:35] [Information] Agent
    warning: CORE3283: stderr: Agent is enabled.
    warning: CORE3283: stderr: 6950: Cache - created semaphore 26 using key 487154429
    warning: CORE3283: stderr: 6950: ResourceCache - created semaphore 27 using key 772367101
    warning: CORE3283: stderr: 6950: Cache - created semaphore 28 using key 503931645
    warning: CORE3283: stderr: 6950: Cache - created semaphore 29 using key 520708861
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun Microsystems Inc.]
    catastrophe: CORE3260: Server crash detected (signal SIGBUS)
    info: CORE3262: Crash occurred in function realloc from module /usr/lib/libc.so.1
    Back Trace of Core
    #0 0xfe042974 in t_splay () from /usr/lib/libc.so.1
    (gdb) bt
    #0 0xfe042974 in t_splay () from /usr/lib/libc.so.1
    #1 0xfe0427e0 in t_delete () from /usr/lib/libc.so.1
    #2 0xfe0423e4 in realfree () from /usr/lib/libc.so.1
    #3 0xfe041f48 in mallocunlocked () from /usr/lib/libc.so.1
    #4 0xfe041ce0 in malloc () from /usr/lib/libc.so.1
    #5 0xfe04f568 in strdup () from /usr/lib/libc.so.1
    #6 0xff1c3038 in INTsystem_strdup_perm ()
    from /home/porting/project/sunone/bin/https/lib/libns-httpd40.so
    #7 0xff1c84c8 in INTvs_get_doc_root ()
    from /home/porting/project/sunone/bin/https/lib/libns-httpd40.so
    #8 0xfdb57f4c in __1cKJ2EERunnerIcreateVS6FpkcpknNConfiguration_pnRJ2EEVirtualServer__i_ ()
    from /home/porting/project/sunone/bin/https/lib/libj2eeplugin.so
    #9 0xfdb528bc in j2ee_vs_create ()
    from /home/porting/project/sunone/bin/https/lib/libj2eeplugin.so
    #10 0xff1c9444 in __1cPNSAPIVSListenerGinitVS6MpnNVirtualServer_pk1_nIPRStatus__ () from /home/porting/project/sunone/bin/https/lib/libns-httpd40.so
    #11 0xff2273e4 in __1cXVSConfigurationListenerQsetConfiguration6MpnNConfiguration_pk1_nIPRStatus__ ()
    from /home/porting/project/sunone/bin/https/lib/libns-httpd40.so
    #12 0xff225dc8 in __1cUConfigurationManagerQsetConfiguration6FpnNConfiguration__2_ () from /home/porting/project/sunone/bin/https/lib/libns-httpd40.so
    #13 0xff245b30 in __1cJWebServerDRun6F_nIPRStatus__ ()
    ---Type <return> to continue, or q <return> to quit---
    from /home/porting/project/sunone/bin/https/lib/libns-httpd40.so
    #14 0x10ab8 in main ()
    Thanks

    I could trace down the problem to the fact that if I don't use the map file (which is passed to the linker using -M mapfile), the plugin works perfectly fine. Further to this if I comment out the local part of the mapfile, it starts working.
    mapfile :
    NSAPIPlugin.so {
    global:
    symbol1;
    symbol2;
    symbol3;
    # local:
    Is there is any specific linker flag that I have to pass along with -M mapfile with the sun studio 9. What are possibe consequencies if I go ahead with this workaround of commenting out the local directive.

  • Sun ONE Web Server 6.0 SP4 EOSL

    Hi,
    I'm having "issues" tracking down information about the status of this version of the Web Server. I'm basically tring to determine if it has gone EOSL or not as we're making a decision on whether or not to upgrade to something a little more recent!
    Thanks in advance
    jezter

    Sun generally doesn't announce EOSL (End Of Service Life) for Web Server service packs, so you're likely to get conflicting answers when you ask about 6.0 SP4 EOSL. 6.0 SP4 was de facto EOSL as soon as 6.0 SP5 was released. No bug fixes will be backported from SP5 to SP4, and the first step in isolating a problem uncovered in 6.0 SP4 will be to apply the current service pack, 6.0 SP9.
    Instead, Sun announces EOSL for versions like "iPlanet Web Server 6.0". iPlanet Web Server 6.0 EOL (End Of Life) was 05/2004. It will be EOSL 05/2009.
    If you're using 6.0 SP4, you should apply the latest service pack as soon as possible. Critical security vulnerabilities have been addressed by subsequent service packs.

  • Error - Web Server Policy Agents setup

    Hi
    I get the following error message when I try to set up a Web Server Policy Agent on a box
    [https-jakarta]: failure: CORE3170: Configuration initialization failed: Error running init function load-modules: dlopen of /opt/SUNWam/agents/es6/lib/libames6.so failed (ld.so.1: webservd: fatal: libamsdk.so.2: open failed: No such file or directory)
    [https-jakarta]: failure: server initialization failed
    the name of the web server instance is https-jakarta.
    And it is talking to the Access Manager instance on the same box.(but set to a different web server instance)
    I set up the PA on the above web server instance and then when I try to start up the web server instance it throws up the above message.
    Any suggestions?
    Anand

    Hi
    I get the following error message when I try to set up a Web Server Policy Agent on a box
    [https-jakarta]: failure: CORE3170: Configuration initialization failed: Error running init function load-modules: dlopen of /opt/SUNWam/agents/es6/lib/libames6.so failed (ld.so.1: webservd: fatal: libamsdk.so.2: open failed: No such file or directory)
    [https-jakarta]: failure: server initialization failed
    the name of the web server instance is https-jakarta.
    And it is talking to the Access Manager instance on the same box.(but set to a different web server instance)
    I set up the PA on the above web server instance and then when I try to start up the web server instance it throws up the above message.
    Any suggestions?
    Anand

  • URGENT: Web Server 6.1 SP4 won't respond to GET /index.html

    Hello folks,
    I was adding "additional document directories" when the management web interface suddenly decided that it had had enough of my additions and decided to throw out all but the last three.
    Worse still, GET /index.html doesn't work; instead the server responds with "Method not allowed", which my browser reports as HTTP405 but the server error log reports as HTTP2205. So no web page request is currently being honoured.
    For what it's worth, a look at the mime.types file shows that type=text/html is linked with exts=htm/html.
    Any ideas?
    Cheers!

    I had just clicked on OK to input another "additional document directories" when the administration server threw an error in a popup window; I honestly can't remember what text was in that popup, probably because I was gutted on realising that of the forty plus entries I had just made, only the last three were showing up in the "Current additional directories" list.
    One possibility that would exonerate the administration server is that I gave some keystroke combination that caused the obj.conf fault as by that time I was typing in quite rapidly...
    Thanks for positng.
    Cheers

  • Why the jsp tag jsp:forward page="page.jsp" / works when i work with web server iPlanet in a Solaris machine and doesn't work with the same web server, in a Windows 2000 machine ?

    The request parameters don't go to the "page.jsp"...

    If someone else runs into this, here is how I solved the problem -
              If you create a PrintWriter object with the autoflush option, it
              doesn't flush the underlying buffer till you call println on it. I
              looked through the generated code for the servlet, and it was doing a
              JSPWriter.print() to output information.
              So, I changed the ResponseWrapper to keep a handle to the PrintWriter
              object, and then flush it in the filter, and that works.
              Why the same code behaves differently in JRun & Weblogic, I'm not sure
              --Sridhar
              

  • InBuilt Apache Web Server v2.0.58 on Solaris 10

    Hi,
    We are working on a custom application which works with the inbuilt Apache Web Server on the Sun Solaris platform. Here are the details of the versions of the various components involved:
    Apache Web Server: Version 2.0.58
    Platform: SunOS 5.10 Generic_127111-03
    Our application is in the form of a shared library(.so binary) which is loaded into the Apache Web Server by mentioning the following directive in the Apache Web Server's configuration file (httpd.conf):
    LoadModule at_module "/var/apache2/logs/sample/sample.so"
    Where, sample.so is our application's binary
    And at_module is the name of the module.
    Problem details:
    For each request to the Apache Web server, the server maintains a table of type "apr_table_t" which contains the header environment from the request. There is a structure "request_rec" maintained in the httpd.h file:
    /** A structure that represents the current request */
    struct request_rec {
    /** The pool associated with the request */
    apr_pool_t *pool;
    /** Request method (e.g. GET, HEAD, POST, etc.) */
    const char *method;
    /** MIME header environment from the request */
    apr_table_t *headers_in;
    In our case, when we try to retrieve the address of "headers_in", we get a NULL Value. Please refer to the code for "sample-apache.cpp" program. Here it goes:
    ** Sample Program acting as a loadable Apache module.
    ** Overview:
    ** This sample program contains the necessary methods to make the program act as a module which can be loaded into the Apache ** Web Server. This program contains skeleton code which is necessary for any module which needs to be loaded into the Apache ** Web Server.
    ** Usage:
    ** 1) Compile and link this program to create a shared library.
    ** Compilation step:
    ** /opt/SUNWspro/bin/CC -c -o sample.o -I<Path to your include directory for Apache API's> sample-apache.cpp
    ** Link step:
    ** /opt/SUNWspro/bin/CC -G -compat=5 -mt -M map.SunOS -o sample.so sample.o -lsocket -lnsl -lpthread -ldl -lposix4 -lCstd ** -lCrun -lm -lw -lthread -lcx -lc
    ** 2) The sample program creates a module named "at_module" which can then be loaded in the Apache Web Server's configuration ** file, httpd.conf in the form of a configuration directive as shown below:
    ** LoadModule at_module "<Location of the shared library created from this sample program>"
    #include "httpd.h"
    #include "http_config.h"
    #include "http_request.h"
    #include "http_log.h"
    static const char s_szInputFilterName[] = "INPUTFILTER";
    extern "C" module at_module;
    typedef struct
         int Enabled;
         char *szConfigFile;  
         apr_array_header_t *input_filters;
    } server_config_struct;
    extern "C" apr_status_t ChildExit(void *p);
    extern "C" apr_status_t ParentExit(void *p);
    extern "C" int Init(apr_pool_t p, apr_pool_t pLogPool, apr_pool_t pTempPool, server_rec s)
    void *data;
    const char *user_data_key = "init_module";
    apr_pool_userdata_get(&data, user_data_key, s->process->pool);
    if(!data)
              apr_pool_userdata_set((const void *) 1, user_data_key, apr_pool_cleanup_null, s->process->pool);
    else
              server_config_struct pConfig = (server_config_struct ) ap_get_module_config(s->module_config, &at_module);
              apr_pool_cleanup_register(p, s, ParentExit, apr_pool_cleanup_null);
              ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "Exit callback registered.");
              fflush(NULL);
    return OK;
    extern "C" void ChildInit(apr_pool_t p, server_rec s)
         apr_pool_cleanup_register(p, s, ChildExit, apr_pool_cleanup_null);
         return;
    extern "C" apr_status_t ChildExit(void *s)
         return APR_SUCCESS;
    extern "C" apr_status_t ParentExit(void *s)
         return APR_SUCCESS;
    extern "C" int access_checker(request_rec *r)
         FILE * fp;
         fp = fopen("/var/apache2/logs/sample.txt", "a");
         fprintf(fp, "\n r->headers_in = %u, r->method = %s", r->headers_in, r->method);
         fclose(fp);
         return OK;
    extern "C" apr_status_t input_filter_init(ap_filter_t *f)
         return APR_SUCCESS;
    extern "C" apr_status_t input_filter(ap_filter_t f, apr_bucket_brigade pbbOut,
                                                 ap_input_mode_t mode, apr_read_type_e block,
                                                 apr_off_t readbytes)
         return APR_SUCCESS;
    static void register_hooks(apr_pool_t *p)
         ap_hook_post_config(Init, NULL, NULL, APR_HOOK_MIDDLE);
         ap_hook_child_init(ChildInit,NULL,NULL,APR_HOOK_MIDDLE);
         ap_hook_access_checker(access_checker, NULL, NULL, APR_HOOK_REALLY_LAST);
         ap_register_input_filter(s_szInputFilterName, input_filter, input_filter_init, AP_FTYPE_RESOURCE);
    extern "C" module AP_MODULE_DECLARE_DATA at_module =
    STANDARD20_MODULE_STUFF,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    register_hooks
    //End of sample
    In this program, inside the access_checker() method, we try to retrieve the address of "headers_in" and get that as NULL:
    extern "C" int access_checker(request_rec *r)
    FILE * fp;
    fp = fopen("/var/apache2/logs/sample.txt", "a");
    fprintf(fp, "\n r->headers_in = %u, r->method = %s", r->headers_in, r->method);
    fclose(fp);
    return OK;
    Here is the output of the sample program after accessing the main page of the Web server:
    r->headers_in = 0, r->method = GET
    r->headers_in = 0, r->method = GET
    r->headers_in = 0, r->method = GET
    Though we are able to retrieve one member of the structure request_rec (method), we are not able to retrieve the address of the other member (headers_in).
    Observation:
    We made an interesting observation that when we used the same sample program with the inbuilt Apache 2.0.52 Web Server on Solaris, we were able to successfully retrieve the address of headers_in. Here are the details of the set-up which is working fine:
    Apache Web Server: Version 2.0.52
    Platform : SunOS 5.10 Generic_118822-30
    Thus, there is something different which has happened between the Sun's Solaris Apache Web Server's versions 2.0.52 and 2.0.58 which is making it unable to retrieve the address of the request headers (headers_in) in version 2.0.58.
    Can sombody please help me find out the reson for this difference and let me know if we need to change the way of retrieving the request headers for Solaris Apache 2.0.58.
    Thanks

    Ok, found the problem:
    Do not use this "SSL_RENEGOTIATE_NEVER" as a value for the environment variable:
    NSS_SSL_ENABLE_RENEGOTIATION=SSL_RENEGOTIATE_NEVER;export NSS_SSL_ENABLE_RENEGOTIATION
    instead, use "0":
    NSS_SSL_ENABLE_RENEGOTIATION=0;export NSS_SSL_ENABLE_RENEGOTIATION
    Add that line to your startserv script and it should disable ssl renegotiation permanently.
    Regards,

  • Problem with inbuilt Solaris Apache Web Server v 2.0.58

    Hi,
    Set-up:
    We are working on a custom application which works with the inbuilt Apache Web Server on the Sun Solaris platform. Here are the details of the versions of the various components involved:
    Apache Web Server: Version 2.0.58
    Platform: SunOS 5.10 Generic_127111-03
    Our application is in the form of a shared library(.so binary) which is loaded into the Apache Web Server by mentioning the following directive in the Apache Web Server's configuration file (httpd.conf).
    LoadModule at_module "/var/apache2/logs/sample/sample.so"
    where, sample.so is our application's binary
    and at_module is the name of the module.
    httpd.conf file has been attached for your reference.
    Attachments:
    httpd.conf - Apache Web Server's configuration file.
    sample-apache.cpp - Sample program which is showing the problem.
    httpd.h - Apache Software Foundation's file which contains the structure "request_rec" that represents the current request.
    Problem summary:
    For each request to the Apache Web server, the server maintains a table of type "apr_table_t" which contains the header environment from the request. There is a structure "request_rec" maintained in the httpd.h file:
    /** A structure that represents the current request */
    struct request_rec {
    /** The pool associated with the request */
    apr_pool_t *pool;
    /** Request method (eg. GET, HEAD, POST, etc.) */
    const char *method;
    /** MIME header environment from the request */
    apr_table_t *headers_in;
    In our case, when we try to retrieve the address of "headers_in", we get a NULL Value. Please refer to the attached "sample-apache.cpp" program. In this program, inside the access_checker() method, we try to retrieve the address of "headers_in" and get that as NULL:
    extern "C" int access_checker(request_rec *r)
         FILE * fp;
         fp = fopen("/var/apache2/logs/sample.txt", "a");
         fprintf(fp, "\n r->headers_in = %u, r->method = %s", r->headers_in, r->method);
         fclose(fp);
         return OK;
    Here is the output of the sample program after accessing the main page of the Web server:
    r->headers_in = 0, r->method = GET
    r->headers_in = 0, r->method = GET
    r->headers_in = 0, r->method = GET
    Though we are able to retrieve one member of the structure request_rec (method), we are not able to retrieve the address of the other member (headers_in).
    Observation:
    We made an interesting observation that when we used the same sample program with the inbuilt Apache 2.0.52 Web Server on Solaris, we were able to successfully retrieve the address of headers_in. Here are the details of the set-up which is working fine:
    Apache Web Server: Version 2.0.52
    Platform : SunOS 5.10 Generic_118822-30
    Thus, there is something different which has happened between the Sun's Solaris Apache Web Server's versions 2.0.52 and 2.0.58 which is making it unable to retrieve the address of the request headers (headers_in).
    I am requesting someone to kindly shed light on this difference and let us know if we need to change the way of retrieving the request headers for Solaris Apache 2.0.58.
    Thanks,
    Atul.

    The only way you can achieve it is by running the web server to listen on port 80
    Please change the port in your httpd.conf file for the webserver and restart it.
    If any other processes are running/using on port 80 on that machine, then please stop them, otherwise you will not be able to achieve your requirement.
    Arun

  • Is SUN's Java Web Server 2.0 running on Solaris 8?

    Hi,
    I had installed Java Web Server 2.0 on Solaris 8 under /opt/SUNWjws/JavaWebServer2.0 directory.
    When I tried to start up the java web server by calling "./httpd &" from /opt/SUNWjws/JavaWebServer2.0/bin directory I got the error message "jre was not found in /opt/SUNWjws/JavaWebServer2.0/jre/bin/../bin/i386/native_threads/jre"
    The directory /opt/SUNWjws/JavaWebServer2.0/jre/bin/ directory does exist.
    Thanks
    Tom

    Thanks.
    After I add JAVA_HOME=/usr/java and PATH=/usr/java/bin:$PATH setting,the httpd still doesn't work.
    But I try the httpd.nojre then it work.
    Httpd.nojre runs jserv -nojre.

Maybe you are looking for