Set up DataSource on Tomcat

Hi,
I'm porting my faces app to Tomcat 5.5.9.
I create a DataSource in the tomcat/admin tool. I've got 2 questions: do I specify "com.sun.sql.datasource.DriverAdapter" as the driverClass (just like in SunOne8)?
Also, which .jar is this class located in? I can't work out where it is and I presume I need to put it in my catalina_home/common/libs directory.
thanks
john

Hi,
This link may help you:
http://wiki.java.net/bin/view/People/DeployingCreatorApps
Thanks,
Creator Team.

Similar Messages

  • How to configure Oracle Datasource in Tomcat

    Hello,
    My configuration of a Tomcat Datasource (oracle) appears to be wrong. Either that or my oraclejdbc.jar file is in the wrong place. Perhaps my classpath setting is wrong. Any help is appreciated.
    Tomcat console error:
    20070423 20:46:22.514 http-8080-Processor24(0x005878d2)
    JdbcUtil#getDataSourceObject() Throw com.waveset.util.ConfigurationError: Failed to load JDBC DataSource 'java:comp/env/jdbc/wrsPool':
    ==> javax.naming.OperationNotSupportedException: Can't generate an absolute name for this namespace
    Trace output from JdbcUtil:
    XPRESS exception:
    Can't call method getDataSourceObject on class com.waveset.util.JdbcUtil ==> com.waveset.util.ConfigurationError: Failed to load JDBC DataSource 'java:comp/env/jdbc/wrsPool': ==> javax.naming.OperationNotSupportedException: Can't generate an absolute name for this namespace
    XPRESS exception:
    Can't call method queryRecords on class com.waveset.util.JdbcUtil ==> java.lang.NullPointerException:
    The express code used to call JdbcUtil follows:
    <defvar name='dataSource'>
    <new class='javax.sql.DataSource'/>
    </defvar>
    <set name='dataSource'>
    <invoke name='getDataSourceObject' class='com.waveset.util.JdbcUtil'>
    <null/>
    <s>java:comp/env/jdbc/wrsPool</s>
    <null/>
    </invoke>
    </set>
    The Tomcat configuration *.xml file
    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="wavex" path="/wavex" useNaming="false" workDir="work\Catalina\localhost\wavex">
    <Resource name="jdbc/waveexPool " type="javax.sql.DataSource"/>
    <Resource name="jdbc/wrsPool" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/waveexPool ">
    <parameter>
    <name>url</name>
    <value>jdbc:sqlserver://localhost:1433;DatabaseName=WaveEx</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value></value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value></value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="jdbc/wrsPool">
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:thin:@vega.vf.lmco.com:1521:dev2</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value></value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value></value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    </ResourceParams>
    </Context>
    Environment is:
    IDM 7.0 on Windows 2000, sql server houses the repository.
    Tomcat 5.0.28 with JDK 1.6

    thanks for the reply, i have configured the connection pool settings in the tomcat.
    I created a class with static method, which will return the connection object.
    whenever i need the connection object, iam invoking the static method, once its usage is over iam closing thew connection..
    is it the right way of using the connection object in the web application.

  • Help Needed : Setting JDBC Datasource in Crystal XI using Sybase 12.5??

    All,
    We are migrating our systems to the Crystal XI from Crystal 9 Reporting Servers. I need some technical assistance on the Java API ( use of the Datasources) .
    Problem: Currently in Crystal 9 we are using OLEDB datasources to connect to various Sybase 12.5 databases (which is been set programmatically at runtime). After I changed the Java code for getting the report object from the Crystal XI server instead of 9.  I stared facing the dbLogon failed exceptions.. But surprisingly it does work randomly on only one datasource for a given session (AppServer Restart).
    Need Help on Topics:
    1. Is there any different way of configuring/usage the OLEDB datasources for CrXI? or any Java API changes while setting the datasource when using OLEDB?
    2. Configuration required for using Simple JDBC connection (Sybase) instead of OLEDB? Can I get detailed help on this.
    I will prefer using JDBC for CrXI using the Sybase 12.5, but there are very less documentation for how to configure and set databases at runtime.
    Many Thanks in Adv.
    Regards - Sudhir Deshmukh | Solutions Lead

    Hi Sudhir,
    For Building up a connection for OLEDB  we need :
    In order for Crystal Reports to connect to a database through OLE DB, there are some requirements that must be met:
    u2022     The database client software must be installed on the client machine.
    u2022     The client machine must be able to connect to the server from its client software
    u2022     The client softwareu2019s working directory (example. c:\orant\bin) must be in the Windows search path
    u2022     The OLE DB provider must be installed on the local machine.
    We have the connection for crystal reports through OLEDB :
    The process by which Crystal Reports access data from an OLE DB data source consists of these five layers:
    Crystal Reports Layer
    OLE DB Translation Layer
    OLE DB Layer
    DBMS Translation (OLE DB provider) Layer
    Database Layer
    The data translation is similar to the ODBC connection model. Crystal Reports uses CRDB_ADO.DLL to communicate to the OLE DB provider, which communicates to the database. Crystal Reports can connect to any database as long as that database has an OLE DB provider.
    When creating a new report in Crystal Reports, OLE DB data sources are found in the Create New Connection folder with the OLE DB (ADO) connection.
    Regards,
    Naveen.

  • How does one set databse parameters in Tomcat to run a servlet?

    Hi, I am trying to run a applet-servlet code, downloaded from the web. According to the installation instructions, the following is stated:
    Database Parameters. You can provide different database parameters to the servlet. These parameters are set during the administration of the servlet.
    dbDriver - name of the database driver class name (default = sun.jdbc.odbc.JdbcOdbcDriver)
    dbURL - complete database URL (default = jdbc:odbc:StudentDatabase)
    userid - user id (default = <none>)
    passwd - password (default = <none>)
    I am running TOMCAT on a Windows2000 machine. My question is how to does one set the parameters in TOMCAT. What is the default userid and password for TOMCAT.
    Any help/advise is appreciated in advance. Thanks.Regards.

    May be parameters must be set in web.xml in your war

  • How do set operation timeout in tomcat server?

    hi all
    suppose i have one endless loop program(jsp) that program run under tomcat server,
    so it's keep on runing in tomcat server.
    i want, after some time the server send error message like operation timeout.
    how do set operation timeout in tomcat server?
    if anybody know help me.
    my mail id [email protected]

    Well, the server.xml file has connection time outs, but that is for idle time, I think... I'm not sure what would happen in a loop... , especially if you are sending some data back to the client in each iteration. Generally you shouldn't be starting a loop that will really run forever. Maybe have some type of counter to break out if something hasn't occurred within x iterations, or create a separate thread that can sleep for x seconds and set a flag to break the loop after that time.

  • 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

  • How can I configure ang use JNDI datasource on Tomcat 4.0.x ?

    How can I configure ang use JNDI datasource on Tomcat 4.0.x ?
    Please help me , Thanks !

    Hello ,
    You need to go through the JNDI tutorial which you can access at the sun's site. It will explain all the things you need.
    By the way all you want to use JNDI datasource is JNDI class library and some naming or directory service provider, which also you can download from sun.
    Good Luck.

  • JNDI DataSource on Tomcat 4.1.27

    I am running Tomcat 4.1.27 with JVM 1.3.1_07-b02 on WinXP and I am trying to connect to an Oracle 9i database. I have a datasource setup and when I supply a username and password in the datasource everything connects fine. However, I need to be able to pass the username and password from my application to the datasource for authentication. Whenever I try DataSource.getConnection(username,password) I get an "java.lang.UnsupportedOperationException" exception. I also tried using the BasicDataSource.getConnection(username,password) method with the same results. Here is a bit of the stack trace:
    java.lang.UnsupportedOperationException
         at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:125)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:329)
         at foo.Login.loginSuccess(Login.java:45)
    Can I get explicit instructions on what I need to do to be able to pass the username and password to the datasource? Is there another/better way to do this? Thanks.

    The problem is that the JNDI data source pool is set up when your app is loaded into Tomcat. You're giving it a username/password in the context.xml to set that up, then the pool is loaded with connections based on that startup password.
    I think it's failing because on subsequent calls you're giving it the individual's username/password, which are different from the one used to set up the connection pool.
    If you want to authenticate the users against the database without a separate table, I think you have to give up the advantage of having a connection pool and create a new connection for each user. It's a design choice: is it better for your app to have a separate username/password table and a connection pool or to use the Oracle authentication and have to create a connection each time? Your call. - MOD

  • Problem setting up JNDI on tomcat 5.5

    Hi,
    I have a problem setting up JNDi in my application, I looked for all topics on this forum about setting up JNDI on tomacat, but I didn't figured out what is wrong, or what I did wrong, so if anyone can help me, here is the content of my xml files:
    META_INF/context.xml :
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/probaWeb" reloadable="true" debug="5"
    docBase="probaWeb"
    crossContext="true">
    <Resource name="jdbc/probadb" auth="Container"
    type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="root" password="majica"
    driverClassName="com.mysql.jdbc.Driver"
    factory = "org.apache.commons.dbcp.BasicDataSourceFactory"
    url="jdbc:mysql://localhost:3309:probadb?autoReconnect=true"/>
    </Context>
    hibernate.cfg.xml:
    <property name="connection.datasource">
    java:comp/env/jdbc/probadb
    </property>
    <property name="show_sql">true</property>
    <property name="dialect">
    org.hibernate.dialect.MySQLDialect
    </property>
    <property name="current_session_context_class">thread</property>
    <property name="cache.provider_class">
    org.hibernate.cache.NoCacheProvider
    </property>
    <mapping resource="com/probaapp/web/pojo/Proba.hbm.xml"/>
    </session-factory>
    I placed mysql-connector-java-5.0.4-bin.jar in common/lib
    and when I run my application I get the following error:
    Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql://localhost:3309:probadb?autoReconnect=true'
    can anyone hlp me?
    Thnx

    Hi,
    I have a problem setting up JNDi in my application, I
    looked for all topics on this forum about setting up
    JNDI on tomacat, but I didn't figured out what is
    wrong, or what I did wrong, so if anyone can help me,
    here is the content of my xml files:
    META_INF/context.xml :
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/probaWeb" reloadable="true"
    debug="5"
    docBase="probaWeb"
    crossContext="true">
    <Resource name="jdbc/probadb" auth="Container"
    type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="root" password="majica"
    driverClassName="com.mysql.jdbc.Driver"
    factory =
    "org.apache.commons.dbcp.BasicDataSourceFactory"
    url="jdbc:mysql://localhost:3309:probadb?autoReconnect
    =true"/>
    </Context>
    hibernate.cfg.xml:
    <property name="connection.datasource">
    java:comp/env/jdbc/probadb
    </property>
    <property name="show_sql">true</property>
    <property name="dialect">
    org.hibernate.dialect.MySQLDialect
    </property>
    <property
    name="current_session_context_class">thread</property>
    <property name="cache.provider_class">
    org.hibernate.cache.NoCacheProvider
    </property>
    <mapping
    resource="com/probaapp/web/pojo/Proba.hbm.xml"/>
    </session-factory>
    I placed mysql-connector-java-5.0.4-bin.jar in
    common/lib
    and when I run my application I get the following
    error:
    Caused by:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException:
    Cannot create JDBC driver of class
    'com.mysql.jdbc.Driver' for connect URL
    'jdbc:mysql://localhost:3309:probadb?autoReconnect=tru
    e'
    can anyone hlp me?
    Thnxchanging to "
    <property name="connection.datasource">jdbc/probadb </property>
    may work.

  • Dynamically set database url using tomcat jndi

    By using Tomcat JNDI, database url information needs to be hardcoded in server.xml file according to the documentation. Is there a way to change the URL information in the code dynamically if necessary?
    And also we need multiple connection pools and the connection information about those pools are only known during run time. So the TOMCAT JNDI is still the right way to go???
    By the way, does anybody ever use tomcat DBCP package to get datasource and set url dynamically?
    Thanks in advance.

    By using Tomcat JNDI, database url information needs
    to be hardcoded in server.xml file according to the
    documentation. Is there a way to change the URL
    information in the code dynamically if necessary?
    Not that I know of.
    And also we need multiple connection pools and the
    connection information about those pools are only
    known during run time. So the TOMCAT JNDI is still the
    right way to go???
    I think so. Since it's just a JDNI lookup, perhaps you can set up multiple data sources and decide on the lookup name at the last minute, depending on circumstances. That might work. I haven't tried it myself. - MOD
    By the way, does anybody ever use tomcat DBCP package
    to get datasource and set url dynamically?
    Thanks in advance.

  • Setting in Datasource (Format Column)

    Hi,
    I am a learner in BI.
    How can i Change the format External to Internal in DataSource.
    I was trying to load the data from Flat File to Infocube.
    while activating DataSource i got an error.
    ERROR: Field NAME ( Position 2 ): no conversion exit entered
    Then i see the format is External and tried changing to Internal, but it is not changing.
    I tried by changing the DataSource to edit mode and reactivated. After activation i have checked the DataSource, the format din't change. Again it shows external.
    I am wondering is there anything to be done while creating InfoObject itself,
    why the format is set to External  by itself.
    The InfoObject Data type is Char.
    Regards,
    CM

    Hi Shiging,
    When using datasource concept (7.0), you go into change mode and can change the settings.
    When using emulated 3.x source, you can recognise via little square in front of description, you have to set these in the transfer rules.
    SS convert routine is just an indication which conversion routine is assigned to the source field.
    Convert routine is the conv. rout. assigned to the infoobject. When storing data, it will convert to internalm format, when displaying, convert to external.
    Hope this helps.
    Regards,
    Olav

  • Crystal Reports 2008 - Error setting new datasource location

    Hi All,
    We are experiencing an issue while trying to set datasource location for our RM 3.0 reports in Crystal Reports 2008 designer. As per guide "SAP BusinessObjects Process Control 3.0 and Risk Management 3.0 - How to build and Personalize Custom Crystal Reports" (step 11), after opening the desire report we go to DataBase-->Set DataSource Location and when selecting our RM system (which actually has the BI content addon installed on it), we got the following error message:
    "Some tables could not be replaced, as no match was found in the new data source. Please verify the table required for any unmodified tables"
    I'm new on this so I'm not sure if the table indicated in the original datasource should exist in my DB (new datasource) before doing this? If so, how those tables are imported or created in our DB?
    Could you please help me on this issue?
    Please let me know if any other detail or data is required.
    Regards

    Hi Don,
    Thanks for the update.
    Actually I've installed SAP Integration Kit and its Fixpack in both....BOE Server (which is the same as the SAP server) and in client pc.  In all cases we have select a typical installation which supposes the required drivers are available. Also I've followed Ingo's documentation to activate and publish standard Risk Management reports (RM reports). Everything works ok with them. We are able to access reports through the application.
    The issue appears when trying to customize one of these standard reports through CR Designer. For example if we select the "GRRM_Risk_by_Risk_Category" and try to customize it as indicated in the "SAP BusinessObjects Process Control 3.0 and Risk Management 3.0 - How to build and Personalize Custom Crystal Reports"...the table behind this report (table GRFN_CY_API_GRRM_R1) it's not in our RM System. My main concern or question is regarding this....Did I miss something while importing transports files, activating or publishing RM reports, etc....and thatu2019s the reason why this (and any other) table is not already in my system? I was not able to find where those tables are supposed to be or how they should be imported in my system. The odd thing is...that we are trying to customize and set the new data source for these reports to the same system from where they are being opened. Put in this way...RM reports have been activated in system A (RM System) and published to system B (BOE System). While customizing reports through CR Designer...we are actually opening reports from system A. These reports have as their original data source...a demo SAP system info (uxcir1p.wdf.sap.corp) and when we want to update this data source with our RM system....the error appears. The whole process is explained in the above mentioned guide for your reference.
    Hope being clear enough..
    Thanks for your help

  • How to use Set type datasources ?

    Hi,
    Our team has recently implemented CRM for one of our clients and now are integrating BW with CRM. Thus are developing corresponding objects in BW.
    In CRM, the team has created many set types and made those BW relevant as a result system created datasources for each attribute of the set type.
    Has anybody used set types to extract data into BW?
    Regards,
    Vikrant.

    Hi
    go to this guide
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
    and see the chapter
    "Designing Scripts for use with the Cisco Application Gateway"

  • How do I set this up in Tomcat ?

    got an example applet-servlet comm of the internet. But i dont know how to set it up.
    The applet requests the current date from the servlet. It is then returned and the data should be displayed client side.
    here is the code ....
    Servlet.
    // a servlet that returns the current time to an applet
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class daytimeservlet extends HttpServlet
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();
    out.println(new java.util.Date().toString());
    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
    doGet(req,res);
    Applet
    import javax.swing.*;
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    * @author vgowri
    * @version
    public class daytimeapplet extends java.applet.Applet implements ActionListener {
    TextField dt = new TextField();
    Label dl = new Label("The Daytime : ",Label.RIGHT);
    Button db = new Button("Get the Time");
    /** Creates new daytimeapplet */
    public void init()
    setLayout(new BorderLayout());
    add("West",dl);
    add("Center",dt);
    db.addActionListener(this);
    add("South",db);
    //pack();
    setVisible(true);
    public void actionPerformed(java.awt.event.ActionEvent p1) {
    dt.setText(getdate());
    private String getdate()
    String ts="";
    String argstring="",urlString="";
    try{
                   urlString = getParameter("servletURL");
    //Reading Servlet Data through URL
    URL url = new URL(urlString);
    URLConnection con = url.openConnection();
    con.setUseCaches(false);
    InputStream in = con.getInputStream();
    //Converting the byte data into String and Displaying in the Applet
    BufferedReader result = new BufferedReader(new InputStreamReader(in));
    ts = result.readLine();
    in.close();
    return ts;
    }catch(Exception e)
    System.out.println("Error\n"+e);
    return "Security Imposed.. Unable to read the time from the server";
    HTML file
    <HTML>
    <HEAD>
    <TITLE>Applet Servlet Communication Page</TITLE>
    </HEAD>
    <BODY>
    <H3><HR WIDTH="100%">Applet Servlet Communication Page<HR WIDTH="100%"></H3>
    <APPLET code="daytimeapplet.class" width=350 height=200>
    <param name="servletURL" value="http://localhost/servlet/daytimeservlet">
    </APPLET>
    </BODY>
    </HTML>
    I put it into the the web-apps/ROOT/WEB-INF/classes/ folder and then run the html file which in turn rusn the applet but i just get the error message - "Security Imposed.. Unable to read the time from the server".
    Do i have to put the Applet class file and HTML file into a particular folder ? Are my paths defined correctly in the HTML file ?
    thanks

    First verify that you can call the servlet from the browser by typing http://localhost/servlet/daytimeservlet into the browser's address bar.
    One potential problem is that the above url uses "/servlet". If you did not map the servlet to this URL in the web xml or enable the servlet launcher then the servlet will not work.
    Another potential problem is that you are using tomcat in stand alone mode listening on port 8080 so the url is incorrect.
    If the servlet is working correctly make sure that you are calling the applet HTML page using http://localhost in the url
    One potential problem is that you are using tomcat in stand alone mode listening on port 8080 so the url the applet is accessing is incorrect.
    Another potential problem is that you are accessing the applet's html page with the IP or domain name of the server instead of localhost. The Applet can only connect back to the url that it originated from which in this case would be localhost.

  • Can I set the Datasource/Conn-pool credential programmatically ?

    Hi all,
    Within our ADF BC + Faces application, we use Crystal Report for our reporting solution.
    Crystal use different db connection from one used by the ADF BC. so I create a Datasource in OAS, to be used only by Crystal Report.
    Here is my problem :
    We also use VPD. So I have requirement to login as DifferentUser to make the VPD run correctly.
    How can I programmatically set the username and password of the datasource/conn-pool based on who is logging in to the application ?
    Thank you for your help,
    xtanto

    Good question; I don't know the answer. Try a post in the Identity Management section.
    Perhaps something with Enterprise Authentication may help.

Maybe you are looking for