Hi, I am trying to lookup a JNDI resource from a smart service deployed in Appia

Hi, I am trying to lookup a JNDI resource from a smart service deployed in Appian 7.7 environment. I am getting the below error when it try to look for a resource configured on weblogic server from Appian.

Could you please let me know if I am doing anything wrong here?

Code Snippet:
--------------------
          public static Connection getDSConnection() {
                    Connection con = null;
                    try {
                              Context ctxt = new InitialContext();
                              DataSource dataSource = (DataSource)ctxt.lookup("jdbc/AppianBusinessDS");
                              con = dataSource.getConnection();
                    } catch (NamingException e) {
                              // TODO Auto-generated catch block
                              e.printStackTrace();
                    } catch (SQLException e) {
                              // TODO Auto-generated catch block
                              e.printStackTrace();
                    }
                    return con;
          }

Stack Trace:
-----------------
javax.naming.NoPermissionException: User <anonymous> does not have permission on jdbc to perform lookup operation.
at weblogic.jndi.internal.ServerNamingNode.checkPermission(ServerNa...

OriginalPostID-151063

OriginalPostID-151063

  Discussion posts and replies are publicly visible

Parents
  • ... oke(DefaultMethodInvocation.java:61)
    at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38)
    at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61)
    at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:132)
    at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:230)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.acc...
Reply
  • ... oke(DefaultMethodInvocation.java:61)
    at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38)
    at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61)
    at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:132)
    at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:230)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.acc...
Children
No Data