Using a java proxy with XI to execute a Script located in external server
HI
I have recived help from here about this. But i don´t know how to work with java proxy. Is someone there who can help me in it.
Many thanks in advance.
Noelia
Hi Noelia,
You can have 2 types of Java proxies viz. client(putting data into xi pipeline) & server (xi pipeline sends request to these proxies.)
From system point of view, the requirements vary in case of these two. for server proxies you can have a webas java business system and associated technical system in sld.in case of client proxies, refer SAP note #809420.
The basic difference between ABAP proxies and Java proxies is ABAP proxies reside on the perticular application system(CRM or R/3) but java proxies reside on SAP Web AS J2EE stack of your XI server.
Just search SDN pointers on Java proxy developement and you will get good pointers. There is one How-to guide on service marketplace by the name "HowToWorkWithJavaProxies.pdf".
Regarding your dev environment, you can always make use of NWDS, you need to be very much familier with EJB concepts and deployment. Check help.sap.com for more details.
Java Proxies and SAP XI - The Inside Story, Part 1
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
Java Proxies and SAP XI - The Inside Story, Part II
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
SAP XI 1.0 Configuring your PC or Laptop as a Java Receiving System
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f5b19b90-0201-0010-9bb0-81c235713d8d
Also go through these links:
/people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
/people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501
http://help.sap.com/saphelp_nw2004s/helpdata/en/97/7d5e3c754e476ee10000000a11405a/frameset.htm
Here you can download code samples for inbound and outbound Java Proxies which you can use together with the Flight Booking Scenario.
http://de.geocities.com/stefan_grube/JavaProxyExample.zip
I hope it helps........
Regards,
Abhy
Similar Messages
-
Using Berkeley Java Edition with Java Web Start
Hi
Have anyone had any experience using Berkeley Java Edition with Java Web Start?. I need to create an application that will download with the database to a client computer and create the database thereThanks for your reply Luca-Sanna,
This is my jnlp file
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/dist" href="launch.jnlp">
<information>
<title>MyApplication</title>
<vendor>My Company</vendor>
<homepage href="/test.html"/>
<description>My Test Application</description>
<description kind="short">My Application</description>
<icon href="test.gif" kind="default"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+"/>
<jar href="myapp.jar" main="true" download="eager"/>
<jar href="lib/appframework-1.0.3.jar" download="eager"/>
<jar href="lib/beansbinding-1.2.1.jar" download="eager"/>
<jar href="lib/commons-beanutils.jar" download="eager"/>
<jar href="lib/commons-collections.jar" download="eager"/>
<jar href="lib/commons-digester.jar" download="eager"/>
<jar href="lib/commons-logging.jar" download="eager"/>
<jar href="lib/derby.jar" download="eager"/>
<jar href="lib/derbyclient.jar" download="eager"/>
<jar href="lib/derbynet.jar" download="eager"/>
<jar href="lib/itext-1.3.1.jar" download="eager"/>
<jar href="lib/jasperreports-1.3.0.jar" download="eager"/>
<jar href="lib/jbossall-client-2004-05-11.jar" download="eager"/>
<jar href="lib/jdt-compiler-3.1.1.jar" download="eager"/>
<jar href="lib/poi-2.0-final-20040126.jar" download="eager"/>
<jar href="lib/swing-worker-1.1.jar" download="eager"/>
<jar href="lib/toplink-essentials-agent.jar" download="eager"/>
<jar href="lib/toplink-essentials.jar" download="eager"/>
</resources>
<application-desc main-class="mypackage.Login">
</application-desc>
</jnlp>
I have seen many forums with the same above problem with no reply.
Anyone knows what exactly the problem is? -
Standalone java as client java proxy with xi
hi,
i am coming from ABAPer, i have read inside story part 1 and 2, this seems J2EE Application.
i am not clear on standalone java as client java proxy with xi.
i have ClassProxy.zip generated by IR and some aii_***.jar.
could you tell me what the step by step is?
any helpful comments will be apprecidated.
thanks
venjaminhi
good
go through these links, i hope these will help you to solve your problem.
http://help.sap.com/saphelp_srm30/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d4/d12940cbf2195de10000000a1550b0/content.htm
http://www.seeburger.com/fileadmin/com/pdf/SAP_Exchange_Infrastructure_Integratio_Strategy.pdf
thanks
mrutyun -
How to use Two main windows with in a page in script ?
Hi any body explain me...
How to use Two main windows with in a page in script ?
with header data in one main window,
& Item data in other main window.HI..,
u need to go for <b>SPLITTING THE MAIN WINDOW</b> !!!
Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
Here is the procedure !!
-->Create a page window and assign it to a page.
Choose <b>Edit --> Main windows</b>.
A dialog box appears.
-->Enter values in the fields <b>Area width</b> and A<b>rea height</b> in accordance with the input guidelines for main windows.
-->Enter values in the fields <b>Spacing</b> and Number in the <b>Horizontal group</b> if you want to use multiple columns. You can ignore the fields in the Vertical group.
Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the <b>Horizontal and Vertical groups</b>.
-->The value in the field Left margin varies from main window to main window if multiple columns are used. The following applies:
<b>
Left margin of current column + Window width + Horizontal spacing = Left margin of next column</b>
In label printing, the field Upper margin also varies from main window to main window:
<b>
Upper margin of current main window + Window height + Vertical spacing = Upper margin of next main window</b>
-->Enter a value in the field Start position.
This is a counter. Enter a starting value which is equal to or greater than 1.
-->The main windows are added to the list.
-->Save your form.
reward if it helps u...
sai ramesh -
Issue with using Sun Java Proxy Server
We are trying to access the WebService using the Sun Proxy Server.
When I access the WebService through proxy ,I find the error message in proxy error log as
[18/Oct/2005:19:10:40] failure ( 1288): for host 127.0.0.1 trying to POST http://localhost:1080/yodsoap/services/CobrandLogin, service-http reports: HTTP7760: error reading request body (Client closed connection)
and the access log is as follows:
POST http://localhost:1080/yodsoap/services/CobrandLogin HTTP/1.1" 400 147
But when i see the WebServer access log for the same WebService POST /yodsoap/services/CobrandLogin HTTP/1.1" 200 1783 "-" "Axis/1.1RC1"
This case is happening when the request is compressed for the webservice. and the request headers are as follows:
POST /yodsoap/services/CobrandLogin HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1RC1
Host: 127.0.0.1
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "loginCobrand"
Content-Length: 1412
Connection: close
Content-Encoding: gzip
And the response headers are as follows:
HTTP/1.1 200 OK
Server: Resin/3.0.8
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 18 Oct 2005 13:41:50 GMT
So ,we found out that if we dont use the proxy server,then the WebService is working properly,but if we start using the proxy server,we are encountering HTTP400 error.
Any ideas will help out to solve this problem..???
Thankz in advance.
Regards,
SomendraThis is what I see in the error message:
ProxyFactory initialized in SOAP_CLIENT_MODE
System property : com.yodlee.soap.client.log4j.config not found. Using the default config resource : com.yodlee.util.soap.log4j
ProxyFactory initialized in SOAP_CLIENT_MODE
System property : com.yodlee.soap.client.log4j.config not found. Using the default config resource : com.yodlee.util.soap.log4j
HTTP Header name and value is HTTP/1.1 400 Bad request
HTTP Header name and value is Server Sun-Java-System-Web-Proxy-Server/4.0
HTTP Header name and value is Date Tue, 18 Oct 2005 14:56:21 GMT
HTTP Header name and value is Connection close
com.yodlee.core.CoreRemoteException: org.xml.sax.SAXException: Bad envelope tag: HTML
at com.yodlee.soap.core.login.CobrandLoginSoapClientProxy.loginCobrand(CobrandLoginSoapClientProxy.java:132)
at SoapClient.main(SoapClient.java:45)
Caused by: org.xml.sax.SAXException: Bad envelope tag: HTML
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:543)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2511)
at org.apache.axis.client.Call.invoke(Call.java:2481)
at org.apache.axis.client.Call.invoke(Call.java:2176)
at org.apache.axis.client.Call.invoke(Call.java:2099)
at org.apache.axis.client.Call.invoke(Call.java:1622)
at com.yodlee.soap.core.login.CobrandLoginSoapBindingStub.loginCobrand(CobrandLoginSoapBindingStub.java:225)
at com.yodlee.soap.core.login.CobrandLoginSoapClientProxy.loginCobrand(CobrandLoginSoapClientProxy.java:119)
... 1 more
Caused by: org.xml.sax.SAXException: Bad envelope tag: HTML
at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:107)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:934)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1635)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:230)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
... 9 more -
How to install JAVA API client files :: Using XI JAVA Proxy & NWDS
Hi
I am going to integrate the SAP with one "AB" System which is providing Java API to integrate with their client ( which in turn will connect with AB System ) using SAP XI. So "AB" System is providing JAR files & property files, in order to instantiate objects & call those APIs.
Now I am going to write the JAVA code in NWDS which is installed on my Laptop so I am sure I need to give this jar files under ::
Project -> Properties and then Java Build Path -> Libraries.
Choose Add External JARs
But where do I need to add property files.
Also do I need to install the same files on XI Server too & do I need to install the "AB" System Client also on XI Server or it can be installed some place else too.
I am not much into JAVA so pls. try to give me detailed steps.
Regards
- Lalit -Lalit,
><i>But where do I need to add property files</i>
How are you going to access the properties file? Are you going to use Java IO to read the file or are you dgoing to bundle the property file as a resource and use the getResource() . If you are going to use Java IO then you will have to hard code the property file path in your code and make sure that your Proxy can read the property file.
If your property file is going to vary across environments, I woudl suggest this approach. Make sure that the property file path will be same in all environments and it will work fine and make sure that your proxy will have OS level IO access as well.
Another option would be to have the property file bundled as a respurce, but, making changes to the file in this case will be an issue!
><i>Also do I need to install the same files on XI Server too & do I need to install the "AB" System Client also on XI Server or it can be installed some place else too.</i>
When you create the EAR file for your Java Proxy, remove all XI .jar files and just make sure that the Client JAR is available in the EAR file. You need not install the Client JAR file anywhere as long as the jar file is a part of the EAR!
Regards
Bhavesh -
Use of outgoing proxy with content engine
Hi All,
I'm experiencing problems using the "outgoing proxy" feature with a content engine running ACNS 4.03.
When this feature is enabled, it takes a long time to get the "execute or save to disk" popup window in the web browser, but when I get it, the file is downloaded in a few seconds.
It seems like the CE waits for the file to be completely retrieved before delivering it to the client...
This is not service impacting when this is a small file, but when the file is bigger than 1MB, the browser fails with a timeout.
Can anyone help ?
Thanks,
Phil.4.01b1 code had a hardcoded proxy timeout value of 300 micro seconds. The ability to set this value was introduced in 4.03 to address symptoms like the one you are describing when the CE is not able to connect to its upstream proxy within this time constraint. (also documented the following bug : CSCdv36226 - "Need CLI to configure connection timeout for outgoing proxy"
The fix was implemented with the addition of the follwoing command to set this value: 'http proxy outgoing connection-timeout' command:
590(config)#http proxy outgoing connection-timeout ?
<200-5000000> Timeout period for probing outgoing proxy servers in microseconds
590(config)#
I hope this helps!
Cheers,
Perry. -
Error while calling the java proxy with the ValueMapping repl scenario
Hi All
I am trying to upload values in the RWB for vaue mapping using the standard ValueMappingReplication interface . But I can see the following message in the Message Display Tool of the RWB .This scenario was working fine sometime back suddenly after some days we started to see this exception .
JPR could not process the message. Reason: No such method valueMappingReplication (for the asynchronous replication scenario) in proxy bean localejbs/sap.com/com.sap.xi.services/ValueMappingApplication
Delivery of the message to the application using connection JPR failed, due to: com.sap.aii.af.ra.ms.api.DeliveryException: No such method valueMappingReplication (for the asynchronous replication scenario) in proxy bean localejbs/sap.com/com.sap.xi.services/ValueMappingApplication: com.sap.aii.proxy.xiruntime.core.XmlInboundException: No such method valueMappingReplication (for the asynchronous replication scenario) in proxy bean localejbs/sap.com/com.sap.xi.services/ValueMappingApplication.
Can anyone please guide me what could be the done to resolve this .
Thanks.This may happen when the java proxy is not registered. Use the following URL to do so
http://<Server>:<Port>/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplication&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplication&method=valueMappingReplication
Regards,
Prateek -
RDS 2012 - Using a reverse proxy with the Gateway server on the internal LAN
Hi there,
I'm looking to introduce an RDS 2012 farm and would like to put the RDS Gateway server on the internal LAN (due to it's AD requirements etc).
What are the best practise options for using a reverse proxy to forward traffic to the gateway server and is it better to do this than just forward 443 traffic from the DMZ through to the Gateway directly?
Thanks,
Paul.Hi Paul,
It is generally considered more secure to have a reverse proxy in front of RDG. I don't know of a proxy that will handle the RDG UDP traffic, so you will need to consider using direct server return for that or not having the benefit of UDP. Whether
or not it is acceptable to simply forward TCP 443/UDP 3391 directly to your internal RDG is up to your security policies. Many companies are fine with it while many other companies think it is unacceptable and require a reverse proxy or other method
to provide an extra layer of protection.
-TP -
Client java proxy with inside story docu
Hi
i am following client JAVA Proxy inside story 1, 2 refering to how to work with java proxy.
just look at the following source;
in InvokeProxy Class
Context ctx = new InitialContext(p);
remote = MIProxyUserSyncOut_PortTypeHome.create();
DTProxyUser_Type dt = new DTProxyUser_Type();
dt.setUsername("name");
dt.setPassword("password");
DTProxyUserDBResponse_Type dtpUserR = new DTProxyUserDBResponse_Type();
dtpUserR = MIProxyUserSyncOut_PortTypeRemote.mIProxyUserSyncOut(dt); , this code will calling this method(
mIProxyUserSyncOut in MIProxyUserSyncOut_PortTypeBean),
and then is calling MIProxyUserSyncOut_PortType.mIProxyUserSyncOut(mTProxyUser)
public DTProxyUserDBResponse_Type mIProxyUserSyncOut(DTProxyUser_Type mTProxyUser)
throws SystemFaultException, ApplicationFaultException {
BaseType $result = null;
try {
MIProxyUserSyncOut_PortType.MTProxyUser_Message request$ = new MIProxyUserSyncOut_PortType.MTProxyUser_Message();
request$.setMTProxyUser(mTProxyUser);
<b>==>error</b> $result = send$(request$, "http://test.com/test02", "MI_Proxy_User_Sync_Out", "MI_Proxy_User_Sync_Out", new MIProxyUserSyncOut_PortType.MTProxyUserDBResponse_Message());
}catch (ApplicationFaultException e){
throw createExceptionWrongExceptionType$(e);
the error message is below;
RemoteException occurred: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/sap/aii/utilxi/prop/rprof/ExchangeProfileR3PropertySource
does anyone has surch experience?
thanks
venjaminanswerd
-
Hi all,
When i try to run more than one servelt of the Quick Start samples that using Livecycle Java APIs and i get an error of "Remote EJBObject lookup failed for ejb/Invocation provider" from any servelt i run.
I try some Quick samples which is not servelts (java class) and it works fine, which makes me sure that my connection properties is true.
Environment:
The LiveCycle is based on "Websphere v6.1", and i use "Eclipse Platform
Version: 3.4.1".
i install "tomcat 5.5.17" to test the servelts in developing time through Eclipse.(only for test in developing time not for deploy on )
The Jars i added in the classpath:
adobe-forms-client.jar
adobe-livecycle-client.jar
adobe-usermanager-client.jar
adobe-utilities.jar
ejb.jar
j2ee.jar
ecutlis.jar
com.ibm.ws.admin.client_6.1.0.jar
com.ibm.ws.webservices.thinclient_6.1.0.jar
server.jar
utlis.jar
wsexception.jar
My code is :
Properties ConnectionProps = new Properties();
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://localhost:2809");
ConnectionProps.setProperty ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_ EJB_PROTOCOL);
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFa ctoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "Administrator");
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
ConnectionProps.setProperty("java.naming.factory.initial", "com.ibm.ws.naming.util.WsnInitCtxFactory");
//Create a ServiceClientFactory object
ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);
//Create a FormsServiceClient object
FormsServiceClient formsClient = new FormsServiceClient(myFactory);
//Get Form data to pass to the processFormSubmission method
Document formData = new Document(req.getInputStream());
//Set run-time options
RenderOptionsSpec processSpec = new RenderOptionsSpec();
processSpec.setLocale("en_US");
//Invoke the processFormSubmission method
FormsResult formOut = formsClient.processFormSubmission(formData,"CONTENT_TYPE=application/pdf&CONTENT_TYPE=app lication/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "",processSpec);
List fileAttachments = formOut.getAttachments();
Iterator iter = fileAttachments.iterator();
int i = 0 ;
while (iter.hasNext()) {
Document file = (Document)iter.next();
file.copyToFile(new File("C:\\Adobe\\tempFile"+i+".jp i++;
short processState = formOut.getAction();
...... (To the end of the sample)
My Error was:
com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
at com.adobe.livecycle.formsservice.client.FormsServiceClient.processFormSubmission(FormsSer viceClient.java:416)
at HandleData.doPost(HandleData.java:62)
at HandleData.doGet(HandleData.java:31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava: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.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)
aI assume here that your application is deployed on a different physical machine of where LCES is deployed and running.
Do the following test:
- Say that LCES is deployed on machine1 and your application is deployed on machine2. Ping machine1 from machine2 and note the ip address.
- Ping machine1 from machine1 and note the ip address.
The two pings should match.
- Ping machine2 from machine1 and note the ip address.
- Ping machine2 from machine2 and note the ip address.
The two pings should match.
Usually this kind of error would happen if your servers have internal and external ip addresses. -
How to use a Socks5 Proxy with authentification only on specified sites? Any Addons?
Hey, I want to use a Socks5 proxy that requires authentification but only on specified sites.
Unfortunately, Foxyproxy does not support such proxies.
Is there an addon or some hidden Firefox feature that allows this?Thanks for the suggestion but I'm looking for a convenient way to avoid blocked content on YouTube and co. I figured this would be superior to all those unblocker extensions since I have access to a fast proxy anyway.
-
How can I use a Java program to write an executable Applescript
I'm using a PC with Windows XP. I'm a private developer. I've written a project in Java and wish to deploy it to other people using email. I've written an Install program (the Main-Class) and successfully packed this in a jar file with the project class files and some data files all as described in the deployment trail in the Java Tutorials. A recipient with a Mac with OS X downloads the jar file and runs it to install the project class files and some data files. The install program then writes an Applescript file (Vocab.scpt shown below) on the Desktop to make starting my downloaded program easier but it doesn't seem to work and I think it may be because the script file is not "executable". Could this be the case? If so, how could I change my install program to make the script file executable or alternatively use some other system to start the downloaded program?
Vocab.scpt:-
# Script to start: Vocab Version: 1.0.0
do shell script "cd /Applications/Vocab; Java Vocab"
Many thanks for your interest. Unfortunately I don't have a Mac to experiment with this problem and although I have spent some days on and off trying to find an answer in the mass of information available on Apple's website I can only find small clues here and there to answer my problem (which I would have thought was quite a common one). In Windows a batch file (eg. Vocab.bat) is automatically executable.I didn't expect you to have your customer run the command. I would expect you to create the executable and install it. However, there wouldn't be any difference in what you are creating and the .jar file. Either way it is a faceless icon. For that matter, it is no different than a batch file on Windows. I'm not sure what they wouldn't understand with, "copy the Vocab.jar file to wherever you want and double-click it to run the program." In addition, you probably ought to point out that Java is not installed on Mac OS X Lion (10.7.x) and when they double-click the jar file (or whatever you send them), the system will ask if they want to install Java.
What you really need to do is package up the app inside a Mac application package and provide the user with the application on a .dmg (disk image). Take a look here: http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Jar_Bundle r/Introduction/Introduction.html#//apple_ref/doc/uid/TP40000884
I also found this which uses ANT to create the bundle: http://informagen.com/JarBundler/ -
How to use standalone java client with an enterprise bean in J2EE 1.4
Hi All,
I am have deployed a stateless session bean in Sun's J2EE 1.4 Application Server. i am trying to call the bean using a standalone java client. but the client cannot access the bean.
The error coming is:
Jan 21, 2004 7:48:27 PM com.sun.corba.ee.impl.legacy.connection.SocketFactoryCo
nectionImpl <init>
WARNING: ORBUTIL.connectFailure
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(
RBUtilSystemException.java:1739)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(
RBUtilSystemException.java:1757)
at com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl.
init>(SocketFactoryConnectionImpl.java:74)
at com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoImpl
createConnection(SocketFactoryContactInfoImpl.java:88)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.begi
Request(CorbaClientRequestDispatcherImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(Corba
lientDelegateImpl.java:121)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaCli
ntDelegateImpl.java:212)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.jav
:69)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.ja
a:58)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:12
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at StatelessSessionClient.main(StatelessSessionClient.java:17)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection re
used: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSoc
etFactory.java:390)
at com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl.
init>(SocketFactoryConnectionImpl.java:58)
... 10 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:457)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSoc
etFactory.java:381)
... 11 more
javax.naming.CommunicationException: Can't find SerialContextProvider
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.ja
a:66)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:12
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at StatelessSessionClient.main(StatelessSessionClient.java:17)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed
No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(
RBUtilSystemException.java:1739)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(
RBUtilSystemException.java:1757)
at com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl.
init>(SocketFactoryConnectionImpl.java:74)
at com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoImpl
createConnection(SocketFactoryContactInfoImpl.java:88)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.begi
Request(CorbaClientRequestDispatcherImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(Corba
lientDelegateImpl.java:121)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaCli
ntDelegateImpl.java:212)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.jav
:69)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.ja
a:58)
... 3 more
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection re
used: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSoc
etFactory.java:390)
at com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl.
init>(SocketFactoryConnectionImpl.java:58)
... 10 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:457)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSoc
etFactory.java:381)
... 11 more
My java client uses the following code to access the bean:
Hashtable props = new Hashtable();
String URL="iiop://localhost:3700";
props.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
props.put("java.naming.provider.url", URL) ;
InitialContext ctx = new InitialContext();
Object ref = ctx.lookup("ejb/StatelessSessionHome");
StatelessSessionHome home = (StatelessSessionHome)PortableRemoteObject.narrow(ref,StatelessSessionHome.class);
StatelessSessionRemote statelessSession = home.create();
plz help me to locate the error.
Regards,
MohitHi Amol,
thanks for your suggestion.
i have deployed the converter application in J2EE1.4 tutorial in Sun AppServer J2EE1.4. the deployment process works smoothly. but accessing the deployed converter bean using standalone client as given in the tutorial gives the following error.
Caught an unexpected exception!
javax.naming.NoInitialContextException: Need to specify class name in environmen
t or system property, or as an applet parameter, or in an application resource f
ile: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
40)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
a:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at ConverterClient.main(ConverterClient.java:14)
I have set the InitialHost and InitialPort as suggested by you in the client code. the client gets successfully compiled but gives error when executed.
The client code is:
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.math.BigDecimal;
public class ConverterClient {
public static void main(String[] args) {
System.setProperty("org.omg.CORBA.ORBInitialHost","localhost");
System.setProperty("org.omg.CORBA.ORBInitialPort","3700");
try {
Context initial = new InitialContext();
Object objref = initial.lookup
("java:comp/env/ejb/SimpleConverter");
ConverterHome home =
(ConverterHome)PortableRemoteObject.narrow(objref,
ConverterHome.class);
Converter currencyConverter = home.create();
BigDecimal param = new BigDecimal ("100.00");
BigDecimal amount =
currencyConverter.dollarToYen(param);
System.out.println(amount);
amount = currencyConverter.yenToEuro(param);
System.out.println(amount);
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
Please suggest so that i can run the standalone client successfully.
Regards,
Mohit Kapoor -
We have an old app written with Java 1.0.2, designed to run on IE3.0.2.
We have need to use it but all our machines are WinXP Pro, running IE6/SP1. The app will not run on this configuration.
Is there a way we can use them? We are not Java programmers. Is there an app that will allow older stuff to run on newer technology?
Thanks
Paul PI will bet the IE 3.02 will give you more problems than Java will. Check out Microsoft Developers Network (MSDN) http://www.msdn.microsoft.com/ to see what they have to say about IE.
Maybe you are looking for
-
Six error msg about apple aplications that must be closed just when I connect my ipod to computers USB.SyncServer aplication and Mobile device helper is closed.The error relat.show : AppName: syncserver.exe AppVer: 17.641.14.26 ModName: coref
-
Integrate the Crystal Reports 2008 SP1 with SAP R/3
Hi Experts, I have a requirement to integrate Crystal Reports with the SAP R/3 . I'm new with this kind of integration and need help because I need to create a report based on the R/3 data. I have read some posts from this forum especially on the in
-
How do I accept the License Agreement
I am trying to install Adobe Reader X on my laptop. As soon as I open it, a Distribution License Agreement pops up requesting me to press the "Accept" button in order to continue. However no"Accept" button appears anywhere on the License Agreement an
-
how to set the title of a standard selection screen ?
-
Why is it we always have to check manually for updated ap's, as it never comes up automatically , that there is an ap that requires an update... Coming from an Iphone, that is one feature I liked, as it would at least inform me if there was any updat