Monday, April 14, 2014

Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [cas.properties] cannot be opened because it does not exist

In the Installtion of Oracle Webcenter Sites, in between there is a step in which you need to deploy the CAS as application on application server (weblogic, websphere etc.). But after deploying the status of the cas application is failed due to following reason:
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [cas.properties] cannot be opened because it does not exist.[2014-04-11 19:05:34,373 IST] [ERROR] [.kernel.Default (self-tuning)'] [cs.core.db.DBTransaction] TransactionUnit failed to execute 
com.fatwire.cs.core.db.TransactionAbortException: replacerows failed

Reason: This is due to the <sites_installation_directory>/bin directory is not in the classpath. And the cas.properties file is stored in the bin directory.

Solution: Add the <sites_installation_directory>/bin in the classpath i.e. make the class path entry in setDomainEnv.cmd/setDomainEnv.sh

  1. Open the setDomainEnv.cmd in edit mode i.e. "Oracle\Middleware\user_projects\domains\soa_domain\bin\setDomainEnv.cmd"
  2. Add the following line "set CLASSPATH=%CLASSPATH%;D:\Oracle\webcenter\sites\bin" at the end of setDomainEnv.cmd file. Here "<sites_installation_directory> = D:\Oracle\webcenter\sites".
  3. Start the server.

No comments:

Post a Comment