Apache cannot load mod_jk.so

Wondering if anyone has bumped into this?
I did a vanilla install of cf10 on mac 10.5.8 on top of the mac-installed apache webserver (i.e. the one that comes stock with the OS, not a macports version or custom compile) ... a few vhosts are defined. cf9 is already installed and working peachy. Install goes fine but the 'switch to the web admin' stage fails and the webserver doesn't restart. Running an apache configtest barfs out the following;
Syntax error on line 509 of /private/etc/apache2/httpd.conf: Syntax error on line 2 of /private/etc/apache2/mod_jk.conf: Cannot load /Applications/ColdFusion10/config/wsconfig/1/mod_jk.so into server: dlopen(/Applications/ColdFusion10/config/wsconfig/1/mod_jk.so, 10): no suitable image found.  Did find:\n\t/Applications/ColdFusion10/config/wsconfig/1/mod_jk.so: unknown required load command 0x80000022
Commenting out the httpd.conf include to mod_jk.conf allows the webserver to start up again.
I've read that the mac hack of apache webserver includes 'apxs' in a manner that won't compile correctly but I'm a bit out of my depth with the apache stuff. Any ideas would be really appreciated

I compiled mod_jk from source, pointed the mod_jk.conf at this, retstarted apache and this time got a clean configtest, However, I'm still but unable to get the webserver to respond, despite it retsarting okay

Similar Messages

  • Cannot load d:\oracle\apache\apache\apache\modules\orajipa8i.dll into serve

    Dear All,
    Getting following error while trying to start http server service.
    "Syntax error on line 1 of d:\oracle\oracle\apache\apache\conf\mod_ose.conf
    Cannot load d:\oracle\apache\apache\apache\modules\orajipa8i.dll into server"
    Pls tell me the work arounds.
    Thanks,
    Sathis.

    I am getting the same error message on my side.
    Were you able to get around the problem? Thank you.

  • Cannot load /usr/local/Zend/Core/modules/apache-eapi/libphp5.so into server

    Hello All.
    I download and install Zend Core for Oracle v.1 Linux x86-64 on
    Linux Server (2.6.9-42.0.3.ELsmp #1 SMP x86_64 x86_64 x86_64 GNU/Linux) and on the server I have Oracle Application Server 10g (1.2.0.2). I have the SELINUX=disable in the /etc/selinux/config and LD_LIBRARY_PATH= /usr/local/Zend/Core/lib/
    But when I start the midtier HTTPS I get the following error and not loading libphp5.so.
    ias-component/process-type/process-set:
    HTTP_Server/HTTP_Server/HTTP_Server
    Error
    --> Process (pid=3203)
    failed to start a managed process after the maximum retry limit
    Log:
    /oracle/ias/mid10g1202/opmn/logs/HTTP_Server~1
    the HTTP_Server~1 log file contains this error message.
    /oracle/ias/mid10g1202/Apache/Apache/bin/apachectl start: execing httpd
    Syntax error on line 1095 of /oracle/ias/mid10g1202/Apache/Apache/conf/httpd.conf:
    Cannot load /usr/local/Zend/Core/modules/apache-eapi/libphp5.so into server: /usr/local/Zend/Core/modules/apache-eapi/libphp5.so: cannot open shared object file: No such file or directory
    Every thing fine when remove this line from httpd.conf file
    LoadModule php5_module /usr/local/Zend/Core/modules/apache-eapi/libphp5.so
    help please.

    some info about the libphp5.so on the server.
    uname -a
    Linux web3 2.6.9-42.0.3.ELsmp #1 SMP Mon Sep 25 17:24:31 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
    ls -l /usr/local/Zend/Core/modules/apache-eapi/libphp5.so
    -rwxr-xr-x 1 root root 5731064 Nov 19 16:25 /usr/local/Zend/Core/modules/apache-eapi/libphp5.so
    md5sum /usr/local/Zend/Core/modules/apache-eapi/libphp5.so
    e1b7ae62abb0989cc3e8600f0641095b /usr/local/Zend/Core/modules/apache-eapi/libphp5.so
    file /usr/local/Zend/Core/modules/apache-eapi/libphp5.so
    /usr/local/Zend/Core/modules/apache-eapi/libphp5.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), stripped
    ldd /usr/local/Zend/Core/modules/apache-eapi/libphp5.so
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000002a95bf4000)
    libz.so => /usr/local/Zend/Core/lib/libz.so (0x0000002a95d28000)
    libssl.so.0.9.8 => /usr/local/Zend/Core/lib/libssl.so.0.9.8 (0x0000002a95e41000)
    libcrypto.so.0.9.8 => /usr/local/Zend/Core/lib/libcrypto.so.0.9.8 (0x0000002a95f9d000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x0000002a9626a000)
    libimf.so => /usr/local/Zend/Core/lib/libimf.so (0x0000002a9637f000)
    libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a966e8000)
    libnsl.so.1 => /lib64/libnsl.so.1 (0x0000002a9686e000)
    libxml2.so.2 => /usr/local/Zend/Core/lib/libxml2.so.2 (0x0000002a96985000)
    libiconv.so.2 => /usr/local/Zend/Core/lib/libiconv.so.2 (0x0000002a96c82000)
    libsvml.so => /usr/local/Zend/Core/lib/libsvml.so (0x0000002a96e66000)
    libirc.so => /usr/local/Zend/Core/lib/libirc.so (0x0000002a96fa9000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000002a970eb000)
    libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a971f6000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000002a9742a000)
    /lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)

  • Cannot Connect to Oracle, PHP cannot load oci dlls

    Hello,
    I have installed wamp on windows server, and oracle 9, When I try to connect to oracle in php I get:
    Fatal error: Call to undefined function oci_connect() in C:\wamp\www\project2\index.php on line 3
    Also when I start wamp, it cannot load the oci dlls found on:
    C:\wamp\bin\php\php5.3.0\ext
    I have configured the php.ini file and commented as much options
    extension_dir = "C:/wamp/bin/php/php5.3.0/ext/"
    extension=php_oci8.dll ; Use with Oracle 10gR2 Instant ...
    extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client
    extension=php_oracle.dll
    extension=oci8.so
    I am unable to either connect to the database through php, also when I start wamp, i get pop up windows that it cannot load the dynamic procedures related to oracle: php_oce.dll, php_oce8.dll, php_pdo_oci,
    I have even eddited the http.conf file
    Also have done this:
    •Add the following entries to the "C:\Apache\Apache\conf\httpd.conf" file:
    LoadModule php4_module c:\php\sapi\php4apache.dll (approx line 193)
    AddModule mod_php4.c (approx line 241)
    AddType application/x-httpd-php .php (approx line 851)
    I have included the phpinfofile attached as well, part of it below is:
    System Windows NT SELECAO 5.2 build 3790 (Windows Server 2003 Standard Edition Service Pack 2) i586
    Build Date Jun 29 2009 21:23:30
    Compiler MSVC6 (Visual C++ 6.0)
    Architecture x86
    Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared"
    Server API Apache 2.0 Handler
    Virtual Directory Support enabled
    Configuration File (php.ini) Path C:\WINDOWS
    Loaded Configuration File C:\wamp\bin\php\php5.3.0\php.ini
    Configuration
    apache2handler
    Apache Version Apache/2.2.11 (Win32) PHP/5.3.0
    Apache API Version 20051115
    Server Administrator admin@localhost
    Hostname:Port localhost:80
    Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
    Timeouts Connection: 300 - Keep-Alive: 5
    Virtual Server No
    Server Root C:/wamp/bin/apache/Apache2.2.11
    Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_setenvif mod_php5

    I get this error, i decided to change directory for oracle_home
    putenv("ORACLE_HOME=C:/oracle/product/10.2.0/db_1/bin");
    to
    putenv("ORACLE_HOME=C:/oracle/product/10.2.0/db_1");
    it functioned.
    my code
    <?php
    putenv("ORACLE_HOME=C:/oracle/product/10.2.0/db_1");
    putenv("ORACLE_SID=PLSExtProc");
    $user ="name"; // set user
    $senha="password"; // set password
    $banco="(DESCRIPTION=
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)
    (HOST=127.0.0.1)(PORT=1521)
    (CONNECT_DATA=(SERVICE_NAME=orcl))
    )"; // configuracoes do banco (isso muda um pouco no oracle)
    if ($conexao = OCILogon($user,$senha,$banco))
    echo "Conexão bem sucedida.";
    else
    echo "Erro na conexão com o Oracle.";
    ?>

  • SOA WebLogic : Cannot load JDBC driver class

    Hi, I'm new to this Oracle SOA World. Currently I'm trying to configure environment on my system. I found a very useful document to install all related SOA component to my system, the document name was 'Quick Start Guide for Oracle® SOA Suite 11gR1 (11.1.1.5.0)'. I did all the steps written in the document and have installed all the components successfully, component including Database, Jdevelper, WebLogic Server, RCU, SOA suite, service bus, all are installed successfully.
    But when I'm trying to Configure Application Server (start -> Oracle SOA 11g-Home1), at one step 'Configure JDBC Component Schema' , here I'm getting this message
    * The driver class listed below was not found in product installation
    vendor: Derby
    Driver: org.apache.derby.jdbc.clientdriver
    A Test will not be performed on any database connections using this driver
    In addition, when i just ignore this message and continue installation, after installation when i run weblogic server then it gives error and gets terminated
    here is weblogic server log:
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    Listening for transport dt_socket at address: 8453
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b50)
    Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xdebug -Xnoagent -Xrunjdwp:transpo
    rt=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx
    1024m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.
    security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Xveri
    fy:none -Xverify:none -da:org.apache.xmlbeans... -ea -da:com.bea... -da:javeli
    n... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbcons
    ole... -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE
    ~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dcom
    mon.components.home=C:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apach
    e.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=
    C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2 -Djrockit.optfile=C:\Oracle\MIDDLE~
    1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.
    dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\config\FMWCON~1\servers\AdminSe
    rver -Doracle.domain.config.dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\con
    fig\FMWCON~1 -Digf.arisidbeans.carmlloc=C:\Oracle\MIDDLE~1\USER_P~1\domains\BAS
    E_D~2\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Oracle\MIDDLE~1\USER_P~1\
    domains\BASE_D~2\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\
    Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\config\fmwconfig\jps-config.xml -Dorac
    le.deployed.app.dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\servers\AdminSe
    rver\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirector
    y=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\Oracle\MIDDLE~1\O
    RACLE~1\modules\oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.md
    s.net.protocol"|"oracle.fabric.common.classloaderurl.handler"|"oracle.fabric.com
    mon.uddiurl.handler"|"oracle.bpm.io.fs.protocol -Dweblogic.jdbc.remoteEnabled=f
    alse -da:org.apache.xmlbeans... -Dsoa.archives.dir=C:\Oracle\Middleware\Oracle_
    SOA1\soa -Dsoa.oracle.home=C:\Oracle\Middleware\Oracle_SOA1 -Dsoa.instance.home=
    C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2 -Dtangosol.coherence.clusteraddress
    =227.7.7.9 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -D
    javax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dwebl
    ogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=t
    rue -Djavax.net.ssl.trustStore=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoTrus
    t.jks -Dem.oracle.home=C:\Oracle\Middleware\oracle_common -Djava.awt.headless=tr
    ue -Dums.oracle.home=C:\Oracle\Middleware\Oracle_SOA1 -Dweblogic.management.disc
    over=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dwe
    blogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifes
    t_classpath;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_c
    lasspath weblogic.Server
    Listening for transport dt_socket at address: 8453
    <2012-mar-02 kl 21:14 CET> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE
    Provider self-integrity check for better startup performance. To enable this ch
    eck, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <2012-mar-02 kl 21:14 CET> <Info> <Security> <BEA-090906> <Changing the default
    Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable th
    is change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <2012-mar-02 kl 21:14 CET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLog
    ic Server with Java HotSpot(TM) Client VM Version 19.1-b02 from Sun Microsystems
    Inc.>
    <2012-mar-02 kl 21:14 CET> <Info> <Management> <BEA-141107> <Version: WebLogic S
    erver 10.3.5.0 Fri Apr 1 20:20:06 PDT 2011 1398638 >
    <2012-mar-02 kl 21:14 CET> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to STARTING>
    <2012-mar-02 kl 21:14 CET> <Info> <WorkManager> <BEA-002900> <Initializing self-
    tuning thread pool>
    <2012-mar-02 kl 21:14 CET> <Notice> <Log Management> <BEA-170019> <The server lo
    g file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServe
    r\logs\AdminServer.log is opened. All server side log events will be written to
    this file.>
    <2012-mar-02 kl 21:14 CET> <Notice> <Security> <BEA-090082> <Security initializi
    ng using security realm myrealm.>
    <2012-mar-02 kl 21:14 CET> <Warning> <oracle.as.jmx.framework.MessageLocalizatio
    nHelper> <J2EE JMX-46041> <The resource for bundle "oracle.jrf.i18n.MBeanMessage
    Bundle" with key "oracle.jrf.JRFServiceMBean.checkIfJRFAppliedOnMutipleTargets"
    cannot be found.>
    <2012-mar-02 kl 21:14 CET> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to STANDBY>
    <2012-mar-02 kl 21:14 CET> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to STARTING>
    <2012-mar-02 kl 21:15 CET> <Critical> <JTA> <BEA-110482> <A logging last resourc
    e failed during initialization. The server cannot boot unless all configured log
    ging last resources (LLRs) initialize. Failing reason:
    weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class:
    org.apache.derby.jdbc.ClientDriver
    weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class:
    org.apache.derby.jdbc.ClientDriver
    at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:3
    01)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(Connect
    ionEnvFactory.java:75)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionE
    nvFactory.java:131)
    at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactor
    y(ConnectionPool.java:712)
    at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.
    java:235)
    Truncated. see log file for complete stacktrace
    >
    <2012-mar-02 kl 21:15 CET> <Error> <Deployer> <BEA-149205> <Failed to initialize
    the application 'wlsbjmsrpDataSource' due to error weblogic.application.ModuleE
    xception: .
    weblogic.application.ModuleException:
    at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:302)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:199)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:517)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:52)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
    loymentCallbackFlow.java:159)
    Truncated. see log file for complete stacktrace
    Caused By: weblogic.common.resourcepool.ResourceSystemException: Cannot load dri
    ver class: org.apache.derby.jdbc.ClientDriver
    at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:3
    01)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(Connect
    ionEnvFactory.java:75)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionE
    nvFactory.java:131)
    at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactor
    y(ConnectionPool.java:712)
    at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.
    java:235)
    Truncated. see log file for complete stacktrace
    >
    <2012-mar-02 kl 21:16 CET> <Alert> <OSB Security> <BEA-387068> <There is no PKI
    credential mapper provider configured in your security realm. Service key provid
    er management will be disabled. Configure a PKI credential mapper provider if yo
    u need service provider support. This is typically the case if you have Oracle S
    ervice Bus proxy services with web service security enabled or outbound 2-way SS
    L connections.>
    <2012-mar-02 kl 21:16 CET> <Warning> <Coherence> <BEA-000000> <Oracle Coherence
    3.6.0.4 (member=n/a): Local address "127.0.0.1" is a loopback address; this clus
    ter node will not connect to nodes located on different machines>
    <2012-mar-02 kl 21:17 CET> <Warning> <J2EE> <BEA-160140> <Unresolved optional pa
    ckage references (in META-INF/MANIFEST.MF): [Extension-Name: oracle.applcore.mod
    el, Specification-Version: 0.1, Implementation-Version: 11.1.1.0.0, referenced f
    rom: C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\
    tmp\_WL_user\usermessagingserver\a7bt7z]. Make sure the referenced optional pack
    age has been deployed as a library

    Hi:
    try placing the jars that represent ur driver, here
    For both Windows and Linux, you must perform the following steps:
    Drop the vendor-specific driver JAR files to the user_projects/domains/soainfra/lib directory.
    Drop the vendor-specific driver JAR files to the <Weblogic_Home>/server/lib.
    Edit the classpath to include the vendor-specific jar file in <Weblogic_HOME>/common/bin/commEnv.sh
    This info was copied, from here: http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_db.htm#CHDBEJDC
    Hope this helps
    best

  • Caanot restart apache after installing mod_jk connector

    Hallo,
    I have installed the mod_jk connector to use seperate apache and tomcat instances for my web ap. I followed the instructions here: http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html?page=2
    After making changes to httpd.conf, I am unable to restart apache - the sevent viewer gives the following message:
    "The Apache2 service terminated with service-specific error 1. "
    I think it has something to do with the addmodule lines i've added. Here is what I added to httpd.conf:
    AddModule mod_jk.c
    # JkWorkersFile C:/tomcat/Tomcat 5.5/conf/workers.properties
    # JkLogFile C:/tomcat/Tomcat 5.5/logs/mod_jk.log
    # JkLogLevel debug
    # Alias /toolkit C:/tomcat/Tomcat 5.5/webapps/toolkitv3
    # JkMount /toolkit/servlet/* ajp13w
    # JkMount /toolkit/*.jsp ajp13w
    # <location "/toolkit/web-inf/">
    # AllowOverride None
    # deny from all
    # </location
    (all uncommented of course)
    I hope someone out there can help me with this.
    Thanks

    I used the mod-jk.dll and loadModule :
    # Load mod_jk module
    # Update this path to match your modules location
    LoadModule jk_module modules/mod_jk.dll
    # Declare the module for <IfModule directive>
    #AddModule mod_jk.c
    # Where to find workers.properties
    # Update this path to match your conf directory location (put workers.properties next to httpd.conf)
    JkWorkersFile c:/Apache/Apache2/conf/workers.properties
    # Where to put jk logs
    # Update this path to match your logs directory location (put mod_jk.log next to access_log)
    JkLogFile c:/Apache/Apache2/logs/mod_jk.log
    # Set the jk log level [debug/error/info]
    JkLogLevel debug
    # Select the log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    # JkOptions indicate to send SSL KEY SIZE,
    #JkOptions ForwardKeySize ForwardURICompat -ForwardDirectories
    # JkRequestLogFormat set the request format
    JkRequestLogFormat "%w %V %T"
    # Send everything for context /examples to worker named worker1 (ajp13)
    JkMount /examples/* loadbalancer
    JkMount /olp/* loadbalancer

  • Java.sql.SQLException: Cannot load JDBC driver class 'null'

    Hi,
    I am a beginner of using jdbc, i use the tomcat4.1.x, mysql3.23.54 and it's jdbc driver 2.0.14. I place the drive <in jar file> in tomcat/commons/lib and configure the server.xml, web.xml and some testing coding. But there are some error like the following:
    java.sql.SQLException: Cannot load JDBC driver class 'null'
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
         at foo.DBTest.init(DBTest.java:18)
         at org.apache.jsp.test_jsp._jspService(test_jsp.java:48)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
    of course its some of the error code and there are more.
    Why I have this problems and how can I fix it? Can someone help me??
    Thanks,
    Tong
    I place my test.jsp at tomcat/webapps/DBTest and DBTest.java at tomcat/webapps/DBTest/WEB-INF/classes/foo
    additional of the tomcat/conf/server.xml
    <Resource name="TestDB" auth="Container" type="javax.sql.DataSource" description="MySQL TestDB"/>
    <ResourceParams name="TestDB">
    <parameter><name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter><name>maxActive</name><value>10</value></parameter>
    <parameter><name>maxIdle</name><value>1</value></parameter>
    <parameter><name>maxWait</name><value>10000</value></parameter>
    <parameter><name>username</name><value>javauser</value></parameter>
    <parameter><name>password</name><value>javadude</value></parameter>
    <parameter>
    <name>driverClassName</name>
    <value>org.gjt.mm.mysql.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
    </parameter>
    </ResourceParams>
    tomcat/webapps/DBTest/WEB-INF/web.xml :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!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>
    <description>MySQL Test App</description>
    </web-app>

    Post the part of your code that loads the driver and connects. My guess is you are using a variable for the name of the driver and the variable has not been set to anything(intially set to null).
    Thanks
    Cardwell

  • Apache/Tomcat  plugin mod_jk.so vs.  mod_wls_20.so

    Hi,
    Someone says to me why apache/tomcat mod_jk.so is so advanced regarding to mod_wls_20.so for load balancing function?
    With a Apache server with mod_jk.so I can to balance N server with Tomcat ( or JBoss ) : with mod_wls_20.so no.
    The bea plungid is ok for instance in cluster but not for multiple ( and equals web application ) single server instance...
    gianc64

    It sounds like you've put your actions on the authN. That only fires once - so your cookies get set - but the headers are only there for one request. Try putting the actions on the authZ where the headers will be set with every request.
    Mark

  • Javax.servlet.UnavailableException: Cannot load a validator resource from '

    sorry to interrupt.
    i m using Struts1.1/jsp.
    When i comment out the codes for validation plugin the projects works fine
    but when its on its gives the following Exceptions
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.5.0_13\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_15\bin;C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;C:\Program Files\ant\bin;C:\Program Files\hibernate-3.2\lib;C:\Program Files\hibernate-3.2;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Apache Group\Tomcat 4.1\bin
    Sep 18, 2008 4:17:07 PM org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Sep 18, 2008 4:17:07 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2219 ms
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
    Sep 18, 2008 4:17:07 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
    log4j:WARN Please initialize the log4j system properly.
    Sep 18, 2008 4:17:12 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
    INFO: Tiles definition factory loaded for module ''.
    Sep 18, 2008 4:17:12 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
    Sep 18, 2008 4:17:12 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validation.xml'
    Sep 18, 2008 4:17:33 PM org.apache.struts.validator.ValidatorPlugIn init
    SEVERE: Connection timed out: connect
    java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:186)
    at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:233)
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:164)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Sep 18, 2008 4:17:33 PM org.apache.catalina.core.ApplicationContext log
    INFO: Marking servlet strutsController as unavailable
    Sep 18, 2008 4:17:33 PM org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /valid threw load() exception
    javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Sep 18, 2008 4:17:34 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
    INFO: Tiles definition factory loaded for module ''.
    Sep 18, 2008 4:17:34 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
    Sep 18, 2008 4:17:34 PM org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validation.xml'
    log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
    log4j:WARN Please initialize the log4j system properly.
    Sep 18, 2008 4:17:38 PM org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Sep 18, 2008 4:17:38 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    Sep 18, 2008 4:17:38 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/109 config=null
    Sep 18, 2008 4:17:38 PM org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    Sep 18, 2008 4:17:38 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 31312 ms
    Sep 18, 2008 4:17:42 PM org.apache.struts.tiles.TilesRequestProcessor initDefinitionsMapping
    INFO: Tiles definition factory found for request processor ''.
    [Length is less than1]
    Sep 18, 2008 4:17:42 PM org.apache.struts.validator.ValidatorForm validate
    SEVERE: No such validation method: org.apache.struts.validator.FieldChecks.validateMinLength(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
    org.apache.commons.validator.ValidatorException: No such validation method: org.apache.struts.validator.FieldChecks.validateMinLength(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
    at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:603)
    at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:533)
    at org.apache.commons.validator.Field.validateForRule(Field.java:766)
    at org.apache.commons.validator.Field.validate(Field.java:846)
    at org.apache.commons.validator.Form.validate(Form.java:290)
    at org.apache.commons.validator.Validator.validate(Validator.java:354)
    at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:112)
    at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:921)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Unknown Source)
    /*********************************************Codes******************************************************/
    my codes are as follows:
    struts-config.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <!--
    This is a blank Struts configuration file with an example
    welcome action/page and other commented sample elements.
    Tiles and the Struts Validator are configured using the factory defaults
    and are ready-to-use.
    NOTE: If you have a generator tool to create the corresponding Java classes
    for you, you could include the details in the "form-bean" declarations.
    Otherwise, you would only define the "form-bean" element itself, with the
    corresponding "name" and "type" attributes, as shown here.
    -->
    <struts-config>
    <form-beans>
    <form-bean name="myform" type="src.Myform">
    <form-property
    name="name"
    type="java.lang.String"/>
    </form-bean>
    </form-beans>
    <global-exceptions/>
    <global-forwards>
    <forward name="welcome" path="/Welcome.do"/>
    </global-forwards>
    <action-mappings>
    <action path="/myAction" type="src.MyAction" name="myform" scope="request" validate="true" input="/index.jsp">
    <forward name="wel" path="/wel.jsp"/>
    </action>
    <!--<action
    path="/AddressJavascriptValidation"
    type="roseindia.net.AddressAction"
    name="AddressForm"
    scope="request"
    validate="true"
    input="/pages/AddressJavascriptValidation.jsp">
    <forward name="success" path="/pages/success.jsp"/>
    </action>-->
    </action-mappings>
    <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
    <message-resources parameter="resources/application"/>
    <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
    <set-property property="moduleAware" value="true"/>
    </plug-in>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    <set-property property="stopOnFirstError" value="false"/>
    </plug-in>
    </struts-config>
    validation.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <form-validation>
    <formset>
    <!-- <form name="form" >
    <field property="name" depends="required">
    <arg0 key="myform.name"/></field>
    </form>
    -->
    <form name="myform">
    <field property="name" depends="minlength">
    <arg0 key="myform.name"/>
    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>2</var-value>
    </var>
    </field>
    </form>
    <!--<form name="AddressForm">
    <field property="name"
    depends="required">
    <arg key="AddressForm.name"/>
    </field>
    <field property="address"
    depends="required">
    <arg key="AddressForm.address"/>
    </field>
    <field property="emailAddress"
    depends="required">
    <arg key="AddressForm.emailAddress"/>
    </field>
    </form>-->
    </formset>
    </form-validation>
    validator-rules.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
    This file contains the default Struts Validator pluggable validator
    definitions. It should be placed somewhere under /WEB-INF and
    referenced in the struts-config.xml under the plug-in element
    for the ValidatorPlugIn.
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    These are the default error messages associated with
    each validator defined in this file. They should be
    added to your projects ApplicationResources.properties
    file or you can associate new ones by modifying the
    pluggable validators msg attributes in this file.
    # Struts Validator Error Messages
    errors.required={0} is required.
    errors.minlength={0} can not be less than {1} characters.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.invalid={0} is invalid.
    errors.byte={0} must be a byte.
    errors.short={0} must be a short.
    errors.integer={0} must be an integer.
    errors.long={0} must be a long.
    errors.float={0} must be a float.
    errors.double={0} must be a double.
    errors.date={0} is not a date.
    errors.range={0} is not in the range {1} through {2}.
    errors.creditcard={0} is an invalid credit card number.
    errors.email={0} is an invalid e-mail address.
    -->
    <form-validation>
    <global>
    <validator name="required"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequired"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    <javascript><![CDATA[
    function validateRequired(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oRequired = new required();
    for (x in oRequired) {
    var field = form[oRequired[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'file' ||
    field.type == 'select-one' ||
    field.type == 'radio' ||
    field.type == 'password') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (trim(value).length == 0) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oRequired[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    // Trim whitespace from left and right sides of s.
    function trim(s) {
    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    ]]>
    </javascript>
    </validator>
    <validator name="requiredif"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequiredIf"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    org.apache.commons.validator.Validator,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    </validator>
    <validator name="minlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMinLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.minlength">
    <javascript><![CDATA[
    function validateMinLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMinLength = new minlength();
    for (x in oMinLength) {
    var field = form[oMinLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMin = parseInt(oMinLength[x][2]("minlength"));
    if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMinLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="maxlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMaxLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.maxlength">
    <javascript><![CDATA[
    function validateMaxLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMaxLength = new maxlength();
    for (x in oMaxLength) {
    var field = form[oMaxLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMax = parseInt(oMaxLength[x][2]("maxlength"));
    if (field.value.length > iMax) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMaxLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="mask"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMask"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.invalid">
    <javascript><![CDATA[
    function validateMask(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMasked = new mask();
    for (x in oMasked) {
    var field = form[oMasked[x][0]];
    if ((field.type == 'text' ||
    field.type == 'textarea') &&
    (field.value.length > 0)) {
    if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMasked[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    function matchPattern(value, mask) {
    return mask.exec(value);
    }]]>
    </javascript>
    </validator>
    <validator name="byte"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateByte"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.byte"
    jsFunctionName="ByteValidations">
    <javascript><![CDATA[
    function validateByte(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oByte = new ByteValidations();
    for (x in oByte) {
    var field = form[oByte[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    } else {
    var iValue = parseInt(value);
    if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="short"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateShort"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.short"
    jsFunctionName="ShortValidations">
    <javascript><![CDATA[
    function validateShort(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oShort = new ShortValidations();
    for (x in oShort) {
    var field = form[oShort[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    } else {
    var iValue = parseInt(value);
    if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="integer"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateInteger"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.integer"
    jsFunctionName="IntegerValidations">
    <javascript><![CDATA[
    function validateInteger(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oInteger = new IntegerValidations();
    for (x in oInteger) {
    var field = form[oInteger[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oInteger[x][1];
    } else {
    var iValue = parseInt(value);
    if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oInteger[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    function isAllDigits(argvalue) {
    argvalue = argvalue.toString();
    var validChars = "0123456789";
    var startFrom = 0;
    if (argvalue.substring(0, 2) == "0x") {
    validChars = "0123456789abcdefABCDEF";
    startFrom = 2;
    } else if (argvalue.charAt(0) == "0") {
    validChars = "01234567";
    startFrom = 1;
    } else if (argvalue.charAt(0) == "-") {
    startFrom = 1;
    for (var n = startFrom; n < argvalue.length; n++) {
    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
    return true;
    }]]>
    </javascript>
    </validator>
    <validator name="long"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateLong"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.long"/>
    <validator name="float"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateFloat"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.float"
    jsFunctionName="FloatValidations">
    <javascript><![CDATA[
    function validateFloat(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oFloat = new FloatValidations();
    for (x in oFloat) {
    var field = form[oFloat[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
    // get field's value
    if (field.type == "select-one") {
    var si = field.selectedIndex;
    if (si >= 0) {
    value = field.options[si].value;
    } else {
    value = field.value;
    if (value.length > 0) {
    // remove '.' before checking digits
    var tempArray = value.split('.');
    var joinedString= tempArray.join('');
    if (!isAllDigits(joinedString)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    } else {
    var iValue = parseFloat(value);
    if (isNaN(iValue)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="double"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDouble"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.double"/>
    <validator name="date"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDate"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.date"
    jsFunctionName="DateValidations">
    <javascript><![CDATA[
    function validateDate(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oDate = new DateValidations();
    for (x in oDate) {
    var value = form[oDate[x][0]].value;
    var datePattern = oDate[x][2]("datePatternStrict");
    if ((form[oDate[x][0]].type == 'text' ||
    form[oDate[x][0]].type == 'textarea') &&
    (value.length > 0) &&
    (datePattern.length > 0)) {
    var MONTH = "MM";
    var DAY = "dd";
    var YEAR = "yyyy";
    var orderMonth = datePattern.indexOf(MONTH);
    var orderDay = datePattern.indexOf(DAY);
    var orderYear = datePattern.indexOf(YEAR);
    if ((orderDay < orderYear && orderDay > orderMonth)) {
    var iDelim1 = orderMonth + MONTH.length;
    var iDelim2 = orderDay + DAY.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderDay && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderDay) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[2], matched[1], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
    var iDelim1 = orderDay + DAY.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");

    Hello,
    thanks for your contribution. But how I already said we have seen that the first error message:
    The error is: javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
    But behind that message is an additional message that describes the real root cause of the problem:
    SEVERE: Cannot find resource "org/apache/commons/digester/xmlrules/digester-rules.dtd"
    org.apache.commons.digester.xmlrules.XmlLoadException: Cannot find resource
    "org/apache/commons/digester/xmlrules/digester-rules.dtd"
    Unfortunately we have no idea why the dtd file can not be loaded. The appropriate line of code is:
    getClass().getResourceAsStream("<link_to_resource")
    And this returns a NULL object. The NULL object causes the general exception and finishes the instantiation of Struts.
    Any additonal hints?
    Regards, Maik

  • Cannot load libamapc2.so

    I am installing policy agent 2.2 for apache web server 2.0.52, after the installation, I get the following error while trying to start apache web server:
    Cannot load /policyagent/agents/apache/lib/libamapc2.so into server: /policyagent/agents/apache/lib/libamapc2.so: undefined symbol: ZNSt24_default_alloc_templateILb1ELi0EE12_S_free_listE
    Any ideas?

    Are you using the version of Apache that comes with Solaris?
    A caution note in chapter 3 of Sun Java System Access Manager Policy Agent 2.2 Guide for Apache HTTP Server 2.0.54 says that version of
    Apache is incomplete. Below is the link below that is the entire caution note:
    http://docs.sun.com/app/docs/doc/819-4770/6n6ta765h?a=view
    Do not use the version of Apache HTTP Server that comes bundled with SolarisTM 9 Operating System or with Solaris 10 Operating System. The bundled Apache HTTP Server package is incomplete. Any attempt to Install Agent for Apache HTTP Server on a bundled version of Apache HTTP Server is likely to fail.
    Therefore, download the desired version of Apache HTTP Server from the Apache web site at http://www.apache.org/ before attempting to install the agent.
    ______________________________

  • Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver

    Hi,
    i am doing a forum application.
    i am trying to connect database connection through javax.sql.DataSource.
    I am using Eclipse editor for developing this application and i am using sql server 2000 database.
    i have create a servlet file.
    here is the coding.
    DatabaseGetConnection.java
    `````````````````````````````````````````
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.sql.DataSource;
    public class DatabaseGetConnection extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
    private Connection con=null;
    private DataSource ds=null;
    public DatabaseGetConnection() throws ServletException {
    super();               
    public DatabaseGetConnection(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
    this.doPost(req, res);          
    public void init() throws ServletException {
    try
    final Context initContext = new InitialContext();
    final Context envContext = (Context)initContext.lookup("java:/comp/env");
    this.ds = (DataSource)initContext.lookup("jdbc/mySQLServer");
    }catch(final NamingException ne)
    ne.printStackTrace();
    }catch(final Exception e)
    e.printStackTrace();
    public DataSource getDS()
    System.out.println("Datasource method calling");
    if (this.ds!=null)
    System.out.println("Datasource not null");
    }else
    System.out.println("Datasource null");
    return this.ds;
    public Connection getCon()
    try
    this.con=this.getDS().getConnection();
    if (this.con!=null)
    System.out.println("Connection Successfull");
    }catch(final SQLException se)
    System.out.print("Connection Establishment Error : ");
    se.printStackTrace();
    return this.con;
    I have configured server.xml. here is the configuration
    server.xml
    ````````````````
    <GlobalNamingResources>
    <Resource name="jdbc/mySQLServer" global="jdbc/mySQLServer" auth="Container"
    type="javax.sql.DataSource" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=forum;SelectMethod=cursor"
    username="sa" password="sa" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    </GlobalNamingResources>
    here is the web.xml file
    ``````````````````````````````````
    <resource-ref>
    <res-ref-name>jdbc/mySQLServer</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    is this configuration correct? plz help me about the configuration and coding through Eclipse.
    i have run the application and i got the error. here is the error details
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
    at com.forum.database.DatabaseGetConnection.getCon(DatabaseGetConnection.java:85)
    at com.forum.database.DatabaseGetConnection.GetAllTopicSearch(DatabaseGetConnection.java:101)
    at org.apache.jsp.test_jsp._jspService(test_jsp.java:73)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
    ... 24 more
    thanks and regards,
    k.s.kumar

    Please don't multipost, it's rude: http://forum.java.sun.com/thread.jspa?threadID=5219591
    Please continue on that thread.

  • Cannot load JDBC Driver Class in Tomcat5.5 using struts.

    Hello to all,
    I'm working in the struts environment using Esclipse3.2 IDE.
    And I have installed Tomcat5.5 server.I have created the LoginForm
    in struts.Now i like to connect my LoginForm with MySql database.I
    have also created the database in MySql naming strutsdatabase.
    I had also download the mysql-connector-java-3.0.16-ga-bin.jar and
    save that in C:/tomcat/commons/lib directory.
    While running I have got the below error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:808)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    And I have attached my struts-config.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software
    Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <data-sources>
    <data-source
    type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/strutsdatabase?autoReconnect
    =true"/>
    <set-property property="driverClassName"
    value="com.mysql.jdbc.Driver"/>
    <set-property property="username" value=""/>
    <set-property property="password" value=""/>
    <set-property property="maxActive" value="10"/>
    <set-property property="validationQuery" value="SELECT
    COUNT(*) FROM test"/>
    <set-property property="maxWait" value="5000"/>
    <set-property property="defaultAutoCommit" value="false"/>
    </data-source>
    </data-sources>
    <form-beans>
    <form-bean name="LoginForm"
    type="fino.web.struts.action.LoginForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards/>
    <action-mappings>
    <action name="LoginForm" path="/login" scope="request"
    type="fino.web.struts.action.LoginAction" validate="true">
    <forward name="success" path="/success.jsp"/>
    <forward name="failure" path="/failure.jsp"/>
    </action>
    </action-mappings>
    <controller/>
    <message-resources null="false"
    parameter="org.apache.struts.action.ActionResources"/>
    </struts-config>
    Friends,please help me to find solution to this problem.

    Note: This thread was originally posted in the [Java Compiler|http://forums.sun.com/forum.jspa?forumID=7] forum, but moved to this forum for closer topic alignment.

  • Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

    Hi,
    At the moment I'm trying to get an example working. The error message I get is:
    Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'"
    The example I tried is http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html.
    Configuration:
    Wampserver 2.0 (Apache, MySQL, PHP for Windows XP), Tomcat 6.0 and jdk1.6.0_03.
    The following files are installed in %CATALINA_HOME%/webabbs/
    - Dbtest/test.jsp
    - Dbtest/WEB-INF/web.xml
    - Dbtest/WEB-INF/lib/standard.jar
    - Dbtest/WEB-INF/lib/tomcat-dbcp.jar
    - Dbtest/WEB-INF/lib/jstl.jar
    Tia,
    Abel.

    Hi,
    I added the jar file containing the requested class to my lib directory. So the current contents of that directory is:
    The following files are installed in %CATALINA_HOME%/webabbs/
    - Dbtest/test.jsp
    - Dbtest/WEB-INF/web.xml
    - Dbtest/WEB-INF/lib/standard.jar
    - Dbtest/WEB-INF/lib/tomcat-dbcp.jar
    - Dbtest/WEB-INF/lib/jstl.jar
    - Dbtest/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar
    More importantly, I started my Wamp server.
    The example works as it should have. Thanks for the feedback.
    Abel

  • Cannot load from BACKUPSTORE issue

    Hi,
    Hopefully, someone can help with this. I'm in the process of developing a J2EE application. At present it contains one very small stateful session bean. The issue I have regards passivation and removal of this bean. For testing purposes I have set the passivation and removal timeouts to small values as follows:
    <bean-cache>
    <victim-selection-policy>FIFO</victim-selection-policy>
    <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
    <removal-timeout-in-seconds>60</removal-timeout-in-seconds>
    </bean-cache>
    My understanding is that using the above settings will passivate the bean after 1 minute and remove the bean after a further minute.
    Passivation appears to be occuring as a message contained within the ejbPassivate method is being written to the server log. However, the problem I'm having is when I then try to access the bean once passivated. I get the following stack trace:
    [08/Sep/2004:15:56:16] SEVERE (23316): FIFO-com.syntegra.neg.ejbtesterejb.EJBTesterBean: Cannot load from BACKUPSTORE FOR Key: <de899dfc12>
    [08/Sep/2004:15:56:16] WARNING (23316): [FIFO-com.syntegra.neg.ejbtesterejb.EJBTesterBean.1]: Invalid sessionID: de899dfc12
    [08/Sep/2004:15:56:16] SEVERE (23316): IOP5011: Exception getting the servant: [javax.ejb.NoSuchObjectLocalException: Invalid Session Key ( de899dfc12)]
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr: Exception in thread "service-j2ee-9" org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: 0x2000 minor code: 1807 completed: No
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.enterprise.iiop.POAProtocolMgr.preinvoke(POAProtocolMgr.java:381)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.POAImpl.internalGetServant(POAImpl.java:388)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.POAImpl.getServant(POAImpl.java:309)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.GenericPOAServerSC.preinvoke(GenericPOAServerSC.java:348)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.initServant(ServantCachePOAClientSC.java:112)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.setOrb(ServantCachePOAClientSC.java:95)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.createDelegate(CDRInputStream_1_0.java:760)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.internalIORToObject(CDRInputStream_1_0.java:750)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:669)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:890)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:884)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream.read_abstract_interface(CDRInputStream.java:307)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:228)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:381)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.enterprise.iiop.IIOPHandleDelegate.getStub(IIOPHandleDelegate.java:64)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.enterprise.iiop.IIOPHandleDelegate.readEJBObject(IIOPHandleDelegate.java:39)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.ejb.portable.HandleImpl.readObject(HandleImpl.java:91)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:908)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:981)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:287)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.copyObject(Util.java:598)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at javax.rmi.CORBA.Util.copyObject(Util.java:314)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.syntegra.neg.ejbtesterejb._EJBTester_Stub.getHandle(Unknown Source)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.syntegra.neg.web.ModelManager.getExistingEJBTester(ModelManager.java:178)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.syntegra.neg.web.ModelManager.getTesterEJB(ModelManager.java:121)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.syntegra.neg.web.WebTisRequestProcessor.processRequest(WebTisRequestProcessor.java:191)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.syntegra.neg.web.RoutingControl.doPostOrGet(RoutingControl.java:134)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.syntegra.neg.web.RoutingControl.doGet(RoutingControl.java:91)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at java.security.AccessController.doPrivileged(Native Method)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
    [08/Sep/2004:15:56:16] WARNING (23316): CORE3283: stderr:      at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)
    [08/Sep/2004:15:56:16] WARNING (23316):java.io.IOException: Serializable readObject method failed internally
         at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:274)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:981)
         at com.sun.corba.ee.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:287)
         at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.copyObject(Util.java:598)
         at javax.rmi.CORBA.Util.copyObject(Util.java:314)
         at com.syntegra.neg.ejbtesterejb._EJBTester_Stub.getHandle(Unknown Source)
         at com.syntegra.neg.web.ModelManager.getExistingEJBTester(ModelManager.java:178)
         at com.syntegra.neg.web.ModelManager.getTesterEJB(ModelManager.java:121)
         at com.syntegra.neg.web.WebTisRequestProcessor.processRequest(WebTisRequestProcessor.java:191)
         at com.syntegra.neg.web.RoutingControl.doPostOrGet(RoutingControl.java:134)
         at com.syntegra.neg.web.RoutingControl.doGet(RoutingControl.java:91)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)
    [08/Sep/2004:15:56:16] WARNING (23316):
    org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : Serializable readObject method failed internally vmcid: SUN minor code: 211 completed: Maybe
         at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:989)
         at com.sun.corba.ee.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:287)
         at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.copyObject(Util.java:598)
         at javax.rmi.CORBA.Util.copyObject(Util.java:314)
         at com.syntegra.neg.ejbtesterejb._EJBTester_Stub.getHandle(Unknown Source)
         at com.syntegra.neg.web.ModelManager.getExistingEJBTester(ModelManager.java:178)
         at com.syntegra.neg.web.ModelManager.getTesterEJB(ModelManager.java:121)
         at com.syntegra.neg.web.WebTisRequestProcessor.processRequest(WebTisRequestProcessor.java:191)
         at com.syntegra.neg.web.RoutingControl.doPostOrGet(RoutingControl.java:134)
         at com.syntegra.neg.web.RoutingControl.doGet(RoutingControl.java:91)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)
    Previously using IPlanet 6 we did not receive such a stack trace. Is this simply because we are now using a later JVM and this stack trace is to be expected?
    Thanks,
    Emma.

    I have finally discovered the cause of this problem. A class file is available to the EJB's client, but not to the EJB.
    It seems we have decided to use pass-by-reference with our EJB (in sun-application.xml). So when an EJB method is called with such an object for an argument, no copy needs to be created, and we do not get any class loading errors.
    The EJB can hold and use the object, and even passivate it without problem. However, when the EJB container needs to restore the passivated EJB a java.lang.ClassNotFoundException is thrown if the class file is not available. Oddly this exception is only seen in the log if logging is set to FINIEST, but this leads to the "Cannot load from BACKUPSTORE" message, the javax.ejb.NoSuchObjectLocalException, the org.omg.CORBA.OBJECT_NOT_EXIST, and the java.rmi.NoSuchObjectException.

  • Apache cannot start due to libphp5.so undefined symbol: ap_log_rerror_

    I was working on some (non-PHP) Apache configuration, when I went to restart httpd I got the following error:
    Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: undefined symbol: ap_log_rerror_
    Here is the console output:
    stav@shiva:~$ sudo systemctl restart httpd
    Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
    stav@shiva:~$ sudo systemctl status httpd
    ● httpd.service - Apache Web Server
       Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
       Active: failed (Result: exit-code) since Wed 2014-07-02 17:25:29 EDT; 1s ago
      Process: 2675 ExecStart=/usr/bin/apachectl start (code=exited, status=1/FAILURE)
    Jul 02 17:25:29 shiva apachectl[2675]: httpd: Syntax error on line 125 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: undefined symbol: ap_log_rerror_
    Jul 02 17:25:29 shiva systemd[1]: httpd.service: control process exited, code=exited status=1
    Jul 02 17:25:29 shiva systemd[1]: Failed to start Apache Web Server.
    Jul 02 17:25:29 shiva systemd[1]: Unit httpd.service entered failed state.
    I removed all PHP & deps, reinstalled just PHP 5.5 and PHP worked ok.  Then when I installed php-apache and I got the error again. 
    I downgraded to PHP 5.4 and now it works.
    More info:
    stav@shiva:/etc/php$ httpd -v
    Server version: Apache/2.2.26 (Unix)
    Server built:   Mar 13 2014 16:37:13
    stav@shiva:/etc/php$ httpd -l
    Compiled in modules:
      core.c
      prefork.c
      http_core.c
      mod_so.c
    I'm having trouble installing Apache 2.4 so that's why I'm still on 2.2.
    Any ideas how to get PHP 5.5 working?

    As far as I know  php-apache apache module is compiled against Apache2.4 libraries and is not going to work with previous Apache versions.
    You either need to use older version of php-apache module (before Apache2.4 migration) or, highly recommended, move your website to Apache 2.4.

Maybe you are looking for