on 03-12-2015 4:32 AM
Hi Champs,
I am using destination service. When I am throwing or catching Destination exception it is giving error
No exception of type DestinationException can be thrown; an exception type must be a subclass of Throwable
NWDS 7.3 SP 8
Dependency : tc/bl/security/destinations/api
Examples for Using the Destination Service API - Using Java - SAP Library
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import com.sap.security.core.server.destinations.api.DestinationException;
import com.sap.security.core.server.destinations.api.DestinationService;
import com.sap.security.core.server.destinations.api.HTTPDestination;
Context ctx = new InitialContext();
DestinationService dstService = (DestinationService)
ctx.lookup(DestinationService.JNDI_KEY);
if (dstService == null)
throw new NamingException("Destination Service not available");
Destination destination = dstService.getDestination("HTTP","dst-1");
//for HTTP destination: cast
HTTPDestination httpDestination = (HTTPDestination) destination;
//obtain a HTTPUrlConnection from the destinationHttpURLConnection
httpConnection = httpDestination.getURLConnection();
Please help me how to fix this issue
Hi Arvind
This happens if some class in the type-hierarchy of the exception is not on the class-path.
Please check.
Thanks,
Hamendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
11 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.