ADF: Gracefully handling JDBC connection errors? Part II
Hi gang
I while back I posted a forum post to find a solution to "display a specific web page when the JDBC connection drops out on our ADF application, specifically the following error: oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection"
...you can see the original post here:
Re: ADF: Gracefully handling JDBC connection errors?
For the life of me I can't get this to work now. It appears I can't redirect to another page during the call to reportException. I've had a play with different methods of redirecting, as seen in the following code sample:
public class ErrorHandlerImpl extends DCErrorHandlerImpl {
public ErrorHandlerImpl() {
super(true);
@Override
public void reportException(DCBindingContainer dCBindingContainer, Exception exception) {
// try {
String message = exception.getMessage();
if (message.indexOf("JBO-26061") >= 0) {
// Method 1
FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot viewRoot =
fc.getApplication().getViewHandler().createView(fc, "faces/errorPage.jspx");
fc.setViewRoot(viewRoot);
fc.renderResponse();
// Method 2
// FacesContext fc = FacesContext.getCurrentInstance();
// fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "goError");
// fc.responseComplete();
// Method 3 - required IOExcepition handler
// FacesContext.getCurrentInstance().getExternalContext().redirect("faces/errorPage.jspx");
} else
super.reportException(dCBindingContainer, exception);
// } catch (IOException e) {
}... with no success.
Has anyobody any other solutions or advice on getting this to work?
Your help appreciated.
Thanks & regads,
CM.
PS. JDev 11gR1 ADF BC + ADF Faces RC
Hi Frank
Yep, I' tried redirect, that was method 3 (you can see all 3 methods I've attempted, last 2 are commented out).
With the declarative ADFc exception handler, problem is it's a catch all, not specifically for JBO-26061. Can you think of a way I can tailor fit it for JBO-26061 with a custom message "Database down"?
In addition the exception handler is not consistently called. As example, if you're moving between pages rather than operating on 1 page, the standard af:messages error dialog is shown if the db connection has been dropped, rather than navigating to the exception handler page. As such it seems the DCErrorHandlerImpl.reportExceptions is the better chokepoint to work from.
Cheers,
CM.
Similar Messages
-
ADF: Gracefully handling JDBC connection errors?
Hi gang
We've a use case to display a specific web page when the JDBC connection drops out on our ADF application, specifically the following error:
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
I've been researching solutions to this and came up with a near solution of placing the following entry in the application's web.xml file:
<error-page>
<exception-type>oracle.jbo.DMLException</exception-type>
<location>/MyErrorPage.jsp</location>
</error-page>This works okay but is a blunt mechanism as it captures all DMLExceptions which includes insert/update/delete failures, as well as the JDBC connection drop out.
Has anybody come up with a better solution for handling JDBC connection drop outs?
Thanks & regards,
CM.
PS. (JDev 11g build 5188, ADF BC + ADF Faces RC)Thanks John, that's the solution. For some reason I'd forgotten that DCErrorHandlerImpl exists in the controller layer, not the model layer, so it makes perfect sense to override it and do the redirect.
Here's what I came up with:
@Override
public void reportException(DCBindingContainer dCBindingContainer,
Exception exception) {
try {
String message = exception.getMessage();
if (message.indexOf("JBO-26061") >= 0) {
FacesContext.getCurrentInstance().getExternalContext().redirect("faces/ErrorPageJDBCFailure.jspx");
} else
super.reportException(dCBindingContainer, exception);
} catch (IOException e) {
}The following OTN post shows some other methods to do the redirect: JSF forward Vs redirect
Cheers!
CM. -
Configure JDBC connection ERROR: no ocijdbc9 in java.library.path
ERROR: no ocijdbc9 in java.library.path
step 6 is where I need help!? thanx.
When configuring a database connection, I chose
1. Oracle JDBC (connection type)
2. Authentication (username/password of my D2K repository)
3. Driver: oci8
4. Hostname: pmurphy1 (my local machine where my db is)
5. Port: 1521 default (odbc works on this)
* 6. Enter custom JDBC url (? please help ?) left blank!!
I really wanna get started with this cool toy!!!
Cheers,
PaullyI am assuming you are using JDeveloper 3.2x
Please see the online help for additional details.
Search help for "JDBC Connection Properties" - With the
quotations and you will find a page names "JDBC Connection
Properties"
This page contains the following info and additional links.
-John
------------- COPIED FROM HELP ---------------
Oracle JDBC-OCI8 Driver
Use this type 2 driver when creating a Java application that
runs against an Oracle8i server. This is a thick driver
optimized for the Oracle8i database: it cannot be used with
applets. This driver handles any database protocol (TCP, IPX,
BEQ, and so on). It is required for applications which are run
from the machine they are stored on. It can also be used against
an Oracle7 database.
This driver requires client software installation. The project
must also include the correct version of the driver in a library
and include no other Oracle JDBC library. This driver is
included in the default Oracle JDBC library for all projects.
The library is named Oracle 8.1.7 JDBC and it includes both the
Thin JDBC and JDBC-OCI8 driver library components. For all OCI
and type 2 JDBC drivers, see Connection Requirements for OCI and
Type 2 JDBC Drivers.
------------- COPIED FROM HELP --------------- -
JDBC Connection Error ORA-12514
Hi all,
I am trying to connect to an Oracle database on my workstation. I am
running Red Hat WS 4.x.
The odbc string I am using is this:
jdbc:oracle:thin:@//localhost:1521/danoracle
I am getting the following error:
Error getting JDBC connection using driver
'oracle.jdbc.driver.OracleDriver' to database at
'jdbc:oracle:thin:@//ddschwitrh4.er.xxxx.gov:1521/danoracle' for user
'satin': java.sql.SQLException: Listener refused the connection with the
following error:
ORA-12514, TNS:listener does not currently know of service requested in
connect descriptorIt looks like the spam filter does not like the copyright line of the output in both commands.
[oracle@ddschwitrh4 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-FEB-2011 11:21:31
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 03-FEB-2011 11:00:55
Uptime 25 days 0 hr. 20 min. 35 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/ddschwitrh4/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ddschwitrh4.er.xxxx.gov)(PORT=1521)))
Services Summary...
Service "danoraclXDB.er.xxxx.gov" has 1 instance(s).
Instance "danoracl", status READY, has 1 handler(s) for this service...
Service "danoracle.er.xxxx.gov" has 1 instance(s).
Instance "danoracl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@ddschwitrh4 ~]$ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-FEB-2011 11:22:32
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "danoraclXDB.er.xxxx.gov" has 1 instance(s).
Instance "danoracl", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: ddschwitrh4.er.xxxx.gov, pid: 20456>
(ADDRESS=(PROTOCOL=tcp)(HOST=ddschwitrh4.er.xxxx.gov)(PORT=11097))
Service "danoracle.er.xxxx.gov" has 1 instance(s).
Instance "danoracl", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:31020 refused:0 state:ready
LOCAL SERVER
The command completed successfully -
JDBC connection error -- unknown SID
Hello,
I am trying to run my first JDBC application (using the thin driver) -- the Oracle DMLSample example. But I am getting a connection error related to SID:
"Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=127.0.0.1))(CONNECT_DATA=(SID=dmsdm)))"
Here is my setup:
I have started the listener -- here is the result of "lsnctl start" command:
Starting /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Log messages written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=qella.array.ca)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
Here is the listener.ora file content
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 25-MAY-2007 09:46:36
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=qella.array.ca)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
The application is built with JDevloper and tries to connect to the DB (located on the same Linux machine where the Oracle installed) with the following parameters:
HostName = qella.array.ca
SID = dmsdm
Port = 1521
UserName = hr
Password = hr
Here is the listener.ora file contents:
# listener.ora Network Configuration File:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = qella.array.ca)(PORT = 1521))
DEFAULT_SERVICE_LISTENER = (XE)
Here is the listener.ora file contents:
# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = qella.array.ca)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
My questions:
1. What is wrong/missing in my setup?
2. In case I don't remember the SID -- how can I find it?
Thanks very much!
Mark.Mark,
You asked:
What is wrong/missing in my setup?Possibly nothing. My guess is the problem is with your code. Excuse me, but I couldn't find that in your post.
You also asked:
In case I don't remember the SID -- how can I find it?In one of the data dictionary views. The Oracle documentation will tell you which one.
(I don't remember right now.)
Note, however, that the connection URL you use in JDBC may contain either the SID or the service name and you have posted the service name, namely:
(SERVICE_NAME = XE)For your information I have Oracle database express edition (XE) installed on my Windows machine. The connection URL I use to connect to the sample HR schema is:
jdbc:oracle:thin:HR/hr@//localhost:1521/XEIf you haven't already done so, I recommend reading the Oracle documentation first, in particular the JDBC User's Guide and Reference.
Good Luck,
Avi. -
Remote JDBC connect error; missing SecStore.properties
Hi
After creating the intial context for a remote JDBC connection, using a Java client, to the J2EE engine, when calling createConnection(), I get the following error on ver 6.4:
com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection:
com.sap.sql.log.OpenSQLException: Error while accessing secure store: File "SecStore.properties" does not exist although it should..
I can not find the file on the server, although what limited doco I can find suggests SecStore should be created at install time. Am I missing something here?
Thanks, LeonardTried, but no success. Am definitely connecting to jndi, getting the context etc. The issue seems to be here;
Caused by: com.sap.security.core.server.secstorefs.FileMissingException: File "SecStore.properties" does not exist although it should.
at com.sap.security.core.server.secstorefs.StorageHandler.openExistingStore(StorageHandler.java:372)
at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1946)
at com.sap.sql.connect.OpenSQLConnectInfo.getStore(OpenSQLConnectInfo.java:803)
at com.sap.sql.connect.OpenSQLConnectInfo.lookup(OpenSQLConnectInfo.java:784)
at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:206)
Why is StorageHandler.openExistingStore trying to open SecStore.properties from the remote java client and not on the j2ee server? This makes no sense.
Thanks -
Handling of Connection error with database
hi, my application is using oracle 9i as database (connection via jdbc).
I understand that we can capture the exact connection errors to database, in event that the database is down or not available. This will allow a more meaningful errors message to be thrown, like "Database is not available" when the user try to login to the system. Is that a particular sql exception that i can catch for such connection errors? or if there is not, what is the best practise for handlng such situation?Yes, java.sql.SQLException is designed for that. It has two methods, getSQLState and getErrorCode, that will help you get the state of the RDBMS if something goes wrong. - MOD
-
How to handle network connection error to bussiness service on OSB
Hello everyone.
Thank for your attentions. I need some help for error handling in OSB 11g. I have a proxy service that route to a business service to check profile status. I'm using java client to consume proxy service and return result to customers. The problem that I'm face to is the handling network connection fail.
I want to get some message (or any useful information) from proxy service to report that connection to Business service is unavailable when that connection fail. I tried to add Error Handling but I cannot found that action from option list.
Can you review my proxy service and tell me some resolutions?
Any suggestion is appreciated.
Thank in advance
<?xml version="1.0" encoding="UTF-8"?>
<xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:con="http://www.bea.com/wli/sb/pipeline/config" xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config" xmlns:con2="http://www.bea.com/wli/sb/stages/config" xmlns:con3="http://www.bea.com/wli/sb/stages/routing/config" xmlns:con4="http://www.bea.com/wli/sb/stages/logging/config">
<ser:coreEntry isProxy="true" isEnabled="true">
<ser:binding type="SOAP" isSoap12="false" xsi:type="con5:SoapBindingType" xmlns:con5="http://www.bea.com/wli/sb/services/bindings/config">
<con5:wsdl ref="Test/resources/wsdl/PortalSide"/>
<con5:port>
<con5:name>PortalSideSOAP</con5:name>
<con5:namespace>http://www.example.org/PortalSide/</con5:namespace>
</con5:port>
<con5:selector type="SOAP body"/>
<con5:WSI-compliant>false</con5:WSI-compliant>
</ser:binding>
<ser:monitoring isEnabled="false">
<ser:aggregationInterval>10</ser:aggregationInterval>
<ser:pipelineMonitoringLevel>Pipeline</ser:pipelineMonitoringLevel>
</ser:monitoring>
<ser:reporting>true</ser:reporting>
<ser:logging isEnabled="true">
<ser:logLevel>debug</ser:logLevel>
</ser:logging>
<ser:sla-alerting isEnabled="true">
<ser:alertLevel>normal</ser:alertLevel>
</ser:sla-alerting>
<ser:pipeline-alerting isEnabled="true">
<ser:alertLevel>normal</ser:alertLevel>
</ser:pipeline-alerting>
<ser:ws-policy>
<ser:binding-mode>wsdl-policy-attachments</ser:binding-mode>
</ser:ws-policy>
</ser:coreEntry>
<ser:endpointConfig>
<tran:provider-id>http</tran:provider-id>
<tran:inbound>true</tran:inbound>
<tran:URI>
<env:value>/Test/proxy-services/DnICT_WSDL_PS</env:value>
</tran:URI>
<tran:inbound-properties/>
<tran:all-headers>false</tran:all-headers>
<tran:provider-specific>
<http:inbound-properties/>
</tran:provider-specific>
</ser:endpointConfig>
<ser:router>
<con:pipeline type="request" name="GetRequestInfo_pipeline_pair_request">
<con:stage name="InputProcess_stage">
<con:context>
<con2:varNsDecl namespace="http://www.example.org/PortalSide/" prefix="por"/>
<con2:varNsDecl namespace="http://www.example.org/PortalSide_Test/" prefix="por1"/>
<con2:varNsDecl namespace="http://www.example.org/OutputSchema" prefix="out"/>
</con:context>
<con:actions>
<con1:assign varName="docId">
<con2:id>_ActionId-2456490176600649155--723117a.130d7d91065.-7b86</con2:id>
<con1:expr>
<con2:xqueryText>$body/por:checkStatus/documentId/text()</con2:xqueryText>
</con1:expr>
</con1:assign>
<con1:assign varName="depId">
<con2:id>_ActionId-2456490176600649155--723117a.130d7d91065.-7b69</con2:id>
<con1:expr>
<con2:xqueryText>$body/por:checkStatus/departmentId/text()</con2:xqueryText>
</con1:expr>
</con1:assign>
<con1:assign varName="srvId">
<con2:id>_ActionId-4566721321360037228--34ba1746.13170e34dc9.-7d41</con2:id>
<con1:expr>
<con2:xqueryText>$body/por:checkStatus/serviceId/text()</con2:xqueryText>
</con1:expr>
</con1:assign>
</con:actions>
</con:stage>
</con:pipeline>
<con:pipeline type="response" name="GetRequestInfo_pipeline_pair_response">
<con:stage name="ErrorHandling">
<con:context/>
<con:actions/>
</con:stage>
</con:pipeline>
<con:flow>
<con:pipeline-node name="GetRequestInfo_pipeline_pair">
<con:comment>Lay cac thong tin trong form search</con:comment>
<con:request>GetRequestInfo_pipeline_pair_request</con:request>
<con:response>GetRequestInfo_pipeline_pair_response</con:response>
</con:pipeline-node>
<con:branch-node type="condition" name="branching_public_services">
<con:context>
<con2:varNsDecl namespace="http://www.example.org/PortalSide/" prefix="por"/>
</con:context>
<con:branch-table variable="depId">
<con:branch name="SoTTTT">
<con:operator>equals</con:operator>
<con:value>1</con:value>
<con:flow>
<con:branch-node type="condition" name="DnICT_dept_services">
<con:context/>
<con:branch-table variable="srvId">
<con:branch name="DichVu_1">
<con:operator>equals</con:operator>
<con:value>1</con:value>
<con:flow>
<con:route-node name="RouteToDnICT_BS">
<con:context>
<con2:varNsDecl namespace="http://www.example.org/PortalSide/" prefix="por"/>
<con2:varNsDecl namespace="http://www.example.org/PortalSide_Test/" prefix="por1"/>
<con2:varNsDecl namespace="http://www.example.org/OutputSchema" prefix="out"/>
</con:context>
<con:actions>
<con3:route>
<con2:id>_ActionId-4566721321360037228--34ba1746.13170e34dc9.-7b4c</con2:id>
<con3:service ref="Test/busines-services/DnictServiceBS" xsi:type="ref:BusinessServiceRef" xmlns:ref="http://www.bea.com/wli/sb/reference"/>
<con3:operation>selecttrangthai</con3:operation>
<con3:outboundTransform>
<con1:assign varName="username">
<con2:id>_ActionId-4566721321360037228--34ba1746.13170e34dc9.-7b4b</con2:id>
<con1:expr>
<con2:xqueryText>fn:string('stttt')</con2:xqueryText>
</con1:expr>
</con1:assign>
<con1:assign varName="password">
<con2:id>_ActionId-4566721321360037228--34ba1746.13170e34dc9.-7b4a</con2:id>
<con1:expr>
<con2:xqueryText>fn:string('123456')</con2:xqueryText>
</con1:expr>
</con1:assign>
<con1:replace contents-only="true" varName="body">
<con2:id>_ActionId-4566721321360037228--34ba1746.13170e34dc9.-7b49</con2:id>
<con1:expr>
<con2:xqueryText><![CDATA[<soap:selecttrangthai xmlns:soap="http://soapinterop.org/">
<username xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">{$username}</username>
<password xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">{$password}</password>
<masohoso xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">{$docId}</masohoso>
</soap:selecttrangthai>]]></con2:xqueryText>
</con1:expr>
</con1:replace>
</con3:outboundTransform>
<con3:responseTransform/>
</con3:route>
</con:actions>
</con:route-node>
</con:flow>
</con:branch>
<con:default-branch>
<con:flow/>
</con:default-branch>
</con:branch-table>
</con:branch-node>
</con:flow>
</con:branch>
<con:branch name="SoGTVT">
<con:operator>equals</con:operator>
<con:value>2</con:value>
<con:flow/>
</con:branch>
<con:default-branch>
<con:flow/>
</con:default-branch>
</con:branch-table>
</con:branch-node>
</con:flow>
</ser:router>
</xml-fragment>P/S:
When connection to business service is fail, I got this soap message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>BEA-380002: No route to host</faultstring>
<detail>
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380002</con:errorCode>
<con:reason>No route to host</con:reason>
<con:location>
<con:node>RouteToDnICT_BS</con:node>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>Regards.
Cuong Pham
Edited by: Doubt_Man on Jul 28, 2011 10:26 AMyou could add an error handler on the route-action in your proxy service.
in there you could investigate the $fault variable and for example check which BEA-... errorcode comes back.
then you can decide what to reply back..for example create your own soap-fault and set your own messages.
now the default $fault generated by the osb itself will get returned
http://www.xenta.nl/blog/2010/07/17/oracle-service-bus-11g-handling-soap-faults/
maybe that one helps you a bit -
Sql server 2000 type4 driver for jdbc connection error
hello,
I am trying to connect m ms sql server 2000 database server with type 4 driver.But I am getting an connection error like *"Error Establishing Socket"* .Can any one please help me out?Well i personally prefer usage of open source MS SQL SERVER 2k jdbc driver called jtds instead of the driver provided by MS themselves(which is proproteriry) as i had similar problem which i personally encountered when i was using it.
go through the below link for further info.
http://jtds.sourceforge.net/
REGARDS,
RaHuL -
JDBC connection error in Crystal Reporting through ESRI Dekho product
Wow, I am so far out of my depth here I am not even sure I am in the correct forum. I have recently started using the GIS software ESRI product Dekho (a web based browser basically) and the reporting tool is Crystal Reports. The JDBC connection required for me to connect to data held in a corporate oracle db is failing with a driver error and I don't know how to troubleshoot it. ESRI support seem to think it's a Crystal Reports issue. If anyone has any idea what I am talking about please respond, including pointing me to a forum which might assist, if this one is not where I should be asking such a question. Thanks in advance.
Simon here from Esri Australia, I work in the support team for the Dekho product, that this client was having problems with.
We established that our Dekho product was passing the relevant information over to Crystal and that Crystal was having issues connecting to a database due to an issue with Crystal not having the correct JBDC drivers installed.
= Therefore we concluded that the client should get in touch with you to resolve these JDBC driver issues.
The error in the report is:
['Failed to open the connection, Details:JDBC driver not found"|http://i7.photobucket.com/albums/y254/jak-c/Outlook1.jpg]
We believe that the issue is specifically a Crystal Reports issue on connecting to an Oracle database.
If we take Dekho out of the equation, the issue is still apparent.
We did some testing on Oracle XE and were able to get it to communicate with Crystal Reports ok.
We had to make the following change:
1. copied the database drivers from:
C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib
to
C:\Program Files (x86)\Business Objects\Common\4.0\java\lib\external\
2. Edit "C:\Program Files (x86)\Business Objects\Common\4.0\java\lib" to include the above JAR file into the classpath tag.
We touch on this in [our own web-help|http://www.dekho.com.au/help/31/default.htm?turl=Documents%2Fconfigurecrystalreports.htm], although this is more specific to SQL Server.
The client had problems setting up this Crystal Reports to Oracle link, due to drivers missing.
Can you generate a support ticket for this client and assist her with getting CR drivers working with her version of Oracle?
As a sidenote - Esri Australia is a distributor for Esri, and not sure if the OEM extends to us?
We would like to get a better relationship with you on how to deal with Crystal related issues with our own product.
For issues like the above, we would like to come up with a more efficient means for our clients to get resolutions to their issues, and if the issue stems to outside our product - a good process for our support team to log a ticket on behalf of our client and pass all the relevant info across, so that a solution can be resolved quickly.
- Do you have a contact in Australia that we could talk to about this?
Let me know if you need the clients contact details - I believe this is still an issue for her. -
Error in adapterlog: JDBC connection error
Hi Experts,
I am getting this error during database connection to the database URL 'jdbc:sqlserver:// <servername>:1433;database=HRBD' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://<servername>:1433;database=HRBD': com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection timed out'
I am able to connect this server from Microsoft SQL Server2005(Which does not require the port number) but when I am trying to connect from PI JDBC sender adapter ,I am getting this error.
It is a SQL Server.JDBC driver seems ok(com.microsoft.sqlserver.jdbc.SQLServerDriver) because I connected the Staging database server from PI but unable to connect to this production database.
After starting the channel ,after 5-7 minutes I am getting this error.
Need your help on urgent basis!!
regards
AnupamAnupam Ghosh wrote:
Hi Navin,
>
> I made a telnet test from putty giving the server name and port number and it showed me the "connection timed out".
> But I made telnet test to other database which resulted in successful connection.
> So is it a firewall issue with that particular databse?
> In that case only network team of that databse can handle this issue?
>
> Thanks,
> Jaydeep
Few things that mght help u
1. Check the port no for the DB that is getting timed out. .check
2. Disable the firewall. and check
3. Consult the N/w and the DB team.. .telling clearly the issue
Good Luck
XA -
Hi!
I am trying to conect to MySql database form a jsp page, but I get error. I am using the following:
1. MySql dababase installed in C:/mysql
2. Tomcat installed in c:/tomcat
3. JDBC driver "mm.mysql-2.0.14-bin.jar" installed in c:\tomcat\lib
Here is my code:
<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost:3306/gixpro1?user=username&password=pwd";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
%>
<html><body>
<%
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "", "");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT * FROM gixpro1");
while (rs.next()) {
out.println(rs.getString("name")+"<br>");
rs.close();
%>
</body></html>
Here is my error:
Internal Servlet Error:
javax.servlet.ServletException: org.gjt.mm.mysql.Driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:462)
at jsp.test_4._jspService(test_4.java:89)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:570)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:481)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClassInternal1(DependClassLoader12.java:240)
at org.apache.tomcat.util.depend.DependClassLoader12Impl$1.run(DependClassLoader12.java:109)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClass(DependClassLoader12.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at jsp.test_4._jspService(test_4.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:570)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:481)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484) at org.apache.tomcat.util.depend.DependClassLoader12Impl$1.run(DependClassLoader12.java:109)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClass(DependClassLoader12.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at jsp.test_3._jspService(test_3.java:69)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:570)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:481)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)Hi!
I also have the same problem (I also test the sample in this case but still got the same error. When I use a standard java client then I can acess mySQL database without any problem, this just occurs when trying to access the database from a JSP page.
CLASSPATH=
C:\Program\RDBMS\mySQL\mysql-connector-java-2.0.14\mysql-connector-java-2.0.14-bin.jar
Please need som advice on this.
Regards
Tobbe
See errormessage below
javax.servlet.ServletException: org.gjt.mm.mysql.Driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
at org.apache.jsp.TestMySQL$jsp._jspService(TestMySQL$jsp.java:91)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
root cause
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1320)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1169) -
JDBC Connect error on Linux: UnsatisfiedLinkError
Hi,
I'm running one of the sample JDBC programs
provided by Oracle (This installation is on
Linux system). This simple program tries to
connect to Database after accepting all the
parameters. When I run this program, I get
the following error.(I'm using Java2).
Any ideas/solution(s) would be appreciated.
Rgds,
$ java JdbcCheckup
Please enter information to test connection to the database
user: scott
password: tiger
database (a TNSNAME entry): ORCL.localhost
Connecting to the database...Connecting...
Exception in thread "main" java.lang.UnsatisfiedLinkError: make_c_state
at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:148)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:103)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
at java.sql.DriverManager.getConnection(DriverManager.java:453)
at java.sql.DriverManager.getConnection(DriverManager.java:133)
at JdbcCheckup.main(JdbcCheckup.java:43)
nullHi again,
now, as I found out how to get around the broken forum login, thank you, Dave, for your reply. You were right, the configuration was the problem.
I did Naming.rebind("//localhost/MyServiceName", serviceObject); which worked well on Windows even when connecting remotely. On Linux I had to put the actual IP address of the machine to make it work, i.e. something such as Naming.rebind("//192.162.2.99/MyServiceName", serviceObject); ...simpler than I feared... ...just in case someone encounters similar trouble.
Ulrich -
Hi
I am using from main() method to access jdbc.
Lookup is successful but I got the following error after that
My Code Snippet
Properties jndiCtxProp = new java.util.Properties();
jndiCtxProp.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl" );
jndiCtxProp.put(Context.PROVIDER_URL, "host:port");
jndiCtxProp.put(Context.SECURITY_PRINCIPAL, "login");
jndiCtxProp.put(Context.SECURITY_CREDENTIALS, "password");
Context initCtx = new InitialContext(jndiCtxProp);
DataSource dataSource =
(DataSource) initCtx.lookup("jdbc/FLIGHTDATA");
System.out.println("nFLIGHTDATA lookup successn"); //no problem upto this
conn = dataSource.getConnection();
I have used the following JAR's
logging.jar
sapj2eeclient.jar
exception.jar
jdbc20.jar
jta.jar
connector.jar
opensql.jar
opensqlapi.jar
opensqlcore.jar
sqljapi.jar
tc_sec_secstorefs.jar
Exception chain is
com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: com.sap.sql.log.OpenSQLException: Could not instantiate class com.sap.sql.connect.OpenSQLDataSourceImpl.
at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:59)
at com.ibm.training.carrier.dbload.JDBCLoader.getConnect(JDBCLoader.java:63)
at com.ibm.training.carrier.dbload.JDBCLoader.doLoad(JDBCLoader.java:29)
Thanks
AnandaHi anand,
Is it not throwing u any error after u give catch statement also?
<b>try()
coding for DB
catch(Exception e)
wdComponentAPI.getMessageManager.raiseException("Exception :" +e);
}</b>
Even this din work?
http://help.sap.com/saphelp_erp2005/helpdata/en/de/7d77f8714b4ef080f2219d7d968008/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/70/a19cc472e72c4481172909938578fc/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/91/ccbf560ecc4e2fb99b09a5e7bce95e/frameset.htm
Hope this helps u,
Regards,
Nagarajan. -
Oracle JDBC Connection Error code 12505 in J2EE
Hi All,
I'm in a great problem.Could not connect my J2EE server to my Oracle database server.
My config/resource.properties file as follows
================================
jdbcDataSource.5.name=jdbc/iisdb
jdbcDataSource.5.url=jdbc:oracle:thin:@128.51.12.33:15 21:iisals.rsapps;create=true
jdbcDriver.1.name=oracle.jdbc.driver.OracleDriver
My config/default.properties file as follows
================================
jdbcDatasources=jdbc/iisdb|jdbc:oracle:thin:@128.51.12.33:1521:iisals.rsapps
Deployment is successful but while running the application through browser the error is as follows
=======================================
javax.ejb.CreateException: java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
which is for either SID identification problem or TCP/IP
port problem.
But from my PC the same database can be connected through sql plus.
So I am n't getting where is the problem ??????
Whether any properties file has to be changed ???
Can anyone help me in this regards,Hai everybody,
I do have the same problem. I am trying to connet to the oracle8.1.7 database in linux machine from windows98. I am able to connect to the database thro' sqlplus, but when i try to connect using JDBC i am getting the follg error :
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNU
M=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
can any one rectify this problem. I checked even java.policy file. Everything seems to be ok.
Thx & regards
jagan
Maybe you are looking for
-
Problem opening Bridge CS5 in Windows 7
When I open Bridge CS5 in Windows 7, I get a pop-up window from User Account Contro that asks "Do you want to allow the following program to make changes to this computer?" The program listed is Bridge. If I say NO, Bridge doesn't open. If I say Y
-
Is there a way to put the pictures in a specific order in the albums? I have my pictures in a new album but would like them in a specific order. Thanks,
-
Efficasoft GPS Utilities Problem (5800)
I used the GPS Utilities on my old N91 and was quite pleased with it and now want to load a new version onto my new 5800. The demo version loads and runs but none of the setup options are 'clickable' which means that I cannot change the default setti
-
Relinked picture files not updating
Hi all, To begin with, I am using final cut pro 10.0.8 on mountain lion 10.8.4. The problem I'm having is that my media files are not updating in final cut pro x once they have been changed outside final cut pro. I'll explain what I'm doing: 1. I hav
-
Could not create JVM error : Substitution
I am trying to create a substitution. I created a new VO as an extension of the existing VO, and then changed the query to include some more columns. I followed the Dev guide: 1. From the JDeveloper menu bar, select Project | Project Settings to open