Using BC4J in JInternalFrame

I have been working a little with BC4J in Form (JFrame) and it works , now I want to use JInternalFrame ina JDesktopPane.
I created a JFrame from JClient wizard and instead extends JFrame I modified the code to extends from JInternalFrame, also comment the constructor because don have listener, but when I want to put some Data Control from de palette , I dont have option to do it.
Could anybody help me please? thanks a lot!

Hello, thanks for the help, I do exactly what you say. Well now the situation is when I want to close the internalFrame in the case that JFrame there is no problem because it close with System.exit(0) but when I try to close an internalframe I get a problem. I use an JFrame that implements InternalFrameListener and invoke an Internalframe called MyInternalFrameUsuarios now, when I close the internalFrame I put in the listener of closing :
public void internalFrameClosing(InternalFrameEvent e) {
System.out.println("Internal frame closing");
MyInternalFrameUsuarios finalFrame = (MyInternalFrameUsuarios)e.getInternalFrame();
int action = finalFrame._popupTransactionDialog();
if (action != JOptionPane.CLOSED_OPTION)
I comment the System.exit because just want to close the internalFrame but the problem is that the window dont close, the content gone but the window still remain in the frame and if I try to close again the window I receive this exception :
oracle.jbo.common.ampool.ApplicationPoolException: JBO-30006: The cookie for session AppModuleDataControl:1089132867566:1 and application AppModuleDataControl is not a valid handle for application pool, mypackage1.AppModuleLocal. The cookie may not be used to access this pool instance.
     at oracle.jbo.common.ampool.ApplicationPoolImpl.validateSessionCookieInPool(
     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(
     at oracle.jbo.common.ampool.SessionCookieImpl.releaseApplicationModule( . ...
Also if I open new internalFrame window and try to close the new one, this exception is generated :
oracle.jbo.NameClashException: JBO-25001: Name MyInternalFrameUsuariosUIModel of object type Form Binding Definition already exists
     at oracle.adf.model.binding.DCDataControl.addOrCreateBindingContainer(
     at oracle.adf.model.binding.DCDataControl.addBindingContainer(
     at oracle.adf.model.binding.DCDataControl.addBindingContainer(
     at oracle.adf.model.binding.DCBindingContainer.setDataControl(
     at oracle.jbo.uicli.jui.JUPanelBinding.initializeApplicationModule(
     at oracle.adf.model.binding.DCBindingContainer.getDataControl( ....
Thanks a lot for your help!!

Similar Messages

  • What is the benefit of using BC4J?

    After working with BC4J for three months, I still can not convince my manager to use BC4J. His major arguments are:
    1. Which applications or web sites are implemented using BC4J? Are they real application or just a demo. For the time being, I even can not show him a demo, not to say any real web applications.
    2. His developers told him that the O-R mapping provided by BC4J, which is probabably one of the key benefit of BC4J can be easily coded manually with a couple of days work for the current task and we have the full control over our own code while BC4J is not an open source and the lack of the support from Oracle really worries him.
    Can someone in Jdev team give me a clear evidence to convince him?

    [*]With regard to struts integration with BC4J, I have done some investigations of the new release and know that BC4JActionForm is only good for simple view and does not work for a joint table view as I have reported a few days ago in this group and no response is received yet.
    This should not be the case. Should work for any view object. View objects can contain join queries with any number of updateable tables in them. Please email me the URL to the forum posting so I can track down the issue.
    [*]I have been recently told indirectly from Oracle that the consulting group at oracle are not using BC4J and instead they think that BC4J only applies to simple applications with limited number of tables and relationships.
    This is plain incorrect. We have very large applications using BC4J both internal in Oracle Applications, for Oracle iLearning, and many external customers. Many of these projects have involved (and are currently involving) Oracle Consulting. Not sure where got this information, but it is incorrect.
    [*]Other commecial O-R mapping products such as top-link should be used for large applications
    The key difference between Oracle9i TopLink and Oracle9i BC4J has nothing to do with the size of your project. The fundamental difference is that toplink is for customers who have already written a custom application framework and who require just a persistence architecture, because they've already hand-written code to implement all of the other J2EE design patterns that are required to build real J2EE applications.
    Conversely, BC4J is for customers who want a complete J2EE Application Framework (and tightly integrated, award-winning toolset to go with it) to avoid having to write, test, debug, and maintain their own application framework.
    There is simply no evidence to backup your statement that BC4J only works for small applications. I am aware of at least 20 (and by now after a summer full of training additional Oracle Apps development teams in BC4J, perhaps over 30) that are using BC4J for full-scale, self-service J2EE web applications. Our BC4J reference info pages (link in this thread above) have references to customers who are using BC4J for large applications as well.
    Hope this helps.

  • How to use BC4J with JDeveloper 9i in a Team

    I'm not sure if I'm to stupid, but to say the truth I didn't found the clue how to share a BC4J Application between several develeopers. Maybe someone can give me a hint.
    That's my situation:
    Our team is going to develop a web application using BC4J and BC4J-JSP, nothing special I think.
    But my problem is, that BC4J and especially the wizards refer to a lot of different files. Even simple changes often result in multiple files being changed in different parts of the project.
    Creating a view link between view objects in two packages for example changes the view objects in both packages. Also the project (.jpr) file or several "BC4J.xcfg" files are changed very often.
    So it is not easy to find parts of code from which I can say they are owned by one developer and others which are owned by another. Most often, if you have to merge the work of different developers, you have to edit the BC4J-XML-Files using an external editor. Or did someone find a better way? Please tell me!
    So, what is the best way to share code between developers?
    Should I partition the application by packages?
    - advantage:
    it allows a fine partitioning
    - disadvantages:
    it has the great danger that BC4J makes changes in other packages which will be overseen when merging.
    Should I create a projects for each developer and distribute code between the projects using libraries?
    - advantage: no unseen changes will happen, as the libraries are readonly.
    - disadvantages: no view links between view objects in different projects (Libraries) are possible! Also a lot of "load errors" can occure when updating a library, which have to be manually corrected in the dependent projects.
    Are source code management systems a real help in this problem or do they just "manage" the problem? I already tried SCM and PVCS but was not very happy with the way of working. As JDeveloper is not "really easy" to use with theese tools.
    So I would like to get any hints how other developers are dealing with this problem. Are you using BC4J with JDeveloper 9i in a team? Please tell me how do it and how you have partitioned your application.
    Thanks in advance
    Frank Brandstetter

    I'm not sure whether my answer is good enough for you, but it might help.
    First of all, you have to use JDev 9.0.3, because 9.0.2 has big problems with associations/view links between objects in different projects.
    Creating a view link between view objects in two packages for example changes the view objects in both packages. Also the project (.jpr) file or several "BC4J.xcfg" files are changed very often.This is not completely true in 9.0.3, as you may choose not to create an accessor in the imported object (and usually you don't need it neither!). As for bc4j.xcfg, there is a trick: define a "standard" database connection name to use all over your project! This will prevent modifying these files all the time!
    Should I create a projects for each developer and distribute code between the projects using libraries?
    - advantage: no unseen changes will happen, as the libraries are readonly.
    - disadvantages: no view links between view objects in different projects (Libraries) are possible! Also a lot of "load errors" can occure when updating a library, which have to be manually corrected in the dependent projects.I would say, projects for each application component, which by chance will be managed by a single developer at a time.
    As for the disadvantages, in 9.0.3 you are able to properly create associations and links using read-only objects. Hopefully, the release version will solve some generation inconsistencies...
    Concerning the errors that occur when modifying a library, this might be balanced by the relative independence of the components... If you are able to develop following the dependency tree, you will not meet the problem very often.
    Are source code management systems a real help in this problem or do they just "manage" the problem? I already tried SCM and PVCS but was not very happy with the way of working. As JDeveloper is not "really easy" to use with theese tools.Indeed, I do not have a SCMS really able to manage merges in the BC4J XML files... We rather try not to arrive there!
    So I would like to get any hints how other developers are dealing with this problem. Are you using BC4J with JDeveloper 9i in a team? Please tell me how do it and how you have partitioned your application.I really hope that my hints will help.

  • HOWTO: Use BC4J With or Without DB Triggers

    This HowTo describes how to use BC4J, database sequences and triggers
    and what are the ramifications.
    BC4J has the ability to work with database sequences in order to obtain a
    unique value when inserting records. BC4J also has the ability to
    work either with a 'before insert' trigger which automatically creates
    a new unique value for the primary key or without a trigger. When not using
    a database trigger, BC4J also has the ability to obtain the sequence value
    and set the primary key value.
    Before discussing the ramifications of using one approach or the other, let's
    show examples of how to use both approaches:
    BC4J & sequences WITH a database trigger
    BC4J & sequences WITHOUT a database trigger
    To illustrate both scenarios a simple database setup script is provided which
    creates two tables:
    CUSTOMER_NT which DOES NOT have a before insert trigger and
    CUSTOMER_WT which DOES have a trigger.
    Database Install Script:
    drop trigger customer_insert_trigger;
    drop table customer_wt;
    drop table customer_nt;
    drop sequence customer_wt_seq;
    drop sequence customer_nt_seq;
    create sequence customer_wt_seq start with 1;
    create sequence customer_nt_seq start with 101;
    create table customer_wt(
    id number,
    name varchar2(30),
    primary key (id)
    create table customer_nt(
    id number,
    name varchar2(30),
    primary key (id)
    prompt Inserting data...
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Mickey');
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Goofy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Daffy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Porky');
    prompt Creating trigger
    create trigger customer_insert_trigger
    before insert on customer_wt for each row
    select customer_wt_seq.nextval into from dual ;
    The next step is to create the DEFAULT Entity Objects and View Objects using
    the Business Components Wizard.
    Let's modify the entity object CustomerWt so it can use the database trigger.
    Edit the entity object CustomerWt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox. This allows you to insert without a value for the primary key
    - Check 'Refresh after Insert'. This obtains the value from the database generated by the trigger.
    - Check 'Updateable While New'. Id is only updateable when inserting.
    Click finish to complete the wizard. Save all and recompile the project.
    Now let's test our work.
    In the navigator right-click the application module and select 'Test..'. This will launch
    BC4J's built in tester. Connect to the application.
    In the tester double-click the CustomerWtView view object to run a test edit form.
    After the edit form renders, navigate through the existing records using the navigate
    buttons on the edit form. Now let's insert a record to execute the trigger.
    click on the '+' button to insert a record. Enter a value in the 'Name' field and commit the change.
    Observe that a new value has automatically been inserted into the Id field.
    That's it! You have successfully used BC4J and a database trigger.
    Now let's try it without a trigger..
    Now edit the entity object CustomerNT so it doesn't need a database trigger.
    Similar to before, edit the entity object CustomerNt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox.
    - Check 'Updateable While New'.
    An additional step is also required. The Create method will have to be modified to extract
    the value of the sequence.
    In the Edit EntityObject Wizard click the Java tab and select Create method and click Finish.
    The create method is generated in your Java fil e. In the Workspace view of the Navigator,
    expand the CustomerNt entity object in the navigator. Double-click to open it in the Source Editor. In the Structure pane, double-click
    create(AttributeList). Modify the Create method so it looks like this:
    public void create(AttributeList attributeList) {
    SequenceImpl s = new SequenceImpl("customer_nt_seq", getDBTransaction());
    Integer next = (Integer)s.getData();
    setId(new Number(next.intValue())); }
    Save and compile the project.
    Now test the ViewObject CustomerNtView using the tester as before.
    In the edit form of CustomerNTView click on the '+' to insert a record. Observe that
    just as before a new value has automatically been inserted in the ID field!
    Using a Database trigger sometimes preferable if you have non BC4J applications
    also sharing the database. In this case it is still safest to just let the database
    update it's own primary keys.
    If you don't have any other non-BC4J applications sharing the database, then not using
    a database trigger is perfectly acceptable and can have slightly better performance.
    The important thing to remember is that the option is yours to use either approach!

    Thank you for the reply Jonathon. I am using a ViewObject which
    consist of several tables. I haven't tried the DB trigger
    approach but just using the BC4 approach in overriding the
    create method.
    Here is the parent class create as a part of the file which does the job correctly.
    public void create(AttributeList attributeList) {
    SequenceImpl l_seq = new SequenceImpl
    Integer l_next = (Integer)l_seq.getData();
    setCustomerId(new Number(l_next.intValue()));
    This is when I triedpassing the value to the child table. But I
    can't figure it out. I think the link is working fine if I had a
    ViewLink deployed but it doesn't look like it's doing the job
    for ViewObject.
    I am trying to call the childclass.method
    But I am getting error.
    Thanks a lot for your suggestions,
    703 696 1121

  • Where Clause messing up results of Query using BC4J

    Hello all.
    I am developing a hand-coded JSP application that uses BC4Js and is deployed to a 9iAS on a SPARC box.
    I'm not sure what has been happening, but the results that are printed out to the screen are vastly different from the SQL results. I've gone as far as printing the Query that is executed onto the results page and have run it on SQL*Plus -- the query works on Plus, but displays no rows on the screen.
    I have a pretty complex where clause, I compare around four columns, and while developing I noticed that the sequencing of the columns greatly affected the output.
    Is this the same case?
    Thanks for the help!

    Additional Information:
    One of the Where parameters is a date range, when I made the range narrow I was able to get the right number of rows for the result set (34 in all). But when I widened it to the day right after that, I got no results.
    I'm stumped.

  • What is the Benefit of EJB2.0 CMP when using BC4J?

    I see much being made of the ability to use BC4J in conjunction with EJB2.0 CMP, but I am unclear of the benefits of doing so as I had understood that BC4J can effectively take care of persistance? There must be more to it no?

    The new feature we introduced in BC4J for 9.0.3 is the ability to use the BC4J "data model" components -- our View Object and Application Module -- against EJB 2.0 CMP entity beans. It is targeted for developers who have already decided, before coming to the BC4J framework, to implement their business domain classes as EJB 2.0 CMP entity beans with local interfaces, and allows them to take advantage of the "top-half" of the BC4J framework's major functionality related to client data-binding.
    At present, there isn't really a benefit per se of using EJB 2.0 CMP entity beans, you actually lose a number of interesting application-building features that the simple BC4J entity object classes give you. The BC4J entity object saves you the trouble of having to worry about persistence, too, like the CMP entity bean, with a declarative deployment-descriptor-based approach, too. However if you have made the choice for using EJB 2.0 CMP entity beans, then there definitely IS benefit in combining them with the BC4J Data Model layer features because this saves you time in building your client user interfaces.
    We are working for future releases with the OC4J team who are participating in the EJB specification's future editions to try and incorporate into an evolution of the entity beans spec, a number of the added value features that BC4J entity objects offer for simplifying common application-building tasks, but that will take some time to accomplish in practice.

  • Custom OCS application using BC4J

    I am using the APIs for Workspaces to write an application we can use to migrate data (using BC4J) from a custom application into Workspaces. According to the documentation, any application using these APIs must run on the server, yet there is no ability to create a new OC4J on the server.
    What is the correct way for me to do this? Can I write an application which uses BC4J and deploy it to tha OCS tier?

    Please check out this link-

  • Using BC4J, Cannot Cast an Oracle Number to a java int

    I am using bc4j in jdev 9i, version I have a type Row, to get the data from oracle, bc4j, and all work fine, except that I cannot
    cast or convert the number returned to an int where I can use it for other java functions.
    Is there any way to convert the number, using a wrapper or a function to do so?
    Any help is greatly appreciated.

    Use Number.intValue() method.

  • Q? on best practices/techniques using BC4J/Struts

    I have a jsp page that shows a bunch of detail records. Next to each detail record is an EDIT link.
    When the user clicks on the edit link I would like to populate a form on the same jsp page with existing values from that detail record so that the user can update the values.
    I am using struts/bc4j.
    What would be the best way to accomplish this?
    I was thinking if somehow I could get all the values of the clicked row in my controller and assign them to a form, then struts would take care of populating them again on the JSP.
    otherwise i guess the other way is to use bc4j data tags.
    Thanks in advance...

    Thanks for the pointer but it seems to be asking the same questions I am.  The only PDF that I could get was the one from quest.  Yours from LuLu I kept getting DB errors on the LuLu site. 
    Also, 3rd party options are currently out of the question.   I have done reorgs on R3 systems but since they don't have partitions and sub partitions and such there didn't seem to be as much to worry about. 
    I don't even want to mess with any BW R3 internal tables and that is why I would like to go from ODSD->Temp->ODSD.  I can get the downtime to do it too.
    Thanks for your help though the issue still sin't solved. And I'd like to see your book sometime.

  • Using bc4j with applets

    I was wondering if you have any tips on using bc4j in applets. The 2 biggest problems I'm having is the jar size of the applet after all libs are included
    (4MB+) and the fact that I can't use XDK, JNDI, BC4J and some other libs from applets unless I sign them or change the policy file at each client using the applets.
    I really think all the calls to System.getProperties(), etc. should be placed inside try catch blocks to catch the security exceptions raised by xdk, RMIInitialContextFactory, etc. and handled using
    defaults for properties... it'd be even better if these properties could be set in another way as well.
    Thanks in advance,
    Leonardo Bueno

    FYI... my environment is:
    Oracle9iAS (
    JDeveloper (

  • Urgent Pls - Using BC4J Intermedia tags

    I am using BC4J Intermedia tag EmbedImage to display images stored in Databases. When I try to display I get only a blank picture equivalent to the size of the image and not the image itself. The type of the image is JPG. The Image datatype in the database is ORDSYS.ORDIMAGE.
    Is it to do something with the project settings? I am using Oracle 9.0.3 version of JDeveloper.
    Any help is appreciated.

    Right, that's because the oracle.ord.html.URLBuilder class builds the URL for the images by using the current JSP directory level.
    For example: if your JSP page that uses <jbo:EmbedImage> is located under Then the generated URL for the image will be
    But in web.xml, the <url-pattern> element defines the url pattern value, which by default is "/ordDeliverMedia". So the media delivery servlet only handles the requests like these:
    So, in order to make your sample work, you need to modify the web.xml in your project. There are two alternatives:
    1. Change the <url-pattern> element to this:
    This will correctly handle the JSPs located under kerfisumsjon.
    2. Change the <url-pattern> element to this:
    This will handle any requests for ordDeliverMedia regardless of their directory location.
    Hope this solves your problem.

  • Using BC4J with MS Access/MySQL

    I have to develop a small application for PC consisting of somes input forms and a data report (for screen & printer). I'm new to the BC4J framework and I don't have any experiencie with it.
    I will work with one of this DB: MS Access or MySQL (SQL 92 compliant).
    Before beginning my work I would want to know if somebody has any experience on using the framework with one of these databases. If so, does the framework work well with these databases? Is there some known problem or limitation? Has anybody some remendation on this matter?
    Thank you so much.
    M Laura.

    Although we don't formally test with MySQL,
    we have an inhouse project that uses
    BC4J with MySQL - it works well.
    The only way into Access is via the JDBC:ODBC bridge,
    which I've always found troublesome.
    regards, Karl McHorton (bc4j development)

  • Using bc4j jbo tags

    Hot to get the id of a topic added in previous jsp page using bc4j jbo tags

    Do you want to use the value in a Java variable? If so then here's what you do:
    1) Inside your rowset iterate tag, use the <jbo:Row> tag and set action="active". It will look like this:
    <jbo:Row id="rowActive" datasource="ds" action="active" ></jbo:Row>
    2) In script, you can access the attribute you want by calling rowActive.getAttribute(); ... One thing to note is that this returns an Object. You will need to type cast it before assignment. For example, say you are retrieving column Test of type Number...
    oracle.jbo.domain.Number tempNumber;
    tempNumber = (oracle.jbo.domain.Number)rowActive.getAttribute("Test");
    Hope that helped!

  • How to use BeanUtils.copyProperties() when using BC4J

    jakarata commons package provides the ability to transfer data from Data Transfer Object to Form bean using BeanUtils.copyProperties().
    How can this be achieved when we are using BC4J where we have Entity and ViewObjects which are DTO's.


  • Maintaining page stack using BC4J framework

    We are developing a web application using JDeveloper(using bc4j+struts) in which list of functions are available in the tree menu on the left side. On clicking any function three tabs are displayed in the main body which are search, result list and maintenance. Now let's say user did some search on function A by entering some criterias and clicking the search button and output is shown in the result tab. Now user goes to another function B and does some operation. Now the requirement is that when the user returns to function A the previously set search criteria should remain. This is required for all functions. Without persiting in the web tier (HttpSession) what is the best way to do this using BC4J framework. Should I design View Objects with all transient attributes for each of the screens and use the application module in stateful mode? What can be the best and generic way to solve this?
    Note that we will have several combos (LOV) which are themselves mapped to a view object in the search page.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team (Laura):
    Which version of JDeveloper are you using?<HR></BLOCKQUOTE>
    I'm using JDeveloper 3.1 .
    Please could you check with the developer if it's bug or not and if there is some fix to this (plans?).

Maybe you are looking for