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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
copy from server sap.com~tc~exception~impl.jar
put in project - right click - build path - add to build path
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arvind
I've had the same issue some time ago. Adding the WD_RUNTIME variable didn't work, so I had to add the class manually.
By adding the class "WD_RUNTIME/com.sap.security_2.0.0.150403083138.jar" it worked (using NWDS 7.31 SP 15).
Search for the "com.sap.security_xxx.jar" and add it to your build path. Should solve the issue.
regards,
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arvind,
Please try to change the library reference in your NWDS.
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 |
---|---|
74 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.