Deploy ADF application as shared library in weblogic

Shared library – WebLogic Shared Library is an Enterprise Application Archive, a stand-alone EJB, a Web Application module, or a JAR file that is registered with Oracle WebLogic Server as a shared library. The library resources can be shared between multiple applications, alleviating the need to have duplicate copies of the resources in each application. For an example, we can all dependency as shared libraries in weblogic.

Normally in bigger application, best practice is to use common features application or dependency as shared library in weblogic. For example, taking an webcenter portal application
we are making custom taskflow and using it in webcenter portal application. We can deploy these adf taskflow as shared libraries and can reference in weblogic.xml for Portal application.

We have two option.
– Deploy adf app as jar and then deploy as shared library or wrap jar into war profile and deploy as shared library.
– We can directly deploy adf application as war shared lib in Weblogic.

Following is the process for ADF/ Webcenter Application in jdeveloper

1) Create deployment profile as war file.
2) Create an MANIFEST.MF file as META-INF/MANIFEST.MF

Manifest-Version: 1.0
Implementation-Title: ADF_Shared_Lib
Implementation-Version: 1.0
Specification-Title: ADF_Shared_Lib
Specification-Version: 1.0
Extension-Name: ADF_Shared_Lib

3) Edit war deployment profile and add MANIFEST.MF in war options.

555

4) Deploy ADF taskflow to weblogic(assuming you have made connection with weblogic in jdeveloper) to specific managed server or admin server.
5) mark option as deploy as shared library instead of application.

11

222

444

6) In master (Portal) application enter reference of your shared library as follows

ADF_Shared_Lib 1.0
1.0
true

This way you can directly deploy from the jdeveloper. Other options is to deploy as war file and find war file from specified location and go to weblogic admin console
and install as shared library

11111

Note: If you deploying shared library again, make sure, you increase implementation version every time to specify version no.

Video –

Troubleshoot :

IOException: ‘Invalid header field; with manifest
Solution – Make sure name is name is correct. There is proper spacing after colon in manifest file content.

Unresolved WebApp library references defined in weblogic.xml
Solution- Make sure you have same implementation version and specification version of shared library, If there is mismatch you will get this error.

Till then happy deployment in Weblogic with Vinay…..

Enable debugging in remote weblogic for ADF and Webcenter Applications

Hi All,

In my previous post of Debugging taskflow in webcenter spaces , I mention about setting java option in startManagedWebLogic.sh or startWeblogic.cmd .But you can do same thing in more easier way. I will tell about debug flag of weblogic today.

Best way to enable debug flag in WebLogic Server is to use weblogic console. This is done in:

Environment–>Servers–>>–>Debug
Select the required flags and click on Enable/Disable.

Enable the level of debug you need, e.g.: security, servlet, jdbc.This change does not require weblogic Server Restart.

You need Make sure the severity is set to debug in weblogic console:

Environment > Servers > MyServer > Logging >Advanced > Minimum severity to log: Debug
This change requires server restart.

You can also do by follow way as well-

Setting Up setDomainEnv.cmd
Near the top of your file add the following line to enable debugging.

echo ——————————————————————
echo Setting Debug to true
set debugFlag=true
echo ——————————————————————

Locate the following line locate further down the file and make a note of the port number.You can change the default port number as well.

rem set the port number
if “%DEBUG_PORT%”==”” (
set DEBUG_PORT=8453
)

So , if you are working on ADF and Webcenter application , follow this approach to accomplish this task.You should also make connection from jdeveloper
to remote/standalone weblogic server as well.

Following Debug flags will help you debug different issues in Oracle Weblogic Server :

Java Messaging Services

Messaging Kernel
-Dweblogic.debug.DebugMessagingKernel=true

MDB connectivity
-Dweblogic.debug.DebugEjbMdbConnection=true

JMS Wrappers
-Dweblogic.debug.DebugJMSWrappers=true

JMS SAF
Sending side:
-Dweblogic.debug.DebugJMSSAF=true
-Dweblogic.debug.DebugJMSMessagePath=true

Receiving side:
-Dweblogic.debug.DebugJMSBackEnd=true
-Dweblogic.debug.DebugJMSFrontEnd=true
-Dweblogic.debug.DebugJMSMessagePath=true

JMS Distributed Destinations
-Dweblogic.debug.DebugJMSCommon=true
-Dweblogic.debug.DebugJMSDistTopic=true
-Dweblogic.debug.DebugJMSMessagePath=true

JMS Boot
-Dweblogic.debug.DebugJMSBoot=true
-Dweblogic.debug.DebugMessagingKernelBoot=true
-Dweblogic.debug.DebugStoreIOLogicalBoot=true

JMS store
Logical IO:
-Dweblogic.debug.DebugJMSStoreIOLogical=true
-Dweblogic.debug.DebugJMSStoreIOLogicalBoot=true

Physical IO:
-Dweblogic.debug.DebugStoreIOPhysical=true
-Dweblogic.debug.DebugStoreIOPhysicalVerbose=true

Store XA:
-Dweblogic.debug.DebugStoreXA=true
-Dweblogic.debug.DebugStoreXAVerbose=true

JMS CDS
-Dweblogic.debug.DebugJMSCDS=true

JMS Backend
-Dweblogic.debug.DebugJMSBackEnd=true

JMS Frontend
-Dweblogic.debug.DebugJMSFrontEnd=true

JMS Dispatcher
-Dweblogic.debug.DebugJMSDispatcher=true

Messaging Bridge :
-Dweblogic.debug.DebugMessagingBridgeRuntime=true
-Dweblogic.debug.DebugMessagingBridgeRuntimeVerbose=true
-Dweblogic.debug.DebugMessagingBridgeStartup=true

Clustering

-Dweblogic.diagnostics.debug.DebugLogger.DISABLED=false & one or all of the following
-Dweblogic.debug.DebugClusterAnnouncements=true
-Dweblogic.debug.DebugCluster=true
-Dweblogic.debug.DebugClusterFragments=true
-Dweblogic.debug.DebugJTAMigration=true
-Dweblogic.debug.DebugAsyncQueue=true
-Dweblogic.debug.DebugReplication=true
-Dweblogic.debug.DebugReplicationDetails=true
-Dweblogic.debug.DebugServerMigration=true
-Dweblogic.debug.DebugSingletonServices=true
-Dweblogic.debug.DebugConsensusLeasing=true
-Dweblogic.debug.DebugUnicastMessaging=true
-Dweblogic.cluster.leasing.ClusterFormation=true
-Dweblogic.cluster.leasing.ClusterGroupView=true
-Dweblogic.cluster.leasing.ClusterLeader=true
-Dweblogic.cluster.leasing.ClusterLeaderService=true
-Dweblogic.cluster.leasing.ClusterMember=true
-Dweblogic.cluster.leasing.ClusterMessaging=true
-Dweblogic.cluster.leasing.LeaseClient=true
-Dweblogic.cluster.leasing.LeaseServer=true
-Dweblogic.cluster.leasing.LeaseView=true
-Dweblogic.cluster.leasing.MachineState=true
-Dweblogic.cluster.leasing.DiscoveryService=true
-Dweblogic.cluster.leasing.DisconnectMonitor=true
-Dweblogic.cluster.leasing.MessageEndPoint=true
-Dweblogic.cluster.leasing.MessageSender=true
-Dweblogic.cluster.leasing.SRMResult=true
-Dweblogic.cluster.leasing.FailureDetector=true
-Dweblogic.cluster.leasing.SRMService

RMI & IIOP

-Dweblogic.diagnostics.debug.DebugLogger.DISABLED=false & one or all of the following
-Dweblogic.debug.DebugCorbaClientHttp=true
-Dweblogic.debug.DebugCorbaClientIIOP=true
-Dweblogic.debug.DebugIIOPNaming=true
-Dweblogic.iiop.naming=true
-Dweblogic.debug.DebugIIOPOTS=true
-Dweblogic.iiop.ots=true
-Dweblogic.debug.DebugIIOPTransport=true
-Dweblogic.iiop.transport=true
-Dweblogic.debug.DebugIIOPTunneling=true
-Dweblogic.iiop.http.tunnelLogin=true
-Dweblogic.iiop.http.tunnelRecv=true
-Dweblogic.iiop.http.tunnelSend=true
-Dweblogic.debug.client.dgc=true, to enable debug for dgc
-Dweblogic.rmi.extensions.server.ServerHelper.DebugExportObject=true
-Dweblogic.debug.DebugDGCEnrollment=true
-Dweblogic.debug.ForceGCEachDGCPeriod=true
-Dweblogic.debug.LogDGCStatistics=true
-Dweblogic.debug.DebugMessaging=true
-Dweblogic.debug.DebugGenericMethodDescriptor=true
-Dweblogic.debug.DebugIIOPDetail=true
-Dweblogic.debug.DebugIIOPMarshal=true
-Dweblogic.debug.DebugIIOPTransport=true
-Dweblogic.debug.DebugIIOPSecurity=true
-Dweblogic.debug.DebugIIOPStartup=true
-Dweblogic.debug.DebugIIOPRepalcer=true
-Dweblogic.debug.DebugIIOPConnection=true
-Dweblogic.debug.DebugIIOPDetail=true
-Dweblogic.debug.DebugIIOPDetail=true
-Dweblogic.iiop.marshal=true
-Dweblogic.iiop.transport=true
-Dweblogic.iiop.security=true
-Dweblogic.iiop.startup=true
-Dweblogic.iiop.replacer=true
-Dweblogic.iiop.connection=true

Deployment debugs

-Dweblogic.debug.DebugDeployment=true
-Dweblogic.debug.DebugDeploymentServiceInternal=true
-Dweblogic.debug.DebugDeploymentServiceTransport=true
-Dweblogic.debug.DebugDeploymentServiceTransportHttp=true
-Dweblogic.debug.DebugDeploymentServiceStatusUpdates=true
If you have problem in edit lock, system resource deployment or configuration updates, you may also turn on configure debug flag:
-Dweblogic.debug.DebugConfigurationEdit=true

HTTP Debugs

-Dweblogic.debug.DebugURLResolution=true
-Dweblogic.debug.DebugHttp=true
-Dweblogic.debug.httpd=true
-Dweblogic.debug.httpd.log=true
-Dweblogic.debug.httpd.servlet=true

JTA

-Dweblogic.debug.DebugJTAPropagate=true
-Dweblogic.debug.DebugJTAGateway=true
-Dweblogic.debug.DebugJTAXA=true
-Dweblogic.debug.DebugJTA2PC=true
-Dweblogic.debug.DebugJTAJDBC=true
-Dweblogic.debug.DebugJDBCSQL=true

JNDI

-Dweblogic.debug.DebugJNDI =true
-Dweblogic.debug.DebugJNDIResolution =true
-Dweblogic.debug.DebugJNDIFactories =true
-Dweblogic.debug.DebugJNDIAppVersion =true

Workmanager

-Dweblogic.workmanager=true
-Dweblogic.StuckThreadHandling=true
-Dweblogic.IncrementAdvisor=true
-Dweblogic.MinThreadsConstraint=true
-Dweblogic.responsetimerequestclass=true
-Dweblogic.workmanagerservice=true

Server Life Cycle

-Dweblogic.slc=true
-Dweblogic.slcruntime=true
-Dweblogic.debug.DebugServerLifeCycle=true

Classloaders

-Dweblogic.utils.classloaders.GenericClassLoader.Verbose=true
-Dweblogic.utils.classloaders.ChangeAwareClassLoader.Verbose=true
-Dweblogic.utils.classloaders.ClasspathClassFinder=true
-Dweblogic.utils.classloaders.DefaultFilteringClassLoader.Verbose=true
-Dweblogic.utils.classloaders.FilteringClassLoader.Verbose=true
-Dweblogic.utils.classloaders.FilteringClassLoader.ResourceDump=true
-Dweblogic.utils.classloaders.URLClassFinder.Verbose=true

WebService

-Dweblogic.wsee.verbose=*

Security

SAML:
-Dweblogic.debug.DebugSecuritySAMLService=true
-Dweblogic.debug.DebugSecuritySAMLCredMap=true
-Dweblogic.debug.DebugSecuritySAMLAtn=true
-Dweblogic.debug.DebugSecuritySAMLLib=true
-Dweblogic.debug.DebugSecuritySAML2Service=true
-Dweblogic.debug.DebugSecuritySAML2CredMap=true
-Dweblogic.debug.DebugSecuritySAML2Atn=true
-Dweblogic.debug.DebugSecuritySAML2Lib=true
-Dweblogic.debug.DebugSecurityCredMap=true

WebService Security
-Dweblogic.xml.crypto.wss.debug=true
-Dweblogic.xml.crypto.wss.verbose=true
-Dweblogic.xml.crypto.keyinfo.debug=true
-Dweblogic.xml.crypto.keyinfo.verbose=true
-Dweblogic.xml.crypto.dsig.debug=true
-Dweblogic.xml.crypto.dsig.verbose=true
-Dweblogic.xml.crypto.encrypt.debug=true
-Dweblogic.xml.crypto.encrypt.verbose=true

Silent Installation of Weblogic and Webcenter portal

Requirment – Silent Installation of Weblogic and Webcenter portal

Implementation-

Silent-Mode Installation – Silent-mode installation is a way of setting installation configurations only once and then using those configurations to duplicate the installation on many machines. During installation in silent mode, the installation program reads the settings for your configuration from an XML file that you create prior to beginning the installation. The installation program does not display any configuration options during the installation process. Silent-mode installation works on both Windows and UNIX systems.
With previous releases of WebLogic Platform, you have the option of running the Configuration Wizard as part of the silent installation process. In WebLogic Platform 8.1, the Configuration Wizard cannot be run, automatically, with the WebLogic Platform installation program; it must be run separately. However, you can create a simple shell script or command file that sequentially runs silent mode installation and silent mode configuration. For more information about running the Configuration Wizard in silent mode, see Creating WebLogic Configurations Using the Configuration Wizard at http://download.oracle.com/docs/cd/E13196_01/platform/docs81/confgwiz/index.html.

-> Install the Weblogic

-> Download the WebLogic Installer … and put it in some directory
-> Create a silent.xml file that defines the configuration settings normally entered by a user during an interactive installation process, such as graphical-mode or console-mode installation. Here is the silent-wls10.3.6.xml file, see below

<?xml version="1.0" encoding="UTF-8"?>
   <bea-installer> 
     <input-fields>
       <data-value name="BEAHOME" value="\Oracle\Middleware_Home" />
       <data-value name="WLS_INSTALL_DIR" value="\Oracle\Middleware_Home\wlserver_10.3" />
       <data-value name="COMPONENT_PATHS"
        value="WebLogic Server/Core Application Server|WebLogic Server
/Administration Console|WebLogic Server/Configuration Wizard and Upgrade 
Framework|WebLogic Server/Web 2.0 HTTP Pub-Sub Server|WebLogic Server/WebLogic 
JDBC Drivers|WebLogic Server/Third Party JDBC Drivers|WebLogic Server
/WebLogic Server Clients|WebLogic Server/WebLogic Web Server Plugins
|WebLogic Server/UDDI and Xquery Support|WebLogic Server/Server Examples|Oracle Coherence/Coherence Product Files" />
       <data-value name="INSTALL_NODE_MANAGER_SERVICE" value="yes" />
       <data-value name="NODEMGR_PORT" value="5556" />
       <data-value name="INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER" value="yes"/>
   </input-fields> 
</bea-installer>

-> For Jar Installers:
Open a command prompt and start the installation by executing the below command.

java -jar wls1036_generic.jar -mode=silent -silent_xml=/path//silent.xml -log=/opt/softwares/Installation_silent.log 

It opens up a new windows showing the installation progress.Check the install progress window and a successful install would display message like below

————————————————————————————————————————————-

-> Install the Webcenter Portal

->  cd /u01/software/ofm_wc_generic_11.1.1.8.0_disk1_1of1/Disk1
->  ./runInstaller -silent -responseFile /u01/software/scripts/custom_installtype_wcp11.1.1.8.rsp -jreLoc /u01/app/oracle/product/java_current/jre

Here is the custom_installtype_wcp11.1.1.8.rsp file.You need an response file to provide parameter while installation.

[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to specify a directory where latest updates are downloaded. This option would use the software updates from the specified directory
SPECIFY_DOWNLOAD_LOCATION=false

#
SKIP_SOFTWARE_UPDATES=true

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
SOFTWARE_UPDATES_DOWNLOAD_LOCATION=

#Provide the Oracle Home location. The location has to be the immediate child under the specified Middleware Home location. The Oracle Home directory name may only contain alphanumeric , hyphen (-) , dot (.) and underscore (_) characters, and it must begin with an alphanumeric character. The total length has to be less than or equal to 128 characters. The location has to be an empty directory or a valid WebCenter Oracle Home.
ORACLE_HOME=/home/middleware/Oracle_WC1

#Provide existing Middleware Home location.

MIDDLEWARE_HOME=/home/middleware
#Application Server choices are WLS, WAS

APPSERVER_TYPE=WLS

[SYSTEM]
[APPLICATIONS]
[RELATIONSHIPS]

————————————————————————————————————————————-

-> Create database schemas via the RCU

Creating schema using silent instillation you provide password in txt file.Below command will create different schema.

	
 cd ofm_rcu_linux_11.1.1.8.0_disk1_1of1/rcuHome/bin
 ./rcu -silent -createRepository -databaseType ORACLE -dbUser sys
 -connectString localhost:1521:orcl  -dbRole SYSDBA
 -useSamePasswordForAllSchemaUsers -schemaPrefix DEV
 -component PORTLET -tablespace WP_REPO -tempTablespace TEMP
 -component MDS -tablespace WP_REPO -tempTablespace TEMP
 -component WEBCENTER -tablespace WP_REPO -tempTablespace TEMP
 -component ACTIVITES -tablespace WP_REPO -tempTablespace TEMP
 -f < passwordfile.txt

This will create 3 schema’s: DEV_PORTLET, DEV_MDS, DEV_WEBCENTER,DEV_ACTIVITES.
The passwordfile.txt file would contain, in order:

database_password
component1_schema_password
component2_schema_password

Happy weblogic/Webcenter installation with Vinay Kumar in techartifact