Wednesday, October 30, 2013

Resolving "oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener Class not Found" Exception

Issue:

Last week one of my customer reported that they are getting

'oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener' Class not Found 

exception in Weblogic environment. They recently applied a patch and after servers are coming up but most of the applications or deployments were in 'Prepared' state. If you try to start them in Weblogic console you will receive the above error.

Cause:

StartScriptEnabled property in nodemanager.properties file was set to 'false'. This must set to 'true' if you are going to start your managed servers using Weblogic console.

Solution:

Simple change the StartScriptEnabled=true in nodemanager.properties file which is usually at WL_HOME/common/nodemanager/ in my case /opt/ora/idm/middleware/wlserver_10.3/common/nodemanager

Restart the managed server using weblogic console

Note: You might not get this issue if you always start servers using command line. 

Have a nice day,
Zeeshan
@baigsorcl

Monday, October 21, 2013

Book Review: Developing Web Applications With Oracle ADF Essentials

Greetings,

Here is my review of Sten E. Vesterli latest book "Developing Web Applications with Oracle ADF Essentials".



Where to get the book

  1. Packt Publishing
  2. Amazon

About the Author (In my words)

Sten Vesterli is one of the ADF Gurus who contributed to ADF community a lot. He is frequent presenter at global Oracle conferences like Oracle Open World, ODTUG Kscope, IOUG Collaborate and I have always enjoyed his style of presenting and writing. This book is 2nd book by Sten on ADF you can reach him on his website http://www.vesterli.com/ and Twitter www.twitter.com/stenvesterli

Introduction:

The book is focused on the FREE version of Oracle ADF called 'ADF Essentials' it contains 8 chapters and about 270 pages.

The book takes an example of building a small application and covers a most of the life cycle of  ADF Essentials development. The key highlight for me the author is using MySQL database, Glassfish server and Apache Shiro for security. (Security is not part of ADF Essentials license which requires you to work with open source security solutions).

Chapter wise Review

Chapter 1: My First ADF Essentials Application

First chapter will provide you step by step detail how to install and configure MySQL database, Glassfish server and setting up your development environment in JDeveloper. By end of this chapter you will be able to run a basic page developed in JDeveloper, deployed on Glassfish server using MySQL database.

Chapter 2: Creating Business Services

Second chapter is about working with a Model layer of ADF essentials. The business services as name suggest about setting up back end data model for your application. The author covered quite details about Entity objects, View Objects, View links, Associations and Application Module within a  context of example application. There are few best practices tips as well and some bugs fixing tricks.

Chapter 3: Creating Task Flows and Pages

Third chapter takes you to more interesting part of working with ADF essentials which is View Controller layer. View layer is where you develop pages and control the flow of your application. The author explained enough information to work with the best practices like templates, memory scopes and internationalization. By end of this chapter you will have a search page with a result table of your application.

Chapter 4: Adding Business Logic

Chapter four as name suggests about adding business logic in your application. The chapter includes topics with working with DML, database triggers, Java methods and Managed beans. There is a quite a lot java code there but it is relevant. At this point the example application is pretty much complete.

Chapter 5: Building Enterprise Applications

Chapter five talked about best practices and setting up your project for an enterprise application. This chapter answers most of the common FAQs for ADF newbies and guide you how to setup projects, version controls, how to make reusable libraries so you can share the code across teams and applications. In this chapter you will be merging all your code into one single master application.

Chapter 6: Debugging ADF Applications

In this chapter you will learn how to debug ADF application. What are best practices for using logging framework in ADF, JDeveloper and Glassfish server.

Chapter 7: Securing an ADF Essentials Application

Chapter seven is my favorite chapter. When ADF essentials came out, the missing security feature raised quite few questions in the community but this chapter gave you all what you need to do if you are building secure applications with ADF essentials. The chapter explains detail steps how to configure Apache Shiro with your application and using database table based user repository.

Chapter 8: Build and Deploy

The final chapter of the book talked about how to build and deploy your application using Apache Ant and other tools and what you need to know if order to deploy ADF applications successfully.

Final Thoughts:

I think this book provides a very good overview of what you can do with ADF essentials what are limitations and how to overcome on it.  This details not only valid for ADF essentials but also works with full version of ADF. 

I find this book could be a great help for who are just going to start ADF development.

Cheers,
Zeeshan Baig
@baigsorcl

Thursday, June 27, 2013

Slides from my ODTUG Kscope13 Presentation

Greetings,

I had a great time at ODTUG Kscope13 in New Orleans and good to see some of my friends and  ADF audience which is growing year by year. I attended few sessions from ADF, APEX and Database and learned lot. Next year ODTUG kscope is going to be in Seattle and i am excited to be a part of it. I have already start thinking about my new abstracts.

Thank you ODTUG for providing me this opportunity to share my knowledge.

Following are the slides from my Kscope13 presentation.




Cheers,
Zeeshan Baig
@baigsorcl

Monday, May 20, 2013

How to Reset Weblogic Server Administrator Password

Hi,

Sometimes there is a possibility that you forget Weblogic server administrator password or you are in the environment where nobody knows the password.

In this post i will show the steps how to reset weblogic server administrator password

What you need?

  1. Access to the server where weblogic is installed. 
  2. Location where weblogic domain is created default is <fmw-home>/user_projects/domains/<domain-home>

Steps to do:

  1. Stop the AdminServer including all managed servers.
  2. Rename the LDAP folder of AdminServer and other managed servers. Location would be like <WLS_DOMAIN>/servers/<server-name>/data/ldap
  3. Run the setDomainEnv.sh or .cmd command to setup the environment i.e. <wls-domain>/bin/
  4. Go to security directory in the domain i.e. <domain-home>/security
  5. Run the following command (Make sure include DOT at the end)  java weblogic.security.utils.AdminAccount weblogic welcome1 . 
  6.  Delete the 'DefaultAuthenticatormyrealmInit.initialized' file from ldap folder in the AdminServer <domain-home>/servers/AdminServer/data/ldap
  7. edit the boot.properties file in <domain-name>/servers/<server-name>/security for all managed servers with your new password
  8. Start the weblogic server

Cheers,
Zeeshan Baig


Monday, March 4, 2013

My Sessions at Collaborate 2013 in Denver

Hi,

This year i am going to speak in 2 sessions at IOUG Collaborate Conference in Denver.  I will be sharing some my experience and best practices in these quick tips sessions. Please mark your calendars and come to say Hello.

Click on the link for more info

  1. Oracle SOA Suite for High Availability Enterprise
  2. Talking Services Oracle ADF and Oracle SOA Suite

Click here for more info

See you in Denver,
Zeeshan Baig
@baigsorcl

Wednesday, February 20, 2013

Setting up WebLogic server for REST Web Services

Hi,

REST web services are getting popular with the time. They are programmer friendly and easy to develop.

By default weblogic server ships with all  required shared libraries for REST but there is one step we need to do in order to activate it which is to deploy those libraries on domain.

The step is simple. All we need to do is to deploy required libraries from
$WLS_HOME/common/deployable-libraries to weblogic domain

In my case i had following libraries used in my application
  1. jersey-bundle 1.1.5.1
  2. jsr311-api-1.1.1

1. Go to weblogic console http://server:port/console
2. Go to Deployment link (click Lock & Edit if in production mode)
3. Click install and choose libraries as shown in the slide
4. Follow wizard and active.




Reference http://docs.oracle.com/cd/E17904_01/web.1111/e13734/rest.htm#WSADV572

Cheers,
Zeeshan Baig
Follow me on twitter @baigsorcl

Tuesday, February 12, 2013

How to enable System.out.println messages in Weblogic server

Hi,

Using System.out.println is common practice to debug issues in Java applications. However, in ADF applications using ADF logger is common and best practice. But if we have some web services/ java apps deployed on weblogic server mostly it will use System.out.println

By default Weblogic server does not display the standard System.out.println messages. To enable those go to weblogic console http://<server-name>:port/console

Click Domain Name > Environments > Servers  > <Server-name> > Logging  and check the following options under Advanced option



Restart the specific managed server and now the System.out.println messages will be visible on the ServerName.log file which is commonly under domain_directory/servers/<server-name>/logs

Cheers,
Zeeshan Baig