Connection problem while invoking remote method from client using oracle 8.1.6 server
while using a connection object to make connection to oracle in all remote methods(in EJB)only the first remote method called from the EJB client is getting invoked and the connection stops.It gives me COMM_FAILURE while invoking the second method in oracle 8.1.6.Help me out in this aspect immediately please.
r singh wrote:
>
I am getting "No Suitable Driver" exception from WebLogic 6.1 (sp1) at
the start up of the server.
My settings:
- WLS 6.1 on a solaris 8 machine and Oracle 8.1.6 on a WIN2K machine.
- I created the connection pool for oracle with the following
parameters:
connection name: OracleConnectionPool
url: jdbc.oracle.thin:@myOracleServer:1521:myDBName
driver class name: oracle.jdbc.driver.OracleDriver
properties: user=scott
password=tiger
- I have also downloaded classes12.zip and nls_charset12.zip from
Oracle.com
and have placed under $WL_HOME/lib.
- I have added $WL_HOME/lib/classes12.zip:$WL_HOME/lib/nls_charset12.zip
in
front of the $CLASSPATH in the startWeblogic.sh script. The echoed
classpath
from the startup script is:
/opt/tools/bea/wlserver6.1/lib/classes12.zip:/opt/tools/bea/wlserver6.1/lib/nls_
charset12.zip:/opt/tools/bea/wlserver6.1:/opt/tools/bea/wlserver6.1/lib/weblogic
_sp.jar:/opt/tools/bea/wlserver6.1/lib/weblogic.jar
- Still I get the error:
<Jan 16, 2002 1:38:45 PM EST> <Error> <JDBC> <Cannot startup
connection pool "Or
acleConnectionPool" No suitable driver>
Can somebody point me out if i am doing anything wrong here.
Thanks.
RamanandHi,
Sure. Your URL should be "jdbc:oracle:thin:@myOracleServer:1521:myDBName"
not "jdbc.oracle.thin:@myOracleServer:1521:myDBName"
Joe
Similar Messages
-
RMI: connection refused error while invoking remote method from client mac.
Hi All,
when i run client program, which is calling remote object from other system, it shows the below error.
please help me solving this issue, i also have policy file and installed security manager.
Exception in Cliendjava.rmi.ConnectException: Connection refused to host: 10.66.
112.137; nested exception is:
java.net.ConnectException: Connection refused: connect
thanks in advance.
Regards,
Anand.See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].
-
Problem while invoking webservice-method in client-code
Hi,
I had written webservice-client-code (using uddi-ext.jar, as i am using uddi for publishing webservices.) which is invoking webservice method successfully with complex datatypes(both for return type and input paramters).
But while calling following webservice-method from my client-code:
public ComplexType[] getData(String[] p_str1, String[] p_str2)
it is throwing exception
The Exception is:
[ERROR] - 27 Mar 2007 12:34:38 -failed to invoke operation 'getData' due to an error in the soap layer (SAAJ); nested exception is: Message[failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException: mapping lookup failure. type=['java:language_builtins.lang']:ArrayOfString schema context=TypedSchemaContext{javaType=[Ljava.lang.String;}]
Although I had done correct registration of mapping of ArrayOfString in client-code:
registry = m_Service.getTypeMappingRegistry();
m_TypeMapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING );
m_TypeMapping.register( ArrayOfStringHolder.class,
new QName( "java:language_builtins.lang", "ArrayOfString" ),
new ArrayOfStringCodec(),
new ArrayOfStringCodec());
But some how it doesnt works.
I had searched on google as well but didnt find any reliable solutions.
Please advice.
Edited by meetmrdeepak at 03/27/2007 2:43 AM
Edited by meetmrdeepak at 03/27/2007 2:45 AMSee item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].
-
Error while invoking a Dataservice from client application
Hi,<br><br>
Code snippet of Client to invoke DataService is....<br><br>
Hashtable h = new Hashtable();<br>
h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");<br>
h.put(Context.PROVIDER_URL,"t3://10.1.5.31:7001");<br>
h.put(Context.SECURITY_PRINCIPAL,"weblogic");<br>
h.put(Context.SECURITY_CREDENTIALS,"weblogic"); <br>
Context context = new InitialContext(h);<br>
DataService ds =DataServiceFactory.newDataService(context, "HLCApp","ld:HLCAppDataServices/com/pfizer/hlc/dataservices/HCP_DETAILS"); <br>
<u>DataObject obj= (DataObject) ds.invoke("HCP_DETAILS", null);</u><br>
System.out.println(" HCP details : \n" + obj);
<br><br><br>
The line(which is underlind) is causing the error(I checked by putting some System.outs).
<br>
While invoking a DataService from the Client application(Java Client) I am getting the following error in the console.
<br><br>
Exception in thread "main" com.bea.ld.dsmediator.client.exception.SDOMediatorExc
eption: com.bea.ld.dsmediator.client.exception.SDOMediatorException: weblogic.rj
vm.PeerGoneException: ; nested exception is:
java.io.EOFException
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invoke(XmlDataService
Base.java:114)
at com.pfizer.hlc.DSClient.HCP.main(HCP.java:23)
Caused by: com.bea.ld.dsmediator.client.exception.SDOMediatorException: weblogic
.rjvm.PeerGoneException: ; nested exception is:
java.io.EOFException
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invokeQuery(XmlDataSe
rviceBase.java:183)
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invoke(XmlDataService
Base.java:102)
... 1 more
Caused by: weblogic.rjvm.PeerGoneException: ; nested exception is:
java.io.EOFException
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:248)
at com.bea.ld.Server_ydm4ie_EOImpl_816_WLStub.executeFunction(Unknown So
urce)
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invokeQuery(XmlDataSe
rviceBase.java:157)
... 2 more
Caused by: java.io.EOFException
at weblogic.rjvm.t3.T3JVMConnection.endOfStream(T3JVMConnection.java:897
at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.ja
va:599)
at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:549)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:707)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:654)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:2
82)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
<br><br><br><br>
<b>And in the server's log file the exception is like below</b><br><br>
<Nov 1, 2006 4:29:31 PM IST> <Error> <RJVM> <gsipl-c2-8> <cgServer> <ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <BEA-000503> <Incoming message header or abbreviation processing failed
<b>java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940</b>
java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
at java.io.ObjectStreamClass.initNonProxy(Ljava.io.ObjectStreamClass;Ljava.lang.Class;Ljava.lang.ClassNotFoundException;Ljava.io.ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Z)Ljava.io.ObjectStreamClass;(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Z)Ljava.io.ObjectStreamClass;(Unknown Source)
at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown Source)
at java.io.ObjectInputStream.readObject()Ljava.lang.Object;(Unknown Source)
at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:33)
at java.io.ObjectInputStream.readExternalData(Ljava.io.Externalizable;Ljava.io.ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unknown Source)
at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown Source)
at java.io.ObjectInputStream.readObject()Ljava.lang.Object;(Unknown Source)
at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:212)
at weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputStream.java:251)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:748)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:782)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
<br><br><br>
<b>My workstation environment is</b>
Weblogic 8.1 SP6,Aqualogic 2.0 ,os is WindowsXP and JDK is jrockit81sp6_142_10.
<br><br><br>
Does anyone have any idea, why i am getting this error.
<br><br>
Thanks,<br>
Suresh varma.Hi Suresh varma
Did you get any answer for your problem?
I'm having the exact same problem. Working with Weblogic 8.1 SP6 and getting this strange message whenever I'm calling my data service.
I've followed the guidlines given on the URL posted here, and still getting the same message.
Let me know if you have any idea.
Cheers
Rod -
Error while invoking ContactQueryPage method from contact.wsdl
Hi All,
Could any one provide me the java client for OnDemand webservice (contact.wsdl). I want to query ContactQueryPage operation.
I am facing some problem while making a call. I am trying with both Axis call as well as ContactStub. but its not working in either way.
Here is the snnipet I am using to invoke a method using ContactStub
String endpoint = "https://secure-ausomxdsa.crmondemand.com/Services/Integration;"+jessionId;
ContactStub stub = new ContactStub(endpoint);
ContactWS_ContactQueryPage_Output queryOutput = null;
ContactWS_ContactQueryPage_Input queryInput = new ContactWS_ContactQueryPage_Input();
ListOfContact listOfContact = new ListOfContact();
Contact contact = new Contact();
queryInput.setListOfContact(listOfContact);
queryInput.setUseChildAnd("Contact");
queryInput.setPageSize("10");
queryInput.setStartRowNum("1");
queryOutput = stub.ContactQueryPage(queryInput);
When I run the program..I get following exception :
org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
Can any one help me out. Its needed urgently.
Thanks & Regards,
SanjayHi !
From what I see, the only problem is the setUseChildAnd function which is waiting for a true or false argument and not a char...
Hope this will help, feel free to ask more !
Max -
Problem while invoking ODI Scenario from BPEL
Hi,
I am trying to invoke a scenario from BPEL process through ODIPublicWebService.
When I initiate the process, its failing with following error message....
InvokeDeptAdmin_invokeScenario_OutputVariable>
-<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="part1">
-<ns1:invokeScenarioResponse xmlns:ns1="xmlns.oracle.com/odi/OdiInvoke/">
<ns1:Ok>false
</ns1:Ok>
<ns1:SessionNumber>23101
</ns1:SessionNumber>
<ns1:ErrorMessage>Agent didn't execute this command:
</ns1:ErrorMessage>
</ns1:invokeScenarioResponse>
</part>
</InvokeDeptAdmin_invokeScenario_OutputVariable
I observed that its failing as I am not giving any input to optional parameters like
<xsd:element name="SessionName" minOccurs="0" type="xsd:string" />
<xsd:element name="Keywords" minOccurs="0" type="xsd:string" />
<xsd:element name="Variables" maxOccurs="unbounded" minOccurs="0" type="VariableType" />
I can see following empty tags in my Audit of BPELConsole....
<SessionName/>
<Keywords/>
<Variables/>
And null is being considered as a variable by the Agent and following Exception is thrown in the Operator
java.lang.Exception: Specified variable not found in the Repository : null
at com.sunopsis.dwg.dbobj.SnpSession.a(SnpSession.java)
at com.sunopsis.dwg.dbobj.SnpSession.y(SnpSession.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSessionPreTrt(SnpSession.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.h.y(h.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Please let me know how can I overcome this problem
Appreciate earliest response.
Thanks!!!
Message was edited by:
user644377Hi, how are you?
I did works including a parameter in my scenario and put value in this parameter on call scenario from BPEL. If i remove the parameter on the scenario and the call, its dont works.
Try include a parameter in your scenario. -
Connection Refused while invoking Web Service from BPEL process
Hie
I am getting the following error when I try to invoke a web service (created in JDeveloper) from a BPEL process.
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="code">
<code>Server.userException</code>
</part>
<part name="summary">
<summary>when invoking endpointAddress '.......................', java.net.ConnectException: Connection refused: connect</summary>
</part>
<part name="detail">
<detail>AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.net.ConnectException: Connection refused: connect faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused:
Did anyone come across a similar problem...??? Plz help:(Hi everybody,
I have the same problem. I developed a sample bpel process and tried to access it form another one, but still having the same exception :
<remoteFault>
<part name="code" >
<code>Server.userException</code>
</part>
<part name="summary" >
<summary>when invoking endpointAddress 'http://set.by.caller', java.net.UnknownHostException: set.by.caller</summary>
</part>
<part name="detail" >.......
Thanks for your help!
miroo -
Problem while invoking Bpel Process from Browser
server WSDL
<definitions
name="getOpenInvoicesService"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService/"
xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" >
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService" schemaLocation="getOpenInvoicesService.xsd" />
</schema>
</types>
<message name="getOpenInvoicesServiceInput_msg">
<part name="getOpenInvoicesServiceInput_msg" element="db:getOpenInvoicesServiceInput"/>
</message>
<message name="getOpenInvoicesServiceOutputCollection_msg">
<part name="getOpenInvoicesServiceOutputCollection" element="db:getOpenInvoicesServiceOutputCollection"/>
</message>
<portType name="getOpenInvoicesService_ptt">
<operation name="getOpenInvoicesService">
<input message="tns:getOpenInvoicesServiceInput_msg"/>
<output message="tns:getOpenInvoicesServiceOutputCollection_msg"/>
</operation>
</portType>
<binding name="getOpenInvoicesService_binding" type="tns:getOpenInvoicesService_ptt">
<jca:binding />
<operation name="getOpenInvoicesService">
<jca:operation
SqlString=" SELECT distinct aps.trx_number TrxNumber, ra.purchase_order PurchaseOrder, rl.sales_order OrderNumber, ra.interface_header_attribute2 OrderType, hc.account_number CustomerNumber, rt.name TrxType, aps.acctd_amount_due_remaining AmmountDue, aps.trx_date TrxDate, aps.due_date TrxDueDate FROM ra_customer_trx_all ra , ra_customer_trx_lines_all rl , ar_payment_schedules_all aps , ra_cust_trx_types_all rt , hz_cust_accounts hc , hz_parties hp , hz_cust_acct_sites_all hcasa_bill, hz_cust_site_uses_all hcsua_bill , hz_party_sites hps_bill , ra_cust_trx_line_gl_dist_all rct WHERE 1 = 1 AND ra.customer_trx_id = rl.customer_trx_id AND ra.customer_trx_id = aps.customer_trx_id AND ra.org_id = aps.org_id AND rct.customer_trx_id = aps.customer_trx_id AND rct.customer_trx_id = ra.customer_trx_id AND rct.customer_trx_id = rl.customer_trx_id AND rct.customer_trx_line_id = rl.customer_trx_line_id AND ra.complete_flag = 'Y' AND rl.line_type IN ('FREIGHT', 'LINE') AND ra.cust_trx_type_id = rt.cust_trx_type_id AND ra.bill_to_customer_id = hc.cust_account_id AND hc.status = 'A' AND hp.party_id = hc.party_id AND hcasa_bill.cust_account_id = ra.bill_to_customer_id AND hcasa_bill.cust_acct_site_id = hcsua_bill.cust_acct_site_id AND hcsua_bill.site_use_code = 'BILL_TO' AND hcsua_bill.site_use_id = ra.bill_to_site_use_id AND hps_bill.party_site_id = hcasa_bill.party_site_id AND hcasa_bill.status = 'A' AND hcsua_bill.status = 'A' AND aps.amount_due_remaining <> 0 AND aps.status = 'OP' AND hc.account_number= ?"
InteractionSpec="oracle.tip.adapter.db.DBPureSQLInteractionSpec" >
</jca:operation>
<input/>
<output/>
</operation>
</binding>
<service name="getOpenInvoicesService">
<port name="getOpenInvoicesService_pt" binding="tns:getOpenInvoicesService_binding">
<!--Your runtime connection is declared in
J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
These mcf properties here are from your design time connection and
save you from having to edit that file and restart the application server
if eis/DB/sfh is missing.
These mcf properties are safe to remove.-->
<jca:address location="eis/DB/sfh" UIConnectionName="sfh"
ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
mcf.DriverClassName="oracle.jdbc.OracleDriver"
mcf.PlatformClassName="oracle.toplink.internal.databaseaccess.Oracle9Platform"
mcf.ConnectionString="jdbc:oracle:thin:@localhost:1526:xxxx"
mcf.UserName="apps"
mcf.Password="53CB0F044A0D3DD2C063679F18F89870" />
</port>
</service>
<plt:partnerLinkType name="getOpenInvoicesService_plt" >
<plt:role name="getOpenInvoicesService_role" >
<plt:portType name="tns:getOpenInvoicesService_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions>
client.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions
name="getOpenInvoices"
targetNamespace="http://xmlns.oracle.com/getOpenInvoices"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:client="http://xmlns.oracle.com/getOpenInvoices"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
>
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/getOpenInvoices" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="getOpenInvoicesProcessResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
<element name="getOpenInvoicesProcessRequest">
<complexType>
<sequence>
<element name="accountNumber" type="string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="getOpenInvoicesRequestMessage">
<part name="payload" element="client:getOpenInvoicesProcessRequest"/>
</message>
<message name="getOpenInvoicesResponseMessage">
<part name="payload" element="client:getOpenInvoicesProcessResponse"/>
</message>
<portType name="getOpenInvoices">
<operation name="OpenInvoices">
<input message="client:getOpenInvoicesRequestMessage"/>
<output message="client:getOpenInvoicesResponseMessage"/>
</operation>
</portType>
<binding name="OpenInvoicebindings" type="client:getOpenInvoices">
<http:binding verb="GET"/>
<operation name="OpenInvoices">
<http:operation location="/OpenInvoices"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<service name="OpenInvoiceService">
<port binding="client:OpenInvoicebindings" name="OpenInvoicesport">
<http:address location="http://sys0004:8889/httpbinding/default/getOpenInvoices"/>
</port>
</service>
<plnk:partnerLinkType name="getOpenInvoices">
<plnk:role name="getOpenInvoicesProvider">
<plnk:portType name="client:getOpenInvoices"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
bpel process
<?xml version = "1.0" encoding = "UTF-8" ?>
<!--
Oracle JDeveloper BPEL Designer
Created: Tue Jul 13 11:05:51 IST 2010
Author:
Purpose: Synchronous BPEL Process
-->
<process name="getOpenInvoices"
targetNamespace="http://xmlns.oracle.com/getOpenInvoices"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService/"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:client="http://xmlns.oracle.com/getOpenInvoices"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<!--
PARTNERLINKS
List of services participating in this BPEL process
-->
<partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information associated
with the client role are automatically set using WS-Addressing.
-->
<partnerLink name="client" partnerLinkType="client:getOpenInvoices"
myRole="getOpenInvoicesProvider"/>
<partnerLink name="getOpenInvoicesService"
partnerRole="getOpenInvoicesService_role"
partnerLinkType="ns1:getOpenInvoicesService_plt"/>
</partnerLinks>
<!--
VARIABLES
List of messages and XML documents used within this BPEL process
-->
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="inputVariable"
messageType="client:getOpenInvoicesRequestMessage"/>
<!-- Reference to the message that will be returned to the requester-->
<variable name="outputVariable"
messageType="client:getOpenInvoicesResponseMessage"/>
<variable name="Invoke_1_getOpenInvoicesService_InputVariable"
messageType="ns1:getOpenInvoicesServiceInput_msg"/>
<variable name="Invoke_1_getOpenInvoicesService_OutputVariable"
messageType="ns1:getOpenInvoicesServiceOutputCollection_msg"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in getOpenInvoices.wsdl) -->
<receive name="receiveInput" partnerLink="client"
portType="client:getOpenInvoices" operation="OpenInvoices"
variable="inputVariable" createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<assign name="Assign_1">
<copy>
<from variable="inputVariable" part="payload"/>
<to variable="Invoke_1_getOpenInvoicesService_InputVariable"
part="getOpenInvoicesServiceInput_msg"/>
</copy>
</assign>
<invoke name="Invoke_1" partnerLink="getOpenInvoicesService"
portType="ns1:getOpenInvoicesService_ptt"
operation="getOpenInvoicesService"
inputVariable="Invoke_1_getOpenInvoicesService_InputVariable"
outputVariable="Invoke_1_getOpenInvoicesService_OutputVariable"/>
<assign name="Assign_2">
<copy>
<from variable="Invoke_1_getOpenInvoicesService_OutputVariable"
part="getOpenInvoicesServiceOutputCollection"/>
<to variable="outputVariable" part="payload"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client"
portType="client:getOpenInvoices" operation="OpenInvoices"
variable="outputVariable"/>
</sequence>
</process>the above is the server and client wsdls and Bpel process. i have created the wsdl so as to call from HTTP calling, means process is been called from Browser .... but i can't see the result ...
http://sys0004:8889/httpbinding/default/getOpenInvoices/OpenInvoices?accountNumber=1608
above is the link called from browser
output in the browser ::: <getOpenInvoicesProcessResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/getOpenInvoices" />
actually it has to fetch data from DB and show in xml format can anyone assist me where i am going wrongHi Rajesh,
Please refer \bpel\samples\tutorials\102.InvokingProcesses\jsp.
BPEL Tutorial 7: Invoking BPEL Processes through SOAP and Java : Reference: 2004/06/14/orabpel/d5/1.0
Hope this helps!
Regards
Anirudh Pucha -
Problems invoking a method from a web service
Am using netbeans 6.1 and my problem is when i invoke a method from a web service that has a custom class as a return type.
When I debug the client that consumes my web service, It get Stack in this line:
com.webservice.WebServiceInfoBean result = port.getWebServiceInfo(nameSpace, serviceName, portName, wsdlURL);
i don't get any error on the console.
static public void function1() {
try { // Call Web Service Operation
com.webservice.WebServiceMonitorService service = new com.webservice.WebServiceMonitorService();
com.webservice.WebServiceMonitor port = service.getWebServiceMonitorPort();
// TODO initialize WS operation arguments here
java.lang.String nameSpace = "NameSpaceHere";
java.lang.String serviceName = "WebServicePrueba";
java.lang.String portName = "Soap";
java.lang.String wsdlURL = "http://localhost/Prueba/WebServicePrueba.asmx?wsdl";
// TODO process result here
com.webservice.WebServiceInfoBean result = port.getWebServiceInfo(nameSpace, serviceName, portName, wsdlURL); // <--- here it stack
System.out.println("getWebServiceInfo");
Iterator i = result.getMethods().iterator();
while (i.hasNext()) {
MethodBean method = (MethodBean) i.next();
System.out.print("Nombre: " + method.getname());
System.out.print(" Returns: " + method.getreturnType());
Iterator j = method.getparameters().iterator();
while (j.hasNext()) {
ParameterBean parameter = (ParameterBean) j.next();
System.out.print(" ParameterName: " + parameter.getname());
System.out.print(" ParameterType: " + parameter.gettype());
System.out.print("\n");
System.out.print(method.getfirma());
System.out.print("\n");
System.out.print("\n");
} catch (Exception ex) {
ex.printStackTrace();
}Web Service side
* Web service operation
@WebMethod(operationName = "getWebServiceInfo")
public WebServiceInfoBean getWebServiceInfo(@WebParam(name = "nameSpace")
String nameSpace, @WebParam(name = "portName")
String portName, @WebParam(name = "serviceName")
String serviceName, @WebParam(name = "wsdlURL")
String wsdlURL) throws Throwable {
//TODO write your implementation code here:
webservicemonitor instance = new webservicemonitor();
return instance.getWebServiceInfo(nameSpace, serviceName, portName, wsdlURL);
}I have tested my internal code from the web service side and everything works fine. The problem occurs when i invoke it from a client side. probably I did not made the right serialization form my class WebServiceInfoBean? or am missing something. here it is:
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.beans;
import java.util.ArrayList;
* @author Tequila_Burp
public class WebServiceInfoBean implements java.io.Serializable {
* Holds value of property wsdlURL.
private String wsdlURL;
* Getter for property wsdlURL.
* @return Value of property wsdlURL.
public String getwsdlURL() {
return this.wsdlURL;
* Setter for property wsdlURL.
* @param wsdlURL New value of property wsdlURL.
public void setwsdlURL(String wsdlURL) {
this.wsdlURL = wsdlURL;
* Holds value of property namespace.
private String namespace;
* Getter for property namespace.
* @return Value of property namespace.
public String getnamespace() {
return this.namespace;
* Setter for property namespace.
* @param namespace New value of property namespace.
public void setnamespace(String namespace) {
this.namespace = namespace;
* Holds value of property serviceName.
private String serviceName;
* Getter for property serviceName.
* @return Value of property serviceName.
public String getserviceName() {
return this.serviceName;
* Setter for property serviceName.
* @param serviceName New value of property serviceName.
public void setserviceName(String serviceName) {
this.serviceName = serviceName;
* Holds value of property wsdlURL.
private String portName;
* Getter for property wsdlURL.
* @return Value of property wsdlURL.
public String getportName() {
return this.portName;
* Setter for property wsdlURL.
* @param wsdlURL New value of property wsdlURL.
public void setportName(String portName) {
this.portName = portName;
* Holds value of property methods.
private ArrayList methods = new ArrayList();
* Getter for property methods.
* @return Value of property methods.
public ArrayList getmethods() {
return this.methods;
* Setter for property methods.
* @param methods New value of property methods.
public void setmethods(ArrayList methods) {
this.methods = methods;
public MethodBean getMethod(int i) {
return (MethodBean)methods.get(i);
}by the way, everything has been worked on the same PC.Hi Paul,
This sound familiar, but I cannot at the moment locate a reference to
the issue. I would encourage you to seek the help of our super support
team [1].
Regards,
Bruce
[1]
http://support.bea.com
[email protected]
Paul Merrigan wrote:
>
I'm trying to invoke a secure 8.1 web service from a 6.1 client application and keep getting rejected with the following message:
Security Violation: User: '<anonymous>' has insufficient permission to access EJB:
In the 6.1 client, I've established a WebServiceProxy and set the userName and password to the proper values, but I can't seem to get past the security.
If there something special I need to do on either the 8.1 securing side or on the 6.1 accessing side to make this work?
Any help would be GREATLY appreciated. -
Access Denied Error While invoking WebService Method
Hi,
When i am trying to invoke web service method from client machine, it throws an Error 401 - Access Denied (Detail Error Shown below)....
Please let me know to set WindowsAuthentication UserName and Password in WebService calling through Java. Here Iam using Stub class to connect WebService through Java...
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (401)Access Denied
faultActor:
faultNode:
faultDetail:
{}:return code: 401
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>
<head>
<style>
a:link {font:8pt/11pt verdana; color:FF0000}
a:visited {font:8pt/11pt verdana; color:#4e4e4e}
</style>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<title>You are not authorized to view this page</title>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
</head>
<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
DocURL=document.URL;
//this is where the http or https will be, as found by searching for :// but skipping the res://
protocolIndex=DocURL.indexOf("://",4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);
//for display, we need to skip after http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
InsertElementAnchor(urlresult, displayresult);
function HtmlEncode(text)
return text.replace(/&/g, '&').replace(/'/g, '"').replace(/</g, '<').replace(/>/g, '>');
function TagAttrib(name, value)
return ' '+name+'="'+HtmlEncode(value)+'"';
function PrintTag(tagName, needCloseTag, attrib, inner){
document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
if (needCloseTag) document.write( '</' + tagName +'>' );
function URI(href)
IEVer = window.navigator.appVersion;
IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );
return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
encodeURI(href) :
escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
function InsertElementAnchor(href, text)
PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
//-->
</script>
<body bgcolor="FFFFFF">
<table width="410" cellpadding="3" cellspacing="5">
<tr>
<td align="left" valign="middle" width="360">
<h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->You are not authorized to view this page</h1>
</td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">You do not have permission to view this directory or page using the credentials you supplied.</font></td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">
<hr color="#C0C0C0" noshade>
<p>Please try the following:</p>
<ul>
<li>Click the Refresh button to try again with different credentials.</li>
<li>If you believe you should be able to view this directory or page, please contact the Web site administrator by using the e-mail address or phone number listed on the
<script>
<!--
if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
Homepage();
//-->
</script>
home page.</li>
</ul>
<h2 style="font:8pt/11pt verdana; color:000000">HTTP 401.2 - Unauthorized: Logon failed due to server configuration<br>
Internet Information Services</h2>
<hr color="#C0C0C0" noshade>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Background:<br>
This is usually caused by a server-side script not sending the proper WWW-Authenticate header field. Using Active Server Pages scripting this is done by using the <strong>AddHeader</strong> method of the <strong>Response</strong> object to request that the client use a certain authentication method to access the resource.
<p>
<li>More information:<br>
Microsoft Support
</li>
</p>
</ul>
</font></td>
</tr>
</table>
</body>
</html>
{http://xml.apache.org/axis/}HttpErrorCode:401
(401)Access Denied
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at engine.citynet_dta.IDTAEngineStub.sendMessage(IDTAEngineStub.java:219)
at test.Test.main(Test.java:37)I hope the sun forum can help for me. Lets see
-
Encoding problem while reading binary data from MQ-series
Dear all,
we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
It seems to us that
1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
2. Both CCSID parameters are not used anyway in JMS-adapter
How can we solve this problem without changing anything on MQ-site?
Here is the stack-trace:
Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
at java.lang.Thread.run(Thread.java:770)
Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
... 36 more
Caused by: sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
at java.io.InputStreamReader.read(InputStreamReader.java:208)
at java.io.BufferedReader.fill(BufferedReader.java:153)
at java.io.BufferedReader.readLine(BufferedReader.java:316)
at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
... 40 more
Any ideas?
Kind regards, StefanHi Stefan,
for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
The second MTB, which does the XML-Wrapping, is configured like this:
Transform.Class = com.sap.aii.messaging.adapter.Conversion
Transform.ContentType = application/xml
xml.conversionType = SimplePlain2XML
xml.fieldNames = value
xml.fieldSeparator = §%zulu§%
xml.processFieldNames = fromConfiguration
xml.structureTitle = payload
Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á). E1 is (different from ISO) an "ß" in 850.
Any ideas? -
ORA-27092 Error while executing any query from client
Hello
I am getting following error while executing any query from client remotly.
IAMDBA@TEST_OAT.ABCD > select userid from dual;
select userid from dual
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/u01/prod/system/system01.dbf'
ORA-27092: size of file exceeds file size limit of the process
Additional information: 131071
Additional information: 286209
But while local connection,its working.hi,
ulimit command- Limit user resources
su - oracle
ulimit -n (this command will show you the current value for ulimit the default value is 1024)
to increase its value:---
ulimit -n <some value> ( this command will change value for current session only)
example
ulimit -n 101062
once done check the value as:--
ulimit -n( for verification)
search in google for more explanation or revert back to me for any suggestions.... :)
Edited by: varun4dba on Jan 31, 2011 4:09 PM -
'Class Cast Exception' while invoking a EJB from a Servlet
Hi,
I am working on J2EE applications.I am using Webgain studio and weblogic server.I
got a problem while invoking EJB from the servlet.
While calling an EJB from the servlet, it is giving that "Class Cast Exception".This
is because, the remote home reference is not able to type casted to the"Home Interface"
of the EJB, even if I type casted explicitly. It is creating the context and able
to identify the EJB with the JNDI name.
Could please help me in solving this problem.I am pasting the code here.
Thanks in advance,
Dharma
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
resp.setContentType("text/html");
PrintWriter out = new PrintWriter(resp.getOutputStream());
try
Context context=getInitialContext();
Object reference=context.lookup("ArlProjContractorAppletSession");
ArlProjContractorAppletSessionHome home=(ArlProjContractorAppletSessionHome)PortableRemoteObject.narrow(reference,ArlProjContractorAppletSessionHome.class);
//Exception is occuring in the above statement. It is unable
//to cast to the home interface
ArlProjContractorAppletSession the_ejb=null;
try
the_ejb=home.create();
System.out.println("the_ejb = " + the_ejb.toString());
catch(Exception e)
e.printStackTrace();
catch(Exception e)
e.printStackTrace();
// to do: code goes here.
out.println("<HTML>");
out.println("<HEAD><TITLE>Contractor TimeTracker</TITLE></HEAD>");
out.println("<BODY>");
// to do: your HTML goes here.
out.println("</BODY>");
out.println("</HTML>");
out.close();
I came across this kind of problem once. My problem went away after I upgraded
from 5.1 SP6 to 5.1 SP8.
"Dharma" <[email protected]> wrote:
>
>Hi,
>
>I am working on J2EE applications.I am using Webgain studio and weblogic
>server.I
>got a problem while invoking EJB from the servlet.
>
>While calling an EJB from the servlet, it is giving that "Class Cast
>Exception".This
>is because, the remote home reference is not able to type casted to the"Home
>Interface"
>of the EJB, even if I type casted explicitly. It is creating the context
>and able
>to identify the EJB with the JNDI name.
>
>Could please help me in solving this problem.I am pasting the code here.
>
>Thanks in advance,
>Dharma
>
>
>public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException
> {
> resp.setContentType("text/html");
> PrintWriter out = new PrintWriter(resp.getOutputStream());
>
> try
> {
>
> Context context=getInitialContext();
>
> Object reference=context.lookup("ArlProjContractorAppletSession");
>
> ArlProjContractorAppletSessionHome home=(ArlProjContractorAppletSessionHome)PortableRemoteObject.narrow(reference,ArlProjContractorAppletSessionHome.class);
>
>//Exception is occuring in the above statement. It is unable
>//to cast to the home interface
>
> ArlProjContractorAppletSession the_ejb=null;
>
> try
> {
> the_ejb=home.create();
>
> System.out.println("the_ejb = " + the_ejb.toString());
>
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> // to do: code goes here.
>
> out.println("<HTML>");
> out.println("<HEAD><TITLE>Contractor TimeTracker</TITLE></HEAD>");
> out.println("<BODY>");
>
> // to do: your HTML goes here.
>
> out.println("</BODY>");
> out.println("</HTML>");
> out.close();
> }
>
>
>
>
>
-
Calling Remote interface from client
Hi there!
I am working on a BMP (using weblogic 6.1)
My problem is - How do I contact remote interface from client. In my jndi tree I have mentioned only Home interface. Right now I am calling my remote interface like this:
//contact home interface
Object obj = ctx.lookup("APIHome");
APIHome home = (APIHome) javax.rmi.PortableRemoteObject.narrow(obj, APIHome.class);
//creating remote somehow - I got this clue from a website
rem = home.findByPrimaryKey(new EntityPK("test1","test2"));
//calling getter & setter methods
rem.setWidth()
rem.getId();
This works...but doesn't make any sense to me. Why should we initialize remote interface as above. Or is there any other option. Can somebody please explain me more clearly about this concept.
Thanks very much
regards
-ManasviThe HomeInterface contains two types of methods - create and find. The create methods create an instance of the entity bean(i.e., a record in the database) and the finder methods finds an existing record in the database, constructs an entity bean representing this row and returns the remote interface of this bean to the client for further manipulations.
-
Operation not found error while calling AM methods from managed bean
Hi,
operation not found error while calling AM methods from managed bean.
written a method with two parameters in AM.
exposed the method in AM client interface
in the page bindings added the method in method action ..left empty in the value fields of the parameters.
calling the method from managed bean like below
String userNameVal = (String)userName.getValue();
String passwordVal = (String)password.getValue();
OperationBinding operationBinding =
ADFUtils.findOperation("verifyLogin");
operationBinding.getParamsMap().put("userName",userNameVal);
operationBinding.getParamsMap().put("password",passwordVal);
operationBinding.execute();
i am getting operation verifyLogin not found error.Please suggest me something to do.
Thanks
SatyaHi vlsn,
Can you try with the below code
// in your backing bean
OperationBinding operation = bindings.getOperationBinding("verifyLogin");
//Put your both parameters here
operation.getParamsMap().put("parameter_name1", parameterValue1);
operation.getParamsMap().put("parameter_name2", parameterValue2);
operation.execute();
if (operation.getResult() != null) {
Boolean result = (Boolean) operation.getResult();
and share the result.
regards,
Rajan
Maybe you are looking for
-
I had my phone replaced today and have tried to restore from the backup I made this morning. It didn't restore properly so I wanted to try again but I can't as it asks for my iCloud password for a non-existant email account. I changed my iCloud email
-
How to determine the download media required from my License key?
Hi After recently rebuilding a dead PC, The user has advised me she used to use Illustrator. Unfortunately the user does not have the install media available. Support advised my license key is a volume license for Design Standard. I have downloaded
-
Can i put 8gb memory in my n95?
i have updated my software - successfully - after lots of blood sweat and tears and a problem was identified by my local nokia care centre as being a corrupt memory card so i bought a new one 8gb - is this ok to use? its not too much is it?
-
How can I get iMovie to unfreeze? It won't play my video I made.
How can I get iMovie to unfreeze? I made a video from different clips and I tried to add audio. After I tried to add audio iMovie won't play my video any longer. How can I fix this?
-
Hi Friends.. Pls tell me how to produce Result Analysis Report. By PARI VENDHAN.R