Search This Blog

Wednesday, February 26, 2014

Jdeveloper integrated server issue: Unable to create a server socket for listening on channel "Default". Cannot assign requested address: JVM_Bind

Unable to create a server socket for listening on channel "Default". The address xxx.xx.xxx.xxx might be incorrect or another process is using port 7101: java.net.BindException: Cannot assign requested address: JVM_Bind.

Server failed. Reason: Server failed to bind to any usable port

Solution to overcome this error is simple two step process.

Step1: Rename the folder JDeveloper  under :\Users\xyz\AppData\Roaming\ to something else. 
Note: AppData folder is a hidden folder in windows.

Step 2: Restart your JDeveloper and start the integrated server, this will prompt the user to create the DefaultDomain with new parameters. Users can enter the following parameters once again and configure the defaultDomain all over again.

Address : User will be provided with a drop down with following values
        a) 127.0.0.1
        b) localhost
        c) IP address 

Port: 7101, 7001 or any desirable port.

These settings will let you re-configure the DefaultDomain or IntegratedDefaultDomain.

Note: This will create a new folder :\Users\xyz\AppData\Roaming\JDeveloper.



Friday, October 11, 2013

Convert string to jbo date

Make sure the format of the date is set as per your requirement. 

                  formatter = new SimpleDateFormat("EEE MMM d hh:mm:ss z yyyy");
                  date = formatter.parse(aDate);
                  java.sql.Date sqlDate = new java.sql.Date(date.getTime());
                  oracle.jbo.domain.Date jboDate = new oracle.jbo.domain.Date(sqlDate);

If you want the date to be locale specific, use the following

                 formatter = new SimpleDateFormat(pattern, currentLocale); 

Here are some customized Date and Time formats (from Oracle Site)


Customized Date and Time Formats
Pattern Output
dd.MM.yy 30.06.09
yyyy.MM.dd G 'at' hh:mm:ss z 2009.06.30 AD at 08:29:36 PDT
EEE, MMM d, ''yy Tue, Jun 30, '09
h:mm a 8:29 PM
H:mm 8:29
H:mm:ss:SSS 8:28:36:249
K:mm a,z 8:29 AM,PDT
yyyy.MMMMM.dd GGG hh:mm aaa 2009.June.30 AD 08:29 AM

Wednesday, August 7, 2013

Authentication/Authorization managed by OAM in Weblogic

Configuration from Weblogic Console

Security Configuration

1. Login to weblogic console.

2. Click on Security Realms -> myrealm -> Providers.
    Click New.
    Enter Name : WebLogic_IdentityAsserter
    Type: "OAM Identity Asserter"
    Click OK.

3. Once done, Click on WebLogic_IdentityAsserter.
    Make the Control Flag to “SUFFICIENT”
    Add “OAM_REMOTE_USER” to chosen side of Active Types.
    Save the changes.

4. Go to the Provider Specific tab.
    And update the SSOHeadername to OAM_REMOTE_USER
    Save the changes.

5. Go to Security Realms -> myrealm -> Providers.
    Click New.
    Name: DSX
    Type: OpenLDAPAuthenticator.
    Click OK

6. Go to provider page and click on DSX.
    Mark the Control Flag as “OPTIONAL”

7. Click on Provider Specific tab.
    Update the following details for LDAP configuration.

Host :
Port 389 (Default port)
Principal
Credentials
Confirm Credentials
User Base DN O=<>
User From Name Filter (&(uid=%u)(objectclass=person))
User Name Attribute uid
User Object Class person
Use Retrieved User Name as Principal
Group Base DN ou=GROUPS,o=<>
Group From Name Filter (&(cn=%g)(objectclass=group))
Static Group Name Attribute cn
Static Group Object Class group
Static Member DN Attribute member
Static Group DNs From Member DN Filter (&(member=%M)(objectclass=group))
GUID Attribute objectGUID

Save the changes.


8. Go to Security Realms -> myrealm ->Providers.
    Click on DefaultAuthenticator
    Make the Control Flag as “OPTIONAL”.
    Save the changes.

9. Make sure Provider Specific setting is a below:
    Go to Security Realms -> myrealm -> Providers.
    Select the check box for DefaultIdentityAsserter.
    Click Delete.

10. Activate the changes & Restart all servers.

Tuesday, July 30, 2013

To Find Dirty data (uncommitted) in ADF task flow

ControllerContext cctx = ControllerContext.getInstance();
cctx.getCurrentViewPort().getTaskFlowContext().is DataDirty();

or

cctx.getCurrentViewPort().isDataDirty();

or

ViewPortContext.isDataDirty();

Sunday, June 30, 2013

OAF - Pass parameters between pages and session

OAPageContext (called from UI client)
putSessionValue( )
removeSessionValue( )
getSessionValue( )

OAPageContext (called from UI client for encryption)
PutEncryptedParameter( )
GetDecryptedParameter( )

OAPageContext (called from UI client)
putTransactionValue( )
getTransactionValue( )
removeTransactionValue( )

OADBTransaction (called from server)
putValue( )
getValue( )
removeValue( )

Format negative numbers with bracket in ADF screens.

In Financials, it is important that negative numbers are displayed/formatted within brackets or braces.

Challenge comes in when the the column or UI attribute holds both positive and negative number.

Solution : On the UI Attribute, place with pattern as "#,##,###.00;(##,##,###.00)"
Or
If the UI is based on a VO, edit the attribute properties and specify the below details as part of the Control Hints. without the double quotes formattype as "Number" and format as "#,##,###.00;(##,##,###.00)"

The key here is semi-colon(;) seperating the value of the format, ADF internally recognizes that the second format value is for negative number.

Reference scope variable in VO as bind parameter

Reference scope variable in VO as bind parameter.

Note: Accessing scope variable in VO is violation of MVC but can be performed using below groovy experssion.

adf.context.expressionEvaluator.evaluate('#{pageFlowScope.empNo}')