Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Can connect the jndi connection protocol after upgrade from LC ES4 to AEM Forms 6.5

ccp123456789
Level 2
Level 2

Hi Everyone,

 

We encounter a problem after we upgrade the Livecycle ES4 to AEM Forms 6.5.

 

Here is the question, in the LC ES4 (Weblogic) we had developed a program and using the EJB Endpoint connection protocol to invoke the output service.

Similar as below:

Properties ConnectionProps = new Properties();  ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "t3://<hostname>:7001");  ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);  ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebLogic");  ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");  ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");

 

Then, we upgrade to the AEM forms 6.5 (Jboss EAP 7.1.4) and trying to use the EJB Endpoint connection protocol to invoke the output service as below:

Properties ConnectionProps = new Properties();
 ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "remote://<hostname>:4447");
 ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);
 ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");
 ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
 ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");

 

However, the error occurred.

com.adobe.livecycle.output.exception.OutputException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remo to EJBObject lookup failed for ejb/Invocation provider
at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:149)
at CreatePdf.CreatePDFFFromRepository.nain(CreatePDFFFromRepository.java:111)
Caused by: 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:101) at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java:141)
at com.adobe.idp.dsc.provider.Impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:66) at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
at com.adobe.livecycle.output.client.OutputClient.invokeRequest(OutputClient.java:607)
at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:132)
... 1 more
Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: http://<hostname> :4447 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.n et.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to conne ct to server http:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server http: 1099 [Root exception is java.net.UnknownHostException: http: Name or service not known]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1416)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:596)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at com.adobe.idp.dsc.provider.Impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.java:92) ... 6 more
Caused by: javax.naming.CommunicationException: Failed to connect to server http:1099 [Root exception is javax.naming .ServiceUnavailableException: Failed to connect to server http:1099 [Root exception is java.net.UnknownHostException: http: Name or service not known]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1387)
... 10 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server http:1099 [Root exception is java.ne t.UnknownHostException: http: Name or service not known]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
... 11 more
Caused by: java.net.UnknownHostException: http: Name or service not known
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
at java.net.InetAddress.getAllByName0(InetAddress.java:1277)
at java.net.InetAddress.getAllByName(InetAddress.java:1193)
at java.net.InetAddress.getAllByName(InetAddress.java:1127)
at java.net.InetAddress.getByName(InetAddress.java:1077)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:76)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)

 

We ensure the 4447 port is listening and able to telnet to the port. But we do not know why the error still happen and searching for the 1099 port.

 

Can some body please provide solution for it? Any responses are appreciated. Thank you.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6.5
1 Accepted Solution
workflowuser
Correct answer by
Employee
Employee
0 Replies
workflowuser
Correct answer by
Employee
Employee
ccp123456789
Level 2
Level 2
Hi @workflowuser, I do read this document for update the protocol. But it cannot invoke the service and cause error.
ccp123456789
Level 2
Level 2
And the document is still suggest to use 1099 port which? I try to do the research online and it claims the 1099 port is replaced by 4447. Can anyone let me know is it correct? Thank you.
workflowuser
Employee
Employee

If they are calling via service client factory then they should use following code to instantiate serviceclientfactory for remote EJB invocation: Properties connectionProps = new Properties(); connectionProps.setProperty("DSC_DEFAULT_EJB_ENDPOINT", "remote://formsserver:4447 "); connectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", ServiceClientFactoryProperties.DSC_EJB_PROTOCOL); connectionProps.setProperty("DSC_SERVER_TYPE", ServiceClientFactoryProperties.DSC_JBOSS_SERVER_TYPE); connectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator"); connectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password"); ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

Or they can use SOAP endpoint which does not require any change.

For remote EJB invocation from a client (this is completely JBoss code and no relation with Forms):

Properties props = new Properties();

props.setProperty("java.naming.factory.initial", "org.jboss.naming.remote.client.InitialContextFactory"); props.setProperty("java.naming.provider.url","remote://formsserver:4447" );

props.setProperty(javax.naming.Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

javax.naming.Context context = new InitialContext(props); context.lookup("...");

ccp123456789
Level 2
Level 2
Hi @workflowuser, I tried you approach with EJB invocation. And the result is the same as the above error message.
workflowuser
Employee
Employee

Looks like you are using older JBoss client libraries. Can use consider moving to SOAP protocol? That would be a lot easier and does not require any application server-specific client libraries.

ccp123456789
Level 2
Level 2
As they developed a java program for and working fine before. They are not willing to use SOAP. Also, what you mean is the problem will be solved if updated the .jar files?
workflowuser
Employee
Employee
you can try updating the jar files. Also i recommend you to consider using AEM Forms OSGi
Kosta_Prokopiu1
Employee
Employee

In LiveCycle ES4 your DSC_DEFAULT_EJB_ENDPOINT used to be "jnp://<servername>:1099" 1099 was the default port if you did not change it. That was JBoss 6.

 

In AEM Forms 6.x, from the moment when JBoss 7 was introduced, the remoting port changed to default 4447 but also the JNP protocol is not used any more.
If you upgraded your LC to AEM Forms 6.5 JEE but your external app still uses the old LiveCycle client jars then it will not be able to connect. The old jars use the wrong connection method.

 

You should recompile your Java application with the versions of the adobe jars that come in the SDK folder of AEM Forms JEE. This might also mean that you have to switch to a newer Java version, depending on how old the current Java program is and with which JDK it had been compiled. Currently you must use JDK 1.8.

 

And @workflowuser: it is correct that customers should consider the OSGi only version for new projects. But OSGi is not a solution for this problem and usually also not a replacement for the JEE functionalities. Moving a JEE application to OSGi is usually a major re-development on many levels (trust me, I have been doing it for some time now 🙂 ).

ccp123456789
Level 2
Level 2
And It is still using 1099 but does not mention any 4447 information. May I know is AEM Forms 6.5 still using the 1099 port in some .jar or not?
Kosta_Prokopiu1
Employee
Employee
According to that documentation, if JBoss Service Security is turned off one should use the old JNP method with 1099. That is a bit confusing I have to admit. The quickest way to check if your JBoss still listens to 1099 is to start a command window and do sth like netstat -a on WIndows which lists all ports in use. On Linux I think that would be sudo netstat -tulpen you can also check if it listens to 4447
ccp123456789
Level 2
Level 2
@Kosta_Prokopiu1 I did use netstat -a to check the Listening ports. But the 1099 is not listening. For our socket binding setting is here <socket-binding-group name="full-sockets" default-interface="public” port-offset="${jocss.socket.binding.port-offset:0}"> <socket-binding name="management-http" interface="management=" port="${jocss.management.http.port:9990"/> <socket-binding name="management-https" interface="management=" port="${jocss.management.https.port:9993"/> <socket-binding name="ajp" port="${jboss.ajp.port:8009"/> <socket-binding name="http" port="${jboss.http.port:80"/> <socket-binding name="https" port="${jboss.http.port:8443"/> <socket-binding name="jndi" port="1099"/> <socket-binding name="jmx-connector-registry" port="l090"/> <socket-binding name="jmx-connector-server" port="1091"/> <socket-binding name="messaging” port="5445"/> <socket-binding name="message-Throughput" port="5455"/> <socket-binding name="iiop" interface="unsecure” port="3528"/> <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <socket-binding name="remoting” port="4447"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="<hostname>" port="25"/> </outbound-socket-binding> </socket—binding-grounp>
ccp123456789
Level 2
Level 2
@Kosta_Prokopiu1 Do we need to configure the Jboss standalone-full.xml to enable the 1099 port?
Kosta_Prokopiu1
Employee
Employee
I don't think you can add jnp 1099 because the subsystem does not exist any more in EAP 7.1. You have remoting enabled and the default port for it is 8080. That is why the docu has the endpoint as https://hostname:8080... check out https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html... from the manuals of JBoss. I think you must make sure that your Java application is compiled with the latest SDK jars
ccp123456789
Level 2
Level 2
@Kosta_Prokopiu1 Thanks, we are using JDK1.8 to compile the program. However, I am still not sure how to use the ports. e.g. if we use SOAP, we should use 8080 and EJB we should use 4447?