Database connection status indicator
I want to put something on the front panel of my program that will show the database connection status. I'm thinking of asking to list tables (it doesn't have to be displayed), if the connection is no longer good, it will show error. I tried it and I think it works okay but I don't know whether this is proper way to do it, maybe there are better ways there, could someone point it out for me?
Best regards,
Solved!
Go to Solution.
You definately do not want to open and close the connection. Maybe it will fail but the "real" connection is fine. Maybe the real one failed but this other open and close works. This could happen if the server has the max number of connections.
Does your connection just go away?
A simple way to check the connection is to just have a loop that periodically executes a meaningless statement.
=====================
LabVIEW 2012
Similar Messages
-
Network Connectivity Status Indicator for IPv6 works wrong in Windows 7 and Windows 8
Hi Folks,
I am working on testing Network Connectivity Status Indicator for IPv6 in Windows 7 and 8.
Waht is "Network Connectivity Status Indicator(NCSI)" you can refer to https://technet.microsoft.com/en-us/library/ee126135%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396
I found that even if Network Connectivity Status Indicator detect IPv6 connection to http://ipv6.msftncsi.com/ncsi.txt failed.
Windows IE still use IPv6 to connect to website first, rather than stop using IPv6 and to use IPv4.
It will cause IPv6 fallback to IPv4 problem, that's 21 secs and 7 secs delay for fallback in Windows 7 and 8.
Does anyone suffer the same problem?
Or someone know how this works?
Thanks!Hi Roger_Wang0214,
"Windows IE still use IPv6 to connect to website first, rather than stop using IPv6 and to use IPv4."
By default Windows prefers IPv6 over IPv4,we can manually configure the IPv4 prefer over IPv6 if it has result in any troubles.
Here is a link for reference :
Resolving Internet connectivity issues after World IPv6 Launch (June 6, 2012)
https://support.microsoft.com/en-us/kb/2533454
"The "Prefer IPv4 over IPv6" Fix it solution will configure your computer to prefer IPv4, instead of IPv6. By default, Windows prefers IPv6 over IPv4. If you are having problems using IPv6 to connect to some websites, this may resolve the
problem."
For a Windows 7 machine ,we can try the following fixit tool to configure IPv4 prefer over IPv6 .For a Windows 8.1 machine ,we can configure it referring to the manual part .
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents
If the DisabledComponents entry is unavailable, we can create it (DWORD (32-bit) Value).Then set a value with "0x20"to prefer IPv4 over IPv6 by changing entries in the prefix policy table.
Here is a link for reference :
How to disable IPv6 or its components in Windows
https://support.microsoft.com/en-us/kb/929852
Best regards
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Determine connection status of multiple database servers
We have mutliple database servers that MAY/MAY NOT be connected to the network at any time. I need to determine which DB servers are available to connect to. I have a stored procedure that does a HOST TNSPING command and checking the results through the FORM_SUCCESS function. That works but the response time is too slow, due to taking too long to timeout. What we attempted to do was to issue a HOST PING command, but because of the 16 bit factor, the FORM_SUCCESS did not recognize the results of the PING. I tried to capture the results of a PING into a variable, but had no success. Bottom line, we don't care how it gets done, we just need to be able to determine, as quickly as possible, what database servers are connected.
Microsoft SQL allows for clustering of SQL databases, so for
instance two servers connected to a fileshare and a virtual address
shared across the two physical boxes. Database connections are made
to the virtual addres which will then be handled by the active
node. Becuase a database is ultimately a file(s) on a disk it can
only be attached to one node at a time so you end up with an
active/inactive cluster. -
J2EE Struts - Database connection failed - help???:(
Hello,
I have built a little web application and it works without any problems. In the next step I tried to add a database connection but I have already worked on it for at least one day and I could not fix the problem with the database connection.
I downloaded the MySQL Server 5.0 and installed it, furthermore I have downloaded the jdbc driver mysql-connector-java-3.1.11.zip and extracted it to the MySQL Server 5.0 directory. Furthermore I have added under system settings - system - etended - system variables the whole path to the driver -> C:\Programme\MySQL\MySQL Server 5.0\mysql-connector-java-3.1.11\mysql-connector-java-3.1.11-bin.jar to the CLASSPATH systemvariable.
Then I have startet the SQL Server 5.0 with mysqld --console from the command line.
Furthermore I have added under Project-Properties-Java Build Path - Libraries - Add External JARs in Eclipse the mysql-connector-java-3.1.11-bin.jar to my Struts WebProject.
To test the whole thing I have added to the existing test-database from mysql a table named owner and wanted to test the database connection in the Action-class with the following statements - I quote the whole execute method of the OwnerAction class:
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
OwnerForm ownerForm = (OwnerForm) form;
String greet = ownerForm.getGreet();
String name = ownerForm.getName();
request.setAttribute("name", name);
request.setAttribute("greet", greet);
String address = ownerForm.getAddress();
String email = ownerForm.getEmail();
int tel = ownerForm.getTel();
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
DriverManager.registerDriver(new org.gjt.mm.mysql.Driver());
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","sa");
try {
//conn = dataSource.getConnection();
stmt = conn.createStatement();
int id = 0;
rs = stmt.executeQuery("select max(id) as counter from owner");
while(rs.next()){
id = rs.getInt("counter");
id += 1;
stmt.executeUpdate("insert into owner values("+id+", '"+greet+"', '"+name+"', '"+email+"', '"+address+"', "+tel+")");
rs.close();
stmt.close();
conn.close();
catch(SQLException e){
throw new SQLException("database error");
// Forward control to the specified success target
return (mapping.findForward("success"));
}But when I execute the WebApplication and the Action will be called the following error message appears in the browser:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
root cause
java.lang.NoClassDefFoundError: org/gjt/mm/mysql/Driver
com.asprise.struts.action.OwnerAction.execute(OwnerAction.java:72)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
It must depend with anything that the driver was not found but I have defined it in the CLASSPATH variable and added it to the Web-Project in eclispe.
Has anybody an idea what I have else made wrong or have forgotten??:(:(:(
thanks in advance
lg
patOne thing I have forgotten - I have also copied the mysql-connector-java-3.1.11-bin.jar in the WebRoot\WEB-INF\lib directory of my EasyStruts WebApplication.
Can anything else be wrong??:(:((
regards -
J2EE - database connection failed...:(:(:(
Hello,
I have built a little web application and it works without any problems. In the next step I tried to add a database connection but I have already worked on it for at least one day and I could not fix the problem with the database connection.
I downloaded the MySQL Server 5.0 and installed it, furthermore I have downloaded the jdbc driver mysql-connector-java-3.1.11.zip and extracted it to the MySQL Server 5.0 directory. Furthermore I have added under system settings - system - etended - system variables the whole path to the driver -> C:\Programme\MySQL\MySQL Server 5.0\mysql-connector-java-3.1.11\mysql-connector-java-3.1.11-bin.jar to the CLASSPATH systemvariable.
Then I have startet the SQL Server 5.0 with mysqld --console from the command line.
Furthermore I have added under Project-Properties-Java Build Path - Libraries - Add External JARs in Eclipse the mysql-connector-java-3.1.11-bin.jar to my Struts WebProject.
To test the whole thing I have added to the existing test-database from mysql a table named owner and wanted to test the database connection in the Action-class with the following statements - I quote the whole execute method of the OwnerAction class:
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
OwnerForm ownerForm = (OwnerForm) form;
String greet = ownerForm.getGreet();
String name = ownerForm.getName();
request.setAttribute("name", name);
request.setAttribute("greet", greet);
String address = ownerForm.getAddress();
String email = ownerForm.getEmail();
int tel = ownerForm.getTel();
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
DriverManager.registerDriver(new org.gjt.mm.mysql.Driver());
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","sa");
try {
//conn = dataSource.getConnection();
stmt = conn.createStatement();
int id = 0;
rs = stmt.executeQuery("select max(id) as counter from owner");
while(rs.next()){
id = rs.getInt("counter");
id += 1;
stmt.executeUpdate("insert into owner values("+id+", '"+greet+"', '"+name+"', '"+email+"', '"+address+"', "+tel+")");
rs.close();
stmt.close();
conn.close();
catch(SQLException e){
throw new SQLException("database error");
// Forward control to the specified success target
return (mapping.findForward("success"));
}But when I execute the WebApplication and the Action will be called the following error message appears in the browser:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
root cause
java.lang.NoClassDefFoundError: org/gjt/mm/mysql/Driver
com.asprise.struts.action.OwnerAction.execute(OwnerAction.java:72)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
It must depend with anything that the driver was not found but I have defined it in the CLASSPATH variable and added it to the Web-Project in eclispe.
Has anybody an idea what I have else made wrong or have forgotten??:(:(:(
thanks in advance
lg
patOne thing I have forgotten - I have also copied the mysql-connector-java-3.1.11-bin.jar in the WebRoot\WEB-INF\lib directory of my EasyStruts WebApplication.
Can anything else be wrong??:(:((
regards -
SQL Server Database Connectivity with Visual Studio 2012 - Help Needed
Hello,
I am having Visual Studio 2012 and SQL Developer 4.0 installed on my system with Windows 8 - 64bit
I want to shift a VS project with an SQL database connectivity to another new Laptop (above mentioned) ...
I have the project opened in VS without bieng connected to the database..
I have a backup file of the database (which needs to be restored to a new created database on SQL Developer)
The problem:
I am unable to create a server connection in SQL Developer which will allow me to create a new database followed by the recovery from backup file.
I am getting the following error message when I try to create a connection:
Status: Faliure - IO error: The network adapter could not establish a connection
Please help me in setting up a server connection and adding a new sql databaseThe error message seemed unfamiliar to me and since I had never heard of SQL Developer before, I went to Google. Google might be pulling my legs, but it appears that SQL Developer is related to Oracle. This forum is devoted to SQL Server, so you are in the
wrong place.
Try finding a forum for SQL Developer.
Erland Sommarskog, SQL Server MVP, [email protected] -
Database connection error in Weblogic 11g
Hello Everyone,
I am new to this forum and Weblogic. I am in the process of migrating a big application from Weblogic 8.1 to Weblogic 11g. I am facing a issue with JDBC Commit. I am getting following exception while trying to commit
####<Feb 18, 2010 1:11:51 PM EST> <Debug> <JTAPropagate> <PPXP2CE951B506> <AdminServer> <ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <3de6adeed2d219bd:-1c9bd9a6:126e245ecb6:-7fff-0000000000000010> <1266516711438> <BEA-000000> <java.lang.Exception: DEBUG: receiveRequest, tx=Xid=BEA1-0000957A69A07E5F133C(16499456),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=300,XAServerResourceInfo[demoPool_cashlinkdomain]=(ServerResourceInfo[demoPool_cashlinkdomain]=(state=ended,assigned=none),xar=demoPool,re-Registered = false),SCInfo[cashlinkdomain+AdminServer]=(state=active),properties=({}),local properties=({weblogic.jdbc.jta.demoPool=[autoCommit=false,enabled=true,isXA=true,isJTS=false,vendorID=0,connUsed=true,doInit=false,'null',destroyed=false,poolname=demoPool,appname=null,moduleName=null,connectTime=187,dirtyIsolationLevel=false,initialIsolationLevel=2,infected=false,lastSuccessfulConnectionUse=1266516711423,secondsToTrustAnIdlePoolConnection=10,currentUser=java.lang.Exception
at weblogic.jdbc.common.internal.ConnectionEnv.setup(ConnectionEnv.java:310)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:344)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:433)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:316)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:93)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:61)
at weblogic.jdbc.jta.DataSource.getXAConnectionFromPool(DataSource.java:1584)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1357)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:438)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:395)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:355)
at com.mycompany.res.services.util.DatabaseHelper.getConnection(DatabaseHelper.java:109)
at com.mycompany.res.services.util.DatabaseHelper.getConnection(DatabaseHelper.java:46)
at com.mycompany.res.services.security.ejb.LoginManagerEJB.login(LoginManagerEJB.java:64)
at com.mycompany.res.services.security.ejb.LoginManagerEJB_z7om1c_EOImpl.login(LoginManagerEJB_z7om1c_EOImpl.java:573)
at com.mycompany.res.services.security.ejb.LoginManagerEJB_z7om1c_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
,currentThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],lastUser=null,currentError=null,currentErrorTimestamp=null,JDBC4Runtime=true,supportStatementPoolable=true,needRestoreClientInfo=false,defaultClientInfo={},supportIsValid=true]}),CoordinatorURL=AdminServer+10.240.15.248:7001+cashlinkdomain+t3+)
at weblogic.transaction.internal.TxDebug.debugStack(TxDebug.java:60)
at weblogic.transaction.internal.TransactionManagerImpl.receiveRequest(TransactionManagerImpl.java:1366)
at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:287)
at weblogic.rmi.cluster.ClusterableServerRef.dispatch(ClusterableServerRef.java:242)
at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:1138)
at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:1020)
at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:240)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:882)
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:453)
at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:322)
at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
What is going wrong with this?
I get the following error every time Weblogic is trying to do database connection check
####<Feb 18, 2010 1:35:40 PM EST> <Debug> <JTA2PC> <PPXP2CE951B506> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-028CACE03896> <3de6adeed2d219bd:-1c9bd9a6:126e245ecb6:-7fff-00000000000000c6> <1266518140849> <BEA-000000> <BEA1-028CACE03896: JDBC Internal: TX[BEA1-028CACE03896] committing-->committed
java.lang.Exception: DEBUG
at weblogic.transaction.internal.TransactionImpl.setState(TransactionImpl.java:1711)
at weblogic.transaction.internal.ServerTransactionImpl.setCommitted(ServerTransactionImpl.java:2945)
at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2737)
at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2657)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:285)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:233)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:286)
at weblogic.jdbc.common.internal.ConnectionEnv.testInternal(ConnectionEnv.java:734)
at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:704)
at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:487)
at weblogic.common.resourcepool.ResourcePoolImpl.testResource(ResourcePoolImpl.java:2260)
at weblogic.common.resourcepool.ResourcePoolImpl.checkResource(ResourcePoolImpl.java:1601)
at weblogic.common.resourcepool.ResourcePoolImpl.checkAndReturnResource(ResourcePoolImpl.java:1507)
at weblogic.common.resourcepool.ResourcePoolImpl.checkAndReturnResource(ResourcePoolImpl.java:1496)
at weblogic.common.resourcepool.ResourcePoolImpl.testUnusedResources(ResourcePoolImpl.java:1942)
at weblogic.common.resourcepool.ResourcePoolImpl.access$800(ResourcePoolImpl.java:40)
at weblogic.common.resourcepool.ResourcePoolImpl$ResourcePoolMaintanenceTask.timerExpired(ResourcePoolImpl.java:2368)
at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Edited by: user12640178 on Feb 18, 2010 10:36 AM
Edited by: user12640178 on Feb 18, 2010 10:38 AMPriya,
Thank you so much for your response. I did test my database source from console and on the console it reported the test was successful, where in the admin logs has same exception logs. I did try creating a non XA connection and it did not have these errors. But my application did raise same exception while doing transaction.
The application has around 250 EJB's that are written long ago and they all comply to EJB 1.1 spec. I am in the process of investigating the level of support for EJB 1.1 in Weblogic 11g.
- Kasi -
Listener EA2: database connection pool and connection revalidation
Hi all,
As one can expect from early adopter release there could be some bugs but I can't find any references in forum to my situation:
* My 11g XE database and listener are starting as windows services when server boots operating system (Windows Server 2003 R2).
* I configured my web server (unsupported Jetty 9.0.0.M1) to start as windows service when operating system starts.
* Apex Listener 2.0.0.268.17.05 configured to connect with XE using JDBC thin driver with default settings (initial pool size 3, max statements 10, min connections 1, max connections 10, inactivity timeout 1800, abandoned connection timeout 900)
* Because web server starts a bit faster than Oracle database when apex connects first time it gets "ORA-12528, TNS:listener: all appropriate instances are blocking new connections" (could be that database still starting but already registered service with listener)
* From listener.log file I can see that all further connections made from Apex listener succeeds
* When I try to open any apex page with browser I am getting 404 error and apex listener logs error (*time is 2 days after system startup*):
2012-11-30 3:56:02 PM oracle.dbtools.common.config.db.DatabaseConfig badConfiguration
SEVERE: The pool named: apex is not correctly configured, error: Listener refused the connection with the following error:
ORA-12528, TNS:listener: all appropriate instances are blocking new connections
ConnectionPoolException [error=BAD_CONFIGURATION]
at oracle.dbtools.common.jdbc.ConnectionPoolException.badConfiguration(ConnectionPoolException.java:62)
at oracle.dbtools.common.config.db.DatabaseConfig.badConfiguration(DatabaseConfig.java:146)
at oracle.dbtools.common.config.db.DatabaseConfig.createPool(DatabaseConfig.java:168)
at oracle.dbtools.common.config.db.DatabaseConfig.getConnection(DatabaseConfig.java:68)
at oracle.dbtools.common.jdbc.ora.OraPrincipal.connection(OraPrincipal.java:25)
at oracle.dbtools.apex.ModApexContext.getConnection(ModApexContext.java:320)
at oracle.dbtools.apex.Procedure.getProcedure(Procedure.java:166)
at oracle.dbtools.apex.OWA.validateProcedure(OWA.java:384)
at oracle.dbtools.apex.security.Security.isValidRequest(Security.java:171)
at oracle.dbtools.apex.ModApex.validateRequest(ModApex.java:233)
at oracle.dbtools.apex.ModApex.doGet(ModApex.java:79)
at oracle.dbtools.apex.ModApex.service(ModApex.java:263)
at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:288)
at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:127)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:665)
<... Jetty web server stack ...>
at java.lang.Thread.run(Unknown Source)
2012-11-30 3:56:02 PM oracle.dbtools.rt.web.HttpEndpointBase modApex
* Oracle listener log for same time (no errors here):
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1078)) * establish * xe * 0
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1079)) * establish * xe * 0
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1080)) * establish * xe * 0
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1081)) * establish * xe * 0
* For some reason apex listener keeps first connection status and won't try to establish new connection if first attempt finished with ORA-12528
* The same scenario is valid when at time of web server start oracle database/listener is not available - even if database and listener starts and apex successfully establishes further connections all apex pages gets 404 error
* If I restart web server windows service (while oracle db and listener still running) browser opens apex pages without errors and apex listener does not log any errors
* I know that I can avoid this error delaying start of web server windows service but it would be nice to have production release 2.x without such bugsHi,
Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?Hi Vinod,
Yes, TopLink allows you to use the app server's connection pooling and transaction services. Chapter 2 of the Oracle9iAS TopLink Foundation Library Guide provides details as do the TopLink examples. The easiest way to set this up is by using the sessions.xml file. The sample XML below is from the file <toplink903>\examples\ias\examples\ejb\sessionbean\sessions.xml. Here we are adding the datasource defined in OC4J and specifying that we are using the OC4J transaction controller also.
<login>
<user-name>sa</user-name>
<password></password>
<datasource>java:comp/env/jdbc/ejbJTSDataSource</datasource>
<uses-external-transaction-controller>true</uses-external-transaction-controller>
<uses-external-connection-pool>true</uses-external-connection-pool>
</login>
<external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
When using this approach you need to change your TopLink code slightly in the EJB methods:
a. Acquire the ACTIVE unit of work from the server
session (again, see the EmployeeSessionEJB code
example) with something like:
UnitOfWork uow = clientSession.getActiveUnitOfWork();
b. Calls to uow.commit() can be ommitted or commented out
because the EJB will handle this. Note that of course
the methods you create in the EJB that are using this
approach must have TX Required (default).
Hope this helps.
Pete -
JDeveloper problem setting up a database connection
I am having some problem setting up a connection to my database. Before I say any more let me explain what I need. I need 2 database connections 1 to a 10g R3 database and one to an 8.0.5.
I do realize that JDeveloper will only connect back to 8.1.7 because of the JDBC version that is installed with it.
What I really need to know is "Is it possible to define and use 2 different versions of JDBC" I really don't want to move back to the version that works with both because I am afraid of what performance/benefits I will lose from the latest and greatest.
The latest version that I can determine will work with 8.0.5 is the last version for 9i.
Any Ideas would be helpful.
The reason for this situation is that I have a production database that I will have to keep up with until the full version of the system is complete so that is why I even care about 8.0.5.
Thanks alot for your time,
ThomI have a similar problem and I would much appreciate any help in this matter.
I have a wireless network set at home with two computers connected to it:
My workstation called Home-ws and my laptop called Acer. I can access the d:\ drive of my workstation from my laptop without any problem.
On my workstation I installed the Oracle 10g product and on my laptop I installed Oracle SQL Developer. On SQL developer I am trying to create a connection to the Oracle server:
My settings are as below:
Connection name: orcl_system
User name: system
Password: ******
Host name: Home-ws
Port: 1521
SID: orcl
When I push test I am getting the following error message:
Status: Failure –Io exception: The Network Adapter could not establish the connection
Are there any special settings that should be made set up a wireless connection to my database?
Then I did the following things below:
1. I downloaded from oracle.com the instantclient-basic-win32-10.2.0.2-20060508.zip file and unzipped it in a folder called instantclient_10_2. There were a number of DLL and two jar files plus sqlplus.exe
2. I started sqlplus from that server
3. sqlplus failed with a similar error as sql developer.
4. I checked for tnsping. There is no tnsping such and exe on my laptop. I looks like I have to install the DLLs I downloaded them but there are no instructions about how to install them. Should I just copy them in system32 folder?
5. I looked for firewalls on my Home-ws workstation (where my oracle server is installed) and on my Acer laptop. The firewalls were activated. I added on exception called oracle for port 1521 on both computers and tried to connect again. I tried with both TCP and UDP options and it did not work in both cases.
I am out of ideas. Any help would be much appreciated.
Thank you in advance for your help.
Julian -
Error While creating new database connection from HFM workspace
Hi,
We have recently installed HFM and was trying to create database connection from database connection manager in HFM workspace.
I am getting below error:
"Error connecting to database connection : no HssJNIDriver950 in java.library.path" initially and later
"Error connecting to database connection : com/hyperion/ap/adm/HssConn".
Any information in this direction would helpful.
Thanks,
Bhargav
Edited by: bhargavr on Jan 24, 2011 6:55 PMHi bhargavr,
We came accross the same issue. Try the following solution below for this 'KNOWN ISSUE' and let me know how you get on. Drop me a note if you have any questions regarding this post.
Error: *"Error connecting to database connection: com/hyperion/ap/adm/HssConn" While Creating a Financial Management Database Connection* [ID 1102697.1]
Modified 04-JAN-2011 Type PROBLEM Status PUBLISHED
Applies to:
Hyperion BI+ - Version: 11.1.2.0.00 and later [Release: 11.1 and later ]
Microsoft Windows x64 (64-bit)
Symptoms:
You are running the Financial Reporting Web Server on a 64-bit server.
When you try to create a new Financial Management (HFM) database connection using the Database Connection Manager in Workspace you receive the following message:
“Error connecting to database connection <connection_name>: com/hyperion/ap/adm/HssConn”
You can create a database connection in Financial Reporting Studio. When you refresh a report with a Financial Management database connection, you receive one of the following messages:
“1001: Error connecting to database connection <DATABASE_CONNECTION_NAME>: com/hyperion/ap/adm/HssConn”
or
“1001: Error connecting to database connection <DATABASE_CONNECTION_NAME>: no HssJNIDriver950 in java.library.path”
Cause:
The issue is documented in unpublished bug 9537050, and in Known Issues in the 11.1.2 Reporting and Analysis Readme. Cross-reference unpublished bug 9707353.
Solution:
In the Windows registry, take the following steps:
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\HyperionSolutions\FinancialReporting0\HyS9FRReports.
For each of the following entries, prefix the contents with text in the blue box: Env2, JVMOption13, and JVMOption17 (note that the JVMOption numbers might be slightly different in your environment).
C:\Oracle\Middleware\EPMSystem11R1\common\ADM\11.1.2.0\bin-64
If your EPM_ORACLE_HOME is not located at C:\Oracle\Middleware\EPMSystem11R1, replace that location with your location.
Restart the server.
G'Luck,
-David -
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 -
JCAP512 and JCAP6 conflict with concurrent database connectivity
So here is the situation:
Environment:
- We have a production JCAP6 appserver (AIX server 1) running a project pulling data from database A
- We have 4 JCAP512 domains on AIX Servers 2,3,4 running 4 distinct projects pulling data from server A
- All project run on a schedule of 5 minutes and login to the server with the same login
- Database A is SQL Server
- repository based code
Scenario:
- All 5 above processes run concurrently in the greater JCAPS environment.
- When all 5 processes are running, the JCAP6 process runs fine with no issue but at the same time the 4 JCAP512 processes hang on the database side waiting for a resultset with a wait status of ASYNC_NETWORK_IO
- As soon as the JCAP6 process completes, all 4 JCAP512 processes start running with no errors. Once the JCAP6 process starts again, same result.
- We shut off the JCAP6 process and all 4 JCAP512 processes run with no issue
So after my high-school proof setup above my question comes to what is going on??? All of these processes run on their own isolated physical and application servers. Their only commonaliy is the login to the database. Are there any known database connectivity settings that would limit user transactions if another (same) user connection currently exists?
Has anybody seen anything like this? Ay assistance would be greatly appreciated.
Bryan
Edited by: bgrant88 on Jan 29, 2010 2:15 PMI've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
Try to take over the world! -
Status Indicator Light not working
I've been having a recurring issue with the status indicator light on my 15.4-inch MacBook Pro 2.8 GHz (Mid-2009). I learned recently that it's normal for the status indicator light to be on when the computer starts up, shuts down and goes to sleep. Lately, the status indicator light has not appeared at all when the computer starts up, goes to sleep, and shuts down. I've tried almost everything and still nothing has worked
1.) Checked to see if any of the ports are working: FireWire, Ethernet, MagSafe, SD card, USB, Mini-DisplayPort. These ports are behaving as normal, working fine.
2.) Checked and successfully paired a seven button Apple Remote to test the IR receiver.
3.) Ran an Apple Hardware Test, found nothing wrong, passed the test.
4.) Reinstalled and erased my hard drive, still having issues.
5.) Bluetooth, AirPort Extreme, microphone, audio ports, speakers, and iSight are working.
6.) Battery works and the charger is working.
7.) Backlighting for display and keyboard work.
The computer is only 1 year and 4 months old. The issue began occurring two months ago. Now the computer does sleep, but if the fans are going, it takes a bit longer for the computer to go to sleep when I close the lid.
I haven't replaced the hard drive or installed any new hardware.
The battery and power information is still at 100%:
Model Information:
Serial Number: W0945***7VC
Manufacturer: SMP
Device name: bq20z451
Pack Lot Code: 0000
PCB Lot Code: 0000
Firmware Version: 0003
Hardware Revision: 0003
Cell Revision: 0100
Charge Information:
Charge remaining (mAh): 4165
Fully charged:No
Charging: Yes
Full charge capacity (mAh): 6662
Health Information:
Cycle count: 43
Condition: Normal
Battery Installed: Yes
Amperage (mA): 3177
Voltage (mV): 12109
System Power Settings:
AC Power:
System Sleep Timer (Minutes): 15
Disk Sleep Timer (Minutes): 10
Display Sleep Timer (Minutes): 15
Wake On AC Change: No
Wake On Clamshell Open: Yes
Wake On LAN: No
Current Power Source: Yes
Display Sleep Uses Dim: Yes
GPUSwitch: 2
Battery Power:
System Sleep Timer (Minutes): 10
Disk Sleep Timer (Minutes): 10
Display Sleep Timer (Minutes): 2
Wake On AC Change: No
Wake On Clamshell Open: Yes
Display Sleep Uses Dim: Yes
GPUSwitch: 2
Reduce Brightness: Yes
Hardware Configuration:
UPS Installed: No
AC Charger Information:
Connected: Yes
ID: 0x0100
Wattage (W): 85
Revision: 0x0000
Family: 0x00ba
Serial Number: 0x009fe8db
Charging: Yes
My computer's warranty with Apple, including tech support, service, and repair, has expired. However, I do have a remaining two year warranty with Best Buy Geek Squad.
I'm wondering how much would it cost out of pocket to take this computer to an Apple Store for service and repair with a Mac Genius?
So is there anything that could be wrong with this computer and if so, please help!
<Serial Number Edited by Host>studabaker wrote:
I erased the disk with Disk Utility using the installation DVD ....
If you used "Secure erase", you can be certain that there is nothing left on the disk that is causing your problem.
Because you have a long wait for access to an Apple Authorized Service Provider, if you merely clicked "erase" (the one that does not take more than an hour), you could try Secure Erase now if you want to try the final possible fix you can do on your own.
... and installed the combo update recently, the size for that update was over 1GB.
That is the right one.
I have been regularly doing those permissions. Thanks for the suggestions.
You're welcome.
I'm taking my Mac to Geek Squad and Mac Genius next month when I visit my dad in Georgia, there's an Apple Store about 45 minutes away from his house and a Best Buy that sells Macs, cause it turns out Geek Squad's coverage for Apple/Mac is only in places where they sell Macs. I used my zip code and turned up 0 results but I typed the zip code for where my dad lives in North Georgia, and a Best Buy in Atlanta is available. So I will definitely go there and visit the Apple Store to at least see what my options are.
If you need help from Apple before you can go to a physical location next month, other Apple Technical Support service option contacts are available here:
http://www.apple.com/contact/
Best Buy by far has the best warranty for computers from what the sales associate was telling me. Apparently, Best Buy warranty covers spills, drops & breaks, and overall maintenance issues. In fact, they told me if the computer can't be fixed, they'll replace it with a new one.
It should surprise nobody when salesmen tell customers that their own warranty product is best. Because you have apparently already paid for the Best Buy warranty, you can take advantage of their warranty and enjoy the "best" results if you can find a location that honors it.
Thanks for advice and if there's anything else you can think of, let me know.
You're welcome. You have all my suggestions. However, if I think of anything else, I will post back here.
We will watch for your status update. Please let us know what fix works for you.
EZ Jim
Mac Pro Quad Core (Early 2009) 2.93Ghz Mac OS X (10.6.7); MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.7)
LED Cinema Display; G4 PowerBook 1.67GHz (10.4.11); iBookSE 366MHz (10.3.9); External iSight; iPod4touch4.3.1 -
When I go to Central Admin > Upgrade and Migration > Manage Databases Upgrade Status, I have 2 content databases which have the status:
Database is up to date, but some sites are not completely upgraded.
How can I determine which sites are not completely upgraded?Manage Databases Upgrade Status will provide you all active and offline DB details, you can get same result
using below PowerShell cmdlet.
Get-SPDatabase and Get-SPContentDatabase will provide all active database/Content DB in Farm which include Service application db, central admin DB.
Get-SPDatabase | Format-Table Name, ID
Coming back to your question, if you find that there are some site are not completely upgraded then run below command and understand the cause if issue on specific DB.
Test-SPContentDatabase WSS_ContentDB_Name
If you find any missing file issue in DB then resolve these issue to upgrade content database.
(verify all customizations referenced within the content database are also installed in the web application. This cmdlet can be issued
against a content database currently attached to the farm, or a content database that is not connected to the farm )
Use the Upgrade-SPContentDatabase cmdlet
to resume a failed database upgrade or begin a build-to-build database upgrade against a SharePoint content database
Upgrade-SPContentDatabase WSS_Content
reference:
http://technet.microsoft.com/en-us/library/ff607813(v=office.15).aspx
http://technet.microsoft.com/en-us/library/ff607941(v=office.15).aspx
If my contribution helps you, please click Mark As Answer on that post and
Vote as Helpful
Thanks, ShankarSingh(MCP) -
Java Database Connections couldn't be closed on PI 7.1 EHP1
Hi, I develop a dynamic web project to PI. And I use Database conection in that web project. Even I closed the connection in java , Connection doesn't closed and after a while PI pooling size reach the maximum size and PI doesn't response. I find open connections on MSSQL and connections' status are sleeping, cmd fields are AWAITING COMMAND. I have to restart PI these to close that connections.
I get Connections like these code
InitialContext cxt = new InitialContext();
final DataSourceManager dsm = (DataSourceManager) cxt
.lookup("dbpool");
String lookUpName = dsm.getSystemDataSourceDescriptor().getDataSourceName();
DataSource ds = (DataSource) cxt.lookup("jdbc/" + lookUpName);
ds.setLoginTimeout(60);
conn = ds.getConnection();...
and I close connections like these
conn = db.getDefaultDatabaseConnection();
if (conn != null) {
try {
conn.setAutoCommit(true);
String sql = "INSERT INTO
pstmt.close();
conn.close();
} catch (Exception e) {
} finally {
try {
pstmt.close();
conn.close();
} catch (SQLException e2) {
e.printStackTrace();
e.printStackTrace();
I changed system DataSource's and i give these parameters
Initial Connections: 5
Maximum Connections: 125
Maximum Time to Wait for Connection: 90
Connection Lifetime (Sec.): 60
Cleanup Interval (Sec.) : 90
it didn't work either
Can anyone hepl me ?I would like to make slight changes in code. . Please close the resources only in finally block.
Dont know you are closing resultset or not. If not, you must close it
conn = db.getDefaultDatabaseConnection();
try {
if (conn != null) {
conn.setAutoCommit(true);
String sql = "INSERT INTO
} catch (Exception e) {
} finally {
try{
if(rs != null){
rs.close()
}catch(SqlException se){
//log it
try{
if(stmt != null){
stmt.close();
}catch(SqlException se){
//log it
try{
if(conn != null){
conn.close();
} catch(SQLException ss){
// log it
} // end of finally
Hope this help.
Maybe you are looking for
-
Installing J2EE 1.4 Beta 2
I downloaded and installed the J2EE 1.4 Beta 2 and I am unable to start the server. I keep getting the same message: Starting the application server, please wait. Could not start the domain domain1 Startup failed. Please check the server log for more
-
Monitoring the progress of a delete operation
Hello All , I am deleting a table with 80M records based on rowid . But it appears that its running for so long . around 12 hrs . I can see an active session with delete statement . But no entry for that session id in v$long_ops . How can i find out
-
Ipw3945 only working when modprobing manually / not on startup
The last kernel update broke my wireless. When booting, the ipw3945d daemon will tell me "ERROR: Could not find Intel PRO/Wireless 3945ABG Network Connection". After it finishes booting, I can rmmod the ipw3945 module and modprobe it again. Starting
-
Hi, i am creating service entry sheet for service PO through BAPI_ENTRYSHEET_CREATE.I am getting a pop up with message "Buffer table not up to date".But while creating manually this pop up is not coming.I have checked both set of datas at header l
-
How can I setup two ipods to automatically sync different songs?
My son and I now both have Ipods. Can I set it up so my Ipod will auto sync my songs and his, his songs? Please step by step me...i know nothing Thanks