Expand my Community achievements bar.

Accessing EJBs through LCES2 SDK Service Forms

Avatar

Former Community Member

Hello,


I try to use this sample (here) to create a Forms Service access from a servlet but I  find "ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Failed to search remote  EJBObject for the supplier dejb / call.


I did a default installation of LiveCycle ES2 (JBoss, MySQL).
I use Glassfish 3 to create the site using the service Forms through a servlet.

I observed that execption is thrown when using the service
renderPDFForm by formsClient.

I wonder if the problem is with the port 1099 for DSC_DEFAULT_EJB_ENDPOINT.
But I do not know whether this port works and if the problem actually comes from.

Can you help me ?

11 Replies

Avatar

Level 8

Getting the error only when you make the call (and not during set up) is expected.  The remote server is not contacted until the actual call is made.

Unfortunately all the error is telling us is that it can't find the Forms EJB on the remote server.  Assuming you used the turnkey LiveCycle installation, then the port should be 1099.  Is there anything that may be blocking that port (firewall, proxy server, etc.)?

Avatar

Former Community Member

Thanks.

I used the turnkey LiveCycle installation, both servers (JBoss/LiveCycle, Glassfish) are on same computer, the firewall is  desactivated, I don't think the proxy has an influence because I'm local (but I have a proxy).

I rebuilt my site on the JBoss/LiveCycle server and it works.

In this context I have new problem, it says my .xdp form is not seriaziable... If I use a .pdf it work but a error occur "File start by '%PDF-'"

But I want to achieve communication between servers...

Avatar

Level 8

Both of the problems boil down to the same cause.  When the request gets to LiveCycle the form (xdp or pdf) is not valid.

Usually this is caused by the template being empty.

Avatar

Former Community Member

I made my form based on a XSD, so both template are not empty...

I tried with others forms (not empty, empty) but I have always the same result.

Avatar

Level 8

Sorry, by empty I mean that the form contents in the attachment map may be empty.

In the sample (here) a Map object (fileAttachments) is created.  It is populated with the Document object that contains your template - attachment1.

I've seen the error you mentione when either the attachment1 Document is not populated, attachment1 is not put into the map, or (on the server side) the map does't get recieved properly.

Avatar

Former Community Member

I slightly modified the code :

String fileName = "rideau1.jpg";
File oneImg = new File("C:\\" + fileName);
FileInputStream fileAttachment = new FileInputStream(oneImg);

Document attachment1 = new Document(fileAttachment);
Map<String, Document> fileAttachments = new HashMap<String, Document>();
fileAttachments.put(fileName, attachment1);

I'm sure image exists, file exists but attachement1 is empty...

oneImg getPath : C:\rideau1.jpg

fileAttachments : {rideau1.jpg=}
fileAttachment available : 15872

But normally I'm able to null in function renderPDFForm as fileAttachements...

The problem can be put there by URLSpec ?

Avatar

Former Community Member

after some test :

- if attachements are null or empty I have the same messages
- if attachements are not null or empty I have : org.omg.CORBA.INITIALIZE: Could not create server socket (3528):  java.net.BindException: Address already in use: JVM_Bind  vmcid: 0x0   minor code: 0  completed: No

Avatar

Level 10

That means you have a port conflict.

Can you do a netstat and try to identify which other process is using port 3528?

Jasmin

Avatar

Former Community Member

after restart, port is ok.

For the test I create a writer on the Response and this created a conflict ...
Thank you for your time.

Avatar

Former Community Member

I have the answer to my original question : call LiveCycle from glassfish within EJB.

Just add jbossall-client.jar (use a different JAR file if LiveCycle ES is not deployed on JBoss)
in the class path.