Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
25 replies
Subscribers
5 subscribers
Views
12603 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi, I am trying to lookup a JNDI resource from a smart service deployed in Appia
ravinderl
over 9 years ago
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
0
ravinderl
over 9 years ago
Yes i have tried that its still not working.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
This error indicates that Weblogic has the Anonymous User Access for the JNDI tree disabled.
Two solutions:
1. Enable this access which is the default used by Appian
2. Configure Appian to use a specific account to perform JNDI tree lookup's instead of using the anonymous account (see
docs.oracle.com/.../security.htm
and
docs.oracle.com/.../prog_details.htm
----> The jndi.properties should be placed under <APPIAN_HOME>/runtim_ear|ear/suite.ear.
----> The security configuration is needed in Appian in META-INF/ejb-jar.xml and META-INF/weblogic-ejb-jar.xml
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ravinderl
over 9 years ago
I have the below contents in the weblogic-ra.xml. And also i have followed the steps from this link but still it didn't work.
forum.appian.com/.../Configuring_WebLogic.html
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-connector
xmlns="
www.bea.com/.../weblogic-connector"
xmlns:xsi="
www.w3.org/.../XMLSchema-instance"
xsi:schemaLocation="
www.bea.com/.../weblogic-connector
www.bea.com/.../weblogic-connector.xsd">
<native-libdir></native-libdir>
<jndi-name>eis/unattended-request-poller</jndi-name>
<enable-access-outside-app>false</enable-access-outside-app>
<enable-global-access-to-classes>false</enable-global-access-to-classes>
<security>
<default-principal-name>
<principal-name>apnjndiuser</principal-name>
</default-principal-name>
</security>
</weblogic-connector>
========================================================================================================================
I have the below in the jndi properties file:
java.naming.security.principal=apnjndiuser
java.naming.security.credentials= XXXXXXX
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Can you enable Anonynous Lookup in the JNDI through the Weblogic Console to confirm that's the root cause?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ravinderl
over 9 years ago
After enabling anonymous look in the JNDI and changing the business datasource security policy group to : everyone it works fine.
Please find the attached document with screenshot.
JNDI_Issue.docx
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<