Showing posts with label Webcenter Sites. Show all posts
Showing posts with label Webcenter Sites. Show all posts

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.

Oracle Webcenter Sites : java.sql.SQLException: ORA-12899: value too large for column "CSUSER"."TT1397223334151"."VALUE" (actual: 2306, maximum: 2000)

While installing the Oracle Webcenter Sites 11.1.1.6.0 or later you are getting the below error :
Exception executing prepared statement: INSERT INTO tt1397223334151 (NAME,LOCALE,VALUE) VALUES (?,?,?)NAME = fatwire/wem/admin/user/edit/DescriptionBodyLOCALE = ja_JPVALUE = <p>�存�れ�ユーザー���を変更�る�������ん。ユーザー�残り�プロパティ�修正����。</p><p>ACL: ユーザー�Browser�ElementReader�PageReader�UserReader�よ�xceleditor ACL��る��を確����。一般管�者�よ�サイト管�者�もxceladmin�必���。一般管�者��ら�TableEditor�よ�UserEditor(Engageを使用�る場��VisitorAdmin)�必���。ACL�詳細��<i>管�者ガイド</i>を�照������。</p><p>グループ: ��ユーザー�アプリケーション・リソースを管��る権�を必���る場��リソース�権�を��グループ�ユーザーを割り当���。グループを作��る������権�を構��る���<i>WEM�管�者ガイド</i>を�照������。</p><p>��ユーザー�アプリケーション�接続�る���(「サイト�ページ�ら)��サイト���ロールを両方�割り当���。</p>java.sql.SQLException: ORA-12899: value too large for column "CSUSER"."TT1397223334151"."VALUE" (actual: 2306, maximum: 2000)
Reason: In webcenter sites 11.1.1.6.0 and later, language pack is automatically installed and file.encoding is not set for weblogic server i.e. the JVM argument -Dfile.encoding=UTF-8 is not set.

Solution:

  1. Open startWeblogic.cmd in edit mode i.e. Oracle\Middleware\user_projects\domains\soa_domain\bin\startWeblogic.cmd
  2. Find -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS%.
  3. Then append "-Dfile.encoding=UTF-8"
  4. Final string look like this -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% -Dfile.encoding=UTF-8.
  5. Save and start the server.
Note: For further information please followed the document 1539055.1 on oracle support.