Jdbc wsdl binding issue
Hi,
I am new to BPEL, facing a small issue. I am creating a BPEL project, after creating a connection with MySQL. I am calling it in my project. when I am building the composite application then jdbc wsdl port is not being visible on casa editor (using netbeans 6.1 IDE).
Please advise.
Thanks.
Edited by: kash.aksh on Dec 1, 2008 10:56 PM
Please post your request at https://open-esb.dev.java.net/MailingLists.html ([email protected]) for quick response.
Similar Messages
-
Attachment binding issue in workflow
Hi All,
I have used FM 'SAP_WAPI_ATTACHMENT_ADD ' in method of my workflow. Here after executing this FM i m getting id of the attachment for this workitem. But now i need to assign this to '_Attach_Objects' of workflow container. so please help me for this binding issue. which i need to bind from method to> task to> workflow. so from next step onwards in workflow i will get that attachment.
Smit ShahHi,
1) In the T.code SWO1, you have to create a custom method for the BO, there execute that method and check whether it working fine
2) Then goto T.code PFTC and Create a Task (Task no. will generate automatically), then call this method and generate the binding
3) Goto T.code SWDD and call that Task by assigning that Task no. and assign the binding
Then test your workflow.
For the Binding see this [link|http://help.sap.com/saphelp_nw04/helpdata/en/c8/bfc39b0fc57a49a0291378f8be0cd6/frameset.htm].
Regards,
Surjith -
Hi,
We are generating WSDL after creating web service in ECC 6.0. We would like to know how can we control the upper/lower case in XML tags when we generate WSDL? Is there any SOAP runtime configuration we have to set? Any kind of help would be appreciated. By default when I check "Mapping of names" check box while creating web service, the system generating WSDL tags as upper & lower case, otherwise the tags are as they are in function module interface.
Thanks,
GSHi Ravi,
Thanks for your reply. Please find one my WSDL below:
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:n0="urn:sap-com:document:sap:rfc:functions" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions" elementFormDefault="unqualified" attributeFormDefault="qualified">
- <xsd:simpleType name="char1">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char10">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char128">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="128" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char20">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="20" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char220">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="220" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char30">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="30" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char32">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="32" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="char50">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="numeric3">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="3" />
<xsd:pattern value="\d*" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="numeric6">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="6" />
<xsd:pattern value="\d*" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" elementFormDefault="unqualified" attributeFormDefault="qualified" xmlns:n0="urn:sap-com:document:sap:rfc:functions">
<xsd:import namespace="urn:sap-com:document:sap:rfc:functions" />
- <xsd:complexType name="Bapiret2">
- <xsd:sequence>
<xsd:element name="Type" type="n0:char1" />
<xsd:element name="Id" type="n0:char20" />
<xsd:element name="Number" type="n0:numeric3" />
<xsd:element name="Message" type="n0:char220" />
<xsd:element name="LogNo" type="n0:char20" />
<xsd:element name="LogMsgNo" type="n0:numeric6" />
<xsd:element name="MessageV1" type="n0:char50" />
<xsd:element name="MessageV2" type="n0:char50" />
<xsd:element name="MessageV3" type="n0:char50" />
<xsd:element name="MessageV4" type="n0:char50" />
<xsd:element name="Parameter" type="n0:char32" />
<xsd:element name="Row" type="xsd:int" />
<xsd:element name="Field" type="n0:char30" />
<xsd:element name="System" type="n0:char10" />
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="ZSdActivityCodes">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="ImExtractMethod" type="n0:char1" />
<xsd:element name="ImFileNameWithPath" type="n0:char128" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="ZSdActivityCodesResponse">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="ExReturn" type="tns:Bapiret2" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="ZSdActivityCodes">
<wsdl:part name="parameters" element="tns:ZSdActivityCodes" />
</wsdl:message>
- <wsdl:message name="ZSdActivityCodesResponse">
<wsdl:part name="parameters" element="tns:ZSdActivityCodesResponse" />
</wsdl:message>
- <wsdl:portType name="Z_ACTIVITY_EXTRACT_ws">
- <wsdl:operation name="ZSdActivityCodes">
<wsdl:input message="tns:ZSdActivityCodes" />
<wsdl:output message="tns:ZSdActivityCodesResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="Z_ACTIVITY_EXTRACT_wsSoapBinding" type="tns:Z_ACTIVITY_EXTRACT_ws">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ZSdActivityCodes">
<soap:operation soapAction="" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Z_ACTIVITY_EXTRACT_wsService">
- <wsdl:port name="Z_ACTIVITY_EXTRACT_wsSoapBinding" binding="tns:Z_ACTIVITY_EXTRACT_wsSoapBinding">
<soap:address location="http://hqsun8.howrey.net:8000/sap/bc/srt/rfc/sap/Z_ACTIVITY_EXTRACT_WS?sap-client=200" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks,
GS -
Hi All,
My Requirement was to publish a RFC as a webserice in PI7.1.
I did the entire configuration and publish display the sender agreement as webservice and took the WSDL from there.
when I test this using SOAP UI tool then this WSDL works fine where the URL is standard
http://host:port/XISOAPAdapter/MessageServlet?channel=:CommunicationComponent:ComminicationChannel
But when I an tring to Use this wsdl in EP I am getting following error.
Cannot Chosse this operation:There is no associated SOAP Binding.
Am I doing Something wrong??
Please help.
Regards,Hi Suraj,
Sorry for late Response.
Please find the below
- <wsdl:portType name="Z_QMNC_SAVE_CORRECTIONS.PortType">
- <wsdl:operation name="Z_QMNC_SAVE_CORRECTIONS">
<wsdl:input message="rfc:Z_QMNC_SAVE_CORRECTIONS.Input" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" />
<wsdl:output message="rfc:Z_QMNC_SAVE_CORRECTIONS.Output" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="Z_QMNC_SAVE_CORRECTIONS.PortTypeBinding" type="rfc:Z_QMNC_SAVE_CORRECTIONS.PortType" xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
- <wsdl:operation name="Z_QMNC_SAVE_CORRECTIONS">
<soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
- <wsdl:input>
<soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding> -
JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..
JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..
I am getting below error when i m trying to access oracle db using oracle 11g client. It works with earlier oracle client versions. how do i resolve this. is there any issue with version of ojdbc6.jar that i am using??? I cant use thin driver since its an old application for which i dont have source files.
Apr 6, 2013 1:00:59 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at PettyCash.SysDate.getSysSubSys(SysDate.java:232)
at org.apache.jsp.PettyCash.index_jsp._jspService(org.apache.jsp.PettyCash.index_jsp:186)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Code is as follow for reference
import oracle.jdbc.driver.*;
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
conn = DriverManager.getConnection ("jdbc:oracle:oci8:@" + database,db_user, db_pass);
eNVIRONMENT VARIABLES set are as follows:
classpath
C:\Program Files\apache-tomcat-5.5.12\common\lib\servlet-api.jar;C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\classes12.jar;C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\ojdbc6.jar;
JAVA_HOME
C:\Program Files\Java\jdk1.5.0_04
PATH
C:\Program Files\Java\jdk1.5.0_04\bin
ORACLE_HOME
D:\Oracle11\product\11.2.0\client_1\BINApr 8, 2013 5:24:06 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.abc.index_jsp._jspService(org.apache.jsp.abc.index_jsp:280)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
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:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
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:595) -
How to use JDBC Positional Binding Style & ExecuteWithParams?
Can anyone provide any help here including any documentation on how to configure this (I've checked online help and the developer guide.)
When defining multiple Bind Position variables on a View Object (using sql statement binding style: JDBC Positional), should I defined multiple bind variable names? Otherwise, if I don't, when I use ExecuteWithParams operation to create the data control, only one input variable field is displayed. I can get a single bind position variable to work, but am struggling on how to configure / get multiple bind position variables to work with ExecuteWithParams.
Here's my current configuration:
1. Define View Object with two JDBC Positional Binding Parameters
-- Bind Variables: name=parm1 (???should I define a second bind variable name???)
-- Bind Positions = 0,1
-- SQL Statement add another position var in where clause: "match (zip) against (CONCAT(?,'*') IN BOOLEAN MODE) and "match (name) against (CONCAT(?,'*') IN BOOLEAN MODE)
2. On a JSF page, drag ExecuteWithParams operation from data control onto the JSF page. If I have defined only one bind variable name, only one input field is displayed (and one field label that I defined for that bind variable), but I need two input fields - one for each bind position variable. How do I set this up?
Back-end Database is MySQL 5.0.1 which is why I am using binding stye JDBC positional.
Thanks, Tom
Message was edited by:
javaXI did some more testing and the problem is that the queries work with one bind position variable but not with two. I created two simple view objects off of the same entity object to test:
#1 - ViewObject with one bind position variable - where clause: where id > ?
#2 - ViewObject with two bind position variables - where clause: where id > ? and id < ?
I created two separate .jspx pages, view1.jspx (one input field) and view2.jspx (two input fields), for each view object by dragging ExecuteWithParams operation onto the JSF page.
The .jspx page with one input field works (returns result sets.) The view2.jspx page with two input fields does not work - the query does not return any result sets (no errors produced, it just does not return any rows) - I've tested my query outside of jdeveloper and it works fine. I also tried switching my inputs to make sure I did not have an illogical query (i.e., id >100 and id< 1).
Is there anything different / extra I need to do to use two bind position variables?
I'm STUCK HERE.
Everything in this simple test was identical except for using 2 input variables versus 1.
Technology stack is: jdeveloper 10.1.3, jsf/ADF BC, mySQL 5.01
Since I now understand what the problem is better, I'm going to re-post this as a new topic that more appropriately describes the problem, "Queries not working with multiple bind position variables?"
Message was edited by:
javaX -
Hi to All,
Iam new to web services. Plz can any body explain the use of *<wsdl:binding>* element in wsdl file.Venkateswarlu.G wrote:
Hi to All,
Iam new to web services. Plz can any body explain the use of *<wsdl:binding>* element in wsdl file.Hi,
I am not an expert with these WSDL, but I have been working with these for the past 2-3months. With this exposure I can tell you the following.
In wsdl:binding element , wsdl is nothing but namespace its importance is same as in other xml files.
binding, Its inside this binding tag usually we specify wat are the operations supported by this wsdl.
I hope my explanation is clear, if not pls revert back. I would be pleased to help you. -
A data-binding issue with a combo box.
Hi,
Iu2019m having a data-binding issue with a combo box. The field it is bound to is an integer. The valid values in the combo box are 1, 2, and 3. If I add a record when it is set to 1 or 2, the value gets stored correctly. If I add a record when it is set to 3, it is stored as 1. However, I can bring up the record just added on the form, change it to 3, and click u201CUpdateu201D and it is saved correctly as 3. If I change it so that the valid values are 4, 5, and 6, it saves a 1 regardless of what is selected in the combo box. It looks like the combo box is correctly bound for updates but not for adds. The table is a master type UDO. Any ideas? Iu2019m somewhat committed to the field being an integer. I'm using 2007A PL47.
Thanks,
Mike
Edited by: Mike Angelastro on Jul 1, 2009 2:43 PMI tried a few things on my own. The result is that I decided that it was not a good idea to use a combo box bound to an integer (numeric) field. I donu2019t think the SDK can handle it. The reason it was an integer field in the first place is that before I changed it to a combo box it was a group of two option buttons. Option buttons use an integer (numeric) field. This worked just fine until I added a third option; the SDK didnu2019t handle the third option correctly when adding records. I thought that using a combo box instead would fix that. I was wrong; the problem remained. So I decided to use a character (alphanumeric) field instead. This works just fine.
So here is my advice: Never use option buttons if they need to be bound to the database; a combo box will actually work better when bound to the database. But use a character (alphanumeric) field.
Edited by: Mike Angelastro on Jul 5, 2009 9:15 PM -
Revision: 17187
Revision: 17187
Author: [email protected]
Date: 2010-08-04 13:44:35 -0700 (Wed, 04 Aug 2010)
Log Message:
Fixed binding issue on the source property of the contact's picture
Modified Paths:
cairngorm3/trunk/samples/insync/insync-modularExtended-contacts/src/insync/contacts/prese ntation/ContactForm.mxmlRevision: 17187
Revision: 17187
Author: [email protected]
Date: 2010-08-04 13:44:35 -0700 (Wed, 04 Aug 2010)
Log Message:
Fixed binding issue on the source property of the contact's picture
Modified Paths:
cairngorm3/trunk/samples/insync/insync-modularExtended-contacts/src/insync/contacts/prese ntation/ContactForm.mxml -
Revision: 17186
Revision: 17186
Author: [email protected]
Date: 2010-08-04 13:43:41 -0700 (Wed, 04 Aug 2010)
Log Message:
Fixed binding issue on the source property of the contact's picture
Modified Paths:
cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactForm.mxmlRevision: 17186
Revision: 17186
Author: [email protected]
Date: 2010-08-04 13:43:41 -0700 (Wed, 04 Aug 2010)
Log Message:
Fixed binding issue on the source property of the contact's picture
Modified Paths:
cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactForm.mxml -
WSDL created by xfire binding issues
Hi all
I have two questions, any answer will be great!
I have Java beans which I "turn into WSDL" using xfire binding.
1. How can I add a WSDL version ? I mean, my POJO's change sometimes, fields are added, required fields become optional, etc. So I'd like to add a version, so whoever uses the WSDL, will know when a new version is out.
How can this be done?
2.The 'minOccure' and 'nillable' attributes are created by default. this is usually ok, but sometimes I wan to change this, how do I do it ?
I found some info in the http://xfire.codehaus.org site, but thats only for defaulting ALL members, and does not show how to control individual members.
Thanks
DaveI've found a solution for the 2nd problem:
Using the annotation:
@XmlElement(minOccurs = "", nillable = )
placed on the getter method will do the job.
E.g - @XmlElement(minOccurs = "1", nillable = false), thus the member is required and not allowed to be null.
The 1st problem still remains though:
How do I add a version number to the outgoing WSDL ?
I don't mind it being as a documentation or any other solution, I just need to add a 'line' to the WSDL and be able to place a verion number (such as 3.1) -
Hi everyone, I'm having an issue with a not bound exception. According to the logs, I'm getting the not bound exception with the following details:
The excerpt is here: 04/24/08 11:44:42.692 Info: [ProcessWrapper] org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'myDataSource' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: WRP not bound]
It looks for me that Spring is doing the lookup correctly but failing to find the resource in JNDI. What I found for binding in the log is following.
04/24/08 11:44:31.302 Info: [ProcessWrapper] 11:44:31,302 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultD S' to JNDI name 'javaefaultDS'
04/24/08 11:44:31.552 Info: [ProcessWrapper] 11:44:31,552 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=J msXA' to JNDI name 'java:JmsXA'
04/24/08 11:44:31.614 Info: [ProcessWrapper] 11:44:31,614 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MACRAE' to JNDI name 'java:MACRAE'
We can see these JNDI names are successfully bound. WRP is the app which I am trying to run, MACRAE is another app that works in that environment. The web server is JBoss running in a DataSynapse grid server. Any tips on how to get the binding fixed?OK, I seem to be getting a new exception, not sure if I did any change but ran into this exception in the logs,
11/08/24 18:45:08 ----YOGI----the exception from this specific block is javax.naming.Reference cannot be cast to javax.sql.DataSource*
From what I read on the web, this is prevalent in glassfish and jboss. The reason could be that missing j2ee.jar in classpath or duplicate jdbc jars. I added j2ee.jar to my application library in oc4j dint resolve the issue. I removed jdbc jar from the OAS lib folder and restarted, it dint help.
Any other clues, anyone? -
Oracle 8i jdbc/Tomcat connection issues
Tomcat 4.1.8
Oracle 8i JDBC Driver
I have been able to create the DataSource as a global resource and as a local resource inside the context of the application.
The code hangs when it attempts to create a connection. I have been able to connect to the database and perform the necessary query in a standalone application to ensure that I actually can connect.
JSP Code:
<html>
<head>
<title>VTW App</title>
</head>
<body>
<%
vtw.VTWApp tst = new vtw.VTWApp();
tst.init();
%>
<h2>Results</h2>
<%= tst.getList() %>
</body>
</html>
Java Code (Class called by JSP):
package vtw;
import javax.naming.*;
import javax.sql.*;
import java.sql.*;
public class VTWApp {
String list = "EMPTY";
public void init() {
try{
Context ctx = new InitialContext();
if(ctx == null )
throw new Exception("Boom - No Context");
System.out.println("Context Created ...");
DataSource ds =
(DataSource)ctx.lookup(
"java:comp/env/jdbc/oracleDB");
if (ds != null) {
System.out.println("DataSource Created ...");
Connection conn = ds.getConnection();
System.out.println("Connection Pulled");
if(conn != null) {
System.out.println("Connection Good");
Statement st = conn.createStatement();
String query = "";
query += "select grpid, to_char(min(dtlastendtime),'mm-dd-yyyy hh24:mi:ss') ";
query += "from calc_table where equipmentsernum in (";
query += "'888000','888001'";
query += ") group by grpid";
ResultSet rs = st.executeQuery(query);
if(rs != null) {
list = "";
while(rs.next()) {
list += (rs.getString(1) + "," + rs.getString(2));
rs.close();
conn.close();
System.out.println("Connection Closed");
} else {
System.out.println("Connection Not Established");
}catch(Exception e) {
e.printStackTrace();
public String getList() { return list; }
}I figured out the issue ...
In the server.xml file the resource & resource params needed to be modified..
1. Set type to oracle.jdbc.pool.OracleDataSource
2. Set factory to oracle.jdbc.pool.OracleDataSourceFactory
3. In the Java code cast the context lookup to an OracleDataSource instead of a java.sql.DataSource
Oracles DataSource does not subclass the jdbc DataSource for its OracleDataSource class everything works fine now.
<Resource name="jdbc/mydb" scope="Shareable" type="oracle.jdbc.pool.OracleDataSource"/>
<ResourceParams name="jdbc/mydb">
<parameter>
<name>validationQuery</name>
<value></value>
</parameter>
<parameter>
<name>factory</name>
<value>oracle.jdbc.pool.OracleDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@server.company.com:1521:dbname</value>
</parameter>
<parameter>
<name>password</name>
<value>guest</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>user</name>
<value>guest</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
</ResourceParams> -
Hi Experts,
The scenario is file to JDBC, the messages are getting failed in XI MDT with the following error "JDBC Message processing failed ,reason when attempting to get processing resources: com.sap.aii.af.service.utill.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL<JDBC Connection details maintained in CC>: SQLException: Io exception: The Network Adapter could not establish the connection".
We got this error after changing the IP addreass of the Oralce system. we did maintained in all the communication channels with new IP Address, previously the data is updating to the Oralce table with old IP addreass.
IP address is also maintained in XI Host file. We are able to ping the Oralce from XI with new IP.
Can any body suggest how to rectify the issue.
Thanks in Advance
BhaskarHi,
have you checked cache status. It is possbile that the change hasn't been applied yet. That would explain, why the database can't be reached.
Stop/Start of communication channel might also help. Sometimes it si necessary to restart the whole JDBC Adapter.
If all this fails, you should get yourself a free copy of DBVisualizer, use the same database driver as is installed on PI, provide credentials and try to reach database. Might also be a driver issue.
Regards
Sven -
Hi SDNers,
I have a scenario which picks data from AS400 table using JDBC adapter.
My sample SQL query and update query are as follows
SQL query : Select * from <table> where <keyfield> = min(keyfield) and flag ="";
Update query: Update <table> set flag = "true" where <keyfield> = min(keyfield) and flag ="";
This is to ensure records are processed one by one.
All goes well. Suddenly I have a issue where out of "n" records in the table one record failed to reach the target system. My cause of concern is there is no error in RWB and SXMB_MONI.
I have identified the missing record and could see the flag has been set to "true" in the table. I dont have TREX installed in XI, so could not track the message in XI.
Has any one faced this issue? Any ideas are highly appreciated.
Regards,
Jai ShankarHi All,
It seems, still the issue is not solved. We have the same issue again inspite of setting the transaction isolation level to serializable.
SAP Note says
<i>The SELECT and the UPDATE are run in the same DB transaction,
i.e. both statements have the same view on the database.
Make sure that both statements use the same WHERE clause. An
additional requirement for the correct operation of this scenario
is the configuration of an appropriate transaction isolation level
on the database (i.e., repeatable_read or serializable). You might
also consider using a "SELECT FOR UPDATE" statement instead of a
plain SELECT statement to ensure proper locking on the database</i>
We have ensured
a. Same where clause.
b. Serializable transaction isolation level
Am not much sure how SELECT FOR UPDATE works. We are using AS400 db.
Any experience with SELECT FOR UPDATE.
Regards,
Jai Shankar
Maybe you are looking for
-
Oracle Application server 10.1.3.1 Installation error
I am facing a problem while installing OAS 10.1.3.1, i can't able to move forward, its showing copying files for HTTP server files 1.3.31.0.0 and copying 'owm-3_0.jar' and not moving.... Please look at the below log and please suggest the alternative
-
Selecting a set of records with diff docs but with same docno
Dear Oracle Gurus Consider the following Data DocNo Doctype ===== ====== 1021 PJ 1021 TJ 1022 TJ 1022 TJ 1022 PJ 1023 TJ 1024 PJ 1025 PJ 1026 PJ 1026 TJ 1027 PJ 1028 PJ 1028 TJ As specified there will be transactions involving Doctype PJ alone . and
-
10.1.0.3 database on Red Hat ES 4.0
Anyone completed this? My OUI bombed out when it realised the O/S was version 4 but I hope there is a workaround for this. I can't afford too much outage so it would be graet to know if it will work prior to re-installing RH4 (again). Thanks
-
Copying basic dates to forecast dates
Hi Experts, I am using WBSE and activities in my project. I want to copy basic dates to forecast dates. But, when i am doing this in Edit>Reconcile date->Transfer basic dates to forecast dates. Then my Planning type in network header also gets change
-
Gr-based-IV flag not changable by SRM buyer
Hi, We are on SRM 7, ECS. Our vendor masters in ECC do not have GR-based-IV flag ticked. When we create a SRM PO, the GR-based-IV is not ticket by default. The following are the default status of the 3 indicators in SRM PO by default: GR indicator: T