Reputation: 1929
I am using Apache Tomcat Server.
While the application is loading it reads from a properties file and the file will be usuall placed in the lib folder of Tomcat server.
Since I am using Windows 7 and I need to test the application on Weblogic Server 10.3.5
While running the application it cannot deploy the application to the server because the server cannot find the properties file.
I tried giving the path of the properties file in
Servers > AdminServer > Server Start > Class Path
and tried to put the propertues file in the Weblogic Server HOME
C:\ORA_WL\MIDDLEWARE\user_projects\domains\base_domain\lib
But still it is giving the error
java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class com.bonsai.webutility.properties.SystemProperties
Upvotes: 1
Views: 31054
Reputation: 6227
Where does your class attempt to find the properties file? Using a relative path?
The Server Start
tab only applies to servers started with the node manager, not with the startWebLogic
script. So if your application is running on the admin server, you probably need to edit the startWeblogic
script itself to put the properties file on your classpath.
A better option is to package the properties file directly in your .war/.ear. Reference the solution here: Java: Accessing properties file inside a war
Upvotes: 2