Kernal crash in Oracle Linux


One Kernal crash in Oracle enterprise Linux
By W.ZH, Mar 31 2009

Issue:

Because of a power failer, there is a kernal crash for my Oracle enterprise linux., the system will force boot up in the readonly mode. can not do anything…..

in fact bootup prompt gives a lot error and that

/dev/VolGroup00/LogVol00 need do the manual fsck.

Solve;:

if system auto bootup to the repair model, then can just directly run

e2fsck -y /dev/VolGroup00/LogVol00

After that , system can run..(but with some startX script and files lost.) Not perfect, but runs.

if not boot up in single mode, then you may need to do sth like this:

(a) Take down system to single user mode and unmout system

Following are steps :

=> Use init (process control initialization ) command to change runlevel 1 (singe user mode)

=> Use umount command to unmount /home file system

=> Run fsck using fsck command

Let us say you would like to run fsck on /home (/dev/sda3):

# init 1

# umount /home

# umount /dev/sda

# fsck /homeOR

# fsck /dev/sda3OR

# e2fsck -y /dev/sda3

ATTN:

The -F option force fsck on reboot, login as root and type the following command to reboot and run fsck:

# shutdown -rF now

If you have to do manual fsck, in fact this command can not help you too much.

Advertisements

about the Query Search

Using the Query Component

The af:query component is used for transactional searches. It has a basic and an advanced mode which the user can toggle by clicking a button.

The basic mode query form features include:

* dropdown list of selectable search criteria operators

* selectable WHERE clause conjunction of either AND or OR (match all or match any)

* saved searches and seeded searches

* personalizing saved searches

The advanced mode query form also includes the ability for user to dynamically add search criteria by selecting from a list of searchable attributes. The user can subsequently delete any criteria that was added.

When an af:query component is dropped onto a JSF page, it offers the user a search panel that includes one or more input fields for entering search criteria values. The user can select from the dropdown list of operators to create a SQL Query WHERE clause for the search. The input fields may be configured to be list of value (LOV), number spinners, date picker, or other modifications. If a search criteria’s underlying attribute was defined as an LOV, inorder for the auto completion feature to work, you must set autoSubmit to true on the LOV component. Also, the query component will support the af:inputListOfValues LOV component. If the af:inputComboboxListOfValues component is defined instead in the model, the af:inputListOfValues component will be inserted in its place. For more informaton about LOV, see Chapter 9, “Using LOV Components”.

A Match All/Match Any radio button group further modifies the query. A Match All selection is essentially an AND function. The query will only return rows that match all the selected criteria. A Match Any selection is an OR function. The query will return all rows that match any one of the criteria.

After the user entered all the search criteria values (including null values) and selected the Match All/Any radio button, the user can click the Search button to initiate the query. The query results can be displayed in any output component. Typically, the output component will be a table or tree table, but you can associate other display components such as af:forms, af:outputText, and graphics to be the results component.

If the basic/advanced button is present, the user can toggle between the two modes. Each mode will display only the search criteria that were defined for that mode. A search criteria field can be defined to appear only for basic, only for advanced, or for both modes.

In advanced mode, the control panel also includes an Add Fields button that exposes a popup list of searchable attributes. When the user selects any of these attributes, a dynamically generated search criteria input field and dropdown operator appears. The position of all search criteria input fields as wells as newly added fields are determined by the model implementation.

This newly created search criteria field will also have an delete icon next to it. The user can subsequently click on this icon to delete the added field. The originally defined search criteria fields do not have a delete icon and therefore cannot be deleted by the user.

The user can also save the entered search criteria and the mode by clicking on the Save button. A popup dialog allows the user to provide a name for the save search and specify hints by selecting checkboxes. A saved search persists for the duration of the session. A persistent data store is required if the save search is to be available beyond the session. For more information about persistence, see Chapter 28, “Using Change Persistence”.

A seeded search is a essentially a saved search that was created by the application developer. When the component is initialized, any seeded searches associated with that query component become available for the user to select.

Any user created saved searches and seeded system searches appear in the Saved Search dropdown list. The seeded searches and user saved searches are separated by a divider.

Users can also personalize the save searches for future use. Personalization of saved searches requires the availability of a persistent data store. For more information about persistence, see Chapter 28, “Using Change Persistence”.

How to convert a taskflow to portlet and use it (Jdev 11g TP4)

 

 

By W.ZH Mar 2009

 

 

Prepare

About the Preconfigured OC4J

Creating Task Flows

To make portlet from task flow

Deploy your portlet to the server

How to use the portlet in your port page

 

Bridge is an interesting tech in the web center. In 11g, task flow can run as the remote component on the web server. Then by building a bridge, in fact, just creating the portlet definition on the web center web server, a task flow can be exposed as a portlet for use. This portlet is just a description on the webcenter server; all functions and code still come from remote task flow. So only one source code for the task flow will be kept. So portlet consumers just need to use this portlet directly. They do not know this is a task flow running behind the portlet.

 

Prepare

 

You should know what is task flow in 11g, what is the portlet and how to develop a simple portlet. The case we are using Jdev 11g TP4, it has the webcenter support for 11g. Offical Oracle WebCenter Framework extension for Jdev 11g is not realease yet.

About the Preconfigured OC4J

 

There is Preconfigured OC4J in Jdev webcenter edition. Such as Jdev TP4. This one is dedicated for the server to contain the portlets. So you must use it to run your portlets.

 

To start Preconfigured OC4J:

1. Launch Oracle JDeveloper.

2. In the toolbar, click the Start WebCenter Preconfigured OC4J icon. If you do not see this icon or cannot start the WebCenter Preconfigured OC4J, ensure you have installed the Oracle WebCenter Framework extension.

3. If you are asked to install OC4J, click Yes. A readme.html file displays in Oracle

JDeveloper for the WebCenter Preconfigured OC4J. You can also test to see

whether OC4J is running by entering the following URL in your browser:

http://localhost:6688/

4. read the readme in detailed and try those default samples, preconfigured OC4J home is in the  JDEV_USER\oracle.adfp.seededoc4j\


 

Creating Task Flows

 

Just need to create a simple ADF project, and: 

1. In the Application Navigator, right-click the project where you want to create the task flow and choose New.

2. In the New Gallery, expand Web Tier node, select JSF and then ADF Task Flow and click OK.

3. In the Create ADF Task Flow dialog, the Create as Bounded Task Flow checkbox is selected by default.  

4. Click OK.

 

You will get your task flow like the task-flow-definition1.xml. Then you can start design your taskflow and then add the view and control flow to them. Please refer to the fusion ADF dev guide to know how to deal with task flow. You can also create a simple JSP page to test your task flow, just need to drag the task flow to your page. It will stay in page as a region. Then you can run your JSP to see wehter your task flow works or not.

 

To me, I just add one view page jsff, for the taks flow to do a simple search in the back bean.

 

After you make your task flow ready, then you can make it as a portlet,

 

To make portlet from task flow

 

1. In Oracle JDeveloper, open the JSF application that contains the task flow from

which you want to make a portlet.

2. In the Application Navigator, right click on the task flow that you want to

portletize and choose Create Portlet Entry.

 

And also there is a portlet.xml in your WEB-INF folder, you can right click this file to “manage portlet entries for task flow”, by this one, you can select any of your task flow in project to be portilized.

 

Deploy your portlet to the server

 

We use the Jdev default preconfiged OC4j. You must to start the Preconfigured OC4J first, and then build a connection to this server in your project,

 

Pack your project of portlet as war file and deploy to the preconfiged OC4j. After deploy successful, you can go to your portlet info page to review the info about it,

Such as, I name my war file default root as testPortlet, then my portlet info page should be http://127.0.0.1:6688/testPortlet/info, at this page you can get the WSDL URL location, on the bottom of this page. Copy that link (version 2) for use later.

 

How to use the portlet in your port page

 

Before your portal can use a portlet, you need to register the Portlet Producers first, of coz you should have a web project already:

 

  1. Ensure that you have started the WebCenter Preconfigured OC4J.
  2. In the Resource Palette, click the folder icon, then choose New Connection, and then Oracle PDK-Java Producer.
  3. On the Welcome page, click Next.
  4. On page 2 of the wizard, let’s enable this portlet producer to be used across all our applications. Select Resource Palette.
  5. In the Name field, enter  a name for your producer, such as testPortletProducer. Click Next.
  6. Enter this URL in the URL Endpoint field. Such as http://127.0.0.1:6688/testPortlet/portlets/wsrp2?WSDL , Click Next.
  7. On the Registration Details page, click Finish. You should see a message indicating that Oracle JDeveloper is registering your producer.

Your new portlet producer displays in the Connections list of the Resource Palette.  And under this producer, you can see all the portlets are list over there for your producer, include your task flow-portlet.

 

Then at any JSP page, you can just drag this portlet into your page, then run your page; you will see the portlet running.

 

About the OutOfMemoryError Issue of WLS

By W.ZH. Mar 30, 2009

Issue:

In the weblogic server, after several times deployment, you may get the OutOfMemoryError like this:

<Feb 5, 2009 9:41:58 AM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004

java.lang.OutOfMemoryError: PermGen space

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

Cause and Solve:

This may be caused by the default setup of the RAM for your Weblogic domain , it is too small.

Go to your domain directory, under the bin you will find a script called,
setDomainEnv.sh,

This file in fact is called by the startWebLogic.sh when yout domain start. Find the line with
MEM_MAX_PERM_SIZE.

set MEM_PERM_SIZE=-XX:PermSize=48m

set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=128m

in crease them to right number as right to your machine. then restart every thing…

This should solve your problem.