Hi, One of my smart service plugin looking for a resource (app_config.prop

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

Parents
  • 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.
Reply
  • 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.
Children
No Data