Displaying Oracle Documents Cloud Services File Picker and Link Picker from other Domains

Introduction The Oracle Documents File Picker and Link Picker allow web applications to select files and folders that reside in the Oracle Documents Cloud Service. These Pickers can start from a specific folder and can further be restricted to a folder structure for a specific user and role when combined with the Oracle Documents App Link. Some of […]

Getting Started with WebCenter Portal – Content Contribution Project – Part 2

Introduction This continues for part 1 and dives into the runtime environment setup of WebCenter portal project. All content listed on this page is the property of Oracle Corp. Redistribution not allowed without written permission

Getting Started with WebCenter Portal – Content Contribution Project – Part 1

Introduction A very common use-case for WebCenter applications is to use them for Content Contribution projects. WebCenter Portal and WebCenter Content are designed to work seamlessly with each other. Once set up correctly a content contribution user can make all content changes from within the Portal application, without going into content administration application. The following […]

Configure Coherence for Oracle WebCenter Portal Framework Content Presenter Task Flow

This guide aims to give you complete configuration overview for how to configure Coherence Cache for Oracle WebCenter Portal Framework Application using the Content Presenter Task Flow.

This document is intended for WebCenter Portal Application administrators who have to improve performance by configuring Coherence cache for Content Presenter.

For more information about the Coherence Cache for Content Presenter have a look at the following link:

http://docs.oracle.com/cd/E21764_01/webcenter.1111/e12405/wcadm_documents.htm#BABHFCJH

Details

 

 

The Content Presenter and the Content Management Interoperability Service (CMIS) are delivered out of the box with in-memory Coherence cache. This cache is NOT enabled by default. You can enable it by adding the file content-coherence-cache-config.xml to the application class path of the WebCenter Portal Application. This guide describes how to configure the cache when you deploy applications based on WebCenter Portal Framework.

The Content Coherence Configuration file below uses the distributed cache mode in combination with local cache mode depending on the type of objects to be cached. Here the example Coherence cache file to use for the configuration:

<!DOCTYPE cache-config SYSTEM “cache-config.dtd”>
<cache-config>
  <caching-scheme-mapping>
    <cache-mapping>
      <cache-name>repo.ucm.nodeUidCache.*</cache-name>
      <scheme-name>ContentNodeCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name>repo.ucm.nodePathToUidCache.*</cache-name>
      <scheme-name>ContentNodeCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name>repo.ucm.securityInfoCache.*</cache-name>
      <scheme-name>ContentNodeCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name>repo.ucm.typeNameCache.*</cache-name>
      <scheme-name>ContentTypeCaches</scheme-name>
    </cache-mapping>
   <cache-mapping>
      <cache-name>repo.ucm.typeNamesCache.*</cache-name>
      <scheme-name>ContentTypeCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name>binaryCache.*</cache-name>
      <scheme-name>ContentBinaryCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name>repo.ucm.searchCriteriaCache.*</cache-name>
      <scheme-name>ContentSearchCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name> repo.ucm.indexedFieldsCache.*</cache-name>
      <scheme-name>ContentSearchCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name>repo.ucm.securityUserCache.*</cache-name>
      <scheme-name>ContentSecurityCaches</scheme-name>
    </cache-mapping>
    <cache-mapping>
      <cache-name>repo.ucm.profileTriggerValueCache.*</cache-name>
      <scheme-name>ContentProfileCaches</scheme-name>
    </cache-mapping>
  </caching-scheme-mapping>

  <caching-schemes>
    <distributed-scheme>
      <scheme-name>ContentNodeCaches</scheme-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>BM_ContentNodeCaches</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <backup-count>0</backup-count>
      <autostart>true</autostart>
    </distributed-scheme>

    <distributed-scheme>
      <scheme-name>ContentTypeCaches</scheme-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>BM_ContentTypeCaches</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <backup-count>0</backup-count>
      <autostart>true</autostart>
    </distributed-scheme>

    <distributed-scheme>
      <scheme-name>ContentBinaryCaches</scheme-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>BM_ContentBinaryCaches</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <backup-count>0</backup-count>
      <autostart>true</autostart>
    </distributed-scheme>

    <distributed-scheme>
      <scheme-name>ContentSearchCaches</scheme-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>BM_ContentSearchCaches</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <backup-count>0</backup-count>
      <autostart>true</autostart>
    </distributed-scheme>

    <distributed-scheme>
      <scheme-name>ContentSecurityCaches</scheme-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>BM_ContentSecurityCaches</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <backup-count>0</backup-count>
      <autostart>true</autostart>
    </distributed-scheme>

    <distributed-scheme>
      <scheme-name>ContentProfileCaches</scheme-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>BM_ContentProfileCaches</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <backup-count>0</backup-count>
      <autostart>true</autostart>
    </distributed-scheme>

    <local-scheme>
      <scheme-name>BM_ContentNodeCaches</scheme-name>
      <expiry-delay>5m</expiry-delay>
      <high-units>100</high-units>
    </local-scheme>

    <local-scheme>
      <scheme-name>BM_ContentTypeCaches</scheme-name>
      <expiry-delay>30m</expiry-delay>
      <high-units>50</high-units>
    </local-scheme>

    <local-scheme>
      <scheme-name>BM_ContentBinaryCaches</scheme-name>
      <expiry-delay>5m</expiry-delay>
      <high-units>1000000</high-units>
      <unit-calculator>
        <class-scheme>
          <class-name>com.tangosol.net.cache.SimpleMemoryCalculator</class-name>
        </class-scheme>
      </unit-calculator>
    </local-scheme>

    <local-scheme>
      <scheme-name>BM_ContentSearchCaches</scheme-name>
      <expiry-delay>5m</expiry-delay>
      <high-units>50</high-units>
    </local-scheme>

   <local-scheme>
      <scheme-name>BM_ContentSecurityCaches</scheme-name>
      <expiry-delay>10m</expiry-delay>
      <high-units>50</high-units>
    </local-scheme>

   <local-scheme>
      <scheme-name>BM_ContentProfileCaches</scheme-name>
      <expiry-delay>1h</expiry-delay>
      <high-units>100</high-units>
    </local-scheme>
  </caching-schemes>
</cache-config>

 

The cache entries are described in the following documentation:

http://docs.oracle.com/cd/E21764_01/webcenter.1111/e12405/wcadm_documents.htm#BABEDDBI

NOTE: You have to put this file into the application classpath. If you use the file in the managed server class path or node manager class path it will NOT work.

 

Step by Step Installation Process

 

 

Step 1: Create JAR file with the Coherence Cache Config file

 

 

Create JAR file which contains the example content-coherence-cache-config.xml shown above. For how to create JAR files follow the tutorial from the Java documentation here:

http://docs.oracle.com/javase/tutorial/deployment/jar/build.html

You will use this JAR file to put it inside your WebCenter Portal Framework Application. As mention above this works only if this JAR file is part of the WebCenter Portal Framework Application class path.

 

Step 2: Create WebCenter Application EAR Lib folder

To put the created JAR file into the APP-INF/lib you have to update your project settings:

·From the JDeveloper WebCenter Portal Application Project click on Application->Application Properties.

 

·From the new window select Deployment. From the deployment profile select the EAR profile you want to use and then click on Edit button.

 

· From the new window select File Groups and then click on New button. From the new opened window select Packaging and type a name for the file group as shown bellow. Then click OK to add your new packaging file group. Click then OK again the save the changes.

 

·Create the APP-INF/lib folder into your project. Go to the file system where you create the WebCenter Portal Application Project as shown bellow

 

·<!–[endif]–>You have to create the APP-INF/lib folder under the src/ folder:

 

·<!–[endif]–>Inside the newly created APP-INF/lib folder you can place your JAR file with the Coherence Cache configurations.

 

·<!–[endif]–>To make sure that the file will be picked go back to JDeveloper and open the Application Properties again by clicking on Application->Application Properties and then click on Deployment. Select the EAR Profile which you used to add the Packaging File Group and click on Edit button. Inside the new window you should see that your APP-INF/lib folder is selected and inside there, there is also the JAR file you copied.

 

·<!–[endif]–>WebCenter Portal Framework Application is ready for deployment now. Redeploy your application and bounce(load your application one in an browser) to make sure that the configurations are loaded.

Step 3: Check your configuration

NOTE: You have to open your application once to make sure that the Coherence Configuration is loaded.

Make sure that you open the application once in the browser then open your <managed_server>_diagnosting.log file and search for coherence inside. If you see message like this:

[APP: AviTrustSamplePortal#V2.0] Unable to load Coherence configuration file content-coherence-cache-config.xml. Using in-memory (local) caches.

 

… then it means that your application did not find the configuration file. The reason for that is that the JAR file was not inside the application classpath. In this case you may used the Managed Server Classpath which is not working. You have to place the JAR file inside the application classpath as described above.

 

If you don’t see the message above you can go for the next step and look for the Coherence configuration inside the MBean.

To do so open your Enterprise Manager and go to the application configuration like shown bellow:

 

 

Then from the Application Deployment click on the System MBean Browser to have a look in the MBeans. Inside the MBean Tree search for the word <coherence>:

 

You should be able to see the configurations as shown above.

 

Another very good why to check if the cache works is to have a look inside the WCC request audit. It shows if queries were fired against the Content Server.

To do so login as Administrator to WCC.

 

After you login in as administrator select System Audit Information and from the Active Sections select only system and requestaudit as well as Full Verbose Tracing checkbox.

 

Click on Update button to update the configuration.

 

 

After that click from the upper right menu on View Server Output to trace the Content Presenter queries to the Content Server.

If you open a example page where the content presenter is used, like this:

 

You can see after that in the audit log the queries used by the content presenter to get the information:

 

Refresh the page by click on F5 or just the browser refresh button. There’re should be no new queries visible in the audit log anymore, since the content presenter should use the coherence cache now:

 

 

 

Step 4: Configuration for Cluster Environment

 

 

If you run your application in cluster environment you have to make sure that the coherence configuration works inside the cluster. If you have two managed servers in one cluster you can configure following parameters in the startup arguments. If Node Manager is used to start the Managed Servers, you can put the argument in the Server Start argument option.

First server:

-Dtangosol.coherence.wka1=server1.mycompany.com

-Dtangosol.coherence.wka1.port=8088

-Dtangosol.coherence.wka2= server2.mycompany.com

-Dtangosol.coherence.wka2.port=8088

-Dtangosol.coherence.localhost= server1.mycompany.com

-Dtangosol.coherence.localport=8088

 

Second server:

-Dtangosol.coherence.wka1= server1.mycompany.com

-Dtangosol.coherence.wka1.port=8088

-Dtangosol.coherence.wka2= server2.mycompany.com

-Dtangosol.coherence.wka2.port=8088

-Dtangosol.coherence.localhost= server2.mycompany.com

-Dtangosol.coherence.localport=8088

 

NOTE: If the two server are running on the same physical machine, you have to make sure that they use different ports.

 

Reverse Engineer DB objects from ADF-BC

Say you are developing an application using ADF Fusion stack. If you are like me you have backed up your ADF application. However Database objects are not backed up so frequently. One day disaster strikes and you loose the schema.  Here’s how yo…

Configuring UCM cache to check for external Content Server changes

Recently, I was involved in a customer scenario where they were modifying the Content Server’s contributor data files directly through Content Server.  This operation of course is completely supported.  However, since the contributor data file was modified through the “backdoor”, a running WebCenter Spaces page, which also used the same data file, would not get the updates immediately.  This was due to two reasons.  The first reason is that the Spaces page was using Content Presenter to display the contents of the data file. The second reason is that the Spaces application was using the “cached” version of the data file.  Fortunately, there is a way to configure cache so backdoor changes can be picked up more quickly and automatically.

How to Setup JDeveloper workspace for ADF Fusion Applications to run Business Component Tester?

Issue

When creating ADF applications using JDeveloper with Fusion Applications Extension, the Application Module Tester (Business Component Browser) will fail the following exception:
“(oracle.jbo.JboException) JBO-29000: Unexpected exception caught: java.lang.NoClassDefFoundError, msg=Could not initialize class oracle.apps.fnd.applcore.oaext.model.OAApplicationModuleImpl”

Description:

The following picture shows the default libraries added to your Model project when creating an ADF Business Component from Tables:

 
After reviewing the Fusion Applications Developer Guide (here), you must add Applications Coreand Applications Core (Attachments Model) libraries to the data model project (default is Model). However, when adding the above libraries into your project, it throws warnings for unable to resolve dependent libraries (secondary imports) such as Topology Manager, Functional Setup Model. Please see the following screens:
 
 
 
 

Solution:

You must select “Topology Manager” and “Functional Setup Module” along with Application Core and Application Core (Attachments Model) libraries. You must also add “Java EE 1.5” and “Java EE 1.5 API” libraries.
You will still get the following warning:
Business Components: Unable to load Business Components Project.  File not found.
    Object: oracle.apps.fnd.applxdf.dm.model.Model
    Owner:  oracle.apps.model.Model 
You can ignore it for now to run ADF Business Component Browser to test your ADF Model.
Note: This is a bug as I do not see this class in <Jdev location>/jdeveloper/atgpf/lib/oracle.apps.fnd.applxdf.jar file.
The following screen shows the libraries in your Model Project:
 
Note: Some of the libraries such as “Commons *” are automatically added with Application Core as secondary imports.
 
 

Removing the “Cannot find a skin that matches family portal and version v1.1” message

Do you get annoyed by the following message on your weblogic log output?

<SkinFactoryImpl> <getSkin> Cannot find a skin that matches family portal and version v1.1. We will use the skin portal.desktop.

Yes? Well, me too :-). To get rid of it just open your portal application’s trinidad-config.xml file and remove the <skin-version> element from it.

Before:

<?xml version=”1.0″ encoding=”UTF-8″?>

<trinidad-config xmlns=”http://myfaces.apache.org/trinidad/config”>

  <skin-family>#{preferenceBean.defaultTrinidadSkin}</skin-family>

<skin-version>v1.1</skin-version>

</trinidad-config>

After:

<?xml version=”1.0″ encoding=”UTF-8″?>

<trinidad-config xmlns=”http://myfaces.apache.org/trinidad/config”>

  <skin-family>#{preferenceBean.defaultTrinidadSkin}</skin-family>

</trinidad-config>

 

Speeding up integrated WebLogic Server Startup – avoiding multiple network bindings

If you see the following messages on the console window when start JDeveloper’s integrated WLS:

<Feb 2, 2012 1:07:41 PM PST> <Notice> <Server> <BEA-002613> <Channel “Default[5]” is now listening on 0:0:0:0:0:0:0:1:7101 for protocols iiop, t3, ldap, snmp, http.> 

<Feb 2, 2012 1:07:41 PM PST> <Warning> <Server> <BEA-002611> <Hostname “mirocha-LAP1.st-users.us.oracle.com”, maps to multiple IP addresses: 192.168.239.1, 192.168.41.1, 192.168.56.1, 10.43.1.12, 0:0:0:0:0:0:0:1> 

<Feb 2, 2012 1:07:41 PM PST> <Notice> <Server> <BEA-002613> <Channel “Default[4]” is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.> 

<Feb 2, 2012 1:07:41 PM PST> <Notice> <Server> <BEA-002613> <Channel “Default[1]” is now listening on 192.168.41.1:7101 for protocols iiop, t3, ldap, snmp, http.> 

<Feb 2, 2012 1:07:41 PM PST> <Notice> <Server> <BEA-002613> <Channel “Default” is now listening on 192.168.56.1:7101 for protocols iiop, t3, ldap, snmp, http.> 

<Feb 2, 2012 1:07:41 PM PST> <Notice> <Server> <BEA-002613> <Channel “Default[3]” is now listening on 10.43.1.12:7101 for protocols iiop, t3, ldap, snmp, http.> 

<Feb 2, 2012 1:07:41 PM PST> <Notice> <Server> <BEA-002613> <Channel “Default[2]” is now listening on 192.168.239.1:7101 for protocols iiop, t3, ldap, snmp, http.> 

 

These messages indicate that WLS is binding itself to all network adapters configured on your machine running Windows – yes, this is an OS issue; it doesn’t happen on Linux.

All these bindings end up eating a couple of seconds of WLS startup time. To minimize it:

 

  1. Start WLS – On JDeveloper, go to Run > Start Server Instance
  2. Go to the admin console at http://localhost:7101/console and login as weblogic/weblogic1
  3.  On the left side navigation bar, select Environment > Servers
  4. Select Default Server from the table
  5. On the Listen Address field, enter: 127.0.0.1
  6. Restart WLS.

 

 

Here’s some before/after numbers:

Before:

IntegratedWebLogicServer startup time: 69557 ms.

 

After:

IntegratedWebLogicServer startup time: 44589 ms.

 

That’s a 25s difference. Not bad. =-)

 

Don’t install JDev and BPM in the same Home

I don’t think this is actually documented anywhere, but it is something that you will want to be aware of if you are using the BPM 11.1.1.5 Feature Pack.

It is not supported to install the Feature Pack patch into an Oracle Home which contains JDeveloper and the runtime components (WebLogic, SOA, BPM, etc.)

If you are installing on the same machine, like a developer’s machine for example, you should install JDeveloper into a separate Oracle (Middleware) Home.

Full access to MDS Repository

JDeveloper allows you to browse the tree structure of any MDS repository, DB or File based. After creating the appropriate connection, a JTree is created, and all documents and packages of the MDS repository are available in it. To manipulate those doc…

Working with OWSM Policies – Part 1 of some

In this post I discuss the available options to work with OWSM (Oracle Web Services Manager) policies in JDeveloper and Enterprise Manager. OWSM is a component available along with the Oracle SOA Suite and provides policy enforcement point (PEP) agents for SOAP-based messages.

Typically, a service policy is attached to a service endpoint to enforce some pre-defined rules (like enforcing a SAML token, Kerberos token, message confidentiality, SSL, etc). And a corresponding client policy is attached to the client in order to transform the outgoing SOAP message, making it suitable to be enforced in the server side.

OWSM Policies in JDeveloper

OWSM supports two types of repositories for its policy files: file system or database.
When working with JDeveloper, you can choose which one you want to use.
By default, JDeveloper reads policies from the file system. To check that out, go to Tools –> Preferences –>WS Policy Store (on left).

image

The File Store Default Location refers to DefaultDomain oracle/store/gmds directory under $JDEV_USER_DIR’s systemxx.x.x.x.xx.xx.xx folder. Policies are under owsm/policies and assertions are under owsm/assertiontemplates.

The App Server Connection option actually refers to a running Weblogic instance that ultimately gets the policies from a database.

Development groups working with custom policies may like the idea of having policies defined in a central location so that everyone can be sure to work against the very same version of policies. The drawback is that you’ll need that server up and running all the time.

When working with SOA and web services, JDeveloper exposes OWSM policies graphically so they can be picked up with a single click. A description of what the policy does is also shown. I strongly recommend reading it, since it can clarify many questions you might have about the policy. If you’re writing a web service proxy and wants to attach a policy, there is no UI and you should know the policy name. Speaking of names, one good aspect is that OWSM policies are named in a very intuitive way. For example, wss11_saml_token_with_message_protection_client_policy says that it is a client policy implementing message protection for SAML 1.1 tokens. In other words, it adds an encrypted and signed SAML 1.1 token to the outgoing SOAP message.

OWSM Policies in Enterprise Manager

JDeveloper is not the single option for policy attachment. Organizations may decide to take such task off developers hands and defer it to sysadmins. That’s accomplished with Enterprise Manager. You navigate to the attachment point and simply pick the policy you want. Policy enforcement starts immediately.

Besides that, Enterprise Manager provides some very convenient ways for working with policies.
There’s a “Create Like” option serving as a template mechanism. During policy creation, you can change several attributes of the original policy as well as add, change or remove specific assertions. By the way, a policy is composed of one or more assertions, who are the ones that actually do the “heavy-lifting”, containing the necessary logic to deal with the SOAP message.

By saving the policy, it gets persisted into the policy repository.

You then have the option to export it to a file. This is useful if you want to consume it directly from the file system (as JDeveloper does by default) and want to add your own assertion implementation class (which is typically the case when you’re developing a custom policy).

When exporting the file, notice that Enterprise Manager messes up with the file name a bit, by changing the “/” (slash) symbol following the “oracle” prefix to an “_” (underscore). You must rename the file, by cutting “oracle_” off the file name. Then simply copy the file to the oracle folder under the gmds/owsm/policies folder mentioned before.

image

If you want to separate out the custom files from the ones shipped by Oracle, you can even create a new folder under gmds, say “custom”, and put your custom policy there. JDeveloper will automatically acknowledge that.

Another very interesting feature I should mention is that Enterprise Manager implements a web service client, allowing  OWSM policies to be tested. For example, let’s say you develop a pair of policies to implement WSS digest-based authentication. Upon attaching the service-side policy to your deployed web service, you should be able to use EM’s testing page to attach the client-side policy to the outgoing SOAP message and verify if your policies are ok.

Next time I will cover how to write custom OWSM policies, including the main java APIs developers should be aware of.

New version of JDeveloper 11.1.2.0 released with Maven support and better performance

Oracle has released a new version of JDeveloper, 11.1.2.0, with a whole bunch of new features, including Maven support, and a lot of performance enhancements.  You can check out details of the new features here. Please note that this version … Continue reading

Changing the default editor/view in JDeveloper

If you work a lot with complex ADF pages in JDeveloper, you may get tired of waiting for it to open your pages in the Design view, I know I do!  Fortunately, there is a simple solution.  You can change … Continue reading

Opening a BPMN process from Oracle BPA Suite

Some organisations use Oracle BPA Suite (which is based on ARIS) to model their organisation’s business processes from the highest level (strategy) down to the operational process level.  Such organisations will often follow the ARIS methodology, or some customised version … Continue reading

Deploying to WebLogic Server on Amazon EC2 from JDeveloper

Sometimes, when running WebLogic Server on the Amazon Elastic Compute Cloud, you may find that you are unable to deploy from your local JDeveloper to your WebLogic Server instance. Andrew Rosson has written a helpful post (here) that provides a simple … Continue reading

Users and Groups migration: a handy JDeveloper feature

When you run an ADF web application directly from JDeveloper, it starts its embedded WLS and deploys the application. In such context, JDeveloper has a very convenient feature when dealing with users and groups defined in the application’s jazn-data.xml file. They get deployed along with the application into WLS embedded LDAP server, provided the Users and Groups check box is selected in the Application Properties Deployment window, as shown right below:

applicationMenu

UsersAndGroupsMigration 

Then by simply asking JDeveloper to run your application you get everything you need.

As said, that’s a JDeveloper convenience that only works when deploying the application through JDeveloper. Do notice this apply whether you click & run a page or taskflow or explicitly ask JDeveloper to deploy your application into WLS, as shown:

DeployingViaJDev

But if you’re not using JDeveloper, you’re on your own. You should not expect it to happen when generating an ear file and deploying via any other means, although jazn-data.xml is packed within the ear file. `I’ve gotten this question from a few of customers. And some believe that’s a bug. It’s not.

You need to manually populate WLS embedded LDAP. There are two ways to accomplish it:

1) Using wlst.sh:

> connect ('weblogic','<weblogic-password>','t3://<server>:<port>')
> cd('<folder-where-your-ldif-file-is-kept>')>
> cmo.importData('DefaultAtn', '<your-ldif-file>', None)

 

2) Using WLS Console:

Notice the path at the top to understand how to get to this screen.

Enter the ldif file absolute path name in “Import File” on Server field. Notice the file has to be accessible on the server file system.

DefaultAuthenticatoSetupWLS

Here’s a small sample of the ldif file you can use and extend:

dn: dc=@domain@

dc: @domain@

objectclass: top

objectclass: domain


dn: ou=@realm@,dc=@domain@

ou: @realm@

objectclass: top

objectclass: organizationalUnit


dn: ou=groups,ou=@realm@,dc=@domain@

ou: groups

objectclass: organizationalUnit

objectclass: top


dn: cn=group1, ou=groups, ou=@realm@, dc=@domain@

memberURL: ldap:///ou=people,ou=@realm@,dc=@domain@??sub?(&(objectClass=person)(wlsMemberOf=cn=group1,ou=groups,ou=@realm@,dc=@domain@))

objectclass: top

objectclass: groupOfUniqueNames

objectclass: groupOfURLs

cn: group1

uniquemember: cn=user1,ou=people,ou=@realm@,dc=@domain@ 

 

dn: ou=people,ou=@realm@,dc=@domain@

ou: people

objectclass: organizationalUnit

objectclass: top


dn: uid=user1,ou=people,ou=@realm@,dc=@domain@

objectclass: top

objectclass: person

objectclass: organizationalPerson

objectclass: inetOrgPerson

objectclass: wlsUser

cn: user1

sn: user1

uid: user1

userpassword: welcome1

wlsMemberOf: cn=group1,ou=groups,ou=@realm@,dc=@domain@

 

What you need to use ADF

This blog contains many articles about Oracle Application Development Framework (ADF).  In order to develop and run applications using ADF, you will need to install Oracle JDeveloper, which you can download from the Oracle Technology Network (here). Each post will … Continue reading

JDeveloper 11.1.1.2 Integrated Server will not start

A quick post as I find that the JDeveloper integrated server will not start with JDeveloper 11.1.1.2 in some cases, looks like when the user’s home directory has a space in the path. You can work around this issue by … Continue reading

Building Custom Security Providers with JDeveloper 11g

As I mentioned previously, the WebLogic Server Sample Security Providers have emerged and have found a new home. This is great, but unfortunately the samples are a little out of date. I’ve received requests for a sample credential mapper, which I hope to be able to post shortly. In the meantime, I thought it would be useful to show how to work with the samples inside of JDeveloper.

Step 1 – Set-up the Application in JDeveloper

Create a new Generic Application in JDeveloper. Create a project for the application and make sure that Java is selected as a project technology. Next, import the samples into the project. Once you’ve downloaded the samples, unzip it. From JDeveloper, select “Import…Java Source” and then select the src folder from the directory where the samples were downloaded.

Finally, modify the project settings to exclude the “tests” folder. Unfortunately, after some effort there are some parts of this sample that are just “too old” to get working – the test clients, test application, and test domains.

Step 2: Setting up Ant


Add an empty build file to the project, then replace the contents of the empty build file by cutting and pasting the contents of the build.xml from the samples into the build.xml in JDeveloper.
If you’ve done this right, then you have a project that looks like this in JDeveloper.

The next step, and this is probably the most “complicated” is to modify the build.xml to conform to your specific environment. Everything is keyed off of the lib property. Modify this to value to point to WEBLOGIC_HOME/server/lib – (c:\Oracle\Middleware\wlserver_10.3\server\lib).

The other complicated part is that since you’re not running this inside of the WLS environment, the classpath is not their. Instead of dealing with JDeveloper and setting the environment that way, I just added elements to the > elements.

<java classname=”weblogic.management.commo.WebLogicMBeanMaker” fork=”true” failonerror=”true”>
<jvmarg line=”-Dfiles=${build_dir} -DMDFDIR=${build_dir} -DMJF=${build_dir}/${sampleprovidersjar} -DtargetNameSpace=${namespace} -DpreserveStubs=true -DcreateStubs=true -DmbeantypesDir=${mbeantypes}”>
<classpath>
<path location=”${lib}\..\..\..\modules\com.bea.core.mbean.maker_1.4.0.0.jar”/>
<path location=”${lib}\..\..\..\modules\com.bea.core.utils.full_1.6.0.0.jar”/>
<path location=”${lib}\weblogic.jar”/>
<path location=”${java.home}\..\lib\tools.jar”/>

 

The last thing to do is to either make a similar change to the > for the tests or to comment them out or to just ignore the error when running the ant task and the building of the tests fails. For people that are interested in the tests, you should add the following:

<javac srcdir=”${test_src_dir}/java” destdir=”${class_dir}”>

<classpath>
<path location=”${lib}\..\..\..\modules\com.bea.core.mbean.maker_1.4.0.0.jar”/>
<path location=”${lib}\..\..\..\modules\com.bea.core.utils.full_1.6.0.0.jar”/>
<path location=”${lib}\weblogic.jar”/>
<path location=”${java.home}\..\lib\tools.jar”/>
</classpath>

</javac>

If you’ve done everything correctly, you should now be able to build the samples. You do this by running the ant task by right clicking on the build.xml and select the all target.

And…you should have a file called wlSampleSecurityProviders.jar in your WEBLOGIC_HOME\server\lib\mbeantypes directory. This is the jar that contains the sample providers.

Admittedly, this is not a perfect solution. Even if you add weblogic.jar to the project classpath there are some funny things with this set-up. Most notably is the fact that the classes appear to be in the wrong packages. This is because of the way that the samples project is distributed. This can be a but annoying, but I’ve used this set-up for the WS-SecureConversation work that I did recently, and I found it workable. I’ll probably go into more details in a future post, but if people have questions in the meantime, post them here, and I’ll do my best to help