Share Database Connection

Hi,
Does anyone know if it is possible to share an Oracle database connection between applications?
I have this scenario:
(1) Java application connects to the database
(2) Java application performs some database queries
(3) Java application calls a Cobol application on the same machine and waits for it to complete
(4) Cobol application performs some database queries
(5) Cobol application sends termination indication to the Java Application, then terminates
(6) Java application closes the database connection
Is it possible to transfer the connection handle from the Java application to the Cobol application,
so that Cobol will use that connection and not have to create it's own connection ?
Is it possible if both applications run on different machines ?
Thanks

What, exactly, does "perform it's function in the context achieved by the calling Java app" mean and what is the problem you are trying to solve?
If you are merely trying to coordinate a distributed transaction that involves multiple client applications, Timur's suggestion would be appropriate. Laurent's [DBMS_XA solution|http://laurentschneider.com/wordpress/2008/08/read-uncommitted.html] might provide more "context" depending upon exactly what you mean by that term. There may be other solutions as well, like Workspace Manager, depending on what you are trying to achieve.
Justin

Similar Messages

  • Share database connection among multiple crystal reports using PULL model

    Hi All,
    Is there any way to share database connection using crystal report PULL method ? I m using crystal report 2011 with visual c# (VS2010). Reports get connected to database server using Oracle Native client drivers.
    Thanks,
    Gaurav

    In crystal report 8.5, we have used "PESetNthTableLogonInfo" (after PELogOnServer got deprecated) which shares the connection among reports. Is there any way to implement the same functionality in crystal reports.
    Thanks,
    Gaurav

  • Share database connection between servlets

    hello,
    i need help to know if the following code works well.
    The intention is to share a unique JDBC database connection with all servlets of my application.
    //************************ file Conexao.java ***********************
    // this class makes a databse connection
    import java.sql.*;
    public class Conexao
    Connection conex;
    public void conecta()
    try
    Class.forName("interbase.interclient.Driver");
    conex = DriverManager.getConnection("jdbc:interbase://localhost/c:\\temp\\Kuala.gdb","SYSDBA","masterkey");
    catch(ClassNotFoundException ex) { }
    catch(SQLException ex) { }
    public void desconecta()
    try
    { conex.close(); }
    catch(SQLException ex) { }
    //****************** file SetConnectionContext ****************
    // this class creates an instance of Conexao class and invokes the
    // conecta() method. After, obtain the ServletContext object and
    // set the attribute "conecta" to the ServletContext
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class SetConnectionContext extends HttpServlet
    Conexao connection = null;
    public void init()
    connection = new Conexao();
    connection.conecta();
    ServletContext context = getServletContext();
    context.setAttribute("conecta", connection);
    public void destroy()
    { connection.desconecta(); }
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType("text/html");
    PrintWriter saida = response.getWriter();
    saida.println("<H1>objeto connection atribuido no contexto</H1>");
    //****************** file GetConnectionContext.java ******************
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class GetConnectionContext extends HttpServlet
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType("text/html");
    PrintWriter saida = response.getWriter();
    ServletContext context = getServletContext();
    Conexao con = (Conexao) context.getAttribute("conecta");
    try {
    Statement comando = con.conex.createStatement();
    ResultSet rs = comando.executeQuery("SELECT * FROM kl_campanha");
    while( rs.next() )
    int codCampanha = rs.getInt("codCampanha");
    saida.println("<h3>"+codCampanha+"</h3>");
    catch(Exception e) { }

    I understand the use of a static variable.
    But if i want to share a database connection object (a
    instance varible instead of class variable) that is
    instantiate once and saved in a ServletContext
    attribute,
    and afterwards the other servlets can get
    the object through the ServletContext attribute and
    use it. This will works well? i did tests with the
    code and everything apparently works.
    How does a new connection (different user) get the old context?

  • How to share the same Database Connection when using several Task Flows ?

    Hi All,
    I’m using JDev 11.1.1.3.0.
    I’m developing ADF Fusion Applications (ABC BC, ADF Faces…)
    These applications are deployed on a Weblogic server.
    Each application has only one Application Module.
    All Application Modules have the same connection type defined: JDBC DataSource : jdbc/GCCDS
    It is working fine.
    I’ve also developed Task Flow Applications for small thinks that are reused in multiple main applications.
    Each Task Flow Application has also one Application Module with the same connections type as main applications.
    All these task flows are deployed to JAR file (ADF Library JAR File) and are reused on my main applications. (drag and drop from the Resource Palette to ADF Regions….).
    There are some parameters passed to Task Flows, so that they can filter data depending on which main applications they are called from.
    Everything is working perfectly.
    All my main applications are using more and more task flows. Which is nice for the reusability etc…?
    Only ONE PROBLEM: DATABASE CONNECTIONS.
    Every Task Flows service made a database connection. So one user may have 10 database connections for the same adf page. And when there are 100 users that are working at the same time, it becomes a problem.
    How to share the same database connections for the main applications and all task flows which are used in the main application?
    Best Regards
    Nicolas

    Hi John,
    When I open a ADF Library JAR file of one of my task flow. (gcc_tf_recentSites.jar)
    I can see TF_RecentSitesService.xml and TF_RecentSitesServiceImpl.class in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service folder
    + bc4j.xcfg in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service\common folder.
    bc4j.xcfg details are
    +<?xml version = '1.0' encoding = 'UTF-8'?>+
    +<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">+
    +<AppModuleConfigBag ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<AppModuleConfig DeployPlatform="LOCAL" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model" name="TF_RecentSitesServiceLocal" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +<Custom JDBCDataSource="jdbc/GCCDS"/>+
    +</AppModuleConfig>+
    +<AppModuleConfig name="TF_RecentSitesServiceShared" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService" DeployPlatform="LOCAL" JDBCName="gccdev" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model">+
    +<AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.isuseexclusive="false"/>+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +</AppModuleConfig>+
    +</AppModuleConfigBag>+
    +</BC4JConfig>+
    So, it seems that the Application Module is packaged with the task flow....
    Is it normal ?
    Regards
    Nicolas

  • How to use Forms Default Database Connection in java class

    When a form based application is started, a connection is made with underlying database. This is the Default (Primay) Database Connection.
    The problem is I have some of my business logic implemented in a java class. In this class I have to make a another connection with the same database. What I want to do is to use the original Database Connection in the java class. In this I may avoid the overhead of reconnection.
    Could anyone pls guide me in this way...

    you can't share the forms connection. Sorry :(

  • Tomcat JDBC Realm Database Connection Error

    Hello all,
    I am trying to edit the server.xml file on Tomcat so I can use the JDBC Realm instead of the MemoryRealm. Hence, I will be able to read users, passwords and roles from a relational database instead of from the tomcat-users.xml.
    I have tried following all the guides on the net I can find, my server.xml looks as follows (after making changes to allow it to use JDBC realm). The only problem is, when I try to run the application the server outputs the following: (after all of these errors have been kicked up a pop-up box then appears titled "Tomcat Manager Application", it asks for a User Name and Password. I have tried the standard user name of "ide" and the password next to it in tomcat-users.xml but it won't accept it. (I am using the netbeans IDE)).
    Please could someone suggest any ideas of how I can get the server.xml to work with JDBC realm?
    Using CATALINA_BASE:   C:\Documents and Settings\Administrator\.netbeans\5.0beta\jakarta-tomcat-5.5.7_base
    Using CATALINA_HOME:   C:\Program Files\netbeans-5.0beta\enterprise2\jakarta-tomcat-5.5.7
    Using CATALINA_TMPDIR: C:\Documents and Settings\Administrator\.netbeans\5.0beta\jakarta-tomcat-5.5.7_base\temp
    Using JAVA_HOME:       C:\j2sdk1.4.2_08
    Created MBeanServer with ID: 1f934ad:107444b1d2b:-8000:ravinder-rdnzoa:1
    31-Oct-2005 01:29:33 org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    31-Oct-2005 01:29:34 org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8443
    31-Oct-2005 01:29:34 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2174 ms
    31-Oct-2005 01:29:34 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    31-Oct-2005 01:29:34 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
    31-Oct-2005 01:29:34 org.apache.catalina.realm.JDBCRealm start
    SEVERE: Exception opening database connection
    java.sql.SQLException: org.gjt.mm.mysql.Driver
            at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
            at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:720)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
            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:324)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    31-Oct-2005 01:29:34 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    31-Oct-2005 01:29:36 org.apache.catalina.startup.ContextConfig validateSecurityRoles
    INFO: WARNING: Security role name IBM used in an <auth-constraint> without being defined in a <security-role>
    31-Oct-2005 01:29:36 org.apache.catalina.startup.ContextConfig validateSecurityRoles
    INFO: WARNING: Security role name Auditor used in an <auth-constraint> without being defined in a <security-role>
    31-Oct-2005 01:29:37 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
    INFO: Tiles definition factory loaded for module ''.
    31-Oct-2005 01:29:37 org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
    31-Oct-2005 01:29:37 org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validation.xml'
    31-Oct-2005 01:29:38 org.apache.catalina.startup.ContextConfig validateSecurityRoles
    INFO: WARNING: Security role name IBM used in an <auth-constraint> without being defined in a <security-role>
    31-Oct-2005 01:29:38 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
    INFO: Tiles definition factory loaded for module ''.
    31-Oct-2005 01:29:38 org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
    31-Oct-2005 01:29:38 org.apache.struts.validator.ValidatorPlugIn initResources
    INFO: Loading validation rules file from '/WEB-INF/validation.xml'
    31-Oct-2005 01:29:39 org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    31-Oct-2005 01:29:39 org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8443
    31-Oct-2005 01:29:40 org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    31-Oct-2005 01:29:40 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/60  config=null
    31-Oct-2005 01:29:40 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    31-Oct-2005 01:29:40 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 5738 ms
    31-Oct-2005 01:29:40 org.apache.catalina.realm.JDBCRealm authenticate
    SEVERE: Exception performing authentication
    java.sql.SQLException: org.gjt.mm.mysql.Driver
            at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
            at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:344)
            at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            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:738)
            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:534)
    31-Oct-2005 01:29:40 org.apache.catalina.realm.JDBCRealm authenticate
    SEVERE: Exception performing authentication
    java.sql.SQLException: org.gjt.mm.mysql.Driver
            at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
            at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:344)
            at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            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:738)
            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:534)The server.xml looks as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Example Server Configuration File -->
    <!-- Note that component elements are nested corresponding to their
         parent-child relationships with each other -->
    <!-- A "Server" is a singleton element that represents the entire JVM,
         which may contain one or more "Service" instances.  The Server
         listens for a shutdown command on the indicated port.
         Note:  A "Server" is not itself a "Container", so you may not
         define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <Server port="8025" shutdown="SHUTDOWN">
        <!-- Comment these entries out to disable JMX MBeans support used for the
        administration web application -->
        <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
        <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
        <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
        <!-- Global JNDI resources -->
        <GlobalNamingResources>
            <!-- Test entry for demonstration purposes -->
            <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
            <!-- Editable user database that can also be used by
            UserDatabaseRealm to authenticate users -->
       <!-- RAV
            <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>
        <!-- A "Service" is a collection of one or more "Connectors" that share
        a single "Container" (and therefore the web applications visible
        within that Container).  Normally, that Container is an "Engine",
        but this is not required.
        Note:  A "Service" is not itself a "Container", so you may not
        define subcomponents such as "Valves" or "Loggers" at this level.
        -->
        <!-- Define the Tomcat Stand-Alone Service -->
        <Service name="Catalina">
            <!-- A "Connector" represents an endpoint by which requests are received
            and responses are returned.  Each Connector passes requests on to the
            associated "Container" (normally an Engine) for processing.
            By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
            You can also enable an SSL HTTP/1.1 Connector on port 8443 by
            following the instructions below and uncommenting the second Connector
            entry.  SSL support requires the following steps (see the SSL Config
            HOWTO in the Tomcat 5 documentation bundle for more detailed
            instructions):
            * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
            later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
            * Execute:
            %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
            $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
            with a password value of "changeit" for both the certificate and
            the keystore itself.
            By default, DNS lookups are enabled when a web application calls
            request.getRemoteHost().  This can have an adverse impact on
            performance, so you can disable it by setting the
            "enableLookups" attribute to "false".  When DNS lookups are disabled,
            request.getRemoteHost() will return the String version of the
            IP address of the remote client.
            -->
            <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
            <Connector port="8084" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="utf-8"/>
            <!-- Note : To disable connection timeouts, set connectionTimeout value
            to 0 -->
            <!-- Note : To use gzip compression you could set the following properties :
            compression="on"
            compressionMinSize="2048"
            noCompressionUserAgents="gozilla, traviata"
            compressableMimeType="text/html,text/xml"
            -->
            <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
            <Connector port="8443"
            maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
            enableLookups="false" disableUploadTimeout="true"
            acceptCount="100" scheme="https" secure="true"
            clientAuth="false" sslProtocol="TLS" />
            <!-- Define an AJP 1.3 Connector on port 8009 -->
            <Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3"/>
            <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
            <!-- See proxy documentation for more information about using this. -->
            <!--
            <Connector port="8082"
            maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
            enableLookups="false" acceptCount="100" connectionTimeout="20000"
            proxyPort="80" disableUploadTimeout="true" />
            -->
            <!-- An Engine represents the entry point (within Catalina) that processes
            every request.  The Engine implementation for Tomcat stand alone
            analyzes the HTTP headers included with the request, and passes them
            on to the appropriate Host (virtual host). -->
            <!-- You should set jvmRoute to support load-balancing via AJP ie :
            <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">        
            -->
            <!-- Define the top level container in our container hierarchy -->
            <Engine name="Catalina" defaultHost="localhost">
                <!-- The request dumper valve dumps useful debugging information about
                the request headers and cookies that were received, and the response
                headers and cookies that were sent, for all requests received by
                this instance of Tomcat.  If you care only about requests to a
                particular virtual host, or a particular application, nest this
                element inside the corresponding <Host> or <Context> entry instead.
                For a similar mechanism that is portable to all Servlet 2.4
                containers, check out the "RequestDumperFilter" Filter in the
                example application (the source for this filter may be found in
                "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
                Request dumping is disabled by default.  Uncomment the following
                element to enable it. -->
                <!--
                <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
                -->
                <!-- Because this Realm is here, an instance will be shared globally -->
                <!-- This Realm uses the UserDatabase configured in the global JNDI
                resources under the key "UserDatabase".  Any edits
                that are performed against this UserDatabase are immediately
                available for use by the Realm.  -->
                <!-- RAV
               <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
               -->
                <!-- Comment out the old realm but leave here for now in case we
                need to go back quickly -->
                <!--
                <Realm className="org.apache.catalina.realm.MemoryRealm" />
                -->
                <!-- Replace the above Realm with one of the following to get a Realm
                stored in a database and accessed via JDBC -->
                <Realm  className="org.apache.catalina.realm.JDBCRealm"
                driverName="org.gjt.mm.mysql.Driver"
                connectionURL="jdbc:mysql://localhost:3306/tomcatusers"
                connectionName="root" connectionPassword="sikhism1"
                userTable="users" userNameCol="user_name" userCredCol="user_pass"
                userRoleTable="user_roles" roleNameCol="role_name" />
                <!--
                <Realm  className="org.apache.catalina.realm.JDBCRealm"
                driverName="oracle.jdbc.driver.OracleDriver"
                connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
                connectionName="scott" connectionPassword="tiger"
                userTable="users" userNameCol="user_name" userCredCol="user_pass"
                userRoleTable="user_roles" roleNameCol="role_name" />
                -->
                <!--
                <Realm  className="org.apache.catalina.realm.JDBCRealm"
                driverName="sun.jdbc.odbc.JdbcOdbcDriver"
                connectionURL="jdbc:odbc:CATALINA"
                userTable="users" userNameCol="user_name" userCredCol="user_pass"
                userRoleTable="user_roles" roleNameCol="role_name" />
                -->
                <!-- Define the default virtual host
                Note: XML Schema validation will not work with Xerces 2.2.
                -->
                <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false">
                    <!-- Defines a cluster for this node,
                    By defining this element, means that every manager will be changed.
                    So when running a cluster, only make sure that you have webapps in there
                    that need to be clustered and remove the other ones.
                    A cluster has the following parameters:
                    className = the fully qualified name of the cluster class
                    name = a descriptive name for your cluster, can be anything
                    mcastAddr = the multicast address, has to be the same for all the nodes
                    mcastPort = the multicast port, has to be the same for all the nodes
                    mcastBindAddr = bind the multicast socket to a specific address
                    mcastTTL = the multicast TTL if you want to limit your broadcast
                    mcastSoTimeout = the multicast readtimeout
                    mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
                    mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
                    tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
                    tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
                    in case of multiple ethernet cards.
                    auto means that address becomes
                    InetAddress.getLocalHost().getHostAddress()
                    tcpListenPort = the tcp listen port
                    tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
                    has a wakup bug in java.nio. Set to 0 for no timeout
                    printToScreen = true means that managers will also print to std.out
                    expireSessionsOnShutdown = true means that
                    useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
                    false means to replicate the session after each request.
                    false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
                    <%
                    HashMap map = (HashMap)session.getAttribute("map");
                    map.put("key","value");
                    %>
                    replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
                    * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
                    * Synchronous means that the thread that executes the request, is also the
                    thread the replicates the data to the other nodes, and will not return until all
                    nodes have received the information.
                    * Asynchronous means that there is a specific 'sender' thread for each cluster node,
                    so the request thread will queue the replication request into a "smart" queue,
                    and then return to the client.
                    The "smart" queue is a queue where when a session is added to the queue, and the same session
                    already exists in the queue from a previous request, that session will be replaced
                    in the queue instead of replicating two requests. This almost never happens, unless there is a
                    large network delay.
                    -->
                    <!--
                    When configuring for clustering, you also add in a valve to catch all the requests
                    coming in, at the end of the request, the session may or may not be replicated.
                    A session is replicated if and only if all the conditions are met:
                    1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
                    2. a session exists (has been created)
                    3. the request is not trapped by the "filter" attribute
                    The filter attribute is to filter out requests that could not modify the session,
                    hence we don't replicate the session after the end of this request.
                    The filter is negative, ie, anything you put in the filter, you mean to filter out,
                    ie, no replication will be done on requests that match one of the filters.
                    The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
                    filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
                    ending with .gif and .js are intercepted.
                    The deployer element can be used to deploy apps cluster wide.
                    Currently the deployment only deploys/undeploys to working members in the cluster
                    so no WARs are copied upons startup of a broken node.
                    The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
                    When a new war file is added the war gets deployed to the local instance,
                    and then deployed to the other instances in the cluster.
                    When a war file is deleted from the watchDir the war is undeployed locally
                    and cluster wide
                    -->
                    <!--
                    <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                    managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                    expireSessionsOnShutdown="false"
                    useDirtyFlag="true"
                    notifyListenersOnReplication="true">
                    <Membership
                    className="org.apache.catalina.cluster.mcast.McastService"
                    mcastAddr="228.0.0.4"
                    mcastPort="45564"
                    mcastFrequency="500"
                    mcastDropTime="3000"/>
                    <Receiver
                    className="org.apache.catalina.cluster.tcp.ReplicationListener"
                    tcpListenAddress="auto"
                    tcpListenPort="4001"
                    tcpSelectorTimeout="100"
                    tcpThreadCount="6"/>
                    <Sender
                    className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                    replicationMode="pooled"
                    ackTimeout="15000"/>
                    <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
                    filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
                    <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                    tempDir="/tmp/war-temp/"
                    deployDir="/tmp/war-deploy/"
                    watchDir="/tmp/war-listen/"
                    watchEnabled="false"/>
                    </Cluster>
                    -->
                    <!-- Normally, users must authenticate themselves to each web app
                    individually.  Uncomment the following entry if you would like
                    a user to be authenticated the first time they encounter a
                    resource protected by a security constraint, and then have that
                    user identity maintained across *all* web applications contained
                    in this virtual host. -->
                    <!--
                    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
                    -->
                    <!-- Access log processes all requests for this virtual host.  By
                    default, log files are created in the "logs" directory relative to
                    $CATALINA_HOME.  If you wish, you can specify a different
                    directory with the "directory" attribute.  Specify either a relative
                    (to $CATALINA_HOME) or absolute path to the desired directory.
                    -->
                    <!--
                    <Valve className="org.apache.catalina.valves.AccessLogValve"
                    directory="logs"  prefix="localhost_access_log." suffix=".txt"
                    pattern="common" resolveHosts="false"/>
                    -->
                    <!-- Access log processes all requests for this virtual host.  By
                    default, log files are created in the "logs" directory relative to
                    $CATALINA_HOME.  If you wish, you can specify a different
                    directory with the "directory" attribute.  Specify either a relative
                    (to $CATALINA_HOME) or absolute path to the desired directory.
                    This access log implementation is optimized for maximum performance,
                    but is hardcoded to support only the "common" and "combined" patterns.
                    -->
                    <!--
                    <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
                    directory="logs"  prefix="localhost_access_log." suffix=".txt"
                    pattern="common" resolveHosts="false"/>
                    -->
                    <!-- Access log processes all requests for this virtual host.  By
                    default, log files are created in the "logs" directory relative to
                    $CATALINA_HOME.  If you wish, you can specify a different
                    directory with the "directory" attribute.  Specify either a relative
                    (to $CATALINA_HOME) or absolute path to the desired directory.
                    This access log implementation is optimized for maximum performance,
                    but is hardcoded to support only the "common" and "combined" patterns.
                    This valve use NIO direct Byte Buffer to asynchornously store the
                    log.
                    -->
                    <!--
                    <Valve className="org.apache.catalina.valves.ByteBufferAccessLogValve"
                    directory="logs"  prefix="localhost_access_log." suffix=".txt"
                    pattern="common" resolveHosts="false"/>
                    -->
                </Host>
            </Engine>
        </Service>
    </Server>Many thanks, and apologies for "dumping" all of the code here.

    So looking through the java api docs, I found that the tcUtilJDBCOperations has a connect string for the database. Below is the info it outlines. The questions I have it this. How do you specify the psdriver and URL along with do I need to do this as a persistent instance then add my selectstatement as a part of this or can I just specify this and the select statement will use this connection? Any help you can give would be appreciated.
    tcUtilJDBCOperations
    public tcUtilJDBCOperations(java.lang.String psDriver,
    java.lang.String psUrl,
    java.lang.String psUsername,
    java.lang.String psPassword)Contructor that sets the parameters for connecting to a database
    Parameters:
    psDriver - The class name of the jdbc driver
    psUrl - The URL of the database
    psUsername - The username required to access the database
    psPassword - The password for the above username
    Nick

  • The Database Connection could not be found

    Hi guys,
    we did a complete new installation of EPM 11.1.2.1 for a testing environment.
    Did the installation 1-1 to our production system.
    But on TEST we have the problem to create database connections:
    Tools > Database Connection Manager > New Database Connection > Fails:
    8001: The Database Connection could not be found: -15da10bd_1378bcfb29f_-7d2c
    Any ideas?
    I am Admin and have all privileges.
    The problem exists for Essbase connections and HFM, too.
    Regards,
    Bernd

    Are you using a NAS share for storing reporting and analysis files? I mean the RM1 folder?

  • Jdev 10g Preview Database Connection Error

    HI,
    I'm trying to create a database connection in Jdev 10.1.3.0.2 .
    When i press "Test Connection" i receive the following error.
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12705: invalid or unknown NLS parameter value specified
    I used previous versions or JDev and never had this problem.
    Thank You. JP.

    I'm using the Jdev 10.1.3 default installation.
    I didn't change anything.
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production (AIX)
    With the Partitioning option
    JServer Release 9.2.0.5.0 - Production
    This is the jdev.conf file. I don't know what is wrong.
    I tried deleting the lines where is "AddVMOption -Doracle.translated.locales=ja ", but i receive the same error.
    Thank you. JP.
    # Oracle JDeveloper 10g Launcher Configuration File
    # Copyright 2000-2004 Oracle Corporation.
    # All Rights Reserved.
    # The format of this file is:
    # "Directive Value" (with one or more spaces and/or tab characters
    # between the directive and the value) This file can be in either UNIX
    # or DOS format for end of line terminators. Any path seperators must be
    # UNIX style forward slashes '/', even on Windows.
    AddJavaLibPath ../lib/patches
    AddJavaLibFile ../../../classes
    AddJavaLibFile ../../ide/lib/javax-ide.jar
    AddJavaLibFile ../../ide/lib/javatools.jar
    AddJavaLibFile ../../ide/lib/ide.jar
    AddJavaLibFile ../lib/looks-1.2.1.jar
    AddJavaLibFile ../../jlib/jewt4.jar
    AddJavaLibFile ../../jlib/share.jar
    AddJavaLibFile ../../jlib/help4.jar
    AddJavaLibFile ../../jlib/inspect4.jar
    AddJavaLibFile ../../lib/xmlparserv2.jar
    AddJavaLibFile ../lib/jdev-ep.jar
    SetUpdateMainClass oracle.ideimpl.webupdate.DeferredUpdater
    SetUpdateClassPath ../../../classes:../lib/jdev.jar:../../ide/lib/ide.jar:../../ide/lib/javatools.jar:../../lib/xmlparserv2.jar:../../jlib/jewt4.jar:../../jlib/share.jar
    # Extensions in jdev/lib/ext may require native libraries
    AddNativeCodePath ../lib/ext
    # Oracle9i Lite Settings
    # Enable these lines (and modify the directories)
    # to suit your Oracle Lite installation
    # AddNativeCodePath C:/Oracle/lite5/mobile/sdk/bin
    # AddJavaLibFile C:/Oracle/Lite5/mobile/classes/olite40.jar
    # Directive SetJavaHome is not required by default, except for the base
    # install, since the launcher will determine the JAVA_HOME. On Windows
    # it looks in ..\..\jdk, on UNIX it looks in the PATH by default.
    # SetJavaHome c:\jdk1.4.2_03
    # The Windows launcher will attempt to use client (hotspot) by default,
    # unless a VM is specified below with the following directive. On UNIX
    # we use whatever is listed first in the $(JAVA_HOME)/jre/lib/jvm.cfg file.
    SetJavaVM hotspot
    # JDK 1.4.2 specific setting, to properly run JDeveloper under JDK 1.4.2,
    # the following property needs to be enabled and set to false. The bug
    # (Sun bug #4895132) has been fixed in JDK 1.5.
    # AddVMOption -Dsun.io.useCanonCaches=false
    # This will enable a "virtual" file system feature within JDeveloper.
    # This can help performance for projects with a lot of files,
    # particularly under source control. For non-Windows platforms however,
    # any file changes made outside of JDeveloper, or by deployment for
    # example, may not be picked by the "virtual" file system feature. Do
    # not enable this for example, on a Linux OS if you use an external editor.
    # AddVMOption -DVFS_ENABLE=true
    # Turn off verifications since the included classes are already verified by the
    # compiler. This will reduce startup time significantly. On some Linux
    # Systems, using -Xverify:none will cause a SIGABRT, if you get this, try
    # removing this option.
    AddVMOption -Xverify:none
    # Set the maximum heap to 512M
    AddVMOption -Xmx512M
    # MaxPermSize is required to run JDeveloper with Sun Microsystems virtual
    # machine (-client and -server). The default value is 64M, which isn't enough
    # to run JDeveloper successfully. With the default value, JDeveloper will
    # end up running out of memory at some point in time. This option is ignored
    # by OJVM (-ojvm).
    # This option is documented at:
    # http://java.sun.com/docs/hotspot/gc1.4.2/faq.html
    AddVMOption -XX:MaxPermSize=128M
    # Option used by OJVM client on Windows, This option will turn on line numbers
    # in the stack traces by disabling the optimizing compiler.
    # AddVMOption -XOd
    # Enabling this option will cause OJVM client on Windows to only use 1 CPU on
    # a multi-processor system, on single-cpu systems, this option has no effect.
    # AddVMOption -Xsinglecpu
    # Disable Direct Draw, on some Windows 2000/XP base computers,
    # Direct Draw is cause excessive screen refreshes and slows down drawing.
    # Disabled by default for all Windows platform.
    AddVMOption -Dsun.java2d.noddraw=true
    # If true, prevent laucher from handle -help command line argument and
    # passes -help to the java application.
    # Disabled by default
    # AddVMOption -Dapplication.handle.help=true
    # If set to true, prevent laucher from checking/setting the shell
    # integration mechanism.
    # The shell integration feature is enabled by default
    # AddVMOption -Dno.shell.integration=true
    # Disable the forced GC for the ICE browser.
    AddVMOption -Dice.browser.forcegc=false
    # Reduce the tile threshold for the ICE browser.
    AddVMOption -Dice.pilots.html4.tileOptThreshold=0
    # Prepend patches to the bootclasspath. Currently, rtpatch.jar contains a
    # patch that fixes the javax.swing.JTree accessibility problems.
    # Uncomment the line below if you need to run JDeveloper under JAWS.
    # AddVMOption -Xbootclasspath/p:../../jdk/jre/lib/patches/rtpatch.jar
    # Replace heavyweight AWT controls with lightweight implementations.
    AddVMOption -Xbootclasspath/p:../lib/lwawt.jar
    # This setting must not be changed.
    SetMainClass oracle.jdeveloper.JDeveloper
    # SetUserHomeVariable is used to define an environment variable
    # that overrides the default user home location. The directory
    # pointed to by the environment variable defined here will be
    # used to store user settings and the "mywork" directory.
    # On UNIX platforms the default setting is $HOME/jdevhome
    SetUserHomeVariable JDEV_USER_DIR
    # If you run into problems related to relocation errors of system dll's, use
    # this option to resolve them. This option only works under ojvm.
    # AddVMOption -Xheapbase10000000
    # A list of filenames that are reserved
    AddVMOption -Dreserved_filenames=con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout$
    # Indicates which version of the jdk to use for editor syntax
    # highlighting and code explorer. Valid values are: "1.3", "1.4", "1.5".
    AddVMOption -DEDITOR_J2SE_VERSION=1.5
    # Whether Code Insight will omit types and members that have been
    # denoted with the @hidden tag.
    AddVMOption -DINSIGHT_OMIT_HIDDEN=true
    # Text buffer deadlock detection setting (OFF by default.) Uncomment
    # out the following option if encountering deadlocks that you suspect
    # buffer deadlocks that may be due to locks not being released properly.
    # AddVMOption -Dbuffer.deadlock.detection=true
    # If you use JDeveloper in a multibyte environment the embedded browser
    # may display all multibyte characters as squares. If this happens you
    # can use the following option to avoid the problem.
    # AddVMOption -Dice.pilots.html4.ignoreNonGenericFonts=true
    # Put the xml parser into 9.0.4 compatability mode (3116160)
    AddVMOption -Doracle.xdkjava.compatibility.version=9.0.4
    # Specify the set of extant translations for resources loaded via
    # BundleLoader. The format is a comma separated list of locales, for
    # example ja,fr_CA. A translation will only be found if included in
    # the list.
    # Comment out the option to force BundleLoader to use the default
    # locale. This is different to giving the property no value,
    # meaning there are no translations.
    # Note that this has no impact on ResourceBundle, which will continue
    # to try to load locale specific resources even if they are certain not
    # to exist.
    AddVMOption -Doracle.translated.locales=ja
    # Temporary internal flag to enable trace messages for the IDE
    # controller stack.
    AddVMOption -Dide.debug.controller.stack=false
    # If you need to connect to OC4J 10.1.2 from JDeveloper, uncomment the
    # following option. Note, however, that enabling this option will prevent
    # JDeveloper from connecting to OC4J 10.1.3.
    # AddVMOption -Drmi.disablePropagation=true
    AddVMOption -Doracle.translated.locales=ja

  • PHP database connection strategy

    Hello everyone,
    I'm currently writing a website with PHP and MySQL.
    I would like to know which strategy you choose to manage database connection.
    I did not find any way to have a database connection pooling in PHP like I usally use in J2EE.
    My current strategy is some kind of singleton my front controller will share with all "sub controller".
    So, to render a page, I'll have a single static connection ( using PDO ). Opened at the beginning and closed at the end of the page.
    So, what do you use in your PHP webapps?
    Regards.

    zenlord wrote:
    litemotiv wrote:Open just on the start of the page though, collect all data in an object, close the connection and then print out.
    Care to give me an example, or point me to an online example of this?
    I'm merely an amateur, and don't understand things like 'singletons' - I do think that I currently code in MVC, but I would like to know more about design patterns. When it comes to db-connections, I think I open the connection, load all the needed data and close the connection. Don't know whether I 'collect the data in an object', though
    If you search a very good book, my suggestion is:
    http://www.amazon.com/Objects-Patterns- … 982&sr=8-1
    Seriouly, a must have!
    litemotiv wrote:Open just on the start of the page though, collect all data in an object, close the connection and then print out.
    Great to see I'm not completely wrong
    Nagian wrote:but have you already read the Zend Framework Quickstart?
    Yep, I know Zend. But I want to create something without any framework to learn and improve my php knowledge.

  • Properly close database connection - Oracle

    I have an unusuall application that has a main in it and runs off of a cron job.
    We have orders that have to be filled, and if the approver of that order does not reject it after 30 minutes its automatically filled.
    The weird thing is that alot of these stored procedures were already in place before I got there so I just went ahead and called them to get the data that I needed.
    So, we have a shell script that just calls my class. The main kicks off and gets the time of the orders placed on that day. If the current time minus the time the order was placed is greater than 30 minutes approve the order.
    Now, I have about 3 - stored procedures that I call in one method. Actually I have about 3 or 4 methods that in turns calls these stored procedures. I have callable statements for each method. and I do a try - catch in each of the other methods, but not a connection close. In the one method that does all the work and calls the other methods, I have a try - catch - and a then a finally. I then do a conn.close() in the finally of this method.
    My question is? Is this correct. Should I do a try catch finally in my main() method.
    So, this is sort of what it looks like.
    class DoSomething
       Connection conn;
       method1()
          try
             CallableStatement cs;
             ResultSet rs;
             rs.close;
             cs.close;
          catch
          return something1;
       method2()
          try
             CallableStatement cs;
             ResultSet rs;
             rs.close;
             cs.close;
          catch
          return Something2;
       method3()
          try
             CallableStatement cs;
             ResultSet rs;
             rs.close;
             cs.close;
          catch
          return Something3;
       doSomethingMethod()
          try
             CallableStatement cs;
             ResultSet rs;
            // call the other methods to get all data needed.
            ds.method1;
            ds.method2;
            ds.method3;
             rs.close;
             cs.close;
          catch
          finally
              conn.close();
       main()
          DoSomething ds = new DoSomething();
          ds.doSomethingMethod();
    }orozcom

    Well, The catch blocks are not empty. I assure you. I
    just didn't feel like writing down all of my code.
    plus I did not want to cloud the example with to much
    code. Very good.
    All I wanted to know is when and where to close
    my resultset, callable statements, and connection.OK, you should close each one in its own individual try/catch block in a finally block inside the method in which they were called.
    If the stored procs are a unit of work, you'll have to share the Connection.
    Please also realize that this is a web based
    application as well. I take in parameters from a URL.
    I pass those parameters to the stored procs (which
    are already there). If you're doing that in a JSP, I'd say you've got a bad design.
    Now sometimes one method needs
    information from another method. So, I run that
    method. pass the info to another method or stored
    proc which gives me my info. All this should be happening in a service layer.
    I was told that a finally block always runs. So, I
    thought if I atleast put my conn.close in the
    finally. then it will always close the connection.As long as it doesn't throw an exception. And you should close ResultSets and Statements, regardless of what the javadocs say.
    Also, there is only one database that I call. Now the
    stored procs are all on the same database, but they
    are in different packages. which is why I use the
    callable statements.That's fine.
    Also, I do not only call stored procs. I usually only
    call a stored proc to get information back, and then
    give it to a class to manipulate the data.Sounds inefficient. Would a JOIN do as well? You might fall into the (n+1) query trap, where you run a query to get a ResultSet and then iterate through it and run another query per iteration. This is inefficient as n gets large.
    %

  • MI Client & database connectivity

    Hi,
        I'm developing an MI based demo application and want to connect to database db2 on the mobile device. In the cilent APIs I could not find anything where I can specify the database or option for using serialization for that matter. Has anybody tried to connect with database? Please guide.
    Regards,
    Ravi Sharma
    HCL Technologies
    SAP Netweaver COE

    You can't do it from the API.
    MobileInfrastructure (former MobileEngine) is a <i>framework</i> used for <b>connecting to</b> and <b>extracting data from</b> R/3 backend. There are just two ways to do it - Generic Sync or Smart Sync.
    If you want to do direct database connection, you have to use the Java Platform features, JDBC or what driver you have on the mobile device. Howsoever, this is little wrongly.
    Just curious, what for mobile device you bear in mind? SAPDB and MobileEngine are not designed for PocketPC. )
    Anyway, this is a funny problem, please share your experience about it, when you establish the connection.
    Good luck,
    Todor

  • Default Database Connection Strings

    Does anyone know if it is possible to default the database connection strings/setup?
    We are trying to rollout ADI through Citrix and would like to default or pre-install the database connection setup instead of having every user set this up individually.
    I'm assuming there are some registry entries that can be set?
    If anyone has any ideas please share.
    Thanks and Regards,
    Chris
    ([email protected])

    ADI 7.2 included a service to centrally manage database definitions. Instructions on how to setup this service can be found in any of the ADI 7.2 Rollup patches in a file called CENTRAL.TXT (root directory of the patch).

  • Installation problem with NW'04 SR1: database connection failed

    Hi all,
    while installing NW '04 SR1 on Windows Server 2003 SP1 and MS SQL Server 2000 SP4 I ran into an error related to the database connection. While performing the step "Load Java Database content" SAPinst crashes with the message
    com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
    The connection to the SLQ Server with e.g. the Query Analyzer is OK. I had a problem with this installation setup before (have a look at the corresponding <a href="https://forums.sdn.sap.com/thread.jspa?threadID=338638&tstart=0">thread</a> ), the JDBC drivers where missing on the installation master but after copying them in the right direction the installation went on with no problem up to this point...
    Has anybody an idea what could have happened here? Is this maybe a problem connected to the one I recently had
    Below I attached the sapinst.log and jload.log with more detailed messages.
    sapinst.log ###########
    INFO 2007-03-12 22:06:24
    Working directory changed to C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST.
    INFO 2007-03-12 22:06:24
    Output of D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' is written to the logfile C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST/jload.java.log.
    WARNING 2007-03-12 22:06:26
    Execution of the command "D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'" finished with return code 1. Output:
    java version "1.4.2_13"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_13-b06)
    Java HotSpot(TM) Client VM (build 1.4.2_13-b06, mixed mode)
    12.03.2007 22:06:25 com.sap.inst.jload.Jload main
    INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
    12.03.2007 22:06:26 com.sap.inst.jload.Jload main
    SCHWERWIEGEND: couldn't connect to DB
    com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
    ERROR 2007-03-12 22:06:26
    CJS-20065  Execution of JLoad tool 'D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'' aborts with returncode 1. Check 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' and 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.java.log' for more information.
    jload.log ###########
    12.03.07 22:06 com.sap.inst.jload.Jload main
    INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
    12.03.07 22:06 com.sap.inst.jload.Jload main
    SEVERE: couldn't connect to DB
    com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
    Best regards,
    Bernd

    Hello Kairat,
    Please follow the below mentioned guide to install it.
    Check all the parameters to set and run pre requisite checker before starting installation.
    Keep in mind that before starting any SAP installation you should always run prerequisite checker.
    https://websmp205.sap-ag.de/instguides --> SAP Netweaver -->SAP Netweaver 7.0 -- > Installations --> EHP2
    Regards,
    Amit Barnawal

  • Closing the database connection after report in a server application

    I searched these forums and the internet for a definitive answer on asking the Crystal SDK for java to close the jdbc connection after it has generated a report.  We have been using the Crystal Report SDK to generate reports within our JEE application, built upon the Spring framework, for the past two years.  It works well, especially if you prepare views in the database for your reports.
    From what I can tell once you have used ReportClientDocument to create your report you all the close() method to release resources associated with report generation, but this does not close the jdbc database connection.
    Further research states that if you are using the CrystalReportViewer you can call the dispose method to close the database connection.  We are not using JSP nor this class, so that does us little good.
    Finally I found a post that one could call ((AdvancedReportDocument)reportClientDocument.getReportSource()).dispose().  This doesn't drop the connection either.
    Each report actually opens 3 connections according to SQL Server.  Each report will reuse the connections it has open, so for 50 reports, theoretically, we could have up to 150 connections.  We explained to our client those connections  remain inactive, however this is unacceptable to our client as they would like to minimize the number of connections left open to their database.
    If anyone can post any further information on this issue, it is much appreciated.

    Yes, another team member found the issue.  Quite embarrassing really I didn't see it.  I was looking for the answer within Crystal's libraries.  It had nothing to do with Crystal.
    The developer who wrote the helper code for using Crystal first opened a connection to the datasource for the live production database and read that connection information for the report. Next he set that connection information in the report template's PropertyBag, then ran the report. The developer however forgot to close the connection he used to look up the connection info, leaving a memory leak and using up all the connections.
    I'm glad you inquired.  I forgot to post the resolution here.

  • Error while applying a patch "Unable to get the database connection"

    Dear Experts,
    A patch which got successfully applied is failing Production and the error is kind of surprising to me.
    Apps version is 11.5.10.2
    db version is 10.2.0.4
    The worker log file shows
    Time when worker restarted job: Thu Nov 24 2011 22:14:52
    Start time for file is: Thu Nov 24 2011 22:14:52
    adjava -ms128m -mx256m -nojit oracle.apps.fnd.odf2.FndXdfCmp &un_apps &pw_apps &un_apps &pw_apps &jdbc_protocol &jdbc_db_addr table &fullpath_pa_patch/115
    Reading product information from file...
    Reading language and territory information from file...
    Reading language information from applUS.txt ...
      Temporarily resetting CLASSPATH to:
      "/erp/oracle/prodappl/ad/11.5.0/java/adjri.zip:/usr/java14/jre/lib/charsets.jar:/usr/java14/jre/lib/core.jar:/usr/java14/jre/lib/graphics.jar:/usr/java1
      Calling /usr/java14/bin/java ...
    Exception occured
                  Copyright (c) 2003 Oracle Corporation
                     Redwood Shores, California, USA
             XDF(XML Object Description File) Comparison Utility
                            Version 1
    NOTE: You may not use this utility for custom development
          unless you have written permission from Oracle Corporation.
    Unable to get the database connection using schema username/passwordIo exception: The Network Adapter could not establish the connection
    AD Run Java Command is complete.
                         Copyright (c) 2002 Oracle Corporation
                            Redwood Shores, California, USA
                                        AD Java
                                     Version 11.5.0
    NOTE: You may not use this utility for custom development
          unless you have written permission from Oracle Corporation.
    AD Worker error:
    The above program failed.  See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Thu Nov 24 2011 22:14:53
    {code}
    The error says database connection error.  I am able to connect to the database using sqlplus.  I tried to restart the failed worker, but the same error is repeating. 
    Any help would be appreciated.
    Thanks
    qARS
    Edited by: user7640966 on Nov 24, 2011 9:07 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hussein,
    One thing which I noticed now is in the apps Tier the
    tnsnames.ora under $TNS_ADMIN
    shows entry like this:
    PROD=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=<appsServerName>)(PORT=1521))
                    (ADDRESS=(PROTOCOL=tcp)(HOST=<dbServer>)(PORT=1521))
                (CONNECT_DATA=
                    (SID=PROD)
            )Actually *(ADDRESS=(PROTOCOL=tcp)(HOST=<appsIPaddress>)(PORT=1521))* this line in the tnsnames.ora is not correct. In fact the appsServerName should be replaced with dbServerName
    I deleted the tnsnames.ora and reran autoconfig but it is again recreating the same entry.
    Any clue how this can be fixed?
    Thanks
    qARS

Maybe you are looking for