Patch for SQL Developer 2.1 released

Olivier Dupont | Mar 3, 2010 08:23 +0000

Just noticed that a patch is released for SQL Developer 2.1. From the Oracle website:

Oracle SQL Developer 2.1.1 is a patch release to SQL Developer 2.1, which was released in December 2009. This patch release resolves a number of the issues raised and addresses a few additional feature requests raised on the SQL Developer Exchange.

You can download it here.


SQL Developer and ApEx: Application missing

Last week I was searching for a long time to find my application in SQL Developer. I wanted to deploy it to a production environment, the application had APP_ID 113 but I couldn’t find it in SQL Developer:

After some time I noticed an other application that had the same name: “Daily Report”. After I changed the name of my application to “Daily Reports”, I could see it in SQL Developer and deploy it!


Normal comment service is now resumed

Gerard Davison | Mar 2, 2010 10:51 +0000

I have been fairly remiss in responding to comments, I have just worked my way though the backlog and now up to date. yay

Building and testing Jersey

Gerard Davison | Mar 2, 2010 07:01 +0000

So I was playing with a patch Building an testing to Jersey but I was having trouble building and running the tests. It seems that there are problems if you don't have the same specific version of Maven, (2.0.9), once that is solved you might run across another issue as the default memory given to Maven will not be enough for all the test to succeed.

The way to track the correct values is to take a look at "hudson/jersey.sh" and this will set the MAVEN_OPTS to:

export MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"

This it turns out isn't sufficient if you are running behind a firewall, at least on Linux, and you need to specify the web proxy as well for some tests:

export MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Dhttp.proxyHost=proxy -Dhttp.noProxyHosts=localhost"

With that resolved I can build and test all of Jersey in a relatively small amount of time. Although it does seem you need an active network connection which is a shame.

Integration in Oracle ADF with ADF Task Flows and Dynamic Regions Pending Changes

From my previous post - Integration in Oracle ADF with ADF Task Flows and Dynamic Regions, you can learn how to integrate separate Oracle ADF applications using dynamic regions. I'm sure, you will want to prevent user navigation from one region to another, when there are unsaved pending changes available. Its pretty simple in ADF 11g, I will describe today.

I have updated sample application from my previous post, download updated archive - ADFIntegrationRegions2.zip.

So, how to prevent user navigation if there are unsaved changes? Key thing - from main application we can see Data Controls of imported applications. Even when main application Model project doesn't contain any ADF BC, still we can see Data Controls from imported ADF libraries:


And that is great, because we can access Data Control and check it for any existing uncommitted data.

I have implemented pending changes check inside Managed Bean, where Dynamic Regions are activated. In case of unsaved data, user is prevented from navigation and forced to stay in current region:


Pending changes are validated simply by accessing Data Control transaction and checking if it is dirty:


If there will be no pending changes, next dynamic region will be opened:


But, if user will type data and without saving will try to open another dynamic region, system will prevent him and inform about unsaved data:


Same rule works with form component:

The Obligatory Calculator in JSF 2.0

Buttso | Feb 28, 2010 21:32 +0000



Checked out some of the high level JSF 2.0 new features recently using NetBeans 6.8 and GlassFish v3.  For what it's worth, I think they are very usable, feature rich and effcient pairing for conducting Java EE 6 development.

As with all old habits, some won't die.  And my habit for taking a quick look at any new programming language/framework is to build a very simple calculator with one screen and some simple calculation logic.

With NetBeans, creating a new Web project is trivial.  To add JSF support select it as a framework to use.

After a bit of navel gazing, I realized a significant part of the unholy dislike I had for JSF 1.2 and its earlier versions predominantly stemmed from the need to live in the configuration red zone -- faces-config.xml. Every damned thing that you wanted to use or access pretty much needed to be defined in the configuration file: managed beans definitions with packages/classes and names and scopes, even the most simples of page navigation paths, etc.

But as of JSF 2.0, that has mostly changed! Accomodating a convention over configuration model for page navigation and making use of annotations for declaring managed bean components (and associated runtime attributes and property values) in my simple example, I didn't have to even look at the faces-config.xml file.  Happy Days.

Here's my simple CalculatorManagedBean, which is responsible for performing the arduous task of calculating a result from a given two values and an operand. It also supplies the operand values for the screen to display.

To declare this as a ManagedBean, all I had to do was to add the @ManagedBean annotation. I also decided to bind this ManagedBean into each clients HttpSession so it was created once, and was able to store property values set from eacg clients page.

 1 package sab.demo.calc.beans;
 2 
 3 import java.io.Serializable;
 4 import javax.annotation.PostConstruct;
 5 import javax.faces.bean.ManagedBean;
 6 import javax.faces.bean.SessionScoped;
 7 
 8 @ManagedBean(eager=true)
 9 @SessionScoped
10 public class CalculatorManagedBean implements Serializable {
11 
12     public static char[] operands = { '+', '-', '*', '/' };
13 
14     int value1;
15     int value2;
16     char operand;
17     String result;
18 
19     public CalculatorManagedBean() {
20     }
21 
22     public char[] getOperands() {
23         return operands;
24     }
25     
26     public char getOperand() {
27         return operand;
28     }
29 
30     public void setOperand(char operand) {
31         System.out.printf("setOperand: %s", operand);
32         this.operand = operand;
33     }
34 
35     public String getResult() {
36         return result;
37     }
38 
39     public void setResult(String result) {
40         this.result = result;
41     }
42 
43     public int getValue1() {
44         return value1;
45     }
46 
47     public void setValue1(int value1) {
48         System.out.printf("setValue1: %s\n", value1);
49         this.value1 = value1;
50     }
51 
52     public int getValue2() {
53         return value2;
54     }
55 
56     public void setValue2(int value2) {
57         System.out.printf("setValue2: %s\n", value2);
58         this.value2 = value2;
59     }
60 
61     public void calculate() {
62         switch(getOperand()) {
63             case '+' :
64                 result = String.valueOf(value1 + value2);
65                 break;
66             case '-' :
67                 result = String.valueOf(value1 - value2);
68                 break;
69             case '*' :
70                 result = String.valueOf(value1 * value2);
71                 break;
72             case '/' :
73                 double v1 = value1;
74                 double v2 = value2;
75                 result = String.valueOf(v1 / v2);
76                 break;
77         }
78         System.out.printf("Calculate: %s %s %s = %s\n",
79                 getValue1(),
80                 getOperand(),
81                 getValue2(),
82                 getResult());
83 
84     }
85 
86     @PostConstruct
87     public void postConstruct() {
88         System.out.println("postConstruct");
89         operand = '+';
90         value1 = 0;
91         value2 = 0;
92         result = "n/a";
93     }
94 }
95 
96 

With the ManagedBean taken care of, the next step was to create the JSF page. With JSF 2.0, it now uses Facelets as the default view technology instead of JSP. This means there are lots of things that are able to be expressed more naturally in the view layer, which were previously difficult or cumbersome in the older JSP model.

A really useful thing I found in facelets was the ability to render a ManagedBean property directly in the page, without needing to surround it with other tag library calls.

So to create my calculator screen, I simply added a couple of fields, and wired them into the CalculatorManagedBean that I'd developed. Again, following convention over configuration, the default name for a ManagedBean is a lower case version of the classname, which makes them easy to remember/lookup from a project hierachy (as opposed to hunting through XML). Of course NetBeans makes this easy since it has code-insight which presents the names of known ManagedBeans and their available properties for insertion via a few keystrokes.

The list of operands values shown in the select list are populated from a property on the ManagedBean which returns an array of char.

The "=" button is wired into the calculate operation, which takes its current property values, performs the desired operation and sets the result property, which is then displayed in the result field on the page.

 1 <?xml version='1.0' encoding='UTF-8' ?>
 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 3 <html xmlns="http://www.w3.org/1999/xhtml"
 4       xmlns:f="http://java.sun.com/jsf/core"
 5       xmlns:h="http://java.sun.com/jsf/html">
 6     <h:head>
 7         <title>Calculator Facelet</title>
 8     </h:head>
 9     <h:body>
10         <h:column><h3 style="font-family: arial; font-variant: small-caps; color: #336699">Calculator</h3></h:column>
11         <h:form>
12             <h:panelGrid columns="1" style="text-align: center; border: 1px solid #336699; padding: 5px; ">
13             <h:column>
14                 <h:inputText id="value1" value="#{calculatorManagedBean.value1}" 
15                              size="5" maxlength="5" style="text-align: right;"/>
16             </h:column>
17             <h:column>
18                 <h:inputText id="value2" value="#{calculatorManagedBean.value2}" 
19                              size="5" maxlength="5" style="text-align: right"/>
20             </h:column>
21             <h:panelGrid columns="2">
22                 <h:column >
23                     <h:selectOneMenu id="operand" value="#{calculatorManagedBean.operand}" 
24                                      style="text-align: center;">
25                         <f:selectItems value="#{calculatorManagedBean.operands}"/>
26                     </h:selectOneMenu>
27                 </h:column>
28                 <h:column><h:commandButton value="=" action="#{calculatorManagedBean.calculate}"/></h:column>
29             </h:panelGrid>
30             <h:column>
31                 <h:inputText id="result" value="#{calculatorManagedBean.result}" 
32                              readonly="true" size="5" style="font-weight: bold; text-align: right"/>
33             </h:column>
34         </h:panelGrid>
35         </h:form>
36     </h:body>
37 </html>
38 
39 
40 

Put it all together and run using the local GlassFish instance, the page works and looks like this.


So there it is, a JSF 2.0 version of my old habit up and running in a few minutes. I like what I've seen with JSF 2.0 so far.

Of course, the use of @ManagedBean annotation in JSF 2.0 may be dead already with the arrival of CDI in Java EE 6 and its @Named annotation, but that's not an issue I'm going to explore here.

How To Traverse ADF Tree

Andrejus Baranovskis | Feb 27, 2010 10:19 +0000
If you are thinking how to delete nodes from ADF tree, there is Frank Nimphius blog post - ADF Faces RC: Single row / Multi row delete from a tree component. However, Frank says that his blog entry is still a raw diamond and needs some polishing. In his example, if you remove root node, all child nodes still will remain in database. This means tree hierarchy will be broken. I decided to polish raw diamond, to describe how you can traverse ADF tree and remove all selected nodes together with children.

Download sample application - TreeTraversal.zip. This sample implements ADF tree traversal algorithm without recursion. ADF tree component provides Java API to get parent node for current node, this allows to avoid recursion.

I have defined tree binding and created action listener method, where tree traversal code is implemented:


Tree traversal algorithm scans selected nodes, and walks through all child nodes. When it reaches last child in tree branch, it returns back until it finds next child sibling. At the end it will return to the initial node, where tree traversal was started - root node.

I'm using two helper methods, one to get first child and second to get next sibling. Its ADF tree Java API, nothing special:


Let's see how it works. We can select multiple nodes, children of all those selected nodes will be traversed:


I intentionally commented node.getRow().remove; in my sample, just to prevent you from all nodes deletion by mistake :-) Traversed nodes are reported in the log:


It starts from first selection and walks from 100 to 102, reports parent node 90 and goes to second selection, walks through and reports parent node 110.

You can select such node, which contains multiple branches:


Tree traversal will work as well - it will enter first branch, traverse it and move to next sibling branch. Whole report for previous selection:


If you are planning to traverse large tree branches, you should increase ADF tree RangeSize property value. Default value is 25, means it will keep only 25 nodes in memory, so you will not be able to traverse whole hierarchy. With default RangeSize it will render large tree hierarchy structures pretty slow, I recommend to increase it to something at least 500:


It will keep 500 nodes in memory, and will allow such tree operations as Expand All Nodes and Expand All Nodes Below to perform faster.

Pushing realtime updates for your backend to ADF Faces

matthiaswessendorf | Feb 27, 2010 07:36 +0000

Imagine you have some services which frequently triggers your backend to process some data and you need to display these changes on the UI… The most reasonable pattern is using Comet!

ADF Faces has great and flexible support for Comet with its ADS facility. This post quickly describes you to push data from a backend to your client. In order to avoid writing and faking a “busy” backed, I use the twitter update stream – which actually provides data in REALTIME to your application.

The previous blog described the pattern how to connect to the Twitter streaming, by using Apache Wink (a REST client API).

Now within the “while loop” you need to notifiy ADS that a new tweet is waiting to be displayed by the client, like:

while(condition)
{
 // parse the input stream's JSON to nick, tweetMsg etc

 listener.onTweet(new TweetBean(nick, image, tweetMsg));
}

So from the “Twitter backend” you notify a listener that a new tweet arrived on the realtime twitter stream.

The easiest way to combine Twitter and ADS is by using the “Proxy approach”. Let your own ActiveCollectionModelDecorator class implement an interface such as “ITwitterUpdateListener”.  So, the above “listener” is actually this class. The code for the onTweet() finally creates and submits the ADS event(s):

public void onTweet(TweetBean tweet)
{
 // start the preparation for the ADS update
 atm.prepareDataChange();

 // create an ADS event.....
 // this class is not part of the API
 ActiveDataUpdateEvent event =
 ActiveDataEventUtil.buildActiveDataUpdateEvent(
// type of the event
 ActiveDataEntry.ChangeType.INSERT,
// the changeCount
 atm.getCurrentChangeCount(),
// rowKey
 new Object[] {tweets.indexOf(tweet)},
// insert at ...
 new Object[] {tweets.indexOf(tweet)-1},
// attribute/property names that change
 new String[] {"image", "nick", "message"},
// the payload for the above attributes
 new Object[] {
tweet.getImage(),
tweet.getNick(),
tweet.getMessage() }
 );

 // deliver the new Event object to the ADS framework
 atm.notifyDataChange(event);
}

Now you can use the <af:table> component to display the information of the tweets. In the example, we show the name and the picture of the poster and the
actual tweet message:

<af:table value="#{bean.activeCollectionModelDecoratorImpl}"
var="tweet" id="t1" ...>

 <af:column width="50" id="c2">

<af:outputText  escape="false"
value="#{tweet.image}" id="ot2"/>

</af:column>

<af:column headerText="USER" id="c1">
 <af:outputText value="#{tweet.nick}" id="ot1"/>
 </af:column>
 <af:column width="350" headerText="Message" id="c3">
 <af:outputText value="#{tweet.message}" id="ot3"/>
 </af:column>
</af:table>

Note: For the image we say escape:false as we stream HTML of the actual twitter location. Note that usually this can be dangerous on all outputText (cross site scripting),but here we want it, since it is a fast way to resolve the IMG…

ADF Faces and ADS is a powerful tool and you can observe twitter trends with out issues! However note that on observing twitter trends, you are kinda spammed by the backend… Therefore you need to think about the “load” of information that your user is potentially interested in..

Another interesting example on how to combine Twitter and “real time ADF Faces” is here. However the only thing there that is not really realtime is that the code polls twitter, which is fine since not all features are yet supported by the Twitter Streaming API!

Generally: This can not be used with Twitter only… You could also connect your 11g database nofifications to push data to the UI. Did that with Frank Nimphius for OpenWorld. (Not sure if his blog actually has the demo code).

Enjoy!


Our Next TechCast Guest: Nandini Ramani (March 2, 10am PT)

Our next guest for a live TechCast show is Nandini Ramani, lead Java Technology Evangelist at Oracle (and formerly a JavaFX evangelist for Sun).

This is a good one! We'll talk about the new Java Technology Evangelist team at Oracle (which contains some familiar names) and perhaps throw in some convo about JavaFX 1.3 as well.

As usual, tune into oracle.com/technology on Tues. March 2 at 10am PT, and bring your questions!

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Setting up Webutil for Oracle Forms

Setting up Webutil for Oracle Forms

What is Webutil

While migrating Oracle Forms applications from 6i to 10g, it's possible that you'll face problems on parts of the form that won't work anymore. Oracle Forms 6i are Client based, this means that every form has to be on each client computer in order to work. The functionality that was written in the forms will be executed on the client machine. Oracle Forms 10g is Client - Server, this means that there are no forms needed on the client computer in order to work. This means that when you don't change your code, the code will be ran on the server instead of the client computer. Webutil is a utility which provides much of the client side functionality taken for granted with a client/server application by providing a set of pre-written Java Beans and an API to perform client side functions such as Host, OLE integration and Text_IO running on the client browser machine. With Webutil you'll be able to change all this and use the application as it was designed for.

 

Downloads

You can download the Webutil Software files (Version 1.0.6) from the oracle server: Click here

You also need the JACOB files (jar and dll) you can download them from Local or from their site

If you want to read the entire documentation file about Webutil: Click here

 

Features

Text_IO File transfer
Read and write text files on the client machine. Move from between the client, application server and database.
Tool_Env File Manipulation
Read client side variables Manipulate client side files.
C API on the client Client machine information
Interface with client side C. Read information from the client machine
Host READ/WRITE_IMAGE_FILE
Run Host commands on the client machine Read and write client side images
OLE2 Get_File_Name
Integrate with client side OLE (e.g. Word and Excel) Use a file selection dialog on the client machine
Enhanced Host commands D2KWUtil? features
Host command can now call back into Forms! Client side interface into the D2KWUtil? package.
Browser functions Integrate with the browser.

 

Configuration WebUtil

This installation can only be used when you have allready a working Forms 10g environment up and running!

1) Make sure that the JDK executables are in the windows path so the can be called from everywhere:
Go to control panel -> system-> environmentvariables->add c:\devsuitehome\jdk\bin at the beginning of PATH variable

2) Copy Jacob.jar and dll from the links above to C:\DevSuiteHome\forms\java and C:\DevSuiteHome\forms\webutil

3) frmwebutil.jar en Jacob.jar have to be signed:
Open cmd prompt
Go to C:\DevSuiteHome\forms\webutil
Execute the following commands: sign_webutil C:\DevSuiteHome\forms\java\frmwebutil.jar
and sign_webutil C:\DevSuiteHome\forms\java\jacob.jar

4) Add the following path C:\DevSuiteHome\forms\java\jacob.jar to this register key [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome] “FORMS_BUILDER_CLASSPATH” using regedit

5) Change the configuration file formsweb.cfg so webutiljpi.htm will be used as htm template for the forms:
baseHTML=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm

6) Also add the following part in the formsweb.cfg file after allownewconnections
#################################################
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
archive=frmall.jar, CaffoJavaClient.jar, frmwebutil.jar, jacob.jar
#################################################

7) Add the following to the CLASSPATH in the default.env file: C:\DevSuiteHome\forms\java\frmall.jar and C:\DevSuiteHome\forms\java\jacob.jar

 

 

Calling a Java Class in PL/SQL

Calling a Java class in PL/SQL

 

  • Create your java class. Make sure the method you want to call from PL/SQL is declared static.
  • From Oracle 8 and higher, you can use the commandline utility loadjava to load your Java class
loadjava -user username/password@SID -force -resolve MyPath\MyFile.java
  • Login as SYS to grant privileges to the user
Call dbms_java.grant_permission('<FUNCTION_OWNER>','java.io.FilePermission','writeFileDescriptor',null);
Call dbms_java.grant_permission('<FUNCTION_OWNER>',',java.io.FilePermission','readFileDescriptor',null);
  • Still logged in as SYS, give the user all roles starting with JAVA
  • Log in as the user, and create a function that will call the Java class
create or replace FUNCTION MyFunction RETURN VARCHAR2 as language java name 'myPackage.MyClass.myMethod() return String';
  • Execute the PL/SQL Function

 

links

Calling a Java Class in PL/SQL

Calling a Java class in PL/SQL

 

  • Create your java class. Make sure the method you want to call from PL/SQL is declared static.
  • From Oracle 8 and higher, you can use the commandline utility loadjava to load your Java class
loadjava -user username/password@SID -force -resolve MyPath\MyFile.java
  • Login as SYS to grant privileges to the user
Call dbms_java.grant_permission('<FUNCTION_OWNER>','java.io.FilePermission','writeFileDescriptor',null);
Call dbms_java.grant_permission('<FUNCTION_OWNER>',',java.io.FilePermission','readFileDescriptor',null);
  • Still logged in as SYS, give the user all roles starting with JAVA
  • Log in as the user, and create a function that will call the Java class
create or replace FUNCTION MyFunction RETURN VARCHAR2 as language java name 'myPackage.MyClass.myMethod() return String';
  • Execute the PL/SQL Function

 

links

Calling a Java Class in PL/SQL

Calling a Java class in PL/SQL

 

  • Create your java class. Make sure the method you want to call from PL/SQL is declared static.
  • From Oracle 8 and higher, you can use the commandline utility loadjava to load your Java class
loadjava -user username/password@SID -force -resolve MyPath\MyFile.java
  • Login as SYS to grant privileges to the user
Call dbms_java.grant_permission('<FUNCTION_OWNER>','java.io.FilePermission','writeFileDescriptor',null);
Call dbms_java.grant_permission('<FUNCTION_OWNER>',',java.io.FilePermission','readFileDescriptor',null);
  • Still logged in as SYS, give the user all roles starting with JAVA
  • Log in as the user, and create a function that will call the Java class
create or replace FUNCTION MyFunction RETURN VARCHAR2 as language java name 'myPackage.MyClass.myMethod() return String';
  • Execute the PL/SQL Function

 

links