quarta-feira, 18 de outubro de 2017

Webcenter Content - Increase Number of SDATA Sections when using OracleTextSearch

About SDATA

Oracle UCM uses the SDATA section feature in Oracle Text to index important text, date, and integer fields and define them as Optimized Fields. The SDATA section is a separate XML structure managed by the Oracle Text engine that allows the engine to respond rapidly to requests involving data and integer ranges. Content Server can have up to 32 Optimized Fields, which includes data, integer, standard Content Server fields like dInDate, dOutDate, and fields selected to be optimized. All Optimized Fields are SDATA fields, which by default include dDocName, dDocTitle, dDocType, and dSecurityGroup.

Source: https://docs.oracle.com/cd/E21043_01/doc.1111/e10792/c05_search001.htm



Configuration for Database:
  • For database version > 11.2.0.4 can already have more than 32 sections, does not need to be configured.
  • For database version is Oracle 11.2.0.3.0:
    • Apply the Oracle 11.2.0.4.0 Patch Set: See Note:1562139.1 "11.2.0.4 Patch Set - Availability and Known Issues" (preferred solution)
    • Apply the one-off patch:
      • For Linux x86-64: Patch:16520720 "MERGE REQUEST ON TOP OF 11.2.0.3.0 FOR BUGS 13922299 12960302 14364541 14367567"
  • For database version is Oracle 11.2.0.1 or 11.2.0.2
    • Apply the Oracle 11.2.0.4.0 Patch Set: See Note:1562139.1 "11.2.0.4 Patch Set - Availability and Known Issues"
      • If your database version is 11.1.0.X:
      • Upgrade the database to Oracle 11.2.0.4.0

Configuring in Webcenter Content:

Edit $CONTENT_DOMAIN/ucm/cs/config/config.cfg

And add parameter MaxNumSdataSections

Sample:

MaxNumSdataSections=99

In weblogic Administration Console, Restart UCM Managed Server.

Reference: Oracle Support 1607548.1

quarta-feira, 4 de outubro de 2017

OHS 12c noprompt password when stop/start component

cd $OHS_DOMAIN/bin
$ ./stopComponent.sh ohs1

Stopping System Component ohs1 ...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Reading domain from /u01/oracle/domains/ohs_domain

Please enter your password : password
Connecting to Node Manager ...
Successfully Connected to Node Manager.
Killing server ohs1 ...
Successfully killed server ohs1
Successfully disconnected from Node Manager.

Exiting WebLogic Scripting Tool.

Done


$ OHS_HOME/oracle_common/common/bin
$ wlst.sh

readDomain('/u01/oracle/domains/ohs_domain')
ohs_domain>cd('/SecurityConfiguration/ohs_domain')
set('NodeManagerUsername','weblogic')
set('NodeManagerPasswordEncrypted','password')
updateDomain()
closeDomain()
exit()

$ ./startComponent.sh ohs1 
Starting system Component ohs1 ...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Reading domain from /u01/oracle/domains/ohs_domain


Connecting to Node Manager ...
Successfully Connected to Node Manager.
Starting server ohs1 ...
Successfully started server ohs1 ...
Successfully disconnected from Node Manager.


Exiting WebLogic Scripting Tool.

Done

Basic Script to Restart OHS instance

Execution:

$OHS_HOME/oracle_common/common/bin/

./wlst.sh restart_OHS.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to Node Manager ...
Successfully Connected to Node Manager.
Restarting server ohs1 ...
Successfully restarted server ohs1


Exiting WebLogic Scripting Tool.

Script:

cat restart_OHS.py

nmConnect('weblogic','password','localhost','5557','ohs_domain','/u01/oracle/domains/ohs_domain','ssl')
nmSoftRestart(serverName='ohs1', serverType='OHS')
exit()

Enjoy!

Change Nodemanager Port from OHS Standalone installation using WLST


[oracle@hostname bin]$ cd $OHS_HOME/oracle_common/common/bin
[oracle@hostname bin]$ ./wlst.sh

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> readDomain('/u01/oracle/domains/ohs_domain')
wls:/offline/ohs_domain>cd('/Machines/localmachine/NodeManager/localmachine')

If you have questions about the structure, you can query using the ls () command.

wls:/offline/ohs_domain/Machine/localmachine/NodeManager/localmachine>set('ListenPort',5057)
wls:/offline/ohs_domain/Machine/localmachine/NodeManager/localmachine>updateDomain()
wls:/offline/ohs_domain/Machine/localmachine/NodeManager/localmachine>closeDomain()
wls:/offline>exit()

Exiting WebLogic Scripting Tool.


Reference: https://docs.oracle.com/middleware/1221/webtier/administer-ohs/getstart.htm#HSADM12040

quarta-feira, 27 de setembro de 2017

Webcenter Content - Jython to Checkin Content with Attachments (CHECKIN_NEW_WITH_RENDITIONS)

In the last few days, i had to load a content that, by its requirements, needs to attach files to the content.

My first alternative would be Batch Loading, however for the bacth loder file it was not possible because it does not actually support the rendition service.

With the next option, i tried to use the IdcCommand, but still had many problems, such as errors below:

sample hda file:
[oracle @ hostname bin] $ cat idctst.txt
@Properties LocalData
IdcService = EDIT_RENDITIONS
dID = 37020
renditionKeys = addRendition0
addRendition0.name = test543
addRendition0.action = edit
addRendition0.file = test.txt
addRendition0.file: path = / u01 / oracle / domains / content_domain / ucm / cs / vault / ~ temp / test.txt
@end
<< EOD >>

Executing:
[oracle @ hostname bin] $ ./IdcCommand -f idctst.txt -u sysadmin -l log.log -c server

Error:
Java HotSpot (TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
> system / 6 09.22 12: 22: 44.847 main Configuring tracing verbose: false; sections: system
> system / 6 09.22 12: 22: 44.848 main Configuring tracing verbose: false; Services:
09-29-2017: Error executing the EDIT_RENDITIONS service. Unable to process post data while adding or deleting attachments or renditions attached to content item 'OWCCDEV12C035232'. Invalid path to attachment.


My appeal was to use RIDC and needing a quick implementation, nothing better than using Jython.

Below, I share a simplified and functional version of the code:

cat checkin_attachments.py

from oracle.stellent.ridc import IdcClientManager
from oracle.stellent.ridc import IdcContext
from oracle.stellent.ridc.model import TransferFile
from java.io import File

manager = IdcClientManager ()
client = manager.createClient ("idc://127.0.0.1:4444")
userContext = IdcContext ("weblogic")
# client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg")
# userContext = IdcContext ("<user>", "<password>")


# Checkin a new file
binder = client.createBinder ()
binder.putLocal("IdcService", "CHECKIN_NEW_WITH_RENDITIONS")

binder.putLocal("dDocTitle", "Test File")
binder.putLocal("dDocType", "Document")
binder.putLocal("dSecurityGroup", "Public")
binder.putLocal("dDocAccount", "")
binder.addFile("primaryFile", TransferFile(File("content1.txt")))
binder.putLocal("fParentGUID", "D53FEDE1CA293189BB21BBC2C2BC3089")

#Add Attachments
inder.putLocal("renditionKeys", "aRendition0,aRendition1")

binder.putLocal("aRendition0.action", "edit")
binder.putLocal("aRendition0.name", "FileAttach")
binder.putLocal("aRendition0.file:path", "test.txt")
binder.addFile("aRendition0.file", TransferFile(File("test.txt")))

binder.putLocal("aRendition1.action", "edit")
binder.putLocal("aRendition1.name", "FileAttach")
binder.putLocal("aRendition1.file:path", "test.txt")
binder.addFile("aRendition1.file", TransferFile(File("test2.txt")))

# response
response = client.sendRequest (userContext, binder)
responseBinder = response.getResponseAsBinder ()
localData = responseBinder.getLocalData ()
dDocName = localData.get ("dDocName")
dID = localData.get ("dID")



Running:

. $MW_HOME/wlserver/server/bin/setWLSEnv.sh

java weblogic.WLST checkin_attachments.py



Reference:

https://blogs.oracle.com
MOS 2072524.1

terça-feira, 19 de setembro de 2017

Webcenter Content - Error Viewing Document with Annotations in WCC UI

Problem:


New Chekin file:


Make Annotations:


Reopen File:



Error Log:

intradoc.common.ServiceException: !csErrorAccessingForDownload,OWCCDEV12C034609-page1.png
        at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2259)
        at intradoc.server.Service.buildServiceException(Service.java:2432)
        at intradoc.server.Service.createServiceExceptionEx(Service.java:2426)
        at intradoc.server.Service.createServiceException(Service.java:2421)
        at intradoc.server.ServiceHttpImplementor.handleUploadException(ServiceHttpImplementor.java:2633)
        at intradoc.server.ServiceHttpImplementor.sendStreamResponse(ServiceHttpImplementor.java:2559)
        at intradoc.server.Service.doResponse(Service.java:2195)
        at intradoc.server.FileService.doResponse(FileService.java:1605)
        at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:836)
        at intradoc.server.Service.doRequest(Service.java:2004)
        at intradoc.server.ServiceManager.processCommand(ServiceManager.java:520)
        at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:359)
        at intradoc.server.IdcServerThread.run(IdcServerThread.java:219)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:666)
        at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
        at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
        at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
        at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
        at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Caused By: intradoc.common.ServiceException: !syFileUtilsFileNotFound,OWCCDEV12C034609-page1.png


Solution:

Set parameter -Djava.awt.headless=true Java option for UCM and WCC UI managed servers.

In Weblogic Administration Console 

Environment -> Servers -> UCM_Server1 -> Server Start

In the Arguments set the parameter: -Djava.awt.headless=true



Repeat this setting for the managed server WCCADF_server1.

Reference: MOS ID 2298552.1

segunda-feira, 11 de setembro de 2017

Webcenter Content - IAU:IAU-6012: Unable to determine the audit log directory. No log directory specified

Warning Message:

[oracle@host bin]$ ./BatchLoader -console -q -n/u01/oracle/domains/content_domain/ucm/cs/bin/test.txt
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
>system/6       09.06 15:39:05.045      main    Configuring tracing verbose: false; sections: system
>system/6       09.06 15:39:05.045      main    Configuring tracing verbose: false; Services:
Sep 06, 2017 3:39:10 PM oracle.security.jps.JpsStartup start
INFO: Jps initializing.
Sep 06, 2017 3:39:19 PM oracle.security.jps.JpsStartup start
INFO: Jps started.
Sep 06, 2017 3:39:19 PM oracle.security.audit.Auditor init
WARNING: IAU:IAU-6012: Unable to determine the audit log directory. No log directory specified.
Sep 06, 2017 3:39:19 PM oracle.security.jps.util.JpsUtil disableAudit
INFO: JpsUtil: isAuditDisabled set to true
Sep 06, 2017 3:39:19 PM oracle.security.jps.internal.audit.AuditServiceImpl validateLogPossible
WARNING: No audit log directory is set. Cannot perform audit operations for component JPS.
FileSystemFileStore:1.0.0.0 iniciado.
Servidor do sistema de gerenciamento de conteúdo. Versão 12.2.1.2.0-2017-07-05 09:25:44Z-r155055
Copyright (C) 1996-2016, Oracle e/ou suas empresas afiliadas. Todos os direitos reservados.
>(internal)/6   09.06 15:39:24.126      Thread-8        Processed 1 of 1 record(s).
>(internal)/5   09.06 15:39:24.126      Thread-8        !csBatchLoaderDone,/u01/oracle/domains/content_domain/ucm/cs/bin/test.txt,1,1,0
>(internal)/6   09.06 15:39:24.134      Thread-8        !csBatchLoaderDone,/u01/oracle/domains/content_domain/ucm/cs/bin/test.txt,1,1,0

Solution:

$MW_HOME/oracle_common/common/bin/wlst.sh
connect('weblogic','password','t3://localhost:7001')
setAuditRepository(logDirectory="/u01/oracle/domains/content_domain/logs/audit")


Trying Again:

[oracle@host bin]$ ./BatchLoader -console -q -n/u01/oracle/domains/content_domain/ucm/cs/bin/test.txt
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
>system/6       09.08 09:23:49.376      main    Configuring tracing verbose: false; sections: system
>system/6       09.08 09:23:49.377      main    Configuring tracing verbose: false; Services:
Sep 08, 2017 9:23:55 AM oracle.security.jps.JpsStartup start
INFO: Jps initializing.
Sep 08, 2017 9:24:07 AM oracle.security.jps.JpsStartup start
INFO: Jps started.
FileSystemFileStore:1.0.0.0 iniciado.
Servidor do sistema de gerenciamento de conteúdo. Versão 12.2.1.2.0-2017-07-05 09:25:44Z-r155055
Copyright (C) 1996-2016, Oracle e/ou suas empresas afiliadas. Todos os direitos reservados.
>(internal)/6   09.08 09:24:37.692      Thread-8        Processed 1 of 1 record(s).
>(internal)/5   09.08 09:24:37.692      Thread-8        !csBatchLoaderDone,/u01/oracle/domains/content_domain/ucm/cs/bin/test.txt,1,1,0
>(internal)/6   09.08 09:24:37.700      Thread-8        !csBatchLoaderDone,/u01/oracle/domains/content_domain/ucm/cs/bin/test.txt,1,1,0

quarta-feira, 6 de setembro de 2017

Webcenter Content - csNoServiceDefined,DOC_INFO_BY_NAME running IdcAnalyze

Error:

Executing IdcAnalyze:

# cd $CONTENT_DOMAIN/ucm/cs/bin/
# ./IdcAnalyze -index

Output:

(internal)/3   09.06 11:38:38.584      main            !csWcGetDocInfoFailed
 (internal)/3   09.06 11:38:38.584      main            at intradoc.common.DefaultTraceImplementor.appendStackTrace(DefaultTraceImplementor.java:348)
 (internal)/3   09.06 11:38:38.584      main            at intradoc.common.DefaultTraceImplementor.traceDumpException(DefaultTraceImplementor.java:467)
...
 Caused by: intradoc.data.DataException: !csNoServiceDefined,DOC_INFO_BY_NAME

Solution:

In Administration Console:

Select Administration --> Admin Server --> Component Manager 

In Advanced Component Manager disable the WebCenterConfigure component if you aren't using it.


Webcenter Content - java.lang.ClassNotFoundException: oracle.i18n.text.OraCollator when Running IdcAnalyze

Error:

Executing IdcAnalyze:

# cd $CONTENT_DOMAIN/ucm/cs/bin/
# ./IdcAnalyze -index

Output:

localization/3 09.06 11:45:41.519      Thread-6        !apUnableToInstantiateClass2,idcnls.OracleCommonLocalizationHandler exception backtrace:
 localization/3 09.06 11:45:41.519      Thread-6                at intradoc.common.DefaultTraceImplementor.appendStackTrace(DefaultTraceImplementor.java:348)
 localization/3 09.06 11:45:41.519      Thread-6                at intradoc.common.DefaultTraceImplementor.dumpException(DefaultTraceImplementor.java:412)
 ...
 ...
localization/3 09.06 11:45:41.519  Thread-6   Caused by: java.lang.ClassNotFoundException: oracle.i18n.text.OraCollator
 localization/3 09.06 11:45:41.519      Thread-6                at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
...
...

Solution:

Edit CLASSPATH variable in intradoc.cfg locate in $CONTENT_DOMAIN/ucm/cs/bin and add library as bellow:

CLASSPATH=$COMPUTEDCLASSPATH:/u01/oracle/Middleware/Ohs_Home/jlib/orai18n-collation.jar


Webcenter Content - Cache Configuration for JdbcFileStore configuration

The configuration values below, control the temporarily cached files keep in FileCache table.


FsCacheThreshold
  • Specifies the maximum cache size, in megabytes (default=100)
  • Once the threshold is met, Content Server starts deleting files that are older than the minimum age, as specified by the FsMinimumFileCacheAge parameter


FsMaximumFileCacheAge
  • The age at which files are deleted, expressed in days. The default is 365 days


FsMinimumFileCacheAge
  • The minimum age at which cached files can be deleted
  • This parameter is used in conjunction with the FsCacheThreshold parameter to determine when to delete cached files


FsCleanUpCacheDuringIndexing
  • This parameter activates vault cache cleaning, while FsCacheThreshold, FsMaximumFileCacheAge and FsMinimumFileCacheAge are controling its behaviour. 
  • Expect, when this is enabled on a system that currently has a large number of files in the FileCache table, the first cycle will take a long time to complete.

How to Configure:

In Administration Console:

Select Administration --> Admin Server --> General Configuration

In the "Additional Configuration Variables" pane add the following to the config.cfg:


I'm using values:

FsCleanUpCacheDuringIndexing=true
FsCacheThreshold=50
FsMinimumFileCacheAge=3
FsMaximumFileCacheAge=6


Reference: Managing a File Store System

Webcenter Content - Additional Configuration Variables for WCC UI

In Administration Console:

Select Administration --> Admin Server --> General Configuration

In the "Additional Configuration Variables" pane add the following to the config.cfg:

FoldersIndexParentFolderValues=true
FldEnforceFolderFileNameUniqueness=true
FldEnforceCaseInsensitiveNameUniqueness=true

When:

FoldersIndexParentFolderValues
Allows you to search for content within folders including subfolders.

FldEnforceFolderFileNameUniqueness
Prevents folders from having a child folder with the same name as a child document.

FldEnforceCaseInsensitiveNameUniqueness
Makes name-uniqueness checks for folder and file names case-insensitive, and makes path resolution case-insensitive.

Reference: Support Note 2075477.1

quinta-feira, 31 de agosto de 2017

Webcenter Content - Configure Java Heap Size for Admin Applets Standalone Applications

Solution:

  1. Edit configuration file intradoc.cfg in $CONTENT_DOMAIN/ucm/cs/bin/
  2. Add the configurations lines bellow:

JAVA_MAX_HEAP_SIZE=1024
JAVA_OPTIONS_GC=-XX:+UseParNewGC
JAVA_OPTIONS_MaxNew=-XX:MaxNewSize=350m

This setting was required to use the BatchLoader

vi tips and tricks

Excellent document with tips and tricks in vi:

vi tips and tricks: Ten cool commands sure to impress your friends

Webcenter Content - Increase Number of SDATA Sections when using OracleTextSearch

About SDATA Oracle UCM uses the SDATA section feature in Oracle Text to index important text, date, and integer fields and define them a...