Domain Portal

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 30 June 2007

Updatable While New problem in JDeveloper 10.1.3

Posted on 09:38 by Unknown
In my recent project I have faced an issue with editable table and validation functionality for table columns in JDeveloper 10.1.3. The problem was - when table was updated with wrong data, 500 Internal Server Error was generated, instead of error message. For sure, quite negative behavior. At first I have checked all validation rules, there was no any errors. For primary key attribute was assigned DBSequence type, I have tried to change it into oracle.jbo.domain.Number type, run test again - and application started to work correctly.

However, DBSequence type wasn't a source of problem. Problem was in Updatable While New option, when DBSequence type is used primary key attribute is read-only for existing rows, this means Updatable While New is selected automatically. Steve Muench have registered Updatable While New issue as a bug with reference - bug# 6138325, and provided workaround for us. Thanks Steve!

I have developed sample application - AttributeList.zip, in order to demonstrate this issue and to show how Steve's workaround works. In sample application EMPLOYEES table from standard HR schema is used. This table contains columns with NUMBER type, so it is suitable in our case. Sample provides two pages - test1.jspx and test2.jspx, first page shows wrong behaviour and second - correct.

At first, in JDeveloper 10.1.3 I have created simple editable table in standard way, like it is described in Oracle ADF Developer Guide. Table contains salary column, let's say we want to increase salary value for Alexander Hunold, column precision declared in database is 8, try to submit with precision 10:


Exception is generated:


Unusual behaviour, instead of validation error, exception is received and application crashed. However, workaround is available and in later JDeveloper versions this bug is fixed. Workaround is pretty simple and elegant, just put any updatable attribute in page definition file before read-only attribute for existing rows:


EmployeeId is declared as read-only attribute for existing rows:


And let's run a test again, correct behavior is received - no exception and expected validation message is shown:


Hope, shared experience will be useful for those, who will face the same issue in Oracle JDeveloper 10.1.3.

When running sample application, don't forget to add adf-faces-impl.jar and jsf-impl.jar to application's WEB-INF\lib directory.
Read More
Posted in ADF | No comments

Wednesday, 27 June 2007

Nice Norway

Posted on 08:43 by Unknown
Just wanted to share nice view of Norway, that I have captured on those days. Rain is coming, but sunlight is still here :).

Read More
Posted in Traveling | No comments

Saturday, 23 June 2007

Create, Edit and Delete operations in Master-Detail af:table components

Posted on 06:35 by Unknown
It seems, my previous post about Create, Edit and Delete operations in ADF Faces af:table component is popular, I have received comments and questions from JDeveloper/ADF developers. One of the most interesting questions was about how to use the same functionality for Master-Detail, when both are based on af:table component. I have decided to implement Create/Edit/Delete functionality for Master-Detail case and to show how it works in Oracle ADF - EditableMasterDetailTable.zip.

Business logic is simple - relation between Countries and Locations entities from standard HR schema is implemented. Countries is for Master, and Locations for Detail. Master-Detail screen:


When row in Master table is selected, Detail table is updated automatically. It happens, because Oracle ADF provides Partial Page Rendering (PPR) functionality. Developed sample allows to manage Master record and at the same time dependent Detail records can be managed also.

Create functionality in Master table:


When record in Master table is saved, it becomes possible to add dependent records in Detail table:

Read More
Posted in ADF | No comments

Sunday, 10 June 2007

Web Services in Oracle JDeveloper 11g

Posted on 06:46 by Unknown
I have received a comment for my previous post - Web Services and Oracle TopLink, about if to try similar sample on Oracle JDeveloper 11g Technical Preview release. Yes, it is interesting, just because you can compare and evaluate new powerful features that will bring JDeveloper 11g Production release. I have tested Web Services development support in 11g using developed sample application - WSTopLink11.zip, this sample implements annotation only Web Service. I have used the same business logic as for previous one.

For persistence layer I'm using JPA entity with two Named Queries - Countries.findAll and Countries.findByName. When creating EJB Session Bean, Web Service Endpoint Interface is declared in the same way as in JDeveloper 10.1.3:


Generated interface for EJB Session Bean contains @WebService annotation, that in fact allows to use EJB Session Bean as Web Service directly:


Developed application structure in Application navigator window:


Oracle JDeveloper 11g provides embedded tool, that allows to test developed Web Service without deploying it to the server - just right click on EJB Session Bean and select - Test Web Service:


HTTP Analyzer window will be opened, where you can choose available operations to test, provide values for parameters and browse through generated result. Four views are provided - SOAP structure, HTTP Content, Hex Content and Raw Message. In our case, queryCountriesFindAll() generates similar result:


And, for queryCountriesByName(parameter) only result that is correct for specified parameter is shown:

Read More
Posted in JDeveloper 11g, TopLink, Web Services | No comments

Wednesday, 6 June 2007

Master in Computer Science degree

Posted on 10:39 by Unknown
Today I have finished university studies, and received Master in Computer Science degree. Finally..., 6 years of studies are finished :). However, I'll never forget Professor Vigirdas Mackevicius and his Mathematical Analysis course. He is really cool Professor, knowledge and expertise that he have shared with us, first year bachelors, is and will be useful in our everyday life.

I'm not leaving academy, I have received an offer to be assistant lecturer in our faculty - I will teach Oracle/J2EE and IBM/J2EE from 2007 autumn semester for first year Masters.
Read More
Posted in Uncategorized | No comments

Sunday, 3 June 2007

Web Services and Oracle TopLink

Posted on 12:14 by Unknown
If you are Oracle TopLink developer and want to access persistence layer through Web Service interface, hopefully you will find an answer in this post. Developed sample - WSTopLink.zip, doesn't provide user interface, it will be tested on Oracle Application Server. I will post how to use Web Services in Oracle ADF Faces in my future posts. Current sample is based on standard HR schema and provides functionality of querying for all or one particular country. Below I will provide main aspects I have noticed, when developing access to TopLink persistence layer through Web Service.

1. You should create Oracle TopLink entity objects in the same way, like you create them always. But, when creating EJB Session Bean don't forget to include Web Service Endpoint interface.


2. When creating Java Web Service, don't check 'Autogenerate Service Endpoint Interface'. It's because endpoint interface is already generated and is represented by EJB Session Bean.


3. In the step 5 of 8 in Java Web Service dialog you can select methods accessible through Web Service. In developed sample I have enabled access only to two methods - findAllCountries and findCountryByName.


4. Finally, JDeveloper generates all needed files. Generated WSDL document should look similar in Design view:


5. Developed application structure in Application navigator window:


6. One important thing - WAR Deployment Profile Properties dialog. Deployment profile for Web Service is generated automatically, but Oracle TopLink configuration files aren't included into it by default. So, don't forget to include them.


7. Access to persistence layer through Web Service is done, it's time to test it. I have deployed developed application to Oracle Application Server and have tested using standard interface provided by AS.


8. Let's press 'Invoke' button - information about all countries available in database table will be returned.


9. I have defined two operations to be available. Second operation accepts parameter and provides information only for country specified in that parameter. For example, if parameter value is set to Albania and 'Invoke' button is pressed, information only for that country will be returned.


Result:

Read More
Posted in TopLink, Web Services | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Multiple LOV's per Attribute in JDeveloper 11g
    During OOW 2008 I have attended Steve Muench talk about new features in ADF Business Components available in 11g release - Oracle ADF: New D...
  • JBO-25058 and JBO-26001 exceptions
    In a case if you will get JBO-25058 and JBO-26001 exceptions after running application developed with Oracle ADF in JDeveloper 11g, most pro...
  • JDeveloper 11g Masterclass in Vilnius
    I'm posting update to my previous post - Oracle Forms to SOA workshop in Vilnius , where I was describing masterclass session I will do ...
  • Opening Report Window in ADF Faces
    Such requirement as opening report window can be assumed as easy one. But, when I have received request for solution, it was not so easy to ...
  • Oracle JDeveloper/ADF Real Life Story on Oracle OpenWorld
    Yes, that right - I was presenting Oracle JDeveloper/ADF Real Life Story on Oracle OpenWorld in Unconference section. Everyone was free to c...
  • JDev/ADF samples list
    This week, Steve Muench on his examples page have added a link to my JDev/ADF samples list . Thanks, I'm very proud of this - it is co...
  • Oracle Always Rocks !
    This song was performed at Oracle OpenWorld 2007, after Larry Ellison and Safra Catz keynote - Sunday Night Live—30 Years Behind The Scenes ...
  • Oracle Fusion Middleware 11g Technology Preview 3 - whats included?
    Probably almost everyone have noticed Christmas gift from Oracle - JDeveloper 11g Technology Preview 3 . What new things are inside this gif...
  • List-Of-Values Component in Search and Edit Form
    Sample application described in this post contains high practical value, it implements real use case. Defined use case - based on value sele...
  • Oracle Magazine Peer-to-Peer column
    My profile is published in Oracle Magazine January/February 2008 edition - Favorite Things . Profiles of Oracle ACE Director - Chris Ostrow...

Categories

  • ADF
  • Apex
  • Apple
  • BPEL
  • Events
  • Forms
  • Groovy
  • JDeveloper 11g
  • Nomination
  • ODTUG Kaleidoscope
  • OFUG
  • Oracle Magazine
  • Oracle OpenWorld
  • Security
  • SOA
  • Spatial
  • TopLink
  • Traveling
  • Uncategorized
  • Vgo Software
  • Web Services
  • WebCenter
  • WebLogic
  • Workarounds

Blog Archive

  • ►  2008 (72)
    • ►  December (2)
    • ►  November (3)
    • ►  October (9)
    • ►  September (4)
    • ►  August (9)
    • ►  July (6)
    • ►  June (10)
    • ►  May (4)
    • ►  April (5)
    • ►  March (7)
    • ►  February (5)
    • ►  January (8)
  • ▼  2007 (65)
    • ►  December (6)
    • ►  November (7)
    • ►  October (6)
    • ►  September (4)
    • ►  August (3)
    • ►  July (4)
    • ▼  June (6)
      • Updatable While New problem in JDeveloper 10.1.3
      • Nice Norway
      • Create, Edit and Delete operations in Master-Detai...
      • Web Services in Oracle JDeveloper 11g
      • Master in Computer Science degree
      • Web Services and Oracle TopLink
    • ►  May (5)
    • ►  April (6)
    • ►  March (4)
    • ►  February (5)
    • ►  January (9)
  • ►  2006 (9)
    • ►  December (9)
Powered by Blogger.

About Me

Unknown
View my complete profile