Tomcat and Oracle

Hi. I have tomcat 6 and Oracle 10g Express edition 10.2.0.1.0 and I have to make a jsp page that would connect to my database and get data from it.
In server.xml I added:
<Resource name="jdbc/myoracle" auth="Container"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@127.0.0.1:8080:apex"
username="hr" password="hr" maxActive="20" maxIdle="10"
maxWait="-1"/>
and in web.xml:
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/myoracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
I also downloaded ojdbc14.jar driver and placed it into tomcat/lib folder.
now, I dont know how to connect to the database in my jsp page and what imports to make, I tried to search the web and couldnt find anything specific.
Can you please help me? How would I for example list all entries from say Employees table that is already created.
Thanks

Hi,
Found the solution best described in below link.
http://wiki.apache.org/tomcat/UsingDataSources
Im using tomcat 6.0.18 on vista and oracle 10g. Hope this Infomation might help someone.
1. comment following line in TOMCAT_HOME\conf\context.xml
<WatchedResource>WEB-INF/web.xml</WatchedResource>
2. copy following in ur web applications META-INF\context.xml
<?xml version='1.0' encoding='utf-8'?>
<Context>
<Resource name="jdbc/oraclexe" auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@127.0.0.1:1521:xe" username="oracle"
password="oracle" maxActive="20" maxIdle="10" maxWait="-1" />
</Context>
3. no need to edit TOMCAT_HOME\conf\server.xml or WEB-INF\web.xml.
Hope this helps
bye

Similar Messages

  • Running both Tomcat and Oracle !

    Can anyone tell me how to setup Tomcat and Oracle on the same machine so that they both can be accessed through port 80.
    I am using Tomcat 5.0.24 and Oracle 9i.
    I would be glad if anyone can send me links to useful resiurces !!!
    Thanks !!!!

    Hi,
    Thank you much for your reply.
    Right now I am running my Tomcat on port#7000. I want it to run on port#80 because my network admin has set firewall on port#7000.
    Do u know anyway of connecting Tomcat and oracle so that they both can run on same port or is there any other way out ?????
    Thanks !!!

  • Java application (tomcat) and Oracle RAC 10gR2

    Hi, I have an Oracle RAC 10gR2 (10.2.0.3) on Suse Linux Enterprise Server (3 nodes).
    I have several application running on tomcat 5.X and tomcat 6.X with java 1.5 and java 1.6. Sometimes, because of hardware fail, network problems,... one of the nodes fails, and then the other 2 nodes still working and my database is up. However, the most of applications lose the connection with the database, and I must to restart the tomcat. I want to have a system more reliable and robust, and I want to prepare the tomcat's and java application for prevent it. I have read the http://drdobbs.com/java/222700353?pgno=1 and http://db360.blogspot.com/2007/01/is-your-java-application-failoverproof.html. I've been tried the example of the first url, but I don't connect with my database. However, I've probe the sample on another oracle rac (10.2.0.4) and it works. In the samples, it use the ucp.jar (11g) and ons.jar (10g) and ojdbc6.jar (11g driver).
    Anyone can help me how can I configure my application for I must not to restart the tomcats??
    Thanks you very much!!.

    The best solution for your problem is ORACLE SUPPORT.. Please raise an SR and coordinate with them.. GoodLuck!

  • Bean differences between tomcat and oracle

    All I have created a session bean in a servlet and am trying to use it in a jsp page. On my localhost I am using Apache Tomcat 4.0 and everything works fine. In my test environment I am using oracle9i's app server and I am getting a "java.lang.ClassCastException: class" exception.
    Code snippets follow - If anyone can help I would appreciate it.
    Thanks in advance
    Servlet snippet
    public class index extends HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,
    IOException
    try{
    res.setContentType("text/html");
    PrintWriter out = res.getWriter();
    HttpSession session = req.getSession(true);
    WebModel model = (WebModel)session.getValue("model");
    if (model == null) {
    model = new WebModel();
    session.putValue("model", model);
    jsp use bean snippet
    <jsp:useBean id="model" class="ngtvsmodel.WebModel" scope="session"/>
    <jsp:setProperty name="model" property="*"/>

    Does this make any sense to anyone??
    I have been banging my head against the wall all day.
    Please help.

  • Storing / Retrieving PDF using JSP and Oracle

    Dear All
    I am building web application using Macromedia Dreamweaver , using JSP , Tomcat and Oracle 10gR1.
    I need to build a JSP to upload a PDF file to the database and have a way to retrieve it from the database ,, all through JSP .
    I need hints about the building architecture and how it is done ,, samples of code will be great.
    Thank You Very Much

    Use JSP, Servlet and some third party API (Apache Common File Upload) to store the PDF document in blob column.
    --Balaji S                                                                                                                                                                                                                                                           

  • Apache 2, Tomcat 4 and Oracle's XSQLServlet not working together

    Hi
    I cannot even get the basic demos in ./demo/java/xsql to work with this combination of technologies.
    I am running this on Red Hat Linux 8. Apache and Tomcat work fine, the CLASSPATH is set and I have created the Alias etc.
    I believe that the .xsql type is not being processed by my XSQLServlet, because calling up http://localhost/xsql/ brings up 3 raw xsql files in the browser.
    All the documentation I have found describes using XSQL with older Apaches and JServ. JServ is now replaced by Tomcat and Tomcat 4 is much different from earlier versions of Tomcat. Despite that I believe I have guessed and made the correct changes to httpd.conf and web.xml to make the XSQLServlet work.
    Has anyone got these to work ? I've been at this for days and am driven half mad by it ! All that has kept me at it is that this seems like a magnificent combination of technologies. Many thanks in advance... for any advice at all.
    - Des

    AndyRTR wrote:Please check the new libreoffice version in testing. It should work with openjdk6 and jre7-openjdk. Not sure if closed
    Oracle jre7 from AUR will also get detected.
    Thanks for the info. Yaourt -Syu will be my friend
    Java7 is recognized, great. Too bad java web plugin could be blacklisted because of security matters.
    Last edited by fredbezies (2011-10-05 14:58:07)

  • Tomcat 7 and Oracle 11g

    Hello Everyone,
    I am facing a strange issue with tomcat 7 connectivity with Oracle 11g. I am using the below versions
    JDK1.7.0_03
    Tomcat 7
    Oracle 11g
    I used to connect to oracle9 with the thin driver, everything was fine, but when I try to connect to 11g, tomcat throws the error CONNECTION REFUSED. I created a seperate standalone java application to test the connection with the same peice of code, and I can see Oracle sends the connection, but with Tomcat 7 it throws the error. I have placed all the correct jar files in the tomcat lib directory and classpath. I am little lost as it works well as an individual application but not from Tomcat. No exception or other error is thrown by Tomcat
    Can anyone help me on this
    Thanks in advance

    926901,
    I am havnig what I think is a very similar issue. I am brand new to java and to configuring any kind of server at all. I am using the versions below:
    JDK 1.7.0_04 - on my local machine
    JRE 7 - on my local machine
    Tomcat 7 - installed on my local machine
    Oracle 11g - on a different server on my company's network
    I created a login page using scriptlets in a jps file and could connect using the following, but it is not on a tomcat server (on my company's development box):
    String dbURL = "jdbc:oracle:thin:@10.5.20.101:1521:myDB";
    String dbUser = "*****";
    String dbPass = "*****";
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection(dbURL,dbUser,dbPass);
    I am now trying to do the same login, connecting to the same DB (same url/UN/PW) using servlets from the tomcat server on my machine. I am writing the code in Eclipse also, and have pointed eclipse to the JDK and JRE folders. You mentioned that you have placed all the correct jar files in tomcat lib directory. Would you please tell me what jar files you used? I am finding a lot of people saying I need to put the oracle driver into the WEB-INF/lib folder directly in the specific web app, and some say it is fine in the tomcat lib folder, and I am seriously frustrated with it. I am not sure if I should be using the class12.jar file or the ojbdc14.jar file either. Please, any advice you can give me would be appreciated. I have been going in circles for days and nothing seems to let me connect to the DB from a servlet running in Eclipse on tomcat. The code I am trying to use on tomcat in the servlet is:
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.*;
    public class ConnectionManager
         static Connection con;
         static String dbURL;
         public static Connection getConnection()
              try
                   String dbURL = "jdbc:oracle:thin:@//10.5.20.101:1521:myDB";
                   String dbUser = "*****";
                   String dbPass = "*****";
                   // assuming "DataSource" is your DataSource name
                   Class.forName("oracle.jdbc.OracleDriver");
                   DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
                   //try
                        con = DriverManager.getConnection(dbURL,dbUser,dbPass);
                   //catch (SQLException ex)
                   //     ex.printStackTrace();
              catch(ClassNotFoundException e)
                   System.out.println(e);
              return con;
    }

  • [svn:bz-trunk] 17133: this time finally (and hopefully) adding all the flex-messaging-opt tomcat/jrun/oracle/weblogic/ websphere servers maven pom files in the right svn folder.

    Revision: 17133
    Revision: 17133
    Author:   [email protected]
    Date:     2010-07-30 02:01:44 -0700 (Fri, 30 Jul 2010)
    Log Message:
    this time finally (and hopefully) adding all the flex-messaging-opt tomcat/jrun/oracle/weblogic/websphere servers maven pom files in the right svn folder.
    Added Paths:
        blazeds/trunk/modules/opt/poms/oracle/
        blazeds/trunk/modules/opt/poms/oracle/pom.xml
        blazeds/trunk/modules/opt/poms/tomcat4/
        blazeds/trunk/modules/opt/poms/tomcat4/pom.xml
        blazeds/trunk/modules/opt/poms/tomcat6/
        blazeds/trunk/modules/opt/poms/tomcat6/pom.xml
        blazeds/trunk/modules/opt/poms/weblogic/
        blazeds/trunk/modules/opt/poms/weblogic/pom.xml
        blazeds/trunk/modules/opt/poms/websphere/
        blazeds/trunk/modules/opt/poms/websphere/pom.xml

  • Errors when using tomcat and netbeans combo.[Solved]

    Hi I'm trying to set up a netbeans/tomcat7 development environment for servlet development.
    I have tried this on 2 machines without any success.
    The steps I have followed are as follows.
    First I installed tomcat7 and netbeans from using pacman, then to be able to configure tomcat from netbeans I made the config files write permission 777, as it's just a development server security is not an issue.
    From there I started up netbeans started a new project and set the server to tomcat and pointed the Catalina home dir to /usr/share/tomcat7.
    When I try to run the example jsp project I get the following error:
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler available
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:392)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    root cause
    java.lang.IllegalStateException: No Java compiler available
    org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:226)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:636)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    I've spent the last couple of days trying to find any information on this but I cant find anything, so any advice would be much appreciated.
    Last edited by darkclown (2011-12-01 05:15:23)

    From the error, it appears that there is no JDK installed - only a JRE, could that be the case? If you do have a JDK installed, then Tomcat is not finding it.
    I would also not run this on the openJDK, in case you are doing that. I would use the proprietary Oracle/Sun JDK. It's in the AUR, or simply download it from Oracle.
    I was not even aware that netbeans and tomcat are available from pacman. I always "install" those myself manually (i.e. unpack them into a folder). They are simply Java apps that can be installed anywhere, as long as you point them to a valid JDK.

  • Using tomcat with Oracle database?

    I am having some difficulty setting up Tomcat 6.0.16 with JDeveloper 10 and Oracle - I have with the kind help of people here found this:
    ADF-BC4J + MySQL 5 + Tomcat 6
    Which helps me some of the way, but it is for MySQL, not Oracle, and I don't know things well enough to change the XML in a meaningful way.
    I did try to install MySQL, but not extremely hard - I would prefer to use Oracle, anyway. Are there any instructions about how to do this for an Oracle database?

    Please refer
    http://www.microdeveloper.com/html/JNDI_Orcl_Tomcat1p.html
    http://www.akadia.com/download/soug/tomcat/html/tomcat_apache.html#Deploying%20Servlets
    http://www.hansbergsten.com/contrib/solaris-oracle-howto.html

  • Access Manager Policy Agent and Oracle AS

    Hi,
    my system uses Oracle Application Server. The security dept use Sun Access Manager. I need to integrate the security of the Oracle system with the policy agent. Where this gets a little confusing is that one of my developers tells me that this is difficult to implement and that Sun arent planning on supporting the Oracle AS in future.
    What I would like is some clarification from the horses mouth so to speak. In particular is it possible to integrate the policy agent and Oracle AS, and are Sun committed to supporting and developing for this.
    Thanks,
    Andy.

    "Where this gets a little confusing is that one of my developers tells me that this is difficult to implement"
    "it is NOT an implementation but an integration ! difficult ? why ?"
    "and that Sun arent planning on supporting the Oracle AS in future."
    There is a PA 2.2 for Oracle 10g ! It is the latest version(2.2 I mean). I don't see any reasons why Sun should not continue. But it is ONLY my point of view...
    "What I would like is some clarification from the horses mouth so to speak. In particular is it possible to integrate the policy agent and Oracle AS, and are Sun committed to supporting and developing for this."
    Of course it is possible because you can find the PA that will integrate your Oracle AS with a Sun AM.
    1) Please read the documentation.
    http://docs.sun.com/app/docs/coll/1322.1
    Download the one for Oracle and read also the user guide.
    PA are very easy to integrate if you know what you do... Espec. und. the AM auth and sso... If you can be helped by a AM guy from your comp. it is welcome... It is a j2ee agent and of course the PA will make what is necessary to redirect you to AM at login time and later to auth. your request...2)
    2) Download the soft and do the job :-)
    Product Downloads
    Sun Java System Access Manager Policy Agent 2.2 for Oracle Application Server 10g
    http://www.sun.com/download/products.xml?id=455d52ed
    I did plenty of int. with Sun/Bea/Tomcat AS(don't forget there are also webserver agents like Apache PA) with AM and it is not a big deal. Not Oracle, but it is an AS and I don't see why it should be difficult...
    Hope this helps a bit.

  • Oracle Linux 6 and Oracle DB for ERP System

    All,
    I have a few questions about using Oracle Linux 6 and the Oracle Database for our ERP Server. We are using a System that run off of Appache httpd and Tomcat and connects to an Oracle Database. We currently are running as a hardware installed server, with Oracle Linux 5 and 10gR2. We are looking to migrate to a Virtual environment as we run VMWare for all our other Servers and services. I have started the install of a development/test system. I wanted to install Oracle Enterprise Linux 6 x86_64 along with either 10gR2 or 11gR2. I noticed that 10gR2 was not certified on OEL6 hence why the thought of moving to 11gR2. The one issue I have is the ERP system is not a x86_64 system is there any way of running 32 bit apps on a 64bit OEL install? I would need to compile a few small 32bit C code programs so would need 32bit libs to compile against. Any support would be greatly appreciated. I know that OEL has an i386 install but I also know that the x86_64 has more support for Oracle DB.
    P.S.
    Our ERP System is programmed via a small company that does not certify anything. They have taken the approach if it works it works (not happy with this but it is what it is). So the main issue is I need to get Appache Httpd, Tomcat running along with ability to compile a few small 32bit apps.
    Edited by: Rever75 on May 7, 2012 1:45 PM

    x86-64 is an extension of the x86 32-bit CISC instruction set. The 64-bit extension provides support for long mode to address larger virtual and physical address spaces.
    You can generally run 32-bit applications on a x86_64 bit CPU and a x86_64 kernel, provided you have the appropriate i386 libraries installed. When you install Oracle 11gR2 11.2.0.1 for x86_64, appropriate i386 libraries are a prerequisite.
    Since x86 on a x86_64 CPU is still hardware, there will be no performance penalty to run 32-bit application. Btw, you cannot run 64-bit applications using a i386 kernel. The only exception I know is Mac OS X.

  • Need Help in JNDI Datasource using tomcat and spring

    Hi,
    I am trying to connect my local database using JNDI datasource in tomcat and spring
    I have done the below configuration in Tomcat 7 server:
    In tomcat server.xml (Path: E:\apache-tomcat-7.0.35\conf) I added the below configuration
    <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" />
    <Resource name="jdbc/myApp" auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:oracle:thin:hr@localhost:1521:XE>"
    username="testUser" password="password"
    maxActive="10" maxIdle="5"
    maxWait="60000" removeAbandoned="true"
    removeAbandonedTimeout="60" logAbandoned="true"/>
    In web.xml, I have added the below config:
    <resource-ref>
    <description>Oracle Spring JNDI Datasource</description>
    <res-ref-name>jdbc/myApp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    And in my Spring context xml (ws-context.xml), added below config:
    <bean name="myDataSourceInJndi" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="java:comp/env/jdbc/myApp"/>
    </bean>
    <jee:jndi-lookup id="dataSource" jndi-name="/jdbc/myApp" resource-ref="true"/>
    In my Java code, I am trying the below code to connect DataBase:
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    DataSource ds = (DataSource) envCtx.lookup("jdbc/myApp");
    ds.getConnection();
    But I am getting the below exception while executing ****ds.getConnection();***
    java.lang.IllegalStateException: Connection factory returned null from createConnection
    at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:584)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.wipro.spring.impl.EmployeeImpl.getDetails(EmployeeImpl.java:57)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246)
    at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
    at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
    at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:471)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
    at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
    at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
    at com.sun.xml.ws.transport.http.servlet.WSSpringServlet.doPost(WSSpringServlet.java:52)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Can you please me to resolve this issue? Am I missing any configuration or any mistake in my java code please suggest your suggestions.
    Thanks

    Hi,
    I am trying to connect my local database using JNDI datasource in tomcat and spring
    I have done the below configuration in Tomcat 7 server:
    In tomcat server.xml (Path: E:\apache-tomcat-7.0.35\conf) I added the below configuration
    <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" />
    <Resource name="jdbc/myApp" auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:oracle:thin:hr@localhost:1521:XE>"
    username="testUser" password="password"
    maxActive="10" maxIdle="5"
    maxWait="60000" removeAbandoned="true"
    removeAbandonedTimeout="60" logAbandoned="true"/>
    In web.xml, I have added the below config:
    <resource-ref>
    <description>Oracle Spring JNDI Datasource</description>
    <res-ref-name>jdbc/myApp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    And in my Spring context xml (ws-context.xml), added below config:
    <bean name="myDataSourceInJndi" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="java:comp/env/jdbc/myApp"/>
    </bean>
    <jee:jndi-lookup id="dataSource" jndi-name="/jdbc/myApp" resource-ref="true"/>
    In my Java code, I am trying the below code to connect DataBase:
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    DataSource ds = (DataSource) envCtx.lookup("jdbc/myApp");
    ds.getConnection();
    But I am getting the below exception while executing ****ds.getConnection();***
    java.lang.IllegalStateException: Connection factory returned null from createConnection
    at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:584)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.wipro.spring.impl.EmployeeImpl.getDetails(EmployeeImpl.java:57)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246)
    at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
    at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
    at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:471)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
    at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
    at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
    at com.sun.xml.ws.transport.http.servlet.WSSpringServlet.doPost(WSSpringServlet.java:52)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Can you please me to resolve this issue? Am I missing any configuration or any mistake in my java code please suggest your suggestions.
    Thanks

  • Latest News on MDX and Oracle OLAP  (from Simba Technologies)

    [http://blogs.simba.com/simba_technologies_ceo_co/2009/05/mdx-query-language-for-oracle-11g-olap-update.html|http://blogs.simba.com/simba_technologies_ceo_co/2009/05/mdx-query-language-for-oracle-11g-olap-update.html]
    Excerpt from above Simba Technologies CEO blog*
    One interesting thing we found from some of the Beta customers is that they thought this was an Excel only solution. Yes, we are focusing all the efforts for v1 on Excel, but this is planned to be a full blown MDX provider for Oracle OLAP*. Therefore, you will get the entire MDX query language and this interface will be similar to what you have with Microsoft Analysis Services or SAP Business Warehouse. Although v1 will be ODBO only, we are planning to support XMLA in future versions. The priorities for what we support and when will be customer driven. One question I have is after Excel, which MDX application do you think we should test with and support next:
    1. SAP Business Objects Crystal Reports
    2. SAP Business Objects Voyager
    3. MicroStrategy 9
    4. Microsoft Reporting Services
    5. Microsoft SharePoint BI
    6. IBM Cognos Business Intelligence 8
    7. Panorama NovaView
    .

    Thanks very much for your response. Pls find the details as requested. You can reach me in [email protected]
    Environment Details
    - BO XI 3.1 SP4 Enterprise Premium (incl Voyager) on Win2008 R2 [Tomcat Flavour]
    - Oracle 11.2.0.1 Enterprise Edition with OLAP on AIX 6.1
    - Simbha MDXProviderForOracleOLAP v2.1.0.23 on Win2008 R2
    Cubes are built using AWM 11.2.0.2A.
    To be more specific, the issue occurs when we attempt put a filter on the dimension (or select members of the dimension) both in the existing workspaces or when we try to create a new workspace in Voyager. Attaching the screenshot of the error message.
    Kindly let us know incase you would require further information. Also, if you would like to have a webex session where I can show the issue, I am happy to do the same.
    Edited by: user1572606 on Jan 4, 2012 9:00 PM

  • Integrate tomcat and JDeveloper10.1.3

    hello
    can anybody help me in how to run/integrate non-oracle application sever (i.e, Tomcat . . .)using JDeveloper .Please give exact info if u r sending any links.Its very Important.

    Re: Jdevelopper and Integrated Tomcat and JSP/jscript DEBUG search informat
    The online help has more info - just do a search for Tomcat...
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state?oldNavSetId=_&oldNavId=2&navId=2&vtTopicFile=&navSetId=_&value=1&sPhrase=&action=search&locale=&searchType=simple&phrase=tomcat&event=update&source=M__Id

Maybe you are looking for

  • Table Issue: Cannot Distribute Columns Evenly

    I have a 3x3 matrix that does not Distribute Columns Evenly when the action is performed. It spaces the columns asymmetrically causing the content to fall off the page. I checked and rechecked all of my formating (tabs, alignment, etc...) and setting

  • Delete button for some photos in the moments tab is disabled

    Several of my photos after the ios8 update are unable to be deleted. I select them but the trash button is disabled. If I open them individually the trash button is not there in the bottom right. Please help. very annoying.

  • Controling document functions from within an iframe

    I'm interested in embedding a pdf document within an HTML iframe along with an iframe panel where i could manipulate the document via javascript.  I've been told that this is possible by inserting some javascript on both the document and the panel if

  • Regarding BADI CRM_ISA_BASKET_ITEM

    Hi Gurus, I am trying to implement method CHANGEITEMS_SET_DATA of BADI CRM_ISA_BASKET_ITEM. We have added some fields in ISA web front and we are trying to pass these fields with value as name value pair ( xml format ) in a single string to CRM syste

  • 1Z0-051 exam

    Hi guys, im writing 1Z0-051 next week, any tips about the latest questions,please help guys. my email is [email address removed by moderator for security purposes]. Thank you Edited by: Brandye Barrington on Dec 6, 2012 11:12 AM