Highlighted

Error while using LiveCycle java APIs with Http servlets:"Remote EJBObject lookup failed for ejb/Inv

Marwasultan

23-02-2009

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,ServiceClientFactoryProperties.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=application/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(FormsServiceClient.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.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.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)

a

Replies

Highlighted

Avatar

Guest

27-02-2009

I 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.
Highlighted

Marwasultan

01-03-2009

Hi pierre ,

thanks for your replay.



But i tried this code on the same physical machine that LCES exists.



as i installed LCES ,Webshpere application server ,databse server and Eclipse on the same machine.



and this errors only appears when trying to run the servelt ,but when i try to run the same code with java Class( with main) and run as java application it works fine .



Any Help is highly Appreciated.