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
+1
person also asked this
people also asked this
Replies
3 replies
Subscribers
6 subscribers
Views
1865 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi, One of my smart service plugin looking for a resource (app_config.prop
ravinderl
over 9 years ago
Hi,
One of my smart service plugin looking for a resource (app_config.properties) from the classpath. I have already placed app_config.properties in the src/main/resources inside my pluing project however it throws below error.
Initial Cause: java.io.FileNotFoundException: /app_config.properties (No such file or directory) :app_config.properties is not in classpath. Please fix the problem before re-run.
Code Snippet:
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
URL resource = contextClassLoader.getResource("app_config.properties");
Question1:
---------------
Could you please let me what is the classpath location in the Appian installation directory so that resouces can be available for the application?
Thanks
Ravinder
OriginalPostID-151057
OriginalPostID-151057
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Attached you'll find an example
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ravinderl
over 9 years ago
Thanks Eduardo!
My plugin deployed in Appian uses (dependency) one third party/different application jar which is internally looking for app_config.properties file in the classpath. I don't have an option to update or modify the Java code in the jar file. I have de-compiled the code and found the below statements they have in the code -
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); URL resource = contextClassLoader.getResource("app_config.properties");
Is there any way i can place the app_config.properties file in the appian /cfg or some config folder which can be available in the classpath at runtime?
Thank you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Have you been able to come up with a solution for this approach? I think you should be able to put the app_config.properties inside the plug-in jar just like the author of "Dynamic Document Generator" does it for docx4j.properties (see
forum.appian.com/.../summary)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel