Expand my Community achievements bar.

EJB connection exception

Avatar

Level 1

Hi guys

i am getting the following exception while trying to make an EJB connection to jboss server. i am following one of the tutorials on adobe's website.

heres the code:

import

java.util.*;

import

com.adobe.idp.dsc.clientsdk.ServiceClientFactory;

import

com.adobe.idp.um.api.infomodel.Principal;

import

com.adobe.livecycle.rightsmanagement.client.*;

import

public

public static void main(String[] args) {

//Set connection properties required to invoke LiveCycle ES

Properties connectionProps =

new Properties();

connectionProps.setProperty(

"DSC_DEFAULT_EJB_ENDPOINT", "jnp://***********:8080");

connectionProps.setProperty(

"DSC_TRANSPORT_PROTOCOL","EJB");

connectionProps.setProperty(

"DSC_SERVER_TYPE", "JBoss");

connectionProps.setProperty(

"DSC_CREDENTIAL_USERNAME", "administrator");

connectionProps.setProperty(

"DSC_CREDENTIAL_PASSWORD", "password");

...........

.........

................

com.adobe.edc.sdk.SDKException

: Remote EJBObject lookup failed for ejb/Invocation provider -- An error occured while performing this operation(error code bin: 1, hex: 0x1)

at com.adobe.edc.sdk.impl.ExceptionHandler$SDKExceptionTranslator.getSDKException(

ExceptionHandler.java:128)

at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(

ExceptionHandler.java:450)

at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(

ExceptionHandler.java:397)

at com.adobe.livecycle.rightsmanagement.client.impl.scf.SCFConnection.registerPolicy(

SCFConnection.java:112)

at com.adobe.livecycle.rightsmanagement.client.impl.PolicyManagerImpl.registerPolicy(

PolicyManagerImpl.java:83)

at CreatePolicy.main(

CreatePolicy.java:48)

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.rightsmanagement.client.impl.scf.SCFConnection.registerPolicy(

SCFConnection.java:107)

... 2 more

Caused by:

javax.naming.CommunicationException: Could not obtain connection to any of these urls: 146.184.16.193:8080 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server 146.184.16.193:8080 [Root exception is java.io.EOFException]]

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(Unknown Source)

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

EjbMessageDispatcher.java:92)

... 6 more

Caused by:

javax.naming.CommunicationException: Failed to retrieve stub from server 146.184.16.193:8080 [Root exception is java.io.EOFException]

at org.jnp.interfaces.NamingContext.getServer(

NamingContext.java:263)

at org.jnp.interfaces.NamingContext.checkRef(

NamingContext.java:1387)

... 10 more

Caused by:

java.io.EOFException

at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)

at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)

at java.io.ObjectInputStream.readStreamHeader(Unknown Source)

at java.io.ObjectInputStream.<init>(Unknown Source)

at org.jnp.interfaces.NamingContext.getServer(

NamingContext.java:250)

... 11 more

class CreatePolicy {

com.adobe.livecycle.rightsmanagement.client.infomodel.*;
1 Reply

Avatar

Level 5

According to this: http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=000004.html

You need to put the jbossall-client.jar into classpath as well.

Check it out and see if it works.

Diego