Open Database Connections
I've ported some code over from LabVIEW7.1 to 8.6 which updates a table in a MYSQL database. The problem is that the new code leaves a database connection open after execution (while the 7.1 code does not). I would like to know if anyone has seen this behavior and if they know a fix, and if not, how would they go about debugging this problem.
I am using the MYSQL ODBC connector, version 5.1.
Some observations:
1. This vi is part of a TestStand 4.2 sequence, and the sequence writes results at the end of testing using TestStand's built in functionality to do this. What's notable is that unlike the vi, the database connection used to write the results is closed properly.
2. I've used the "trace" tool in windows ODBC panel but the information is overwhelming large, cryptic and doesn't contain recognizable strings. To reduce the size of the file I tried to start and stop it so that it was tracing only during the execution of the vi.
This didn't work - the tool did not record any information.
3. Stepping through the vi...
a. The database connection problem does not appear.
b. The error cluster is always empty indicating no errors have ocurred.
4. No errors happen during normal execution.
5. I've added delays of 5 seconds between some of the database vi calls and still the database connection is left open.
The vi that's causing the problem is attached.
Thanks in advance.
Attachments:
Read_Write Cal Data For Badger.vi 36 KB
You have a clean error in the middle, but i dont see how that should cause this. I reacted a little to the Select query using double quotes instead of single ones, NID="***"; instead of NID='***';
Might that be a reason?
Unpacking that sequence made it easier to read, i might add.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV
Similar Messages
-
Unable to open database connection after applicaiton is running for several days.
Has anyone experienced a similar error to this:
After about 3 days of use our application starts to report errors opening
the database connection. By that time we've had thousands of transactions
happen. Oracle is only showing a few open connections to our iAS host so
the error seems to indicate the connection pool. I'm configured for 64
connections (the default). We are using the Oracle native driver on iAS
SP3, Solaris.
The iAS ksvradmin monitor gives errors when trying to see how many open
connections it has (verified bug in SP3), so I can't get any info from iAS
on the connection pool.
Thanks in advance,
Rodger Ball
Sr. Engineer
Business WireiAS6 SP3 and earlier cannot detect dead connections. If connections become
stale, iAS does not detect this and will hand out these stale connections.
I don't know enough about your problem, but you can check for this.
hope this helps,
-James
"Rodger Ball" <[email protected]> wrote in message
news:9suucb$[email protected]..
Has anyone experienced a similar error to this:
After about 3 days of use our application starts to report errors opening
the database connection. By that time we've had thousands of transactions
happen. Oracle is only showing a few open connections to our iAS host so
the error seems to indicate the connection pool. I'm configured for 64
connections (the default). We are using the Oracle native driver on iAS
SP3, Solaris.
The iAS ksvradmin monitor gives errors when trying to see how many open
connections it has (verified bug in SP3), so I can't get any info from iAS
on the connection pool.
Thanks in advance,
Rodger Ball
Sr. Engineer
Business Wire -
Serialization of an Object containing an opened database connection
Hi everyone,
My question is simple:
If you serialize an object containing an active databse connection, will it be de-serialized with that connection active and ready to use?First of all, lets look at the purpose. what is that
making you write an object which hold the Connection
object to a network or to the file.
First check the condition. The conditions for
serialization are
1) Connection object should not be declared as
transiant.
2) And it should not be as static.
It the above conditions are meet then the it is
serializable.
Now the obejct holding the connection object is
written to the file or over the n/w.
Reading
Case 1 ) You read from the file at the server end no
issues. You can reconstruct the Connection object and
use it.
case 2) If you are writing to the n/w , your client
is some where in Aus and the java server the db
server are in US. Java Server being public and db
server being local to the Java Server , how you
would use the connection object to execute the querys
on that DB.
Think about this :).Hi,
Are n't you missing the whole point here? What you've said above is valid , of course, but then your readObject/writeObject methods would take care of restoring the connection object (from wherever) if such an implementation is taken up. IMHO, such an implementation is not practical in the first place, and if it's required in your project, it's bad design.
Regards
Hrishikesh -
Failed to open database connections
Hi all,
I have installed oracle db succesfully, but when I run operational client, it downloads some plugins for a while, but then crashed abovementioned error.
Any ideas what should I test in this situation?
Br.
Mr. Pasi
FinlandPlease paste the last few lines from alert.log
adrci
show alert -
Open and close database connection jsp page
hi there, i wanna know about how to open database connection to Mysql at the beginning of the page and close the connection at the end of the page. The jsp page contain all processing code.
plz help me...thx thx<html>
<head>
<basefont face="Arial">
</head>
<body>
<%@ page language="java" import="java.sql.*" %>
<%!
// define variables
String id;
String firstName;
String lastName;
// define database parameters, change this according to your needs
String host="localhost";
String user="root";
String pass="";
String db="test";
String conn;
%>
<table border="1" cellspacing="1" cellpadding="5">
<tr>
<td><b>id</b></td>
<td><b>first name</b></td>
<td><b>last name</b></td>
</tr>
<%
Class.forName("org.gjt.mm.mysql.Driver");
// create connection string
conn = "jdbc:mysql://" + host + "/" + db + "?user=" + user
+ "&password=" + pass;
// pass database parameters to JDBC driver
Connection Conn = DriverManager.getConnection(conn);
// query statement
Statement SQLStatement = Conn.createStatement();
// generate query
// change this query according to your needs
String Query = "SELECT id, firstname, lastname FROM abook";
// get result
ResultSet SQLResult = SQLStatement.executeQuery(Query);
while(SQLResult.next())
id = SQLResult.getString("id");
firstName = SQLResult.getString("firstname");
lastName = SQLResult.getString("lastname");
out.println("<tr><td>" + id + "</td><td>" +
firstName + "</td><td>" + lastName + "</td></tr>");
// close connection
SQLResult.close();
SQLStatement.close();
Conn.close();
%>
</table>
</body>
</html>hi :-)
i've got that on the net as part of the tutorial on jsp (long long time ago)
you just have to be resourceful in finding solutions :-)
try google :-) there are lot's of tutorial available in there ;-)
goodluck ;-)
regards, -
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 -
How I can close Database connection?
I am using the following to open Database connections in Java class.
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("URL","user","password");
But I do not know how I can have it closed.
This cause an SQL error: Maximum open cursors exceeded.Thanks so much. Your explanation is so clear.
Here is the whole code. Thanks for your help.
package xxx.xx.xxx;
import java.io.*;
import java.sql.*;
import java.util.*;
public class Format_BaseTable {
Connection con = null;
Statement stmt = null;
Statement stmt1 = null;
ResultSet rs = null;
ResultSet rs1 = null;
PreparedStatement ps = null;
PreparedStatement ps1 = null;
public Format_BaseTable() {}
public static String valueOf(String oldStr)
StringTokenizer st = new StringTokenizer(oldStr.trim(), "-");
char zero = '0';
String dem_zero = ".0";
String newStr = "";
while(st.hasMoreTokens()) {
String degree = st.nextToken();
String minute = st.nextToken();
String second = st.nextToken();
if (minute.length() == 1) {
minute = zero + minute;
if (second.length() == 1) {
second = zero + second;
if (second.length() == 2) {
second = second + dem_zero;
if (second.length() == 3) {
second = zero + second;
if (second.length() == 5) {
double d = Double.parseDouble(second);
second = String.valueOf(Math.round(d));
newStr = degree + " " + minute + " " + second;
return newStr;
public static double feetToMeter(int ft)
double mt = ft * 0.305;
return mt;
public void doConvert() {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("url","user","password");
stmt = con.createStatement();
stmt1 = con.createStatement();
rs = stmt.executeQuery("SELECT cla_seqnum, str_leased, nad27_lat, nad27_lon, nad83_lat, nad83_lon, ge_ft, sh_ft, osh_ft, ov_faa_approv_ft, ant_tip_ft, ant_ctr_line_ft FROM cl_antenna_base WHERE application_user_id = 'SQL LOADER'");
rs1 = stmt1.executeQuery("SELECT mwa_seqnum, nad27_lat, nad27_lon, nad83_lat, nad83_lon, ge_ft, osh_ft, cl_ft FROM mw_antenna_base WHERE application_user_id = 'SQL LOADER'");
int cl_seqnum = 0;
String leased = "";
String ownership = "";
String str_code = "";
String cl_nad27_lat = "";
String cl_nad27_lon = "";
String cl_nad83_lat = "";
String cl_nad83_lon = "";
int cl_ge_ft = 0;
int cl_ge_mt = 0;
int cl_sh_ft = 0;
int cl_sh_mt = 0;
int cl_osh_ft = 0;
int cl_osh_mt = 0;
int cl_ov_faa_approv_ft = 0;
int cl_ov_faa_approv_mt = 0;
int cl_ant_tip_ft = 0;
int cl_ant_tip_mt = 0;
int cl_ant_ctr_line_ft = 0;
int cl_ant_ctr_line_mt = 0;
int i = 1;
int mw_seqnum = 0;
String mw_nad27_lat = "";
String mw_nad27_lon = "";
String mw_nad83_lat = "";
String mw_nad83_lon = "";
int mw_ge_ft = 0;
int mw_ge_mt = 0;
int mw_osh_ft = 0;
int mw_osh_mt = 0;
int mw_cl_ft = 0;
int mw_cl_mt = 0;
int j = 1;
while(rs.next()) // For Cellular/PCS
System.out.println("\n\nCellular/PCS Record #" + i);
cl_seqnum = rs.getInt("cla_seqnum");
System.out.println("cla_seqnum =" + cl_seqnum);
if (rs.getString("str_leased") != null) {
leased = rs.getString("str_leased");
} else {
leased = "";
StringTokenizer st = new StringTokenizer(leased, "/");
while(st.hasMoreTokens()) {
ownership = st.nextToken();
str_code = st.nextToken();
if (rs.getString("nad27_lat") != null) {
cl_nad27_lat = valueOf(rs.getString("nad27_lat"));
} else {
cl_nad27_lat = "";
System.out.println("cl_nad27_lat = " + cl_nad27_lat);
if (rs.getString("nad27_lon") != null) {
cl_nad27_lon = valueOf(rs.getString("nad27_lon"));
} else {
cl_nad27_lon = "";
System.out.println("cl_nad27_lon = " + cl_nad27_lon);
if (rs.getString("nad83_lat") != null) {
cl_nad83_lat = valueOf(rs.getString("nad83_lat"));
} else {
cl_nad83_lat = "";
System.out.println("cl_nad83_lat = " + cl_nad83_lat);
if (rs.getString("nad83_lon") != null) {
cl_nad83_lon = valueOf(rs.getString("nad83_lon"));
} else {
cl_nad83_lon = "";
System.out.println("cl_nad83_lon = " + cl_nad83_lon);
cl_ge_mt = (int)feetToMeter(rs.getInt("ge_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&cl_ge_mt = " + cl_ge_mt);
cl_sh_mt = (int)feetToMeter(rs.getInt("sh_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&cl_sh_mt = " + cl_sh_mt);
cl_osh_mt = (int)feetToMeter(rs.getInt("osh_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&cl_osh_mt = " + cl_osh_mt);
cl_ov_faa_approv_mt = (int)feetToMeter(rs.getInt("ov_faa_approv_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&cl_ov_faa_approv_mt = " + cl_ov_faa_approv_mt);
cl_ant_tip_mt = (int)feetToMeter(rs.getInt("ant_tip_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&cl_ant_tip_mt = " + cl_ant_tip_mt);
cl_ant_ctr_line_mt = (int)feetToMeter(rs.getInt("ant_ctr_line_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&cl_ant_ctr_line_mt = " + cl_ant_ctr_line_mt);
// update NAD27 and NAD83 data in CL_ANTENNA table
ps = con.prepareStatement("UPDATE cl_antenna_base SET str_leased = ?, structure_code = ?, nad27_lat = ?, nad27_lon =?, nad83_lat = ?, nad83_lon = ?, ge_mt = ?, sh_mt = ?, osh_mt = ?, ov_faa_approv_mt = ?, ant_tip_mt = ?, ant_ctr_line_mt = ? WHERE cla_seqnum = " + cl_seqnum);
ps.setString(1, ownership);
ps.setString(2, str_code);
ps.setString(3, cl_nad27_lat);
ps.setString(4, cl_nad27_lon);
ps.setString(5, cl_nad83_lat);
ps.setString(6, cl_nad83_lon);
ps.setInt(7, cl_ge_mt);
ps.setInt(8, cl_sh_mt);
ps.setInt(9, cl_osh_mt);
ps.setInt(10, cl_ov_faa_approv_mt);
ps.setInt(11, cl_ant_tip_mt);
ps.setInt(12, cl_ant_ctr_line_mt);
ps.executeUpdate();
i++;
} // end of while
while(rs1.next()) // For Microwave
System.out.println("\n\nMicrowave Record #" + j);
mw_seqnum = rs1.getInt("mwa_seqnum");
System.out.println("mw_seqnum =" + mw_seqnum);
if (rs1.getString("nad27_lat") != null) {
mw_nad27_lat = valueOf(rs1.getString("nad27_lat"));
} else {
mw_nad27_lat = "";
System.out.println("mw_nad27_lat = " + mw_nad27_lat);
if (rs1.getString("nad27_lon") != null) {
mw_nad27_lon = valueOf(rs1.getString("nad27_lon"));
} else {
mw_nad27_lon = "";
System.out.println("mw_nad27_lon = " + mw_nad27_lon);
if (rs1.getString("nad83_lat") != null) {
mw_nad83_lat = valueOf(rs1.getString("nad83_lat"));
} else {
mw_nad83_lat = "";
System.out.println("mw_nad83_lat = " + mw_nad83_lat);
if (rs1.getString("nad83_lon") != null) {
mw_nad83_lon = valueOf(rs1.getString("nad83_lon"));
} else {
mw_nad83_lon = "";
System.out.println("mw_nad83_lon = " + mw_nad83_lon);
mw_ge_mt = (int)feetToMeter(rs1.getInt("ge_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&mw_ge_mt = " + mw_ge_mt);
mw_osh_mt = (int)feetToMeter(rs1.getInt("osh_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&mw_osh_mt = " + mw_osh_mt);
mw_cl_mt = (int)feetToMeter(rs1.getInt("cl_ft"));
System.out.println("&&&&&&&&&&&&&&&&&&&mw_cl_mt = " + mw_cl_mt);
// update NAD27 and NAD83 data in MW_ANTENNA table
ps1 = con.prepareStatement("UPDATE mw_antenna_base SET nad27_lat = ?, nad27_lon =?, nad83_lat = ?, nad83_lon = ?, ge_mt = ?, osh_mt = ?, cl_mt = ? WHERE mwa_seqnum = " + mw_seqnum);
ps1.setString(1, mw_nad27_lat);
ps1.setString(2, mw_nad27_lon);
ps1.setString(3, mw_nad83_lat);
ps1.setString(4, mw_nad83_lon);
ps1.setInt(5, mw_ge_mt);
ps1.setInt(6, mw_osh_mt);
ps1.setInt(7, mw_cl_mt);
ps1.executeUpdate();
j++;
} // end of while
} catch(SQLException se) {
System.out.println("SQL Exc" + se.getMessage());
se.printStackTrace();
} catch(Exception e) {
System.out.println(" Exc" + e.getMessage());
e.printStackTrace();
finally
try
rs.close();
stmt.close();
dbConn.freeConnection("system", conn);
conn.close();
} catch (SQLException e)
} // end of doConvert
public static void main(String args[]) {
Format_BaseTable old_nad = new Format_BaseTable();
old_nad.doConvert();
} // end of class -
Jsp and database connection using bean
* I want create a bean to handle database connectivity.The
<jsp:usebean> tag uses
no argument constructor ..so I cannot pass the userid and password to
the constructor.
So how can I create a database connection when the user_id and password
will be a part of parameter ?
* Now I'm opening database connection in the jsp scriplets. Everytime I
refresh the
jsp page a new connection is created ? Is it not going to choke the
database ? I cannot use connection pool because every user logs in with
different userid.
Thanks
You can pass your arguments in this way:
<jsp:usebean id="myBean" scope="page"/>
<jsp:setProperty name="myBean" property="userId", value=<%= user_id%>/>
<jsp:setProperty name="myBean" property="password", value=<%=
user_password%>/>
of course, in your bean class, you should create two setter methods,
setUserId and setPassword.
Hopefully, this will help you.
sonia WEN
Chiranjib Misra wrote:
> * I want create a bean to handle database connectivity.The
> <jsp:usebean> tag uses
> no argument constructor ..so I cannot pass the userid and password to
> the constructor.
> So how can I create a database connection when the user_id and password
> will be a part of parameter ?
>
> * Now I'm opening database connection in the jsp scriplets. Everytime I
> refresh the
> jsp page a new connection is created ? Is it not going to choke the
> database ? I cannot use connection pool because every user logs in with
> different userid.
>
> Thanks
-
Database connection error - Blackberry 9300 simulator
Hi, I'm unable to open database connection in Blackberry 9300 simulator which runs on 5.0.0.977 Device Software. Could someone please let us if I can open the database connection on this device. Also I'm unable to run widget in Blackberry simulator 8900 (device software 4.6.1) As I'm new to widget development, please provide me the details on my questions. Error - net.rim.device.apps.internal.browser.gears.Database. Thanks Raghu .
You know what, upon thinking about this again, i have the exact same problem sometimes!
This i believe is what is causing your problems. When you go out of range of the wifi, for some reason apps like whatsapp seem to switch over to the service providers data scheme and if you have no credit or I would assume as in your case it does not work, the whatsapp does not switch back over to the wifi when it comes into range again.
I have had issues like this before with my 9300 and to solve it try to do this. Turn off all network radios on the phone. mobile and wifi. then turn on wifi only then do a battery pull on the device. When it turns on again, wifi will be on and things should work... Well atleast that is what happens for me. You can then turn on the mobile network again.
You could also try just closing the problematic application, disabling all of the network radios then turning on wifi only and try out the application. I know the last option I provided works 100% of the time for me though and I really think if you stay close to the wifi router for more than an hour or two you are not going to have any problems at all. -
Failed to open the connection - database vendor code 17
I'm upgrading a VB.net Windows Forms application from 1.1 to 4.0. In the reporting form, the list of reports you can choose are pulled from a folder where the .rpt files reside. Once the user chooses a report and executes it, vb code populates the current database connection information and displays the report in the report viewer control.
The following things are true:
- Version 1.1 works on my systems and my customers systems
- The code has not been changed, except that it now targets .Net 4.0 instead of 1.1
- The exact same .rpt files are being used
- Version 4.0 connects to the same database my customer is using, and I can run the reports just fine from here.
- Version 4.0 is able to connect to the database just fine from my customers systems (using the same connection information provided to the report)
- My customer installed this: http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_2.zip
The only problem is that my customer encounters this error when trying to run any report from his systems:
Failed to open the connection.
Details: Database Vendor Code: 17
Failed to open the connection.
Orders.BOL.TaskDetail {393C9017-0ED1-4E1E-8824-E222F4B9D14C}.rpt
Details: Database Vendor Code: 17
I read all of the articles I could find, and they either don't describe this exact situation, or there is insufficient information for troubleshooting this issue. Are there steps that I've missed to make Crystal Reports for VS2010 work on my customer's systems?
Your help is appreciated,
MarkHi Mark,
More information required -
- Does this happen with all reports or few?
- What is the connection type used for the report to connect to the database (OLEDB,ODBC etc)
- Are you changing the database at runtime?
few things you could check
- Check if the database is accaessible from the client machine with proper permissions / rights.
- If its an ODBC connection check if the DSN with same name is created on the client machine.
- Check the driver / provided used by the report to connect to the DB, verify that the same is installed on the client machine. (SQL NAtive client, SQL Server etc)
Also take a look at below articles discussing the simillar issue.
[CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]|CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]]
[1474461 - Unknown Database Connector Error when connecting to a Dataset in a VS .NET application |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433373334333433363331%7D.do]
Hope this helps,
- Bhushan. -
Failed to open the connection. Details: [Database Vendor Code: 53 ]
I'm upgrading one of our applications from Visual Studio 2005 to 2010. In the process I'm also switching our reports to run using Stored Procedures instead of Tables/Views. Everything runs fine on development machines after all the migration work. On the server however, it does not work. And I am getting the error message ""
Server is Windows 2003 Server 32 bit. And yes, I have installed the latest runtimes version 13.0.2000.0 on the server. There have been no other changes on the server other than to switch the target framework on the website in question from .net 2 to .net 4, and then to modify the web.config file to remove references to the older Crystal Reports and replace with references to the newer version.
I've seen many other threads on this "failed to open the connection" errors but none of them are my problem except there is one post that remains unanswered where someone had the same Database Vendor Code 53. I don't know what that error means, spent a considerable amount of time researching that before asking this question.
Lastly, it appears that this error only happens when the report is pulling data from a Stored Procedure rather than Tables/Views. If I re-copy the previous reports, they still work.
The ODBC drivers haven't changed, nor should they. They are fully up to date on that server machine.
I can't think of anything else that would be indicative of anything other than this is a bug. Here is the error text as it shows up in the event log:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 12/7/2011 3:49:50 PM
Event time (UTC): 12/7/2011 11:49:50 PM
Event ID: 38ce5b5487984e8aa8d2b84493d859a8
Event sequence: 17
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/739252194/Root-1-129677751941252500
Trust level: Full
Application Virtual Path: /
Application Path: D:\Websites\ACE5\Clients\TST\
Machine name: ACE1
Process information:
Process ID: 5436
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: InternalException
Exception message: Failed to open the connection.
Failed to open the connection.
Details: [Database Vendor Code: 53 ]
Failed to open the connection.
Details: [Database Vendor Code: 53 ]
Failed to open the connection.
PackSlipTST0 {638463B4-2196-492A-BD6E-9D82CB1862D5}.rpt
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName)
at Distribution_PackingSlips_default.ExportPackingSlips(String CrystalReportPath, Boolean UseStoredProcedure)
at Distribution_PackingSlips_default.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Failed to open the connection.
Failed to open the connection.
Details: [Database Vendor Code: 53 ]
Failed to open the connection.
Details: [Database Vendor Code: 53 ]
Failed to open the connection.
PackSlipTST0 {638463B4-2196-492A-BD6E-9D82CB1862D5}.rpt
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)Lots of great info here, except for the database; MS SQL? Oracle? Etc?
Database Vendor Code 53 is an error code that the CR engine simply passes straight from the database it's self. E.g.; look at your database error code and you should be able to find a verbose description of the error.
As a test, what happens if you add the report to your project and run it in the CR design part of the .NET IDE?
- A quick google search of Error 53 (for MS SQL - an assumption) comes up with a number of good hits. E.g.;
http://social.msdn.microsoft.com/Forums/en-AU/sqlgetstarted/thread/27684811-1a59-4273-b7ed-3cc990b4f20a
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
Edited by: Ludek Uher on Dec 8, 2011 6:31 AM -
I have installed Crystal reports server 2008 VI on a Windows 2008 64bit OS. I have added SQL server and Oracle reports through CMC. I then installed Oracle 10g client 32bit on the server and created and tested the required DSNs using ODBC 32bit. All the testings are successfull.
Now when I try to run my Oracle report through CMC it prompts for the parameters and when I enter them and click ok, gives me the following error:
Failed to open the connection. Details: [Database Vendor Code: 12154].
I have the same exact setup on a different server which has a 32 bit windows 2008 server OS and could run the same reports through CMC.
Is there away to fix this in the 64 bit OS?
I did a yahoo search and someone had a similar problem with Crystal RAS and Oracle.
And there is mentions that this is an issue with 32 bit ODBC drivers on 64bit wondows OS.The parentheses in the default file location, C:\Program Files (x86), causes problems with the ODBC driver and the workarouns in re-installing Crystal RAS on a different folder.
Full description is at (http://www.tririga.info/)
Is this the case with Crystal report server 2008 VI? I already got users using the InfoView to run SQL reports and doing this will have to put the application offline atlease for a say.
Any help is greatly appreciated.Vasana,
Resolution: Failed to Open the Connection.
First:
If the Crystal Report is using 32-bit version of Microsoft ODBC then the Window 2008 server must also have 32-bit version of Microsoft ODBC. The 32- bit version of Odbcad32.exe is located in the %systemdrive%\Windows\SysWoW64 folder.
On the Windows 2008 server, execute Odbcad32.exe by clicking start and run and entering the following: C:\Window\SysWow64\ODBC32.exe.
Then:
The Windows 2008 server ODBC Data Source Administrator must have the same System Data Source Server and Database Names that is used to run the Crystal Report.
e.g. Crystal Report points to server ABC and database EFG (ABC_efg); then the ODBC connections on the Windows 2008 Server must also point to the same server ABC and database EFG (abc_efg) listed. -
Failed to open the connection.Details: [Database Vendor Code: 17 ]
We have too many reports designed by Crystal Reports XI Release 2 a time ago reports are old but we are calling them in asp.net 4.0 and connection through ODBC Data Sources (Driver SQL SERVER)
but when we refresh the report we are facing this issue....
Failed to open the connection.
Details: [Database Vendor Code: 17 ] Failed to open the connection.
AP Outstanding Check Run Detailed Ver 2 {CF3B13A2-F259-4B1D-ACC9-BF78F44D4AA5}.rpt
Details: [Database Vendor Code: 17 ]
here is the code to set ReportLoginInfo
CrystalDecisions.Shared.TableLogOnInfo logonInfo = new CrystalDecisions.Shared.TableLogOnInfo();
string myTableLocation;
foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in rptDoc.Database.Tables)
myTableLocation = myTable.Name;
logonInfo = myTable.LogOnInfo;
logonInfo.ConnectionInfo.AllowCustomConnection = true;
logonInfo.ConnectionInfo.ServerName = ServerName; // dnsname
logonInfo.ConnectionInfo.DatabaseName = DatabaseName;
if (!(string.IsNullOrEmpty(UserID) || string.IsNullOrEmpty(Password)))
logonInfo.ConnectionInfo.UserID = UserID;
logonInfo.ConnectionInfo.Password = Password;
logonInfo.ConnectionInfo.IntegratedSecurity = false;
logonInfo.ConnectionInfo.Type = CrystalDecisions.Shared.ConnectionInfoType.SQL;
myTable.ApplyLogOnInfo(logonInfo);
myTable.Location = DatabaseName + ".dbo." + myTableLocation;
bool success = myTable.TestConnectivity();
Edited by: zeshansadiq on Nov 4, 2011 3:49 PMresolved by me itself.
Do the following steps:
1. Open the report in the CR XI designer.
2. Select Database -> Set Datasource Location.
3. Set Datasource Location window will appear and in the replace with section connect to the database and replace these tables with the tables in the current datasource by clicking the update button.
4. After updating close the Set Datasource Location window.
5. Go to 'Database menu' and Click 'Verify Database' and click on u2019OKu2019.
6. Preview the report and the save the report. -
I receive REP-0501: Unable to connect to specified database. I run developer 6i application on windows 2008 r2. I have applied the nn60.dll and nnb60.dll files to the \BIN directory. The forms are working fine. The reports will only display after the correct user id (username, password and database connection string) is supplied. This is happening to all attempts to open already complied form. Pls, help.
If you are connecting to an Oracle 11g database, remember that by default the passwords are case sensitive. To disable that, run
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE; -
Database connection dailog opens with missing fields
Greetings all,
I have one user who has a couple reports that do not display all the fields in the database connection dialog box when she attempts to refresh the data in a report.
Normally this dialog box opens with the Datasource, UserID (of the last person who saved data with the report) and Database prefilled, so only the Password needs to be completed or the UserID changed.
For her (and this is only happening on a couple reports), only the Datasource text box is visible. The datasource is correctly filled in but in order to see the other fields, she needs to click the next button and then click back. Then all three fields - UserID, Password and Database need to be entered.
This only started in the past couple months and so far is only occuring with 2 reports, both new. Other new reports are acting normally.
We are using Crystal Reports XI with the latest service packs. Our reports are in a shared folder on the network. So far I have not been able to duplicate this behavior on anyone else' machine.
Any idea's on what might be causing this or how to correct it?
TIA,
BobI would check that persons database client and/or version of MDAC. May also be a permission issue on tables.
Maybe you are looking for
-
Nautilus Can't Be Used Now Due To An Unexpected Error
I discovered that I am getting this message almost every time that I restart X using the command Ctrl + Alt + Backspace. I have been trying to figure out my proper resolution and have been doing many of these restarts recently. The error message in f
-
Create accessible PDFs that only open in Adobe Reader
Is there a way to create/tag/mark PDFs so that they are forced to use Adobe Reader to open? Sounds like a stupid question I know but we have a large number of accessible fillable PDF files that are now being opened by the integrated PDF readers in s
-
Copy address from 1 operating unit to another
Hello. What is the easiest way to copy address information from one operating unit to another? We addresses created in our Belgium OU that need to also reside in France. Do I need to use the HZ APIs or can I do this RA interface tables easier? Desire
-
Out Of Memory Errors - Please Help
I'm running Rational XDE Tester -> which is a java-based QA program that tests other java programs. I'm having numerous performance problems -> possibly a result of the XDE program manipulating a 11 MB XML file continuously. We've tried to include th
-
Assigning Default Role to New Users created
Hi How can we assign a default Role to any new User created. This Role should automatically get assigned whenever a new User is created. Regards