Development

How to fix Putty timeout issue

Arun Bavera - Tue, 2015-12-01 14:00

Set this in Putty/SuperPutty:

image

Categories: Development

Open Source Cool Web App with PL/SQL and Formspider

Gerger Consulting - Tue, 2015-12-01 01:21
As an independent consultant, Nicholas Mwaura needed a Formspider demo application so that he can show the best of the product to his potential clients.

However, all the sample applications on the Formspider web site were developer oriented. We had no application online which consultants, IT managers can use to impress other stakeholders with Formspider. (Facepalm)

Nicholas decided to built this demo application himself even though this was going to be the first time he is going to work with Formspider. The tool encouraged him that much.

Think about this for a minute. When we learn a new tool, most of us are happy if we build a Hello World application as our first one. Nicholas built a demo application to demonstrate the best of Formspider. This speaks volumes about his high technical skills and how Formspider empowers Oracle Forms and PL/SQL developers.

You can watch the entire webinar below. The webinar consists of four parts:

1) Introduction to Formspider by me

2) Nicholas Mwaura on Formspider

3) Development of the Demo Appliaction

4) Questions and Answers



Below are the slides Nicholas used during the webinar:



Open Source Demo Application



Nicholas is sharing his work as an open source application with the Formspider community. This is indeed very nice him and we are much indebted to him for his generosity.

You can use the application at this link.

You can download the source code of the application from this link.

If you’d like to contribute to this open source project, here is the project’s GitHub page.

Yalim K. Gerger

Founder
Categories: Development

Developing with Oracle MAF and Oracle ADF Business Components - The REST Edition

Shay Shmeltzer - Mon, 2015-11-30 18:24

When Oracle ADF Mobile was released over 3 years ago, one of the first blogs I created on this topic showed how to leverage Oracle ADF Business Components to access a server database and create a mobile front end on top of it.

Since then both frameworks have matured, and we learned some best practices doing implementations internally and for customers. Today I'm going to show you a better way to build this type of applications, specifically leveraging REST as the communication protocol between the ADF backend and the Oracle MAF front end. REST based integration performs much better than SOAP for this mobile scenario, and as you'll see development is as simple.

Specifically I'm leveraging the Oracle A-Team Mobile Persistence Accelerator (AMPA) JDeveloper Extension- this extension simplifies MAF's interacting with REST backends, and has some cool extra features if your  REST services are based on ADF BC.

I used JDeveloper 12.2.1 to expose REST services from my ADF Business Components.  If you are not familiar with how to do that, see this blog on exposing ADF BC as REST services, and then this blog about enabling CORS for ADF Business Components.

The video below picks up the same application (Application14) and continues from where the previous two ended. 

Now let's see the MAF development part:

As you can see, it is quite easy to create your MAF UI. The AMPA extension does a lot of work for you making the access to the REST backend as easy as possible. (thanks goes out to Steven Davelaar).

The AMPA extension can also generate a complete UI for you - so you can give that wizard a try to if you are  looking for even more productivity. 

Categories: Development

Doughnut Chart - a Yummy Addition to Oracle ADF Faces

Shay Shmeltzer - Mon, 2015-11-23 02:16

Another new feature in Oracle ADF 12.2.1 is the new Doughnut Chart capability.

It looks like this:

When I first tried to create this one, I couldn't find the option for doughnut chart in the JDeveloper wizard.

Then I was told that a doughnut is just a pie with a hole in the center - so you actually just need to create a pie chart, and then specify some properties.

And indeed, if you'll look at the property inspector for pie charts you'll see a few new properties you can leverage. 

For example there is the InnerRadius property - that expects a value between 1 and 0 - this controls how big is the hole in your doughnut.

Another nice capability is the you can put some filling in your doughnut - basically put some text that will go in the middle empty area. You do this by using centerLabel property. In the example above I used the center of the doughnut to report the total salary of a department - using a groovy sum expression in the Departments ViewObject - learn how here.

(Don't forget to use the centerLabelStyle property to assign it a bigger font - a best practice from the Oracle Alta UI book).

Here is the code from the JSF page:

<dvt:pieChart selectionListener="#{bindings.EmployeesView4.collectionModel.makeCurrent}"
   dataSelection="single" id="pieChart1" var="row"
   value="#{bindings.EmployeesView4.collectionModel}"
   centerLabel="Total Salary: #{bindings.SumSalary.inputValue}" innerRadius="0.7"
   centerLabelStyle="font-size:large;" title="Salary BreakDown" 
   sliceLabelPosition="inside">
         <dvt:chartLegend id="cl1" position="bottom"/>
         <dvt:pieDataItem id="di1" label="#{row.LastName}" value="#{row.Salary}"/>
</dvt:pieChart>

Try it out - it's a yummy new addition to Oracle's set of bakery based charts. 

Categories: Development

Enabling CORS for ADF Business Component REST Services

Shay Shmeltzer - Fri, 2015-11-20 05:12

CORS (which stands for Cross-Origin Resource Sharing) is a setting that will enable your REST services running on one server to be invoked from applications running on another server.

I first encountered this when I was trying to run an Oracle JET project in my NetBeans IDE that will access a set of REST services I exposed using Oracle ADF Business Component in my JDeveloper environment. Since NetBeans runs the HTML on a GlassFish instance, while JDeveloper ran the ADF BC layer on a WebLogic instance I got the dreaded No 'Access-Control-Allow-Origin' header is present error:

 XMLHttpRequest cannot load http://127.0.0.1:7101/Application14-RESTWebService-context-root/rest/1/dept/20. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access.

There is no built-in functionality to enable CORS for ADF BC in JDeveloper, but I found it very easy to leverage the CORS Filter libraries to do this. All you need to do is add the two JAR files it provides to your project and configure the web.xml to support the filter and the specific REST operations you want to enable CORS for.

Here is a quick video showing you the complete setup (using the REST ADF BC project created here).

The web.xml addition is:

   <filter>
    <filter-name>CORS</filter-name>
    <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
            <init-param>
                <param-name>cors.supportedMethods</param-name>
                <param-value>GET, POST, HEAD, PUT, PATCH, DELETE</param-value>
        </init-param>
  </filter>
  <filter-mapping>
    <filter-name>CORS</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

If you follow my approach in the video and add the JARs as a new user library to JDeveloper and don't forget to check the "Deploy by Default" check box for the library.

Categories: Development

Are you a PL/SQL Developer? [Fixed Link]

Gerger Consulting - Wed, 2015-11-18 06:18
Then attend our webinar and learn how you can build first class web applications with PL/SQL.



The application above is built using only PL/SQL and Formspider. No Java, no JavaScript. Join our webinar and learn how. Every attendee will get priority access to the source code of this application. We'll also give you an opportunity to purchase Formspider at a discount. :-) Sign up today.
Categories: Development

Remote TaskFlows/Remote Region - For Advanced Reusability in Oracle ADF

Shay Shmeltzer - Tue, 2015-11-17 17:56

A new feature in Oracle ADF 12.2.1 is Remote TaskFlows (or Remote Regions) - this allows one application to have regions inside it that are populated from taskflows that are running as part of another application.

Initially some of you might be a bit confused - "wasn't this something that we were able to do with ADF libraries already? We could just package a taskflow from one app as an ADF library and use that library in the other application".

The slight distinction here is that the library approach had the taskflow running as part of your consuming application. Remote task flows on the other hand have the taskflow running as part of the other application and don't require the creation of a library. As a result they also don't require an ADF library update when the taskflow changes- the minute the changes are deployed on the remote server, your application will get the new version. 

One way of thinking about remote taskflows is as adding a "portal" like functionality to your ADF app - allowing one app to display parts of another app leveraging the other app resources for executing any logic. 

Here is a quick video demoing how to configure and run this.

The URLs you'll need for creating the remote region resource connection are:

http://yourserver:port/your-context-root/rtfquery

and

http://yourserver:port/your-context-root/rr

Note that there are some limitation on the type and functionality of taskflows that can be exposed as remote taskflows. And there are other things to consider such as security and session timeout settings. So have a read through the remote region documentation before you start leveraging this feature.

A couple of notes.

1. In the currently available 12.2.1 version of JDeveloper from OTN, there is a slight bug that will prevent you from creating the connection to the remote task flow - there is a patch available for this from Oracle Support - request the patch for bug 22132843 or 22093099.

2. At my OOW session about new features I mentioned that remote task flows are loaded in parallel, that is actually still not the case, while we started work on this capability - it didn't made it into 12.2.1. So remote task flows behave like other task flows and load in sequential way right now. 

Categories: Development

Are you a PL/SQL Developer? Are you an Oracle Forms Developer?

Gerger Consulting - Tue, 2015-11-17 01:45
Then attend our webinar and learn how you can build first class web applications with PL/SQL.



The application above is built using only PL/SQL and Formspider. No Java, no JavaScript. Join our webinar and learn how. Every attendee will get priority access to the source code of this application. We'll also give you an opportunity to purchase Formspider at a discount. :-) Sign up today.
Categories: Development

REST based CRUD with Oracle ADF Business Components

Shay Shmeltzer - Mon, 2015-11-16 12:17

A key new feature in Oracle ADF 12.2.1 is the ability to expose ADF Business Components through REST/JSON interfaces.

REST/JSON is the preferred interface for many client side UI technologies to access remote backend services - as examples both Oracle JET and Oracle MAF leverage REST as the way to access data from remote servers. 

Oracle ADF makes it very simple to expose your existing business components as REST services - all through a declarative set of dialogs.

Once you published the service interface for a view object, you should be able to do the full set of CRUD operation on that object through different REST action:

GET - will do a Read

POST - will do a Create

PATCH - will do an Update

DELETE - will do a Delete

One thing that you'll want to verify is that when you are passing JSON data back into the REST interface you specify in the header that:

Content-Type is application/vnd.oracle.adf.resourceitem+json

otherwise you'll get an error along the lines of:

oracle.adf.internal.model.rest.core.exception.CannotParseContentException: The content type is not a ADFm REST entity. Content-Type: text/plain 

In the video below I show very quickly how to expose a REST interface and then how to invoke all the CRUD operations directly from the chrome app "Postman". 

These new feature can make your Oracle ADF business services part of any new application that prefers to use REST/JavaScript/HTML5 type of architecture.

Read more about exposing Oracle ADF BC as REST in the documentation

Categories: Development

Developing an Application with PL/SQL, the Formspider Way

Gerger Consulting - Thu, 2015-11-12 03:05
On November 24, attend our webinar to watch Professional Consultant Nicholas Mwaura as he talks about his experience with Formspider and shows you how you can build first class applications to impress your prospective customers and end users.

Watch a short demo of the application Nicholas will show you how to build:



During the webinar the following topics will be discussed:
  • The importance of Formspider for PL/SQL developers and Oracle customers
  • Why Oracle Forms applications are very easy to migrate to Formspider
  • Introduction to the demo application
     
  • Building the demo application: How to design the UI, how to work with windows, panels, tabs, trees and various other Formspider components, working with LOV’s, application structure in the database. 
At the end of the webinar, the attendees will get priority access to the source code of the demo application.

During the webinar, each attendee will receive a discount offer for Formspider developer licenses! :-)
 
Sign up to the webinar now!
Categories: Development

SQL Needs a Sister (Broken Link Corrected)

Gerger Consulting - Wed, 2015-11-04 01:28
I've just published an article on Medium about the missing sister of SQL. I think there is a fundamental mistake we’ve been making in using SQL. We use it both to ask a question and format the answer and I think this is just wrong. You can read the article at this link. (Sorry for the broken link in the previous post and a big thank you to the person who sent us a comment about the issue. :-) )
Categories: Development

Goodbye Old Bike, Hello Old Bike

FeuerThoughts - Sat, 2015-10-31 09:53
In 1977, one of my best buddies told me about a friend he had, who had just custom-built a bicycle for him, from components. This guy would do the same thing for me. "How cool is that?" thought I.

A few weeks later, for (according to my admittedly leaky memory) about $200, I received a bicycle that became one of my all-time favorite machines.

It was built around a black Raleigh Competition Reynolds 531 double butted steel tubing. It was powered by a lovely, engraved, all-metal Shimano 600 Arabesque derailleur ("One of the most decorative groups Shimano ever released"):


The bike was a beautiful ride and all-around excellent transportation. It came to Chicago with me in 1981. It took me downtown for my first job as a programmer in Chicago, at First National Bank (I commuted by bike whenever possible). It accompanied me on day trips all over Chicagoland. It took me back and forth to the CISPES office, a cause and organization that consumed way too much of my life for too little in return. Whatever foolishness I chose to engage in, this bike helped me do it in style (my style: it was scratched up and usually dirty, but the chain and gears were clean and lubricated).

But for some reason (yes, that's right, I do not recall), about fifteen years ago, I decided to buy a new bicycle, and chose a Jamis Coda. I hung the black bike (I don't know what else to call it. It used to be a Raleigh Competition, but that was long before I took possession) in the back of my shed, and very much enjoyed the Coda. It was new, it was shiny, and it was a hybrid, better suited for city riding. After a while it wasn't new or shiny anymore - just my style, but it was still a great ride. I didn't think very often about my black bike, even when I noticed it hanging behind garden gear and abandoned kids' toys.

Well, a couple months ago, I got careless with my Coda and it was stolen. Arrrrggggh.

I figured I would buy a new bicycle, which I dreaded in part because everything has gotten so over-built, optimized for convenience, unnecessarily fancy, etc. Not my style. Started looking around and found myself at Bucephalus Bikes, where they do a brisk, proud business in reconditioning older bicycles to better-than-new.

That got me thinking: maybe I should bring in the Reynolds 531 frame (by this time, I was thinking that was all that was left of the bike) and see what it might cost to make it a beauty, once again.

I hauled it out of the shed and was delighted to see it was intact as a bicycle, but with understandably flat tires, rusty chain, and who knows what else wrong with it. I did, after all, choose to stop riding it long ago.

Feeling slightly guilty at not returning to Bucephalus, I brought the black bike to my neighborhood bike shop, Roberts Cycle. They made appreciative noises. They probably do that with all their customers. :-)

Well, in any case, a few weeks went by and yesterday I rode the bike home - smoooothly. Here are the parts Roberts needed to properly restore the bike:
  • Chain
  • Front and rear brake cables and housing
  • Front and rear shift cables
  • Seat binder bolt
  • Schwalbe 27-1/4 K-guard (Kevlar) tires
  • Sealed bottom bracket
  • Headset bearings (29, loose, had to be individually packed in)
  • Rear wheel bearings (22, loose, had to be individually packed in)
  • Front alloy wheel
  • Used rear derailleur
Yes, you read that right. They removed the Shimano 600 and gave me a "good enough" replacement for a very fair price. He never asked if I wanted to replace it. WTF? The guy who runs the shop explained that the 600 was actually not compatible with the rear gear assembly on the bicycle; I couldn't get to all the gears using it. So he swapped it out.

Gee, I'd never really noticed any problem. I rarely needed the very low settings. I started to feel aggrieved and righteous about the whole thing, but he so sincerely seemed to consider it an act of necessity. So in the end I accepted with grace (or so I told myself) the Shimano 600 (and every other part, including the old ball bearings - !!) in a plastic bag.

I tried not to be too sad. It really is pretty.

No, I won't tell you how much all those parts (and the accompanying, thoroughgoing overhaul) cost me. I suppose I could've gotten a new bicycle for the amount, but nothing as elegant or satisfying as my black bike. 

And as I said in an earlier post, "New is BadBuying things new is the way to consume the most resources and have the worst impact on our world. So I am going to make every effort to avoid buying new things and instead by used."

Hurray! I acted on my principles. I have lots of principles and I never feel like I act enough in accordance with them. I also am not sure how many I've forgotten.

So this act of reuse and redemption felt - and feels - really good. 

Now if only it would stop raining so I could go out for a ride!

Categories: Development

EM12c Agent generating heapDump_*.hprof

Arun Bavera - Tue, 2015-10-27 14:43
By default Em12c Agent has enabled -XX:+HeapDumpOnOutOfMemoryError. We need to change the log directory to other directory or disable the Dump before it fills up Agent partition.
  --  -XX:-HeapDumpOnOutOfMemoryError   or  -XX:HeapDumpPath=/home/oracle/logs/
 
You can put these entries in AGENT_INST/sysman/config/s_jvm_options.opt
Agent has an auto tuning feature which increases Xmx automatically whenever it goes out of memory and dumps the memory.
We  disabled the Dump by putting this entry   -XX:-HeapDumpOnOutOfMemoryError     in file  AGENT_INST/sysman/config/s_jvm_options.opt and did emctl stop agent;emctl start agent.
 
Also, if you think if the agent memory auto tuning is not working you can disable that .. if you see a frequent restart or failing to start due to outOfMemory errors.
You can change  in emd.properties
#Enable auto tuning out of the box
enableAutoTuning=true false

Change the default Xmx
# These are the optional Java flags for the agent
#
agentJavaDefines=-Xmx512M -XX:MaxPermSize=96M
Note: This is not recommended by Oracle Dev team.








Categories: Development

Responsive UI in Oracle ADF 12.2.1 with the MatchMediaBehavior Tag

Shay Shmeltzer - Tue, 2015-10-27 08:42

Another very powerful addition to the responsive capabilities of ADF Faces in version 12.2.1 is the new af:matchMediaBehavior tag. It allows you to control almost every bit of your UI and change properties in response to changes in the viewport size.

Check out what it can do in this video:

Note that in the mediaQuery you can use other type of CSS media queries

The code for the page in the demo is

       <af:panelSplitter id="ps1" orientation="horizontal" splitterPosition="201">
                <f:facet name="first">
                    <af:panelFormLayout id="pfl1" labelAlignment="start">
                        <af:matchMediaBehavior matchedPropertyValue="top" propertyName="labelAlignment"
                                               mediaQuery="screen and (max-width: 768px)"/>
                        <af:inputText label="Label 1" id="it1"/>
                        <af:inputText label="Label 2" id="it2"/>
                        <f:facet name="footer"/>
                    </af:panelFormLayout>
                </f:facet>
                <f:facet name="second">
                    <af:panelFormLayout id="pfl2" labelAlignment="start" rows="2">
                        <af:matchMediaBehavior matchedPropertyValue="top" propertyName="labelAlignment"
                                               mediaQuery="screen and (max-width: 900px)"/>
                        <af:matchMediaBehavior matchedPropertyValue="4" propertyName="rows"
                                               mediaQuery="screen and (max-width: 800px)"/>
                        <af:inputText label="Label 1" id="it3"/>
                        <af:inputText label="Label 2" id="it4"/>
                        <f:facet name="footer"/>
                        <af:inputListOfValues label="Label 1" popupTitle="Search and Result Dialog" id="ilov1"/>
                        <af:inputFile label="Label 1" id="if1"/>
                    </af:panelFormLayout>
                </f:facet>
                <af:matchMediaBehavior matchedPropertyValue="vertical" propertyName="orientation"
                                       mediaQuery="screen and (max-width: 768px)"/>
                <af:matchMediaBehavior matchedPropertyValue="100" propertyName="splitterPosition"
                                       mediaQuery="screen and (max-width: 768px)"/>
            </af:panelSplitter>
     
Categories: Development

Introducing the Masonry Layout in Oracle ADF 12.2.1

Shay Shmeltzer - Fri, 2015-10-23 14:34

One of the focus areas for Oracle ADF 12.2.1 was simplifying the creation of responsive UIs, and one of the new components that supports this is the af:masonryLayout component. It allows you to define areas on your page that act as tiles and automatically re-arrange themselves to match the browser's window size.

This layout is very useful for dashboard type of pages where you are showing all sorts of information. 

In the video below I show you the very basic way to use this out of the box.

As mentioned in the video there are built in styleClasses in ADF for the size of masonry tiles.

They are in the format of AFMasonryTileSize1x1 with support for 1x2,1x3,2x1,2x2,3x1,3x2

The Masonry Layout can contain any component you want (not just group layout as shown in the page), as long as you give that component the right AFMasonryTileSize style. 

You can further control the sizing and coloring of the tiles using styleClasses that you define in a skin file.

For example in the video I used the following style to make sure you can actually see the panelGroupLayout tiles on the page. 

.tileStyle{
background-color:gray;
border: black;
border-width: 2px; 
} 

The actual code in the JSF page is:

<af:masonryLayout id="ml1">
  <af:panelGroupLayout id="pgl1" styleClass="AFMasonryTileSize2x1 tileStyle"/>
  <af:panelGroupLayout id="pgl2" styleClass="AFMasonryTileSize2x1 tileStyle"/>
  <af:panelGroupLayout id="pgl3" styleClass="AFMasonryTileSize1x1 tileStyle"/>
  <af:panelGroupLayout id="pgl4" styleClass="AFMasonryTileSize3x1 tileStyle"/>
</af:masonryLayout>

Categories: Development

OOW and JavaOne 2015 - Where I'll Be

Shay Shmeltzer - Thu, 2015-10-22 10:41

It's that time of the year again, and next week is going to be crazy busy for us at Oracle OpenWorld and at JavaOne.

In case you want to catch me, here is a list of the locations where I'll be:

Building iOS Apps with Java 8 [CON1588]

Monday, Oct 26, 12:30 p.m. | Hilton—Continental Ballroom 4

Build Responsive Web Applications with Oracle ADF [HOL10380]

Monday, Oct 26, 5:00 p.m. | Hotel Nikko—Nikko Ballroom III (3rd Floor)

General Session: Revolutionizing Application Development with Oracle Cloud [GEN9500]

 Tuesday, Oct 27, 11:00 a.m. | Moscone South—103 

Meet the Experts: Oracle’s Development Tools and Frameworks [MTE10022]

Tuesday, Oct 27, 6:15 p.m. | Moscone South—300

Oracle Application Development Framework and Oracle JDeveloper—What’s New and How to Use It [CON8333]

Wednesday, Oct 28, 1:45 p.m. | Moscone South—304

Building iOS Apps with Java 8 [CON1588]

Thursday, Oct 29, 9:00 a.m. | Hilton—Continental Ballroom 1/2/3

Moving Oracle ADF to the Cloud—Development and Deployment in the New Age [CON8332]

Thursday, Oct 29, 1:15 p.m. | Moscone South—270

In between you could also catch me at the Oracle demo ground in Moscone south (mostly in the Oracle Application Builder Cloud Service), and at the JavaOne GeekBar on Monday.

At the rest of the time, I'll try and catch some of the sessions on this list.

See you there...

Categories: Development

Select all Checkboxes in IR - APEX 5

Denes Kubicek - Thu, 2015-10-22 06:54
If <input type="checkbox" onclick="$f_CheckFirstColumn(this)"> doesn't work for you in APEX 5 Interactive Reports then you will need to disable Fixed Headings (standard). Fixed headings splits the report into two tables and the function won't work.

Categories: Development

Oracle Live SQL

Denes Kubicek - Thu, 2015-10-22 06:45
Oracle Live SQL is a great source for learning SQL and PL/SQL. It has a lot of good examples and interactive educational tutorials. The best thing is, it runs on APEX ;) Add this site to your bookmarks.

Categories: Development

Oracle APEX 5.0.2 now available

Patrick Wolf - Wed, 2015-10-21 02:51
Oracle Application Express 5.0.2 is now released and available for download. If you wish to download the full release of Oracle Application Express 5.0.2, you can get it from the Downloads page on OTN. If you have Oracle APEX 5.0.0 … Continue reading
Categories: Development

Pages

Subscribe to Oracle FAQ aggregator - Development