10.1.2 bc4j  createRootApplication question

I'm trying to implement a new application using 10.1.2
It seems like I'm doing it just like in 9.0.5.2
What am I doing wrong??
code.
String applicationConfig = "UfaxAppModLocal";
try{
Converter converter = new Converter();
Converter aCUtility = new Converter();
//String configName = args[0];
//String applicationConfig = args[1];
try {
converter.config.readDB(sysCompRI, applicationConfig);
void readDB(long sysCompRI,String applicationConfig) throws ConverterException
am =
oracle.jbo.client.Configuration.createRootApplicationModule
("Ufax.DBAccess.UfaxAppMod", applicationConfig);
//("ACUtility.ApplicationModule1", "ApplicationModule1Local1");
myTrans=am.getTransaction();
Exception:
Exception in thread main
java.lang.NoClassDefFoundError: oracle.xml.parser.v2.XSLException
     at oracle.jbo.client.Configuration.<init>(Configuration.java:241)
     at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:280)
     at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:482)
     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1457)
     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1435)
     at Ufax.Converter.Config.readDB(Config.java:87)
     at Ufax.Converter.Converter.main(Converter.java:92)
Debugger disconnected from local process.
Application Module XML
<?xml version='1.0' encoding='windows-1252' ?>
<!DOCTYPE AppModule SYSTEM "jbo_03_01.dtd">
<AppModule
Name="UfaxAppMod"
ComponentClass="Ufax.DBAccess.UfaxAppModImpl" >
<Data>
<Property Name ="IS_ABSTRACT" Value ="FALSE" />
<Property Name ="COMPLETE_LIBRARY" Value ="FALSE" />
<Property Name ="IS_LEAF" Value ="FALSE" />
<Property Name ="IS_ROOT" Value ="TRUE" />
<Property Name ="ID" Value ="16a628d6-0102-1000-80f3-c0a8016997c8::Ufax.DBAccess.ApplicationModule1::ApplicationModule" />
<Property Name ="VISIBILITY" Value ="PUBLIC" />
<Property Name ="IS_ACTIVE" Value ="FALSE" />
</Data>
<DesignTime>
<Attr Name="_isCodegen" Value="true" />
<Attr Name="_version" Value="10.1.2.17.96" />
<Attr Name="_deployType" Value="0" />
<Attr Name="_ejbAppModule" Value="false" />
</DesignTime>
<ViewUsage
Name="UFCompView1"
ViewObjectName="Ufax.DBAccess.UFCompView" >
<Data>

Ok it was obvious.
Don't know why it took me two days to figure it out
with the help of support.

Similar Messages

  • BC4J: Simple question about PK generation

    Hi
    I have a table which primary key is based in a sequence.
    So, I would like to make an BC4J app where the user could query by the PK column, but when inserting a new record the field must be disabled, and somehow the sequence should be queried to generate the PK before inserting the row.
    How can I achieve this using BC4J? I could not see any property to set...
    I think this is a very basic question, so there is some resources (like a FAQ) where I can find solutions to similar questions?
    Thanks!
    Luis Cabral

    luis
    one thing you could do is edit the entity object you created for that table, go to the Attribute Settings and select your primary key. where it says Type pull down that box and select DBSequence. then you can either create an on insert trigger that generates the primary key or (i think, haven't tried it) you can specifiy your sequence on the same screen as mentioned above.
    i know there is documentation out there, i just can't remember exactly where. maybe someone else can provide a link?
    here is a link to the "how-tos"
    http://otn.oracle.com/products/jdev/howtos/content.html

  • Testing BC4J - Newbie Question

    Hi all,
    Maybe this is a stupid question: can i put a System.out.println() call into a bc4j method and will this print out to the console when run either in the bc4j tester or in a JSP front-end? Or, how could i check if certain methods in the EO are being called?
    My problem is that i'm testing an overriden doSelect method in an EO and i need to know if the method is actually being called. I've already put a number of println() method calls in but nothing seems to be happening, even if i create a JSP browse page based on the VO.
    Any help is welcome, thank you.

    Michael:
    When you run the tester, you are running the app in 2 tier mode (usually). Your println output should come to the log window or the console (if you use java.exe--see below for more) of the tester. When you run JSP, you run in 3 tier mode. The browser is in one process and the appserver (which includes the servlet code) is running in another process. You have to look at the log window or the console for the appserver (labelled something like "... OC4J Server."
    If your app or appserver runs with javaw.exe, you may not see the println output. To get around this problem, you would run java.exe instead of javaw.exe. JDeveloper will print the command line of the program invoked in its log window. If it says javaw.exe, you can copy that command line, edit it to change javaw.exe to java.exe and run the command line on a clean command prompt.
    Another thing you may want to check is whether you enabled the log window or not. In the IDE, click on the 'View' menu to see if you have 'Log Window' checked.
    Thanks.
    Sung

  • Broken pipe, DMLException: JBO-26061: Error while opening JDBC connection

    Hi,
    We are facing strange problem with oc4j903 container using bc4j getConnection() method.
    We are getting the following error intermitantly using bc4j getConnection() method.
    ApplicationModuleProvider JBO-30003: The application pool (bc4j_paris) failed to checkout an application module due to the following exception:
    oralce.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
    and then it says ,
    java.sql.SQLException: Io exception: Broken pipe.
    It gets connection automatically in a matter of minutes.
    Has anybody faced these problem or anyone has the solution please help us out.
    Thanks,
    Chinna

    Bhaskar -- BC4J related questions are better directed to the JDeveloper forum; that's where the BC4J PMs and developers hang out.
    cheers
    -stevee

  • DMLException: JBO-26061: Error while opening JDBC connection, Broken pipe

    Hi,
    We are facing a strange problem with oc4j903 container using bc4j getConnection() method.
    We are getting the following error intermitantly using bc4j getConnection() method.
    ApplicationModuleProvider JBO-30003: The application pool (bc4j_paris) failed to checkout an application module due to the following exception:
    oralce.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
    and then it says ,
    java.sql.SQLException: Io exception: Broken pipe.
    It gets connection automatically in a matter of minutes.
    Has anybody faced these problem or anyone has the solution please help us out.
    I appreciate your inputs.
    Thanks,
    Chinna

    Bhaskar -- BC4J related questions are better directed to the JDeveloper forum; that's where the BC4J PMs and developers hang out.
    cheers
    -stevee

  • Questions/comments on "How to Use BC4J HTML Field Renderers"

    BTW thanks for getting this HOWTO on custom renderers up. Good stuff. Probably one of the first things someone should read after getting past the first BC4J-JSP tutorial.
    But after having just read it, I have some questions and comments.
    What would be the best way to localize the YES|NO values from the first example? I know I can create property files for resource bundles and get the values from there, but where do I get the users Locale? And given that BC4J has a place for localized field labels, is there some better place (for JDev/BC4J integration) than going off and creating my own property files?
    I was hoping to see examples of actually writing the HTML so I can add properties for validation, etc. The examples were about custom data for the renders rather than custom HTML. I assume that I just output HTML in the renderToString() method and it would just start with "<select" or "<input" not TDs or spans or anything, right? But in such cases, what can I extend / not extend? In the case of lists, I would have to handle all the different control types, right?
    I am confused on control types. There's a control type on the control hints tab and in the HOWTO creates a new propery called MY_CONTROL_TYPE. Why? How do they relate? (and is that question about the RADIOGROUP suppose to be in the HOWTO doc?)
    Can we not get the list control types as options on control hints tab? Or if we are creating our own renders, say for a boolean, I could create different renderers for the different control types (checkbox, select, radio, maybe selectYesNo, selectTrueFalse,...) or create one with a control type setting for them all. Which should I do when? And is there a way to expose these control types in the control hints tab?
    BTW do these custom renders work the same in UIX-JSP and UIX-XML?
    Since we are extending Oracle's classes we need more complete JavaDocs, not just the public methods. For example the HOWTO uses "ds" from PickList. BTW I have to give my opinion on Java style, maybe consider coding like "this.ds" for clarity. But anyway....
    thanks for all the help!

    Some comments:
    1. the provided renderers read the properties every time becuase they are meant to be 'generic' and there are possible parameter differences between one attribute and another. You can easily hard-code the property values into the renderer implementation and 'never' look at the properties for parameters. The same applies for the dynamic renderer.
    2. The set of renderers applis to both UIX JSP and JSP. There some bugs in the UIX JSP that prevent this in 9.0.2, but they will be fixed in Jdev 9.0.3.
    3. The 'control type' is a shortcut way to select some of the default renderers. If you specify the 'Renderer' properties, they take precedence over any control types selected at design-time.
    4. A cool way to re-use renderers is to create a new domain class and setup the renderer properties at that level. You can then use tihs domain type in your entity objects. all the rendering selection will happen automatically.
    5. You can retrieve the current locale by using the ApplicationModule.getSession().getLocale() , make sure you use this method instead of the default locale since a single web application may be used by different users with different locale settings. We take the http locale information and map it into the application module's locale. If you need locale specific values, use resource bundles.

  • BC4J - Many-to-Many Question

    I have modeled in a bc4j project a many to many relationship between AUTHOR and BOOK using an association table BOOK_AUTHOR.
    My BC4J objects to model this are:
    - 3 entity objects (BOOK,AUTHOR,BOOK_AUTHOR)
    - 1 many-to-many association (book_author_association)
    - 2 view objects (book_view,author_view)
    - 1 many-to-many viewlink (BookAuthorViewLink)between book_view and author_view.
    - 1 app_module with all the correct vo/viewLinks added.
    - I have also created the row/vo interfaces for all of my client methods.
    So my questions are:
    (1)What is the best way to add an author to a book?
    I’ve tried doing it in the bc4j tester and it only adds to the author table not the association table. I’ve also tried the following code in my BookViewRowImpl:
    public AuthorViewRow createEmp(String name) {
              AuthorViewRow newAuthor = (AuthorViewRow) getAuthorView().createRow();
              getAuthorView().insertRow(newAuthor);
              newAuthor.setAuthorNam(name);
              return newAuthor;

    I've had the same problem.
    I'solved it using three different views. In your case there is a view "AuthorsView", a "BooksView" and a "AuthBookRelationsView", all of them connected with the appropriate one-to-many Associations and ViewLinks.
    Creating a new many-to-many Association means first creating or selecting the corresponding rows in "BooksView" and "AuthorsView" and then inserting the correspondig row into the "AuthBookRelationsView".
    The many-to-many association or the many-to-many view can only be used for reading, but not for creating a new many-to-many association.
    Don't know if this is the best way to do, but however, it works! I think that BC4J might have been a little bit smarter here...
    By the way, I'm using a cascading delete constraint on both associations to the intersection table. This results in both associations being composite associations, which itself is a source of a lot of trouble with BC4J. But however, it is quite useful as I do not have to bother with maintaining the intersection table once one of the master entities is deleted. Please ask, if you need more details...

  • BC4J + Struts: Design questions!

    OK, I'm wanting to use Struts with BC4J and have a design question for you BC4J users and gurus.
    Here's how I think things would work:
    1. User requests page
    2. Struts ActionServlet calls perform() on Struts ActionForm
    3. Struts ActionForm instantiates BC4J AppModule and calls business method
    4. BC4J AppModule instantiates necessary BC4J ViewObjects and performs business operations which return data
    5. Struts ActionForm receives value objects from BC4J AppModule
    6. Struts ActionForm populates Struts FormBean
    7. Struts ActionForm forwards to Struts JSP which displays Struts FormBean
    I prefixed the components with Struts/BC4J to keep things clear where things belong.
    Now, here are my questions:
    In step 3, what's the best method of doing this? Do I need to do JNDI lookups every time? What's the performance overhead of this? Anyone have any best-practice code that does this?
    Is this the accepted way of doing things? Is there a better way of designing this system?
    Thanks!

    In Step3 you should use the ApplicationModule pooling framework, especially if you are trying to work in stateful mode because the pooling automatically handle the AM activation/passivation.
    There are different way to go at it.
    If you are using the BC4J custom tag library and have an ApplicationModule tag in your jsp, the pooling is already initialize. By the time your action is trigger you just need to retrieve the am using the application id:
    in your jsp:
    <jbo:ApplicationModule id="myAM" ... />
    in your Action implementation:
    HttpContainer container = HttpContainer.getInstanceFromSession(request.getSession());
    SessionCookie cookie = container.getSessionCookie("myAM");
    ApplicationModule am = null;
    if (cookie != null)
    am cookie.useApplicationModule();
    This AM id can be passed as URL parameter...
    If you do have a JSP with an AM tag you need to create the pool with findSessionCookie call.
    For more info about AM pooling look at the end of this thread for Steve resources:
    http://forums.oracle.com/forums/message.jsp?id=912431&gid=513211
    This is what we are currently doing for to provide support for BC4J in Struts for our next release.
    Charles.

  • BC4J Question: How does AM and Connection Pooling work?

    Hello everybody,
    we are just trying to understand what exactly happens when a BC4J Application Module is created / when a AM is checked out of the pool with respect to Connection and Application Module Pooling. Especially we would like to understand what ConnectionStartegies, EnvInfoProvider and SessionCookies exactly do and when and how to customize them. Especially we would like to use features like virtual private databases (VPD) and proxy authentication (a feature of the Oracle OCI JDBC driver) with BC4J application modules. We found the HowTo about using JAAS and VPDs with BC4J (http://otn.oracle.com/products/jdev/howtos/bc4j/bc4jvpdjaas.html) but there are still questions, e.g. when is the afterConnect() method of an ApplicationModuleImpl called? During the instanciation of an AM or every time it's check out of the pool?
    Any info on this topic would be very welcome!
    Regards
    Stefan

    Hi,
    1. Setting jbo.doconnectionpooling=false ,
    connection pool still exists.
    Is it correct ? When you set this parameter to false, you are saying that Connection Pool is not managed by AM, so you need to specify a JNDI Name in Application Module to use a Pool not managed by AM.
    2. There is one situation to set
    jbo.doconnectionpooling=true. The article said
    "when you have a large number of application
    module pools all needing to database connections
    from the same underlying application user at the
    database level. In this case, the many application
    module pools can perhaps economize on the total
    overall database sessions by sharing a single,
    underlying database connection pool of JDBC
    connections, albeit at a loss of efficiency of each
    one. This choice would be favored only if total
    overall database sessions is of maximum priority. "
    Does it mean that if we set it to true when we
    have many many AM instances and we cannot afford to
    have such number of connection instance in the pool
    ? It's means that the JDBC connections will be shared avoid new Connection at time.
    Normally i use Connection Pool not managed by Application Module.
    Bye

  • Question about BC4J data tags, Oracle sessions and Locking!

    Hi ,
    I have seen numerous examples of JSPs using data tags and in all the examples the data tag for the application module has the "username" and "password" harcoded in it.
    My questions are:
    1) For a stateful application should we be including the username and password in every JSP page. I personally believe that we should not.
    2) If we have a username and password in every JSP page will it not start a new ORACLE user session and if so will it not cause locking problems?
    3) If we don't hard code the username and password in every JSP page, will it reuse the same ORACLE session ?
    4) How do we avoid locking problems when we use data tags?
    5)I can understand the inclusion of username and password in every JSP page if it is a stateless application but again Is there a way we can avoid hardcoding the username and password in every single page?
    I would appreciate if some one can let me know if any of my assumptions are incorrect.
    JDeveloper Team/Juan any advice?

    The username and password are optional. They can be provided via the connections.properties file. The multple entries for username and password don't mean that separate connection are made. The first time the ApplicationModule tag is encountered, your application instance is created. If you are running in reserved mode (look at your releasePageResources tag) the application instance is kept until your Http session times out. If you are running in Stateful or Stateless mode, you application instance is returned to the application pool and retrieved the next time you need an instance. Please refer to the application pool documentation and to the source in oracle\jbo\common\ampool provided in jbohtmlsrc.zip.

  • ADF/BC4J EO and VO cache question

    I created an EO off a simple table and a corresponding VO. I created a Struts/JSP app to display, add, and update the records. When I add or update records through the Struts/JSP app, I see my add and updates on the display page --- this is expected. However, when I add or update records outside of the ADF/BC4J framework (i.e., via SQLPlus), I don't see my changes from the Struts/JSP display page. How do I turn caching off at the EO and VO level so that they are always getting the latest and greatest from the database?

    Where do I put the code? In the *Impl.java file of the application module?  If so where?  In the corresponding getter method for that viewobject?                                                                                                                                                                                                                                                                                                   

  • Bc4j.xcfg reload question

    Hi,
    since Jdev 9.0.3.3 I am facing a strange issue:
    whenever I compile or try to run my BC4J-application a dialog pops up with the message "externally modified file, reload bc4j.xcfg", although the option "silently reload file" is set in the preferences dialog of JDev.
    Does anyone have an idea how to disable this message?
    TIA,
    Stefan

    This is an unfortunate bug in the IDE. The good news is that it is fixed in 9.0.5.1. I have not heard of any attempt to backport the fix to 9.0.3.3.
    Ray

  • BC4J Application Pool Question

    Hi,
    I have created a Application Pool using
    PoolMgr.getInstance().createPool(poolname,
    appModName,connectString,env);
    Now the question is, if the connectString is invalid, even then
    it creates a pool. Is there a way where i can check the validity
    of the connect string before we create the app pool or during
    the creation of app pool.
    Thanks
    Ramna

    I recommend that you immediately try and use an application
    module from that pool after the pool has been created. If the
    use (checkout) call fails then simply remove the pool from the
    pool manager which will also release the pooled application
    modules. If not, the application module can be released. For
    example:
    try
    // Only perform if the named pool did not already exist.
    ApplicationPool pool =
    PoolMgr.getInstance().createPool(poolName, appModName,
    connectString, env);
    ApplicationModule appModule = pool.checkout();
    pool.checkin(appModule);
    catch (Exception e)
    PoolMgr.getInstance().removePool(poolName);
    // Do other application exception handling here.
    This strategy has the advantage of not requiring an "extra" JDBC
    connection to test the connection info. The same JDBC connection
    that was used during the checkout call will be reused when the
    application reuses the application module that was checked out
    from the application pool above.
    Please note that 9i supports "session" level connection strings.
    This allows a single application pool instance to support
    multiple JDBC connection strings. With this support the strategy
    above changes slightly; instead of having to test/remove the pool
    if the connection fails upon the first checkout the connect
    string can be dynamically validated when it is provided by the
    application. Please see the javadoc for the class,
    oracle.jbo.common.ampool.EnvInfoProvider for more information
    about dynamically providing/validating JDBC connection
    information.
    Thanks,
    JR

  • Question about the Application Module in bc4j

    Hi all,
    I've been playing with JDeveloper9i for a little ovar a week only and have been trying to get access to a BC4J View Object in order to execute a runtime specific query on it, by passing 2 user input values to the object, and setting the WHERE clause by a call to the setWhereClause() method on the View Object. The only way i could come across to get hold of the View Object was to create an Application Object (in this case its called Bc4jModule) and then to use a call to a custom method in the Application Module Implementation which i created and set to be a Client Method.
    The code is as follows:
    In the Application Module (Bc4jModuleImpl)
    public int authenticateUser(String strLogin, String strP_Word)
    getUsersView().setWhereClause(" LOGIN='" + strLogin + "' AND P_WORD='" + strP_Word + "'");
    System.out.println(getUsersView().getWhereClause());
    getUsersView().executeQuery();
    return getUsersView().getRowCount();
    In the JClient panel (JButton action):
    Bc4jModule app = (Bc4jModule)panelBinding.getApplicationModule();
    int n = app.authenticateUser(txtUser.getText(), txtPassword.getText());
    System.out.println("Number of rows queried = " + n);
    I would like to know if this is the best way of doing a custom query on the Entity Object or is there some other way that i'm missing?

    The best way would be to:
    [list=1]
    [*]Design a view object in JDeveloper which has bind variables for the parameters you need to pass in at runtime. For example, your WHERE clause for your view object would look like:
    LOGIN = :0 and P_WORD = :1[*]Add an instance of that view object definition to your application module
    [*]Write your custom AppModule method like this:
    public boolean authenticateUser(String strLogin, String strP_Word)
      getUsersView().setWhereClauseParams(new Object[]{strLogin,strP_Word});
      getUsersView().executeQuery();
      return getUsersView().first() != null;
    }[list]

  • UIX-JSP vs. BC4J-JSP wizard based question

    In BC4J-UIX wizard based forms there exists a button to Insert new rows. In the UIX-JSP wizard based forms there is not. Is this an option I overlooked somewhere or does this need to be hand coded? Detailed instructions on how to implemnt the Insert row capability in UIX-JSP are appreciated.
    Ed.

    In BC4J-UIX wizard based forms there exists a button to Insert new rows. In the UIX-JSP wizard based forms there is not. Is this an option I overlooked somewhere or does this need to be hand coded? Detailed instructions on how to implemnt the Insert row capability in UIX-JSP are appreciated.
    Ed. Ed -
    I'm a bit confused by your reference to the BC4J-UIX and UIX-JSP wizards. There is a 'new' link in wizard-generated
    BC4J JSPs and a 'Create' button in wizard-generated UIX JSP browse/edit forms. Is this what you mean?
    Regards,
    Lynn
    Java Tools Team

Maybe you are looking for

  • Goods receipt inbound delivery using old goods movement transactions

    Hi! I have a client who is still using the old goods movement transactions in the new ECC system. I would like to confirm whether it is possible at all to receipt inbound delivery (from shipping notification) using any of the old goods movement trans

  • Time Machine error after restoring all data

    Sorry, I've tried to run through various trouble shooting guides on Time Machine (notably here http://pondini.org/TM/C4.html etc) but haven't been able to work out a solution. I just had my iMac harddrive replaced and earlier did a full restore of th

  • 15" Brand New (June 2009) Macbook Pro and Capturing HD Footage

    Right now I capture HD footage in FCP from my Canon XH A1 via firewire 400 onto an external 7200 rpm hard drive connected via firewire 800. My iMac is getting a bid dated and I would like to upgrade to the highest end 15" MBP - except I'm not sure ho

  • FORECAST VS SALES

    Hi Guys, One of my client wants to compare his monthly sales against the forecast ( for monthly ).I have tried  linking using crystal reports and its showing wrong values . Pls  help me guys in building a query for this. Regards, P.V

  • Migrate from Oracle 8.1.6 Release 2 to 10 or 11g

    Dear All, Please tell me the best solution of migrating from 8.1.6 to 10g or 11g. The operating system is Windows server 2003 and it would remain the same. The database size is almost 6GB.