Oracle-Java-Apache-Tomcat-JK connector configuration help...

Windows 7 Ultimate 64-bit
Oracle 12c
Java 8
Apache HTTP server 2.4.10
Tomcat 8.0.15
JK Connector 1.2.40
Here are the main configuration files httpd.conf, mod_jk.conf, server.xml, and workers.properties.
When I browse to a .jsp file, it appears to be read as html, thus not reading <jsp:include> statements as such.
Please suggest minimum configuration.
httpd.conf
Define SRVROOT "/apache"
ServerRoot "${SRVROOT}"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
ServerName localhost:80
#experimental section starts here
#experimental section ends here
# Virtual hosts
NameVirtualHost *
Include conf/mod_jk.conf
mod_jk.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile "c:/tomcat/conf/jk/workers.properties"
JkMount /servlet/*  ajp13
JkMount /*.jsp  ajp13
<VirtualHost *>
ServerName om1001001.omnisocial.com
DocumentRoot "c:/data/fxality/java001"
</VirtualHost>
<VirtualHost *>
ServerName om1001002.omnisocial.com
DocumentRoot "c:/data/fxality/java002"
</VirtualHost>
<VirtualHost *>
ServerName om1001003.omnisocial.com
DocumentRoot "c:/data/fxality/java003"
</VirtualHost>
server.xml
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/></Realm>
<Host name="localhost"  appBase="webapps"/>
<Host name="om1001001.omnisocial.com" appBase="c:/data/fxality/java001">
<Context path="" docBase=""></Context>
</Host>
<Host name="om1001002.omnisocial.com" appBase="c:/data/fxality/java002">
<Context path="" docBase=""></Context>
</Host>
<Host name="om1001003.omnisocial.com" appBase="c:/data/fxality/java003">
<Context path="" docBase=""></Context>
</Host>
</Engine>
</Service>
</Server>
workers.properties
# BEGIN workers.properties
# Definition for Ajp13 worker
worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
# END workers.properties

I haven't studied your problem in detail and don't actually use Tomcat 6, but in earlier versions of Tomcat the handling of JNDI leaves a lot to be desired. If you search this forum for posts about Tomcat and JNDI, you will find some useful information.
One thing I found was that you really need to use the context.xml file in your Meta-inf directory, putting the datasource anywhere else gets into one kind of trouble or another. I tried using server.xml, a context file for the application and the web-inf file.

Similar Messages

  • Check Installed Version of Java / Apache / Tomcat

    Hi,
    I have recently installed Solaris 10 Update 4 on a T2000 and need to confirm exactly which version of Java / Apache / Tomcat Solaris 10 installs by default. This will ebetually become a Web Server for our developers but I need to check this before doing any further work.

    * java -version
    * there's a version number in the realease notes in the root directory of your tomcat server.
    What do mean Apache / Tomcat? Do you mean Apache Tomcat, or are you using both there servers, if you don't know what I mean the answer is "No, just tomcat".

  • Io Exception connecting to Oracle from apache-tomcat-6.0.14 - weird problem

    Hi all,
    I'm in a desperate situation here. Trying to solve this problem for a week now. I have searched all over the internet but coul not find any solution. I developed an application using netbeans 5.5.1 with VWD pack and it works fine. The application accesses an oracle db on another server which works fine on my development machine. Now I deployed to oracle 9i and apache-tomcat-6.0.14 on a solaris machine and encountered this error :
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    on further troubleshooting I tried this code on the server.
    java.sql.DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@servername:1521:sid", "username", "pswd");
    and it works alright. The connection was established wothout error.
    But when I try
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    javax.naming.Context init new javax.naming.Context();
    javax.naming.Context ctx = (javax.naming.Context)init.lookup("java:comp/env");
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("jdbc/dataSource");
    java.sql.Connection conn = ds.getConnection();
    I still get the same io Exception error.
    Now I need to fetch the values from the context file, because my application uses :-
    CachedRowSetXImpl portal_tabsRowSet= new CachedRowSetXImpl();
    CachedRowSetDataProvider portal_tabsDataProvider= new CachedRowSetDataProvider();
    as follows :-
    portal_tabsRowSet.setDataSourceName("java:comp/env/jdbc/dataSource");
    portal_tabsRowSet.setCommand("SELECT * FROM PORTAL_TABS");
    portal_tabsRowSet.setTableName("PORTAL_TABS");
    portal_tabsDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionBean1.portal_tabsRowSet}"));
    here is my context.xml
    <Context path="/AppPortal">
    <Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" m
    axActive="20" maxIdle="10" maxWait="-1" name="jdbc/dataSource" password="pswd" ty
    pe="javax.sql.DataSource" url="jdbc:oracle:thin:@servername:1521:sid" username="username"/>
    </Context>
    here is my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"><context-param><param-name>javax.faces.STATE_SAVING_METHOD</param-name><param-value>server</param-value></context-param><context-param><param-name>javax.faces.CONFIG_FILES</param-name><param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value></context-param><context-param><param-name>com.sun.faces.validateXml</param-name><param-value>true</param-value></context-param><context-param><param-name>com.sun.faces.verifyObjects</param-name><param-value>false</param-value></context-param><filter><filter-name>UploadFilter</filter-name><filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class><init-param><description>
    The maximum allowed upload size in bytes. If this is set
    to a negative value, there is no maximum. The default
    value is 1000000.
    </description><param-name>maxSize</param-name><param-value>1000000</param-value></init-param><init-param><description>
    The size (in bytes) of an uploaded file which, if it is
    exceeded, will cause the file to be written directly to
    disk instead of stored in memory. Files smaller than or
    equal to this size will be stored in memory. The default
    value is 4096.
    </description><param-name>sizeThreshold</param-name><param-value>4096</param-value></init-param></filter><filter-mapping><filter-name>UploadFilter</filter-name><servlet-name>Faces Servlet</servlet-name></filter-mapping><servlet><servlet-name>Faces Servlet</servlet-name><servlet-class>javax.faces.webapp.FacesServlet</servlet-class><load-on-startup> 1 </load-on-startup></servlet><servlet><servlet-name>ExceptionHandlerServlet</servlet-name><servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class><init-param><param-name>errorHost</param-name><param-value>localhost</param-value></init-param><init-param><param-name>errorPort</param-name><param-value>24444</param-value></init-param></servlet><servlet><servlet-name>ThemeServlet</servlet-name><servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class></servlet><servlet-mapping><servlet-name>Faces Servlet</servlet-name><url-pattern>*.jspx</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ExceptionHandlerServlet</servlet-name><url-pattern>/error/ExceptionHandler</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ThemeServlet</servlet-name><url-pattern>/theme/*</url-pattern></servlet-mapping><session-config><session-timeout>5</session-timeout></session-config><welcome-file-list>
    <welcome-file>JSCreator_index.jsp</welcome-file>
    </welcome-file-list><error-page><exception-type>javax.servlet.ServletException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>java.io.IOException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>javax.faces.FacesException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type><location>/error/ExceptionHandler</location></error-page><jsp-config><jsp-property-group><url-pattern>*.jspf</url-pattern><is-xml>true</is-xml></jsp-property-group></jsp-config><resource-ref><description>Creator generated DataSource Reference</description><res-ref-name>jdbc/dataSource</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth></resource-ref></web-app>
    This is really strange to me.
    Please help!

    I haven't studied your problem in detail and don't actually use Tomcat 6, but in earlier versions of Tomcat the handling of JNDI leaves a lot to be desired. If you search this forum for posts about Tomcat and JNDI, you will find some useful information.
    One thing I found was that you really need to use the context.xml file in your Meta-inf directory, putting the datasource anywhere else gets into one kind of trouble or another. I tried using server.xml, a context file for the application and the web-inf file.

  • Apache Tomcat and Servlets configuration...

    Hi there fellow Javites,
    does anybody know how to configure the apache tomcat server xml file to enable you to use the "old servlet url technique"? I hear that its been disabled by default in newer versions Tomcat.
    You know where you would previously type in: http://localhost:8080/servlet/folder1.servlets.TheServlet
    ,but now you have to tell your web.xml file where your servlet is so you now have to type in:
    http://localhost:8080/TheServlet
    That is, unless you enable the server config file to allow you to do both.
    I hate to ask such questions but I really hate the Apache Tomcat documentation.
    Thanks.

    Hi there,
    well I was kinda hoping they'd be a shortcut to having to map the servlet in the web.xml file. In the older versions of the Apache tomcat you used to just be able to type in the url and the Servlet would be found.
    Does anybody know how to enable the later versions of Apache Tomcat via the config file to use the old style of Servlet mapping?
    I guess a more important question I should be asking also is, is this older style of mapping servlets now considered bad practice and is why it is no longer enabled by default in more recent Apache Tomcat versions???
    Thank you, this community rocks! Keep up the Javite work guys, they'll never take us alive. NO LOL. :D

  • Oracle EPM 11.1.1.3 Configuration Help

    Hi all,
    I have installed Oracle EPM 11.1.1.3. I have installed on Windows Server 2003 and SQL Server 2005
    Foundation Services
    Essbase
    Planning
    Web Analysis
    and after a while i have decided to installed EPMA and Profitability. Now when i tried to configure them, i messed up some settings. Now my workspace would not start. So i have uninstalled EPMA but still my configuration is still messy.
    Can you please tell me how to delete the configuration completely and start as if it were a fresh install.
    Any suggestions would be really appreciated i have spent over a month trying to get this thing to work.
    Thanks
    Arun

    thank you to all of you guys for responding to this question. as much as i hate to do, looks like i have no other option rather than uninstalling the whole thing.
    i just want to mention that the other day i was speaking with an installation expert from one of the leading "hyperion experts" in US, the guy told me that there is a certain folder called oracle/userprojects . He said that if i can delete the folder the configuration will be wiped out,
    but i was unable to find that folder in my installation...but what ever looks like i am going to have a sleepless weekend!!..thank you again guyz!

  • Apache - Tomcat - JBoss

    Hi,
    I'm trying to run Apache + Tomcat + JBoss.
    JBoss/Tomcat embedded is working fine, but I can't run Tomcat standalone, I've got the following error :
    javax.naming.CommunicationException: Can't find SerialContextProvider
    at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:60)
    at com.sun.enterprise.naming.SerialContext.<init>(SerialContext.java:79)
    at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:54)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
    at javax.naming.InitialContext.init(InitialContext.java:222)
    at javax.naming.InitialContext.<init>(InitialContext.java:178)
    at ejb.sbtest.SBTest1Servlet.doGet(SBTest1Servlet.java:96)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
    at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    Someone has a tutorial on Tomcat configuration with an application server ?
    Thanks,
    jerome.

    At your SBTest1Servlet.java:96, you must have a call
    new InitialContext(); // no parameter
    It only works if tomcat is running with jboss. Also this call is for JNDI, if your jboss is not running, who is your JNDI server??? Anyway, assuming you have jboss running on "anotherHost" as JNDI server, the use the following code. If your JNDI server is not jboss, the property values are diff depending on that server.
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
    env.put(Context.PROVIDER_URL, "anotherHost:1099");
    env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");
    ctx = new InitialContext(env);

  • Help with error (apache tomcat + java )

    hi all ! Im having an issue with my program.
    Im using jasper report to generate some reports from the program... everything seems to work except for this (making the program unstable at some point). When the report is generated and loaded as a pdf I get this error in the log.
    java.lang.IllegalStateException
    at org.apache.coyote.Response.reset(Response.java:296)
    at org.apache.catalina.connector.Response.reset(Response.java:642)
    at org.apache.catalina.connector.Response.reset(Response.java:908)
    at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:355)
    at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:211)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:736)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:619)
    The code Im using to generate the pdf is this one.
    File file = new File("C:\\Reportes\\", reporte +""+ datNac +".pdf");
    String contentType = getServletContext().getMimeType(reporte+ "" +datNac+ ".pdf");
    System.out.println("antes BufferedOutputStream");
    BufferedOutputStream output = null;
    output = new BufferedOutputStream(response.getOutputStream());
    BufferedInputStream inputFile = null;
    inputFile = new BufferedInputStream(new FileInputStream(file));
    response.reset();
    response.setContentType(contentType);
    response.setContentLength((int) file.length());
    response.setHeader("Content-disposition",
    "attachment; filename=\"" +file.getName()+ "\"");
    System.out.println("BufferedOutputStream");
    byte[] buffer = new byte[10240];
    for (int length; (length = inputFile.read(buffer)) != -1;) {
    output.write(buffer, 0, length);
    inputFile.close();
    output.close();Any help is appreciated.
    Thanks!
    Edited by: juanmanuelsanchez on Aug 4, 2009 11:17 AM
    Edited by: juanmanuelsanchez on Aug 4, 2009 11:18 AM
    Edited by: juanmanuelsanchez on Aug 4, 2009 11:19 AM

    juanmanuelsanchez wrote:
    java.lang.IllegalStateException
    at org.apache.coyote.Response.reset(Response.java:296)The response is already committed and thus cannot be reset anymore.
    output = new BufferedOutputStream(response.getOutputStream());
    response.reset();At least you should obtain the outputstream AFTER the reset. If that doesn't fix, then check everything in the chain before this code.

  • Apache Tomcat goes down on starting Java application, Oracle error

    Hello all
    I am running a Java application on Apache Tomcat 5.5. I use Oracle 10g Express Edition as the back-end for my application. I deploy my application using theTomcat manager and it works fine.
    However, when I try to access the home page of the application, my Tomcat server goes down. The stdout logs of Apache Tomcat display the following message:
    Exception message: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-12705: Cannot access NLS data files or invalid environment specified.
    What could the possible reasons be for this to happen? And how can I workaround or fix this?
    Thanks
    Swetha

    This looks like a problem that XE has with some recently altered locales, i.e. Russian. You can work around the problem by making sure that the Java locale (Locale.setDefault()) is supported by XE before the JDBC connect call. For example, use Locale.setDefault( Locale.US ). After connect, you may explicitly set session NLS parameters using ALTER SESSION. You can also restore the Java locale.
    -- Sergiusz

  • Problem in establishing connectin to Oracle Database using TOMCAT-APACHE

    Hello can anyone help me i can't establish a coonection to Oracle Database eventhough i have set everything in my server.XML...
    I manage to connect to ACCES database but not Oracle... help me... here is the resource portion in my server.xml
    <!-- My Forum Context - Access Database-->
    <Context path="/forum" docBase="forum" debug="0" reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_forum_log." suffix=".txt" timestamp="true"/>
    <Resource name="jdbc/forumDb" auth="Container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/forumDb">
    <parameter><name>user</name><value></value></parameter>
    <parameter><name>password</name><value></value></parameter>
    <parameter><name>driverClassName</name><value>sun.jdbc.odbc.JdbcOdbcDriver</value></parameter>
    <parameter><name>driverName</name><value>jdbc:odbc:forumDb</value></parameter>
    </ResourceParams>     
    </Context>
    <!-- PMOD Context - Oracle -->
    <Context path="/pmod" docBase="pmod" debug="0" reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_pmod_log." suffix=".txt" timestamp="true"/>     
    <Environment name="maxExemptions" type="java.lang.Integer" value="15"/>
    <Parameter name="context.param.name" value="context.param.value" override="false"/>          
    <Resource name="jdbc/pmodDb" auth="Container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/pmodDb">
    <parameter><name>user</name><value>pmod_owner</value></parameter>
    <parameter><name>password</name><value>pmod_owner</value></parameter>
    <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter>     
    <parameter><name>driverName</name><value>jdbc:oracle:thin:@192.9.200.2:1521:PMOD</value></parameter>
    </ResourceParams>     
    </Context>
    can anyone help... thanks...
    sharil

    hello....
    here is how i do it if i use access, i just set in my server.xml as bellow....
    <!-- PMOD Context -->
    <Context path="/pmod" docBase="pmod" debug="0" reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_pmod_log." suffix=".txt" timestamp="true"/>
    <Ejb name="ejb/User" type="Session" home="pmod.user.UserHome" remote="pmod.user.User"/>
    <Environment name="maxExemptions" type="java.lang.Integer" value="15"/>
    <Parameter name="context.param.name" value="context.param.value" override="false"/>
                   <Resource name="jdbc/pmodDb" auth="SERVLET" type="javax.sql.DataSource"/>
                   <ResourceParams name="jdbc/pmodDb">
                   <parameter><name>user</name><value></value></parameter>
                   <parameter><name>password</name><value></value></parameter>
    <parameter><name>driverClassName</name><value>sun.jdbc.odbc.JdbcOdbcDriver</value></parameter>
              <parameter><name>driverName</name><value>jdbc:odbc:pmodDb</value></parameter>
    </ResourceParams>     
    </Context>
    later i would call from my servlet as follows
    InitialContext initCtx = new InitialContext ();
    DataSource ds = (DataSource)initCtx.lookup ("java:comp/env/jdbc/pmodDb");
    conn = ds.getConnection();
    then i can establish connection to my database... but now i change to oracle and my server.xml i configure as follows
    <!-- PMOD Context -->
    <Context path="/pmod" docBase="pmod" debug="0" reloadable="true">
              <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_pmod_log." suffix=".txt" timestamp="true"/>     
    <Environment name="maxExemptions" type="java.lang.Integer" value="15"/>
    <Parameter name="context.param.name" value="context.param.value" override="false"/>          
              <Resource name="jdbc/pmodDb" auth="Container" type="javax.sql.DataSource"/>
              <ResourceParams name="jdbc/pmodDb">
                   <parameter><name>user</name><value>pmod_owner</value></parameter>
                   <parameter><name>password</name><value>pmod_owner</value></parameter>                
                   <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter>     
                   <parameter><name>driverName</name><value>jdbc:oracle:thin:@192.9.200.2:1521:PMOD</value></parameter>
    </ResourceParams>     
    </Context>
    and i call from my servlet like before ...
    InitialContext initCtx = new InitialContext ();
    DataSource ds = (DataSource)initCtx.lookup ("java:comp/env/jdbc/pmodDb");
    conn = ds.getConnection();
    the datasource would return null in other word i cannot find the database
    however if i tried to establish connection directly,
    String u1 = "pmod_owner";
    String p1 ="pmod_owner";
    String path = "jdbc:oracle:thin:@192.9.200.2:1521:PMOD";
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection( path, u1, p1 );
    i can talk with the database....
    so if anyone out there can help me to point me where did i go wrong?
    fyi: i have put a lib which contains oracle jdbc driver called classes12.zip in my c:\tomcat\common\lib\
    thank you

  • Exception:org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

    Hi All,
    i am using jdev version 11.1.1.5.0
    and deployed my Adf application on Apache Tomcat 6.0.
    in my use case i have created simple adf application using adf business component. create a vo based on eo and drag-drop on jspx page.
    i have created JNDI data source in Apache server using edit context.xml file and add following line-
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"  accessToUnderlyingConnectionAllowed="true" />
    3.using same data source in my adf applicatioin as -
      right click on AM --> Configuration-->edit-->select connection type jdbc datasource  -->java:/comp/env/jdbc/TestDB  
    4. after that i have deployed my application on apace server but when i have running application i have got following error-
    org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
    i have goggling and find  following solution-
    oracle.jdbc.driver.OracleConnection delConn = (oracle.jdbc.driver.OracleConnection) ((org.apache.tomcat.dbcp.dbcp.DelegatingConnection)c_stmt.getConnection()).getDelegate();
    but my problem is that i'm using Adf Business Component so where i set following type casting.
    Is there any method on ADF BC which handle JNDI Data source setting or any other way to do this.
    thanks in Advance
    Manish

    Hi dvohra21,
    thanks for reply.
    i don't understand where i go to set accessToUnderlyingConnectionAllowed =true
    i have already set this property on context.xml file
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"  accessToUnderlyingConnectionAllowed="true" />
    any other place where i set this propery
    please elaborate this steps how to Configuree DBCP

  • Problem connecting oracle database to jsp pages using Apache Tomcat server 8.0

    Well...I tried too many things..googled so many times..but still could not find solution to my problem.
    I use windows 8 Enterprise Edition(if this has to do something with the problem)
    Oracle 11.2.0
    Apache Tomcat server 8.0
    JDK 1.7
    My oracle is installed in the D: drive and tomcat in c:. i copied the ojdbc6.jar file from oracle to lib directory of tomcat server.
    Then i set  CLASSPATH in environment variables as "C:\Program Files\Apache Software Foundation\Tomcat 8.0\lib\ojdbc6.jar" in system variables
    My path variable is set as "C:\Program Files\Java\jdk1.7.0_02\bin".
    My program is as follows in notepad:
    <%@ page import="java.sql.*" %>
    <html>
    <body>
    <%
    Connection conn;
    Statement st;
    ResultSet rs;
    try{
    new oracle.jdbc.driver.OracleDriver();
    String dbURL="jdbc:odbc:oracle:thin:@localhost:1521:XE";
    String userId="system";
    String pwd="moon";
    conn=DriverManager.getConnection(dbURL,userId,pwd);
    st=conn.createStatement();
    rs= st.executeQuery("SELECT * FROM login");
    while(rs.next())
    System.out.println(rs.getString(1)+""+rs.getString(2));
    catch(Exception e){}
    %>
    </body>
    </html>
    I get too many errors then
    eroors
    org.apache.jasper.JasperException: An exception occurred processing JSP page /page2.jsp at line 14
    11: String userId="system";
    12: String pwd="moon";
    13:
    14: conn=DriverManager.getConnection(dbURL,userId,pwd);
    15: st=conn.createStatement();
    16:
    17: rs= st.executeQuery("SELECT * FROM login");
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    root cause
    javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:905)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:834)
         org.apache.jsp.page2_jsp._jspService(page2_jsp.java:102)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Nothing solved this problem.

    >> Nothing solved this problem.
    Can't fix a problem 'till an actual problem is identified.
    >> ODBC Driver Manager ... Data source name not found
    That appears to be ODBC drivers looking for a DSN (Data Set Name). If it wants a DSN, the DSN has to be specified in the code, and the DSN has to be configured in the windows host ODBC applet. So that is at least two squirrels to get in the right tree before moving forward. A ...host:...[port:]SID|service name are some of the bits needed in a jdbc connect string, and that is in no way related to DSNs. A Whole Different Animal. If it wants a DSN that might be what needs to go in the URL bit.
    And ODBC setups can be confusing, especially if an x64 OS is in the mix- if that is the case there are two different ODBC configuration applets, one for x64 the other for x86, and if one gets as far as talking to an actual database it might toss an architecture error. Only way to fix that "problem" is *delete* the ODBC DSN and then run the correct (maybe the x86) ODBC config utility, and set up the DSN. Again.

  • Tomcat 4.1 Configuration after upgrading Java SDK

    Hi
    I have an existing Tomcat 4.1 installation which runs on Java 2 SDK 1.4.1_01. I've upgraded the SDK to 1.4.2_08. However, I can't seem to get the Tomcat 4.1 Windows service to start with the new SDK.
    What do I have to do to ensure that the Tomcat 4.1 Windows service runs with the new SDK? Do I have to reinstall Tomcat 4.1 or is there some configuration I can change?
    Thanks for the help :)
    Regards,
    Lily

    I've set the JAVA_HOME to the new JDK installation.
    However it seems that the Apache Tomcat 4.1 windows service is looking for the old JDK installation, hence the windows service is unable to start.

  • Could not see Java tab on Apache Tomcat 5.5.20 Properties in CCM

    Hi,
    After uninstalling and reinstalling BusinessObjects Edge 3.1, I can no longer see Java tab on Apache Tomcat 5.5.20 Properties in Central Configuration Manager (CCM). I can only see 2 tabs namely Properties and Dependency. Therefore, I could not start my Tomcat because I could not change Java maximum memory pool from 1024 to 768 in the Java tab.
    Please help.
    Hapizorr

    Hi Denis,
    Yes, it works. Thank you.
    Hapizorr

  • Oracle web service on apache tomcat 5.5.X

    Hello everyone,
    we developed web service using oracle jdeveloper 10.1.3.2 and successfully deployed it on OC4J. It works fine.
    we also tried to deploy that web service on apache tomcat 5.5.17, but faced with error:
    java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:929)
    at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:578)
    at org.apache.tomcat.util.digester.Rule.end(Rule.java:228)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1318)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> PointSoap12
    HttpPort in servlet mapping
    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2292)
    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2268)
    ... 39 more
    16.07.2007 8:55:46 org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Parse error in application web.xml file at jndi:/localhost/WebServices/WEB-INF/web.xml
    java.lang.IllegalArgumentException: Invalid <url-pattern> PointSoap12HttpPort in servlet mapping
    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2725)
    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2751)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1318)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    did anyone solve this problem or is there any workaround for this?
    thanks for your help in advance.
    Renat

    Please modify the url-pattern in web.xml.
    java.lang.IllegalArgumentException: Invalid <url-pattern>
    URL-patterns must be one of the following:
    - start with a '/' and end with a '/*', use this one for path patterns
    - start with a '*.' and end with a character, use this for extension mapping
    - some sequence of characters starting with '/' and not ending in '*', use this for exact matches.

  • Apache 2, Tomcat 5, mod_jk2 configuration problem

    I am setting up a Web Server on a RedHat Enterprise Linux box. I installed the RedHat Application Server that installs Apache 2, Tomcat 5 and Mod_JK2. I can't get the mod_jk2 configured properly. I've searched the internet and haven't found any documentation that will work with this.
    I need to know how to configure the mod_jk2 with Apache2 and Tomcat 5.
    PLEASE HELP!!! Nothing I've tried from the Internet has helped. The best site that I've found is ::
    http://www.johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html
    but its for tomcat 4 so it doesn't work for me.
    Has anyone does this before that can help me????
    Thanks in advance.

    Ended up downloading and installing the mod_jk instead of the mod_jk2 that came with RedHat Application Server.

Maybe you are looking for

  • Network Home Folders - iMac Freezes

    Hello all. I am trying to implement GarageBand for editing at a radio station. Everything is based off of a XServe G5 running OSX 10.4.11 with only 2 iMac workstations running 10.5.3. Only one main user right now who has a network based home folder.

  • Deleting an account?

    How do I delete an Admin account.  I inadvertantly created an Admin account when I just wanted to create an "ordinary" acount?  When I try to highlight the erroneous account under 'Other Users' to delte it by selecting the minus sign it doesn't selec

  • Could not find key?

    I have tried to upgrade Itunes, but everytime I do it comes back saying it cannot be installed & that it needs QuickTime. But when I try to download QuickTime, it claims that it could not open key(?) I've even uninstalled Itunes completely, but it st

  • How to deal with unresponsive Leopard?

    Hello people, I would like to know, as a mac newbie, what to do when Leopard stops responding. For example it happened a few times, when i had lots of apps open, to work with very big PDF, and i clicked cancel on that action and soon after the whole

  • Logic for date

    hi all, in the selection screen i have fields like BUKRS, COST CENTER, PROFIT CENTER, PERIOD, AND YEAR. The problem is if i give period as 5 i.e., may and year as 2008 i need fetch the records from 1 st may to 31st may only. can any one please help m