Expand my Community achievements bar.

facing error Remote EJBObject lookup failed for ejb/Invocation provider

Avatar

Former Community Member

Hi SupportTeam,

We are facing problem while invoking an EJB service running in Websphere 6.1 through our client (with the program "ConvertWordDocument.java").

we are using the following jar files in our client.

1) adobe-generatepdf-client.jar
2) adobe-livecycle-client.jar
3) adobe-usermanager-client.jar
4) adobe-utilities.jar
5) naming.jar
6) namingclient.jar
7) j2ee.jar
8) ws_runtime.jar
9) ibmorb.jar
10) ibmorbapi.jar

Could you please help us and let us know what are the jar files needed to invoke that EJB service through our client which is using Sun JDK 1.5.

Below is the code we are using.

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
import javax.naming.Context;


import com.adobe.idp.Document;
import com.adobe.idp.dsc.InvocationContext;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
import com.adobe.livecycle.generatepdf.client.CreatePDFResult;
import com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient;
import com.ibm.ws.install.configmanager.utils.HashtableUtils;

public class ConvertWordDocument {

public static void main(String[] args)
{
  try{
  //Set connection properties required to invoke LiveCycle ES       
  Properties connectionProps = new Properties();
  connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://esealvm343.al.sw.ericsson.se:2089");
  connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);          
  connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebSphere");
  connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
  connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
 
  
  //Create a ServiceClientFactory instance
  ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);
   
  //Create a GeneratePdfServiceClient object
  GeneratePdfServiceClient pdfGenClient = new GeneratePdfServiceClient(factory);
 
  //Get a Microsoft Word file document to convert to a PDF document
  String inputFileName = "C:\\sun.doc";
  FileInputStream fileInputStream = new FileInputStream(inputFileName);
  Document inDoc = new Document(fileInputStream);
 
  //Set createPDF parameter values
  String adobePDFSettings = "Smallest_File_Size";
  String securitySettings = "No Security";
  String fileTypeSettings = "Filetype Settings";
 
  //Convert the Word document to a PDF document
  CreatePDFResult result = pdfGenClient.createPDF2(inDoc,inputFileName,fileTypeSettings,adobePDFSettings,securitySettings,null,null);
  
  //Get the newly created document
  Document createdDocument = result.getCreatedDocument();
  
  //Save the converted PDF document as a PDF file
  createdDocument.copyToFile(new File("C:\\testdoc\\sunejb.pdf"));
}
catch (Exception e) {
  e.printStackTrace();
  System.out.println("Error OCCURRED: " + e.getMessage());
  }
}
}

The Complete error we are facing is given below:

ALC-DSC-031-000:

com.adobe.idp.dsc.net.DSCNamingException

: Remote EJBObject lookup failed for ejb/Invocation provider

at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(

EjbMessageDispatcher.java:97

)

at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(

EjbMessageDispatcher.java:130

)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(

AbstractMessageDispatcher.java:57

)

at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(

ServiceClient.java:208

)

at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF2(

GeneratePdfServiceClient.java:519

)

at ConvertWordDocument.main(

ConvertWordDocument.java:86

)

Caused by:

javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException

: com.sun.corba.se.impl.orb.ORBImpl]

at com.ibm.ws.naming.util.Helpers.getOrb(

Helpers.java:294

)

at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(

WsnInitCtxFactory.java:373

)

at com.ibm.ws.naming.util.WsnInitCtx.getContext(

WsnInitCtx.java:112

)

at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(

WsnInitCtx.java:422

)

at com.ibm.ws.naming.util.WsnInitCtx.lookup(

WsnInitCtx.java:143

)

at javax.naming.InitialContext.lookup(Unknown Source)

at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(

EjbMessageDispatcher.java:88

)

... 5 more

Caused by:

java.lang.ClassCastException

: com.sun.corba.se.impl.orb.ORBImpl

at com.ibm.ws.orb.GlobalORBFactory.init(

GlobalORBFactory.java:82

)

at com.ibm.ejs.oa.EJSORBImpl.initializeORB(

EJSORBImpl.java:174

)

at com.ibm.ejs.oa.EJSClientORBImpl.<init>(

EJSClientORBImpl.java:97

)

at com.ibm.ejs.oa.EJSClientORBImpl.<init>(

EJSClientORBImpl.java:73

)

at com.ibm.ejs.oa.EJSORB.init(

EJSORB.java:386

)

at com.ibm.ws.naming.util.Helpers.getOrb(

Helpers.java:285

)

... 11 more

Error OCCURRED: Remote EJBObject lookup failed for ejb/Invocation provider

3 Replies

Avatar

Former Community Member

Hi Jasmin,

I have gone through the document but didn't find any solution.

Thanks and Regards,

Sunitha.

Jasmin Charbonneau <forums@adobe.com>

19/05/2009 18:33

Please respond to

clearspace-1443482828-1NEw-2-8hjg@mail.forums.adobe.com

To

Sunita Nookala7/India/IBM@IBMIN

cc

Subject

Re: facing error Remote EJBObject lookup

failed for ejb/Invocation provider

Have you read the following documentation:

http://livedocs.adobe.com/livecycle/8.2/programlc/programmer/help/000264.html

Jasmin

Avatar

Level 2

try using the following instead of EJB

ConnectionProps.setProperty(ServiceClientFactoryProperties.

DSC_DEFAULT_SOAP_ENDPOINT, "http://localhost:8080"

);

ConnectionProps.setProperty(ServiceClientFactoryProperties.

DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_SOAP_PROTOCOL

);