Sunday, July 8, 2012

How to increase maximum uploading size for UCM taskflows from WebCenter Spaces?



When try to upload file more than 2MB from UCM taskflows into WebCenter Spaces, you will get following error:-

The file could not be uploaded because it is too large. Enter the file name and location. Files must be less than 2 GB

According to PS3/PS4 documentation, its limit is 2MB not 2GB as error message misleading you.

How to increase the upload limit

1.     Export webcenter-config.xml file using following command:-

wls:/wc_domain/serverConfig> exportMetadata(application='webcenter', server='WC_
Spaces', toLocation='/tmp/', docs='/oracle/webcenter/webcenterapp/metadata/webce
nter-config.xml')

Executing operation: exportMetadata.

Operation "exportMetadata" completed. Summary of "exportMetadata" operation is:
List of documents successfully transferred:

/oracle/webcenter/webcenterapp/metadata/mdssys/cust/site/webcenter/webcenter-con
fig.xml.xml
/oracle/webcenter/webcenterapp/metadata/webcenter-config.xml

2 documents successfully transferred.

2. Open the webcenter-config.xml file in text editor in order to modify file upload size:-.
<webcenter:uploadedFileMaxDiskSpace>2097152</webcenter:uploadedFileMaxDiskSpace>

Please note that the size is in bytes.


3. Once updated, run the following import command:-

wls:/wc_domain/serverConfig> importMetadata(application='webcenter', server='WC_
Spaces', fromLocation='/tmp/', docs='/oracle/webcenter/webcenterapp/metadata/web
center-config.xml')

Executing operation: importMetadata.

Operation "importMetadata" completed. Summary of "importMetadata" operation is:
List of documents successfully transferred:

/oracle/webcenter/webcenterapp/metadata/mdssys/cust/site/webcenter/webcenter-con
fig.xml.xml
/oracle/webcenter/webcenterapp/metadata/webcenter-config.xml

2 documents successfully transferred.

It works without restarting any Managed Server.

Sunday, May 6, 2012

How to change HTTP Session Timeout for WebCenter Spaces?


 If you see WebCenter Spaces application (webcenter.ear) session-timout from the Weblogic Console, this session Timeout (3600 Seconds) is misleading and not applicable in case of WebCenter Spaces application. If you update this value from the console, it will not impact session-timeout of the WebCenter Spaces application.
 
Then question is how can I change session-timeout for WebCenter Spaces application? By default session-timeout set in web.xml is 45 minutes. There are following two ways to change the session-timeout:-
  
        1. Deployment Descriptors(web.xml and weblogic.xml)
       2. Customizing the Session Timeout sample project of SampleWebCenterSpacesExtensions (Supported solution till PS4)

Here, we will not discuss solution-2 as this project is excluded from PS5 documentation and sample project. If you are running WC Spaces PS3 or PS4, you can implement it as well.

You can update the session timeout in web.xml as well as weblogic.xml but if web.xml takes precedence over the weblogic.xml. Here, we will configure the session timeout in web.xml as recommended by Oracle in following documentation as well:-


Following are the steps to modify the web.xml for session timeout value:-

1.       Go to <WEBCENTER-HOME> /archives/applications directory and you will find webcenter.ear file there. In my case the complete path is C:\Oracle\Middleware\Oracle_WC1\archives\applications.
2.       Backed up webcenter.ear in <WEBCENTER-HOME> /archives/applications as webcenter.ear.bak
3.       Open the webcenter.ear file using winrar or 7zip or any other tool

4.       Now, go to spaces.war >> WEB-INF folder and open the web.xml file in editor
 
     

5.       Add following entry in it:-
<session-config>
                                         <session-timeout>15</session-timeout>
                         </session-config>
Pls note that session-timeout value in web.xml is in minutes whereas in weblogic.xml it is in seconds.


6.       Once done, save it and close it.
7.       Make sure that webcenter.ear contain an updated web.xml.
8.       Restart WC_Spaces servers. At startup, this automatically deploys the newer application with the modified web.xml.
Note: Once application is deployed, revised spaces.war is available at <DOMAIN-HOME> /servers\WC_Spaces\tmp\_WL_user\webcenter_11.1.1.4.0\<Randon-Folder-Name>. You can verify the web.xml changes as well.


Note:- From PS5 onward, there is one more way to change the session timeout, see the following documentation:-
http://docs.oracle.com/cd/E23943_01/webcenter.1111/e12405/wcadm_gen_prop.htm#BCEHFHCH


References:-

Monday, February 27, 2012

How to run 32bit RCU on 64bit Linux in graphical mode?

RCU is available only on 32-bit x86 Linux and 32-bit Microsoft Windows operating system platforms. For Release 11.1.1.4.0 and later, RCU can also be run on 64-bit x86 Linux and 64-bit Microsoft Windows operating systems. 

If you run the RCU in graphical mode using x11 client from the 64-bit x86 Linux, you will get following error:-
Exception in thread "Main Thread" java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:89)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at java.awt.Toolkit$2.run(Toolkit.java:834)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
        at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
        at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
        at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
        at oracle.sysman.assistants.rcu.ui.InteractiveRCUModel.<init>(InteractiveRCUModel.java:117)
        at oracle.sysman.assistants.rcu.Rcu.execute(Rcu.java:292)
        at oracle.sysman.assistants.rcu.Rcu.main(Rcu.java:344)

Solution

1.       Go to $RCU/bin and change the permission of rcu.sh file using chmod 755 rcu
2.       Edit the rcu.sh using nano rcu
3.       Change the 32bit JRE path to with 64bit JRE path
JRE_DIR=export JAVA_HOME=/apps/oracle/java/jrockit-jdk1.6.0_26/ jre

Now, run the rcu again.

Wednesday, January 4, 2012

Hiden Gem of Oracle WebCenter: Spaces Automatic Services Configuration

Spaces supports automatic configuration of certain Oracle WebCenter Portal services.  Mean, you don’t need to set discussion, portlet, UCM services etc from the EM manually. This feature is available from 11G PS3 onward.
The Automatic Service Configuration only worked if the following conditions are met:
  • Spaces and the target component must be installed in the same domain.
  • The managed server of the target component must have an explicit listening address. If its listening address is empty or null or "localhost", then it must have a system associated to it that has an explicit address.
  • The target component (like discussions, ucm, pagelet etc) must not be deployed to a cluster.
  • You must start the managed servers associated to the WebCenter Portal services first. Then, start the WC_Spaces managed server.

Currently, automatic Service Configuration is implemented for the following Services:
Component/Service
Default Connection Name
Specific Rule
Discussions and Announcements services
WebCenterSpaces-Discussions
The user granted the Administrative role exists in discussions.

Documents service
WebCenterSpaces-ucm

Pagelet producer
WebCenterSpaces-PageletProducer

Personalization service
Conductor-WCPSSpaces
 and
Properties-WCPSSpaces

Preconfigured portlet producers
wc- OmniPortlet

wc-WebClipping

wc-WSRPTools

Worklist service and Spaces workflows
WebCenterSpaces- Worklist



Every time you start Spaces it will try to create the connections unless they already exist. This will be true until the service is configured for the first time unless you disable automatic service configuration. If the automatic configuration fails for a specific component, then you will have to manually configure the service.
You can verify from the EM that service connections are automatically configured for the Spaces application when you start the managed servers.
If required, you can disable the auto-configuration feature by setting the following Java property in domain_home/bin/setDomainEnv.sh  (on UNIX) or domain_home\bin\setDomainEnv.cmd (on Windows). 
-Dwebcenter.spaces.disableAutoConfigure=true

Reference:

Oracle® Fusion Middleware Installation Guide for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0)

4.2 Working with Oracle WebCenter Portal: Spaces

http://docs.oracle.com/cd/E23943_01/install.1111/e12001/wc_components.htm#CHDGEJFG

Monday, December 19, 2011

Why Web Server for WebCenter? Oracle HTTP Server (OHS) vs Apache HTTP Server? How to configure Apache HTTP Server as a Web server for WebCenter?


Why Web Server for WebCenter?
To configure any HTTP Server for WebCenter is important in following scenarios:-
a.      For a good integration between WebCenter and UCM
b.   To configure SS0
c.       Access UCM few functionalists like Document Manager, document rendition support, advanced metadata edit, the IFRAME functionality, and so on.

Oracle HTTP Server (OHS) vs Apache HTTP Server
You can also use Oracle Web Tier that also has HTTP Server (OHS) instead of Apache HTTP Server. The advantage of using Apache HTTP Server is easy to download due to small size, easy to install and its light weight. The advantage of using OHS is that it’s also based on Apache HTTP Server, already configured for Weblogic Server.

Configure Apache HTTP Server as a Web server for WebCenter
Assuming that WebCenter and UCM is installed and configured. Start the Admin Server and other manage servers. You can access Weblogic Console with the URL http://localhost:7001/console, WebCenter Spaces with http://localhost:8888/webcenter and UCM with http://localhost:16200/cs.

1.      Download the Apache HTTP Server at http://httpd.apache.org/download.cgi#apache22 according to your OS
2.      Install the Apache HTTP Server 2.2.x
3.      Start the Apache HTTP Server and access the Apache HTTP Server using http://localhost. If you see message that “It Works!”, its mean its installed successfully
4.      Copy the mod_wl_22.so from $WL_HOME\wlserver_10.3\server\plugin\win\32\mod_wl_22.so to APACHE_HOME\modules
5.      Open the httpd.conf file at APACHE_HOME\conf
6.      By default, Apache HTTP Server listen on port 80, you can change the port using Listen property like Listen 7777. We will use default port.
7.      Add the following line in
httpd.conf LoadModule weblogic_module   modules/mod_wl_22.so
8.      Add the following request to proxy

<Location /console>
 SetHandler weblogic-handler
 WebLogicHost localhost
 WebLogicPort 7001
</Location>

#Spaces
<Location /webcenter>
WeblogicHost localhost
WebLogicPort 8888
SetHandler weblogic-handler
</Location>

<Location /webcenterhelp>
WeblogicHost localhost
WebLogicPort 8888
SetHandler weblogic-handler
</Location>

# Discussions
<Location /owc_discussions>
    WebLogicHost localhost
        WebLogicPort 8890
    SetHandler weblogic-handler
</Location>

#UCM
<Location /cs>
WeblogicHost localhost
WebLogicPort 16200
SetHandler weblogic-handler
</Location>

<Location /adfAuthentication>
WeblogicHost localhost
WebLogicPort 16200
SetHandler weblogic-handler
</Location>

9.      Start the Apache HTTP server
10.  Open the browser and test the following URLs:
http://localhost/webcenter
http://localhost/cs 

 You will see that its working now without any Admin Server port.