on 10-17-2006 1:12 PM
Hi,
This problem is confusing me. I have a Web Dynpro for Java project that is making a connection to MDM. The code is very simple but I cannot get round this exception
LinkageError: Class com/sapportals/connector/connection/IConnection violates loader constraints
Which is occuring when the connection.retrieveNative() method is being called.
If anyone has any idea what this could be, please let me know. I will be very grateful. The code I am using is below.
IConnectorGatewayService cgService = (IConnectorGatewayService)WDPortalUtils.getServiceReference(IConnectorGatewayService.KEY);
IUser user = UMFactory.getUserFactory().getUserByLogonID(loginId);
ConnectionProperties prop = new ConnectionProperties(user.getLocale(), user);
connection = cgService.getConnection(alias, prop);
INative nativeInterface = connection.retrieveNative();
Many Thanks
Gary
Gary,
Seems that you have problem with class loaders. The class mentioned in error message is already loaded by one class loader, and you try to load it second time. As far as class reuires native code, it loads DLL every time it is loaded. However, it's only possible to load DLL into same process (JVM in this case) only once.
You have to re-visit references you have and make related library to be loaded only once.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. I played around with the references and now it works ok. points rewarded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.