Wednesday, December 26, 2012

How to Unzip .tgz file in Linux

To unzip the archive file with extension .tgz, use the below command.

tar -zxvf <filename>

eg:
                             $tar -zxvf apache-jmeter-2.8.tgz

Tuesday, November 27, 2012

RESTful web service


REST - Representational State Transfer

In the REST architectural style, data and functionality are considered resources and are accessed using Uniform resource Identifiers.
In the REST architectural style, clients and servers exchange representations of resource by using standardized interface and protocol.

The pricnciples supports the RESTful webservices to be simple, leightweight and fast.

1. Resource identification through URI :
- exposes a set of resources that identify the target of the interaction with its clients.
- resources are identified by URIs
2. Uniform Interface
- resources are manipulated using CRU operations : PUT, GET, POST and DELETE
PUT - creates a new resource
GET - retrieves the current state of a resource in some representation.
DELETE - deletes the resource.
POST - transferes a new state on to a resource.
3. Self Descriptive Messages
- resources are decoupled from their representation so that their content can be accessed in a variety of formats.
- Metadata about the resources are available.
4. Stateful interactions through hyperlink.
- every interaction with a resource is staeless.
- request messages are self contained.

Root resource classes
- POJOs
- annotated with @Path
or atleast one method annotated with @Path
or request method designator - @GET/ @PUT/ @POST/ @DELETE

- Resource methods - methods of a resource class annotated with a request method designator.

Sunday, November 18, 2012

Online Study : A Knowledge Sharing System - Online Project

Change the oracle database user password



How to change a oracle database user password in console?

Connect to the database using sysdba user by below command,

sqlplus "/as sysdba"

Then chnage the user password using the below command,

alter user <user> identified by <password>;

The account is locked : Oracle Database


While creating the jdeveloper database connection, I got this error. I have to unlock the <user>. For that I have connected to the sysdba user by below command,

sqlplus "/as sysdba"

then I have pasted the below commants.

alter user <user> account unlock;

grant connect, resource to <user>;

Monday, November 5, 2012

Failed to Load VirtualBox image - VT-x features locked or unavailable in MSR


Failed to Load VirtualBox image.

While loading the virtual box existing image after the importing, I got the following error.

Failed to open a session for the virtual machine XP.

VT-x features locked or unavailable in MSR. (VERR_VMX_MSR_LOCKED_OR_DISABLED).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}

To solve the issues, I opened the image settings and did the following changes.

This changing your bios settings of your virtual machine for the first load. 

Tuesday, June 5, 2012

Connect external hard disk to Linux


To connect external harddrive in Oracle enterprise linux, please follow the below steps.

1. I connected the external harddrive, but there is no notification of external harddrive in file system explorer window.

I typed fdisk -l , and I saw the boot devices under /dev/sdb
           
                  /dev/sdb1
                  /dev/sdb2

Next I removed the partion and formatted the disk.

                  fdisk /dev/sdb

To get the menu, type m and enter

To remove the existing partion, type d and enter, it will ask us to remove primary partition or extended partion. type p and enter

Again it will prompt about primary partition 1-4. We can give 1 and contiue. This will remove the primary partition 1. Continue these steps until we get there are no partitions yet.

2. After deleting the partitions, we can create new partion. For that type n and enter. This will promt about primary partition and extended partition. Type p and enter, and create the primary partion with 1-4 (I used 1 and 2 with 50 GB and 250GB) and mention the size of the partion at the end file size (+50000M and +250000M). To save the partitions, type w and enter

3. After creating the new partitions, format the partitions

  mkfs.ext3 /dev/sdb1
  mkfs.ext3 /dev/sdb2

4. Now we can mount the file system. Create two directories

mkdir /mnt/usb1
mkdir /mnt/usb2

5. Mount the hardrive file systems to these directories.

mount /dev/sdb1 /mnt/usb1
mount /dev/sdb2 /mnt/usb2

We can copy the files in either usb1 or usb2, will copy in the external harddrive
Befor disconnecting the external harddrive, please unmount the directories.

umount /mnt/usb1
umount /mnt/usb2

Thursday, May 31, 2012

zip and unzip in linux


To zip the directory, use the following command

         zip <archivename> <directoryname>

We dont need to mention the .zip extension with archive name.

Eg: zip myarc myfolder
We can see the myarc.zip file in the directory

To deploy the directory and sub directory, use the following command
 
         zip -r <archivename> <directoryname>

To unzip the archive file, use the following command,

         unzip <archivefile>.zip

Friday, May 25, 2012

Configure Apache HTTP Server in Linux


To configure the apache http server linux, please do the following steps.

1. If you are not installed apache http server in linux, please follow the link for the installation.

http://mye20.blogspot.in/2012/05/install-apache-http-server-in-linux.html

2. Go to the directory, /usr/local/apache/conf

3. Edit the httpd.conf file and search the below entries,

ServerRoot
DocumentRoot

4. We can follow with default entries of ServerRoot and DocumentRoot, or we can configure the path.For that edit DocumentRoot and add the new values.

ServerRoot "/usr/local/apache"
DocumentRoot "/usr/local/apache/htdocs"

5, Put some image (sat a1.jpg) in htdocs directory and access the URL : http://<hostname>/a1.jpg
   If you are able to see the image, then the configuration is success.

Install Apache HTTP Server in Linux


Install Apache HTTP Server in Linux

To install apache http server in linux, please follow the below steps.

1. Download the apache file from the below location.

http://linux-files.com//httpd/httpd-2.2.22.tar.bz2

2. Copy the httpd-2.2.22.tar.bz2 file in to the destination folder

Eg: /u01/apache/httpd-2.2.22.tar.bz2

3. Follow the below commands to install apache
# tar -jxvf httpd-2.2.22.tar.bz2
    # cd httpd-2.2.22
    # ./configure --prefix=/usr/local/apache --enable-module=so
    # make
    # make install
4. To start the apache server,
#cd /usr/local/apache
#apachectl start

Check the http://<hostname>/ in browser and you will get a text 'IT Works'.

5. To stop the apache server,
#cd /usr/local/apache
#apachectl stop

Tuesday, May 22, 2012

Remove the disk from existing Virtualbox Image


If we have a requirement of removing the existing disk from the Virtual box image running, please follow the below steps.

1. Start the Virtual Box image and login with root user.
2. Open a terminal, and type the command
                   df -h
which will give the mount points. Remove the mount point using the below command
                   umount <mount point>

    Eg: umount /u02

3. Check the entries of /etc/fstab. Take the backup of the file first.
   If we are able to see the same mount points in /etc/fstab file, please remove the line with the mount point
          vi /etc/fstab
          Move to the line which you need to remove.
 press Esc key and then press the key 'd' twice
          Save the file
4. shutdown the VBox image
5. Open the settings window of the VBOx image and go to the storage option. Remove the disk.
6. Start the Virtual Box image again.

Sunday, May 20, 2012

Configure Webcenter Content with Webcenter Portal PS5

Hi friends, I tried to connect webcenter content PS5 (UCM) with Webcenter Portal Framework PS5 using Jdeveloper11.1.1.6.


I opened JDeveloper, created a content repository connection with all the required fields. While testing the connection, the connection became successful. But while navigating to the Webcenter Content Connection, I am getting the following error.





SEVERE: Could not list contents of folder with ID = dCollectionID:-1
oracle.stellent.ridc.protocol.ServiceException: No service defined for COLLECTION_DISPLAY.


To solve the issue, please find the following the steps in Webcenter Content.

1. Login into webcenter content : https://<hostname>:<port number>/cs
2. Click on 'Administration' and select 'Admin Server'


3. This will open a new window in browser, please select 'Component Manager'.
4. In the right side window, please click on 'Advanced component manager'

5. We can see all the enabled and disabled features.

The main problem for this error is folders_g is not enabled and Framework folders might have enabled. But for creating a connection with webcenter portal framework or with webcenter spaces, we need
folders_g, then only we will get Contribution folder.

6. come to the enabled feature session, select Framework folders and disable it.
7. Come to the disabled feature session, select folders_g in the list and enable it.
8. Restart the Webcenter content node.
9. Login into webcenter content system, go to 'Browse Content' menu. If we are able to see 'Contribution Folder' the problem is solved. We can configure webcenter content with Webcenter portal framework or with webcenter spaces.






Saturday, May 19, 2012

Enable Java in Firefox - Linux

This is a very common known issue that Firefox browser in Linux is not able to identify the java installation and hence we could not open java applets using Firefox browser.

There are multiple ways are available to enable java in Firefox browser. I am listing the very basic simple way to achieve the functionality here.

1. Open Firefox browser and locate preference/options menu. (Tools--> Options / Edit-->preferences)
2. Go to 'contents' tab.
3. Select 'Enable Javascript' check box.
4. Install Java (jdk) in Linux if it is not already installed.
5. Locate the below file under the java installation directory.
  libnpjp2.so


you can use the below command for locating the file,
                                      locate libnpjp2.so


Most probably the file can be find in the below directory,
<java installation directory>/jre/lib/i386/libnpjp2.so


Eg: /u01/Oracle/Middleware/jdk160_24/jre/lib/i386/libnpjp2.so


6. Locate Firefox installation directory.
7. Go to 'plugins' directory under the Firefox installation directory. You can use the below command to display only the directories,
                                     ls -lrt|grep ^d


 8. if the 'plugins' directory is not available under the Firefox installation directory, please create a plugins directory.
                                   mkdir plugins
Move to plugins directory
                                   cd plugins
9. create a soft link inside plugins directory to the libnpjp2.so file. Use the below command to create the soft link.


ln -s <java installation directory>/jre/lib/i386/libnpjp2.so


Eg: ln -s /u01/Oracle/Middleware/jdk160_24/jre/lib/i386/libnpjp2.so

10. Restart the Firefox web browser

Display all the directories under a directory in linux

If we are using ls -lrt , which will display all the files and directories with user permission, group permission size etc. But if we have a directory with a lot of files and sub directories, then we can use the below command to display only directories under a directory

ls -lrt|grep ^d

Wednesday, May 16, 2012

Install JDeveloper in Linux

To install JDeveloper in Linux, we can proceed in two ways.

Download generic jar for installing or download specific os supported native file (like rpm or bin )
1. Generic Jar
Download generic jar
run the jar file with the following command,
java -jar <jdevinstall.jar>

2. OS specific file
Download <jdevinstall>.bin file from oracle site
chmod +x <jdevinstall>.bin

This will start the JDeveloper installer window and continue the installation.

Start JDeveloper in Linux

After installing JDeveloper in linux, please follow the below steps to start JDeveloper.

1. Go to <JDeveloperMiddlewareHome>/jdeveloper/jdev/bin
     We can find a script, addjdevtodesktop.
     Make executable the script by chmod +x addjdevtodesktop and run it. This will create a jdeveloper icon in   the Desktop.

or

2. Go to <JDeveloperMiddlewareHome>/jdeveloper/jdev/bin
    ./jdev
   This will start the jdeveloper

Tuesday, May 15, 2012

Webcenter Portlet Producer Example

I have created an html portlet application and registered in webcenter spaces. Please find the steps given below.

HTML Portlet Development.   


1. Create a Portlet producer application in JDeveloper.




2.    Create a Standard based Java Portlet.

3.        Edit view.jsp, and add the required code


4.    Run the application(Right click view.jsp and select run) and get the webservice path from the application url.




 http://127.0.0.1:7101/PortletApp-Portlets-context-root/


 http://127.0.0.1:7101/PortletApp-Portlets-context-root/portlets/wsrp1?WSDL


 5.      Login into webcenter spaces portal with admin user and click on Administration/Admin link. Go to configuration tab and select portlet producer.
Register the portlet application using above wsdl url as a wsrp portlet. After registering the portlet, the portlet will be available in resource catalog.
Edit the spaces page and click on Add contents, navigate to the portlets repository folder and add the portlet in to page.


Thursday, February 23, 2012

Webcenter Portal PS5

Webcenter PS5 is released on February 22nd 2012. Here I am listing a few basic overview of the PS5 features and will add more details later.

Oracle Webcenter PS5 contains product enhancements and customer bug fixes from Webcenter PS3/PS4.
Webcenter PS5 components :

1. Webcenter Portal
2. Webcenter Content
3. Webcenter Sites
4. Webcenter Services (Networks and Collaboration).

Using Oracle Webcenter portal, we can develop internet sites, intranet sites, social networking sites. Oracle Webcenter portal components are

1. Oracle Webcenter Portal Framework
2. Oracle Webcenter Portal Spaces
3. Oracle Webcenter Portal services
4. Oracle Composer - which embedded with all of the other components.

The main high level information about webcenter PS5 is

Enhancements :

1. UCM is rebranded to Oracle Webcenter Content in the implementation level.
2. Dynamic roles based on the Oracle Entitlement Server Integration.
3. More features in Real time Collaboration.
4. Webcenter Sites
5. Adding pagelets in webcenter sites.

Saturday, February 18, 2012

Disable the Flash usage in Webcenter PS3 Spaces - Manually Editing the webcenter.ear

1.      Start the VM
2.      Locate the webcenter.ear (/u01/app/oracle/product/PS3RC8/fmwhome/Oracle_WC1/archives/applications/ webcenter.ear)
3.      Take the backup of the webcenter.ear and copy to windows machine.
4.      Extract webcenter.ear (eg:  7-zip à Open Archive).
5.      Locate adf-config.xml (adf\META-INF\)
6.      Edit adf-config.xml (Right click on adf-config.xml, and select ‘Edit’)
7.      Navigate to the end of the file and point the cursor before </adf-config> entry

8.      Enter the following entry to that file,                   <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/config">     
<flash-player-usage>disabled</flash-player-usage>   
</adf-faces-config>
9.      Save and close the file.
10.  Click on ‘ok’ to the confirmation dialog.
11.  Close the 7-zip window.
12.  Copy the changed webcenter.ear to the exact location (/u01/app/oracle/product/PS3RC8/fmwhome/Oracle_WC1/archives/applications/ webcenter.ear).
13.  Stop all the services.
14.  Restart the VM / virtual box instance.
15.  Start all the services.

How to configure Oracle BPM 11g PS4 Process Space on Oracle Webcenter Spaces 11g PS4