Customization of BC4J
Hi,
I need to extend a SupplierSitesVO.
I downloaded the VO from the server to my local machine and opened the VO in Tutorial.jpr
I also brought all the dependent objects by referring to server.xml to the respective folder, but when I am trying to rebuild Tutorial.jpr, its showing me lots of compilation errors saying that many components not found.
So, my questions are,
1>What objects do i need to download into my local machine in order to compile successfully the above?
2> I have downloaded apps.zip file and included the path in the classpath option in JDeveloper but it does not help. What other files do i need to download to do any OA extension?
Please help me out.
Thanks,
Arun
Many thanks for the reply.
Let me try that.
One more question is Can I substiture a Controller at runtime?
I need to modify a controller for a specific requirement here but not sure whether we can substitute that.
Because as far as I know only BC4J components can be substituted.
If Controller can not be substituted like VO and EO, then do I need to directly modify the Oracle original controller file?
If I do so how to avoid any oracle upgrade/patch which would undo my changes?
Please help me out on this.
Thanks,
Arun
Similar Messages
-
Error message customization in BC4J
Is it possible to customize messages (eg. translate them) in order to make them more clear for users ?
TIA
TullioSee the following set of topics in the Online Help:
Developing Business Components
Working with View Objects, View Links, Application Modules and Clients
Creating and MOdifying View Object, View Links and Application Modules
Ways to Handle Errors -
How does customization of BC4J works? (Does anyone use it?
What I have to do if I have more than one ApplicationModule that use an imported package, which have a ViewObject to be extended (i have to change n .jpx files).
The documentation of JDeveloper 9i doesn't say what to do in the case of an EJB deploy. Anyone can say me what I have to do?Hi Diego,
How does customization of BC4J works? (Does anyone use it?
What I have to do if I have more than one ApplicationModule that use an imported package, which have a ViewObject to be extended (i have to change n .jpx files).Here's what you can do:
1) Right-click the .jpx file and choose Import Business Components (note that it's not sufficient to do a java import--you have to do this to change the jpx file).
2) Then, when you create view objects, use the base view object you created in the Extends field in the wizard.
The documentation of JDeveloper 9i doesn't say what to do in the case of an EJB deploy. Anyone can say me what I have to do? Actually, it does. Choiose Help | Help Topics, and see
+Packaging and Deploying
--Ways to Deploy Business Components for Java
+----Deploying BC4J as an EJB Session Bean
It's a pretty simple process.
Then, all you have to do is make sure your client uses the right Configuration (creating the deployment profile will automatically generate a Configuration). If you're using JClient or have inserted a jbo:ApplicationModule tag into a JSP from the component pallette, you'll get to choose a configuration from a dropdown list. Choose the one the Wizard created (if you've only deployed once, it will be the one that doesn't end in Local)--for example, "MyApplicationModule9iAS"
Hope this helps,
Avrom -
BC4J: app. customization - it just doesn4t work !?!?
Here the situation: Using the interface to customize the application, it doesn4t work ... make changes directly on the files, it doesn4t work .... so, what4s the way to make few basic customization ?
1) I4ve changed the column alias on the views (to don4t show the column name) but It doesn4t work. Although I consider conceptually wrong, I4ve tryid to change other levels in the business component, but it didn4t work either.
2) Select statement: it allows you to put correct commands (expert mode), but it doesn4t work !?!?
3) Is there any way to don4t show the entity primary key ?? Why show the primary key to the user when we can show descriptions ?!
4) Using more than one table (with relationship between them) it doesn4t allows you to hide the foreign keys ?!?! How to do it ?
I4d hope there are simple answers for these basic, simple and common problems ...if you using the data web bean implementation you can hide columns by not including in the this call:
RowEditor.setDisplayAttributes("NotAPkColumn, AlsoNotAPkColumn");
in the xxxView_EditPanel.jsp.
null -
3.2;BC4J; StatusBarControl customization?
Hi,
Any property/way for StatusBarControl to show our message on the message Area?
(by default message area shows the view object which is bound to the Grid).
nullIsn't that possible to edit/set the message area? Please advice.
-
Automatic creation of thumbnail image in BC4J App
I have created a BC4J application using the default wizards that displays the content of the following table:
CREATE TABLE EMPLOYEE_PHOTO (
ID NUMBER (3) NOT NULL,
DESCRIPTION VARCHAR2 (20),
PIC ORDIMAGE,
THUMB ORDIMAGE,
EMPLOYEE_NAME VARCHAR2 (50))
The 'browse' jsp displays the id, description and thumb image.
The 'edit' jsp allows the user to enter the description, employee_name and upload file details for the pic image.
I have 2 problems with the application.
1. How do I set the 'browse' jsp to display the thumb image as an anchor tag that points to the 'edit' jsp ?. I would also like to dynamically set the hint text for the thumb image to 'employee_name' from the database table.
2. In the 'edit' jsp I want to invoke the Intermedia processCopy method to automatically create the thumbnail image from the image file specified by the user. How do I accommodate this method into the default code ?
Thanks in advance
ChrisChris,
Basically, you have to use the "manual" mode of the rendering instead of the "automatic" mode. The JDev Wizard
generated JSP page uses the "automatic" mode which is hard to customize. The characteristic of the "automatic"
mode is using the <AttributeIterate> tag to iterate through all attributes. You have to change the following JSP files
to achieve what you wanted.
1. DataTableComponent.jsp
<%@ page language="java" import = "oracle.jbo.html.*, oracle.jbo.*" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%
RequestParameters params = HtmlServices.getRequestParameters(pageContext);
String editTargetParam = params.getParameter("edittarget");
if ("null".equalsIgnoreCase(editTargetParam))
editTargetParam = null;
%>
<jbo:DataSourceRef id="dsBrowse" reference='<%=params.getParameter("datasource")%>' />
<table class="clsTable" cellspacing="1" cellpadding="3">
<tr class="clsTableRow"><%
if (editTargetParam != null)
%>
<th class="clsTableHeader"> </th>
<th class="clsTableHeader"><a href="<jbo:UrlEvent targeturlparam='edittarget' event='Create' datasource='dsBrowse' extraparameters='<%=originURL=" + params.getParameter("originURL")%">'/>">New</a></th><%
%>
<th title="<jbo:ShowHint datasource="dsBrowse" hintname='TOOLTIP' dataitem="Id"/>" class="vrTableHeader"><jbo:ShowHint datasource="dsBrowse" hintname="LABEL" dataitem="Id">##Column</jbo:ShowHint></th>
<th title="<jbo:ShowHint datasource="dsBrowse" hintname='TOOLTIP' dataitem="Description"/>" class="vrTableHeader"><jbo:ShowHint datasource="dsBrowse" hintname="LABEL" dataitem="Description">##Column</jbo:ShowHint></th>
<th title="<jbo:ShowHint datasource="dsBrowse" hintname='TOOLTIP' dataitem="Thumb"/>" class="vrTableHeader"><jbo:ShowHint datasource="dsBrowse" hintname="LABEL" dataitem="Thumb">##Column</jbo:ShowHint></th>
</tr><%
Row currentRow = dsBrowse.getRowSet().getCurrentRow();
%>
<jbo:RowsetIterate datasource="dsBrowse" changecurrentrow="false" userange="true">
<jbo:Row id="aRow" datasource="dsBrowse" action="Active"/><%
String rowStyle;
if (aRow == currentRow)
rowStyle = "clsCurrentTableRow";
else
rowStyle = "clsTableRow";
%>
<tr class="<%=rowStyle%>"><%
if (editTargetParam != null)
%>
<td class="tablecell"><a href="<jbo:UrlEvent targeturlparam='originURL' event='Delete' datasource='dsBrowse' addrowkey='true'/>">Delete</a>
</td>
<td class="tablecell"><a href="<jbo:UrlEvent targeturlparam='edittarget' event='Edit' datasource='dsBrowse' addrowkey='true' extraparameters='<%="originURL=" + params.getParameter("originURL")%>'/>">Edit</a>
</td><%
%>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Id"/>" class="tablecell" >
<jbo:RenderValue datasource="dsBrowse" dataitem="Id">##Cell</jbo:RenderValue>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Description"/>" class="tablecell" >
<jbo:RenderValue datasource="dsBrowse" dataitem="Description">##Cell</jbo:RenderValue>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Thumb"/>" class="tablecell" >
<A href="<jbo:UrlEvent targeturlparam='edittarget' event='Edit' datasource='dsBrowse' addrowkey='true' extraparameters='<%="originURL=" + params.getParameter("originURL")%>'/>">
<jbo:EmbedImage datasource="dsBrowse" mediaattr="Thumb" altattr="EmployeeName" />
</A>
</td>
</tr>
</jbo:RowsetIterate>
</table>
2. DataEditComponent.jsp
<%@ page language="java" import = "oracle.jbo.html.*" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%
RequestParameters params = HtmlServices.getRequestParameters(pageContext);
String dsParam = params.getParameter("datasource");
String formName = dsParam + "_form";
String rowAction = "Current";
%>
<jbo:DataSourceRef id="dsEdit" reference="<%=dsParam%>" />
<jbo:OnEvent name="edit" datasource="dsEdit">
<% rowAction = "Get"; %>
</jbo:OnEvent>
<jbo:OnEvent name="create" datasource="dsEdit">
<% rowAction = "Create"; %>
</jbo:OnEvent>
<form name="<%=formName%>" action="<%=params.getParameter("targetURL")%>" method="post" enctype="multipart/form-data">
<jbo:Row id="rowEdit" datasource="dsEdit" rowkeyparam="jboRowKey" action="<%=rowAction%>">
<table border="0">
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Id"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="Id">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Id"/>">
<jbo:InputRender datasource="dsEdit" dataitem="Id" formname="<%=formName%>" />
</td>
</tr>
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Description"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="Description">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Description"/>">
<jbo:InputRender datasource="dsEdit" dataitem="Description" formname="<%=formName%>" />
</td>
</tr>
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Pic"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="Pic">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Pic"/>">
<jbo:InputRender datasource="dsEdit" dataitem="Pic" formname="<%=formName%>" />
</td>
</tr>
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="EmployeeName"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="EmployeeName">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="EmployeeName"/>">
<jbo:InputRender datasource="dsEdit" dataitem="EmployeeName" formname="<%=formName%>" />
</td>
</tr>
</table>
<jbo:FormEvent event="update" datasource="dsEdit" addrowkey="true" />
</jbo:Row>
<%-- Pass along originURL parameter --%>
<input type="hidden" name="originURL" value="<%=params.getParameter("originURL")%>">
<input type="submit" value="Update">
<input type="reset" value="Reset">
</form>
3. DataHandlerComponent.jsp
<%@ page language="java" %>
<%@ page errorPage="errorpage.jsp" %>
<%@ page import="oracle.jbo.ApplicationModule" %>
<%@ page import="oracle.jbo.html.*" %>
<%@ page import="oracle.ord.im.*" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%
RequestParameters params = HtmlServices.getRequestParameters(pageContext);
String targetParam = params.getParameter("targetURL");
String amId = params.getParameter("amId");
String voName = params.getParameter("jboEventVo");
%>
<%
if (voName != null)
{ %>
<jbo:DataSource id="ds" appid="<%=amId%>" viewobject="<%=voName%>" />
<jbo:OnEvent name="update">
<jbo:Row id="myrow" datasource="ds" rowkeyparam="jboRowKey" action="Update" />
<%
myrow.setAttribute("Thumb", new OrdImageDomain());
String myRowKey = myrow.getKey().toStringFormat(false);
%>
<jbo:PostChanges appid="<%=amId%>" />
<jbo:Row id="theRow" datasource="ds" action="Find" rowkeyparam="jboRowKey" >
<%
OrdImageDomain pic = (OrdImageDomain) theRow.getAttribute("Pic");
OrdImageDomain thumb = (OrdImageDomain) theRow.getAttribute("Thumb");
pic.processCopy("scale=\"0.1\"", thumb);
%>
</jbo:Row>
</jbo:OnEvent>
<jbo:OnEvent name="delete">
<jbo:Row id="delrow" datasource="ds" rowkeyparam="jboRowKey" action="Delete" />
</jbo:OnEvent>
<%-- Scroll event handling --%>
<jbo:OnEvent list="firstset, nextset, previousset, lastset">
<jbo:RowsetNavigate datasource="ds" />
</jbo:OnEvent>
<%-- Navigation event handling --%>
<jbo:OnEvent list="first, next, previous, last">
<jbo:RowsetNavigate datasource="ds" />
</jbo:OnEvent>
<%-- Query event handling --%>
<jbo:OnEvent name="Del Criteria" >
<% String remove = params.getParameter("index"); %>
<jbo:ViewCriteria id="vc" datasource="ds" action="append">
<jbo:CriteriaRow id="row<%=remove%>" index="<%=remove%>" clearall="true" />
</jbo:ViewCriteria>
</jbo:OnEvent>
<jbo:OnEvent name="Clear All" >
<jbo:ViewCriteria id="vc" datasource="ds" action="new" />
</jbo:OnEvent>
<jbo:OnEvent list="Search, Add Criteria" >
<% String rowParam = params.getParameter("nRows");
int nRows = 0;
if (rowParam != null)
try { nRows = Integer.parseInt(rowParam); }
catch (Exception ex) { }
%>
<jbo:ViewCriteria id="vc" datasource="ds" action="new">
<% for (int index=0; index < nRows; index++)
{ %>
<jbo:CriteriaRow id="row<%=index%>" >
<jbo:AttributeIterate id="attrvc" datasource="ds" queriableonly="true">
<% String item = attrvc.getName();
String value = params.getParameter("row" + index + "_" + item); %>
<jbo:Criteria dataitem="<%=item%>" value="<%=value%>" />
</jbo:AttributeIterate>
</jbo:CriteriaRow>
<% } %>
</jbo:ViewCriteria>
</jbo:OnEvent>
<% }%>
<%-- Transaction event handling --%>
<jbo:OnEvent name="Commit" >
<jbo:Commit appid="<%=amId%>"/>
</jbo:OnEvent>
<jbo:OnEvent name="Rollback" >
<jbo:RollBack appid="<%=amId%>"/>
</jbo:OnEvent>
Hope this helps.
richard
</a> -
I have looked at BC4J and it looks good. Buy my question is that isn't this frame work in direct conflict with EJB entity beans. I know lot of stuff that is there in BC4J should have been in EJB enitiy beans, but as a developer why should I go with BC4J and not the standard EJB stuff considering the fact that BC4J is properietery to Oracle?Any thoughts?
Vimal,
Without going into exhaustive detail here, I would like to recommend that you take a look at the BC4J Technical White Paper available from the JDeveloper page on OTN (in the 3.0 Technical Information section):
http://technet.oracle.com/products/jdev/info/techwp20/wp.html
Amoung other things to note, BC4J is based on pure Java, and is what we consider a 'white box', meaning, you as a developer have complete control over what is going on. You can extend any of the code generated to customize it.
Primarily though, the major benefit of BC4J is that we have taken care of most of the complicated communication code for you. Communication between the client and the data server, transaction handling, row locking, etc are already written for you. You just use, extend, customize what we have provided.
In addition, BC4J allows you flexibility in your deployment environment decision. Regardless of where and how you deploy your BC4J Application Module, the client is unchanged.
Those are the key advantages. Again, for more details, I would take a look at the white paper to see if it more fully addresses your questions. -
Migrate OAF MDS customizations from TEST to PROD from UNIX
1. Copy the the files of JDEV_USER_HOME/jdevbin to TEST or PROD UNIX mid-tier
jdevbin/jdev/appslibrt/oamdsdt.jar
jdevbin/jdev/lib/mdsdt.jar
jdevbin/mds/lib/mdsrt.jar
jdevbin/BC4J/lib/collections.jar
jdevbin/lib/xmlparserv2.jar
jdevbin/jdev/appslibrt/share.jar
jdevbin/jdev/appslibrt/uix2.jar
jdevbin/jdbc/lib/classes12dms.jar
jdevbin/lib/dms.jar
jdevbin/jdev/appslibrt/oamdsdt.jar
2. environment variable for XMLExporter/XMLImporter:
($PRO_LIB is the path pointing to the jar files)
CLASSPATH=\
$PRO_LIB/jdevbin/jdev/appslibrt/oamdsdt.jar:\
$PRO_LIB/jdevbin/jdev/lib/mdsdt.jar:\
$PRO_LIB/jdevbin/mds/lib/mdsrt.jar:\
$PRO_LIB/jdevbin/BC4J/lib/collections.jar:\
$PRO_LIB/jdevbin/lib/xmlparserv2.jar:\
$PRO_LIB/jdevbin/jdev/appslibrt/share.jar:\
$PRO_LIB/jdevbin/jdev/appslibrt/uix2.jar:\
$PRO_LIB/jdevbin/jdbc/lib/classes12dms.jar:\
$PRO_LIB/jdevbin/lib/dms.jar:\
$PRO_LIB/jdevbin/jdev/appslibrt/oamdsdt.jar
3. for -mmddir needed in XMLExporter/XMLImporter:
copy the following files of JDEV_USER_HOME\myhtml\OA_HTML\jrad to TEST or PROD UNIX mid-tier
JRADElementList.xml
OAElementList.xml
UIXElementList.xml
4. Write a Unix shell script to export from TEST and import to PROD. (You may register it in Oracle apps to let the developers to promote it themselves using the assigned responsibility)
Notice:
1. Oracle puts OAF customization together with Oracle seeded customizations. It's impossible to tell them apart just from the OAF MDS document names.
2. Using responsibility_id in the document name to get the application_id from the apps table, you'll get an different application_id than the application_id in the document name.
3. The function_id in the document name is not consistent with the function_id in the apps table. The function_id in apps table has null value.You may also use a PC to migrate OAF MDS from TEST to PROD. Instead of running an Unix script on the TEST or PROD mid-tier, you may write a batch file and run it on your PC.
-
How to customize SORT event in the View Form ?
I'm using Jdevelper 9.0.3 with BC4J+UIXML, and I need customize the View Object Query, including "bind variables" as:
SELECT A.COD_CLIENTE,
A.NUM_TESTE,
A.NOM_TESTE
FROM TESTE A
WHERE A.COD_CLIENTE = :1
I create the java class for prepare assign values to View Object as:
//Nome da Package da Tela Detail
package br.com.siadem.siaed.ed00010;
// Importa as Bibliotecas necessárias
import oracle.jbo.ViewObject;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.Page;
import oracle.cabo.servlet.event.PageEvent;
import oracle.cabo.servlet.event.EventResult;
import oracle.cabo.data.jbo.servlet.bind.*;
import oracle.cabo.ui.data.BoundValue;
import oracle.cabo.ui.data.DataBoundValue;
import br.com.siadem.siaed.util.*;
public class FunPreQuery
public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
TrataDadosSessao varDadosSessao = new TrataDadosSessao();
// Configura os Parametros
String valor1 = varDadosSessao.getCodCliente();
// Cria o objeto ViewObject para a difinição dos parametro na Query
ViewObject view = ServletBindingUtils.getViewObject(context);
// Configura os parametros na query do ViewObject
view.setWhereClauseParam(0,valor1);
// Executa a Query
view.executeQuery();
// Retorna o Resultado para a Página
return new EventResult(page);
This works very well customizing the "Search" event in the View form as:
<event name="search" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="TesteView1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="TesteView1" >
<!-- search for the view criteria -->
<bc4j:findByExample>
<bc4j:exampleRow ignoreCase="true" >
<bc4j:exampleAttribute>
<bc4j:nameBinding><bc4j:parameter name="attrName" /></bc4j:nameBinding>
<bc4j:valueBinding><bc4j:parameter name="attrValue" /></bc4j:valueBinding>
</bc4j:exampleAttribute>
</bc4j:exampleRow>
</bc4j:findByExample>
<method class="br.com.siadem.siaed.ed00010.FunPreQuery"
method="FunConfiguraQuery"/>
<!--<bc4j:executeQuery/>-->
<!-- store the current search criteria as page properties -->
<bc4j:setPageProperty name="attrName" >
<bc4j:parameter name="attrName" />
</bc4j:setPageProperty>
<bc4j:setPageProperty name="attrValue" >
<bc4j:parameter name="attrValue" />
</bc4j:setPageProperty>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
I'm use the sortable columns with <bc4j:sortablecolumn> as:
<bc4j:column attrName="NomTeste">
<columnHeader>
<bc4j:sortableHeader/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
But, the "Sort" event does not enable a manual control for call Java Class. When user click in any sortable column, occur the follow error:
oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT A.COD_CLIENTE, A.NUM_TESTE, A.NOM_TESTE FROM TESTE A WHERE a.cod_cliente = :1 ORDER BY A.NUM_TESTE ASC
Anybody know to implement this functionality ?Ok, the solution:
Sort BC4J table with reduced view objects -
ADF customization: AM(Application Module) not picking up customize changes.
Hi All,
We have customize curtain ADF BC4JC objects, from the seeded application, but the issue is the Extended AM which is consuming the customize is running after some tweaking in the adf-config.xml file.
But problem is its not picking up any customize changes, can someone tell how to debug the customization related issues in bc4j itself.
or tell us is it not possible to see the customize changes in model layer of ADFBC.
Thanks
VIpinHi All,
We also noticed onething in sandbox, when we are deploying the changes to sandbox, extactly two stantus are coming there
|-> merged (o) sign is reflecting it
|-> add on layer sing is reflecting it .
we noticed that merged layer changes we are able to see in the application but added layer changes are not coming, and we are not exactly sure when a layer is merged.
Added we are fine.
Thanks
Vipin -
ISetup new custom interface using BC4J/java class
Hi,
I am able to create new custom interface using the link :- How to setup an user to be Oracle iSetup Super user ? but I have not seen anything for BC4J filter set, as per oracle iSetup developer guide clearly explains step by step process how to create custom BC4J interface type, but they have not mention how to add filters, as per oracle developer guide we have to use 'iSetup Framework' for BC4J, if we select type as 'iSetup Framework' then we don't have option to add filter parameters.
Any idea how to see existing iSetup interface repository values, Search shows the result, but we can't go in details? any idea to see this?
Oracle have good interface repository but most of them does not have option to filter, and update so I want to customize them by adding new interfaces with filterable and update option
Regards
AnilFirst, be sure your properties file is in the root of the classpath.
The Messages.properties or Messages_en.properties should be in the WEB-INF/classes/ directory of the war or as a root file of a jar included in the classpath (WEB-INF/lib).
If it doesn't work, try adding a "/" before the file name. The classloader will try to find it as a root file of the classpath.
For example:
ResourceBundle messages = ResourceBundle.getBundle("/Messages", locale);
If you are using sun appserver, the classloader hierarchy is configured by default from inside the war to outside, so it will search first in the WEB-INF/classes/Messages_en.properties and then it will search the file inside each jar file in WEB-INF/lib.
If you want more information, check the classloader hierarchy of the appserver you are using.
Hope it helps. -
Struts bc4j date pick window problem
i'm using bc4j and struts in jdeveloper 9.0.3
i generated application using the wizard
running it using the jdeveloper oc4j works fine
when i deploy it to remote stand alone oc4j
the application work fine except for the date chooser button which suppose to open a window in which the user pick up a date. the button does not appear and there is a message "calendar for date entry assistance"
when i press the link and explorer error jump telling a run time error occurred (object expected).
a) i need a solution
b) how can i customize the calendar objectI've had problems similar to this when building portlets that use BC4J. When you put the same portlet on a page twice, the portal "parallel page engine" calls the portlet renderer with two threads that share the same HttpSession. (Very similar to your multi-frame case) I had to add some code like this in my renderer class:
HttpSession sess = request.getSession();
synchronized (sess) {
// fetch appmodule, do stuff, return appmodule
This effectively single-threads the usage of your ApplicationModule so that the multiple concurrent requests don't clobber eachother by executing queries, and moving the row pointer on your RowIterators and ViewObjects. But, it only single-threads it on a per-user basis, because we synchronized on the HttpSession.
Hope this helps... -
Layout options when generation BC4J Jsp
I have a novice question..
Ive tried to user Jdeveloper to generate JSP pages for displaying data from Oracle tables. And it seems to work just fine. Ive tried BC4J Jsp, UIX Jsp and UIX XML. But i cant figure out how to change the layout! By that i mean how the JSP is presenting the data in HTML. Simple things like Font and color of HTML tables seems to be hidden somewhere...
Any ideas???
Bjxrn
Norway.The style information is stored in a HTML stylesheet called BC4J.css in the case of the BC4J application. This file is already deployed in the webapp application. You can look at it in BC4J\redist\webapp\css. To customized these setting you can modify their values by inserting your own style sheet with the new style values overwritten.
For UIX project the style sheet is generated and you have to go through style customization at the UI renderer level. -
URGENT timout problems with bc4j
Hello Jdev Team,
We have a serious problem with the BC4J. The situation is as
follows:
We use BC4J with jsp pages an run the whole thing on a j2ee
Container.
We have written our own ApplicationPool class and
ApplicationModule datatag because the users have to login
using different credentials. The login users are db-users. The
application release mode is reserved.
The application crashes frequently. 2 errors occur.
First of all we get an JBO-30003: "The application pool, {AM
Name}, failed to checkout an application module instance."
after the BC4J Container timeout --> messages ("BC4J HTTP
Container was timed out" and "The binding listener for { AM
name} was timed out")
We haven't found a way to alter the BC4J container timeout.
Where do we customize the timeout?
We have tried to use the HttpSessionTimeOut variable but it
seems to have no effect.
I hope you can help us with this one.
Second problem is that the J2EE Container stops functioning
after a couple of requests.
Even if an other browser is started (on the same or different
machine) the Container does not respond to any request.
We have found a Thread on technet handling this kind of problem
but the solution doesn't work in our case.
(the solution on technet was to put synchronized(session) around
each JSP page)
Now we run the application under Apache/Jserv and with the same
Runtime packages as used in the Container and the problem
seems to have disappeared.
Here follows the code of the ApplicationPool class:
The class is based on an example posted on technet
* @author Juan Oropeza
package be.cronos.dbwise.jbo;
import oracle.jbo.common.ampool.ApplicationPoolImpl;
import oracle.jbo.ApplicationModule;
import java.util.Properties;
public class SeperateLoginApplicationPool extends
ApplicationPoolImpl
private String vConnectURL;
private String vUsername;
private String vPassword;
public SeperateLoginApplicationPool()
public void setConnectInfo(String pUsername, String pPassword,
String pConnectURL)
this.vUsername = pUsername;
this.vPassword = pPassword;
this.vConnectURL = pConnectURL;
protected void connect(ApplicationModule appModule)
if (!appModule.getTransaction().isConnected())
appModule.getTransaction().connect(vConnectURL ,
vUsername, vPassword);
//use Optimistic locking as default for all transactions
appModule.getTransaction().setLockingMode
(oracle.jbo.Transaction.LOCK_OPTIMISTIC);
* checkin
* @param appModule
public synchronized void checkin(ApplicationModule appModule)
// release the instance regardless of the release mode
// this is necessary since we need a fresh instance each
time.
this.releaseInstance(appModule);
this.releaseInstances();
public void disconnect(ApplicationModule pAppModule, boolean
pRetainState)
super.disconnect(pAppModule, pRetainState);
Here is the code of the applicationPool datatag:
* @author Juan Oropeza
* @author Ief Cuynen
* @version 1.1
/* Modification history
package be.cronos.dbwise.datatags;
import be.cronos.dbwise.jbo.SeperateLoginApplicationPool;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspException;
import java.io.StringWriter;
import java.io.PrintWriter;
import oracle.jbo.html.jsp.ConnectionInfo;
import oracle.jbo.common.ampool.PoolMgr;
import oracle.jbo.common.ampool.ApplicationPool;
import oracle.jbo.ApplicationModule;
import oracle.jbo.html.jsp.JSPApplicationRegistry;
import java.util.Properties;
import java.util.Hashtable;
import java.util.Enumeration;
public class ApplicationModuleTag extends TagSupport
String fApplicationName;
String fConfigName;
String fUsername;
String fPassword;
String fConnectionURL;
String fIiopUserName;
String fIiopPassword;
JSPApplicationRegistry fAppRegistry;
public ApplicationModuleTag()
public void setId(String pAppName)
{ this.fApplicationName = pAppName; }
public void setConfigname(String pValue)
{ this.fConfigName = pValue; }
* doEndTag
* @return int
* @exception javax.servlet.jsp.JspException
public int doEndTag() throws JspException
try
SeperateLoginApplicationPool pool = null;
init();
// Get an application module resource.
fAppRegistry = JSPApplicationRegistry.getInstance();
// this step will access the custom pool from the property
file
appRegistry.registerApplicationFromPropertyFile
(fApplicationName);
// Since we don't want to use a
PropertyFile per AM, we have written are own
registerApplicationModule method
this.registerApplicationModule();
// get an instance of the pool, which is already existing
pool = (SeperateLoginApplicationPool)
PoolMgr.getInstance().getPool(fApplicationName);
// get an instance of the application module
synchronized(pool)
// Setup the connection information
pool.setConnectInfo(fUsername, fPassword,
fConnectionURL);
// This instance will be used by the rest of the
DataWebBeans since it’s part of the context.
try
//After the BC4J
container timeout, this method will raise an exception
ApplicationModule am =
fAppRegistry.getAppModuleInstance(fApplicationName, pageContext);
catch(Exception e)
System.out.println
("JspRegistry has failed to get application module instance");
setPageContextValues();
catch(Exception ex)
StringWriter writer = new StringWriter();
PrintWriter prn = new PrintWriter(writer);
ex.printStackTrace(prn);
prn.flush();
throw new JspException(writer.toString());
return SKIP_BODY;
* for internal use only
private void init()
fUsername = (String)pageContext.getSession().getValue
("username");
fPassword = (String)pageContext.getSession().getValue
("password");
fConnectionURL = (String)pageContext.getSession().getValue
("connectionURL");
private void setPageContextValues()
// place default renderers into session, these will not be
exposed via config file
pageContext.getSession().putValue
("oracle_ord_im_OrdImageDomain_Renderer", "oracle.ord.html.OrdBui
ldURL");
pageContext.getSession().putValue
("oracle_ord_im_OrdAudioDomain_Renderer","oracle.ord.html.OrdBuil
dURL");
pageContext.getSession().putValue
("oracle_ord_im_OrdVideoDomain_Renderer","oracle.ord.html.OrdBuil
dURL");
pageContext.getSession().putValue
("oracle_ord_im_OrdVirDomain_Renderer", "oracle.ord.html.OrdBuild
URL");
pageContext.getSession().putValue
("oracle_ord_im_OrdImageDomain_EditRenderer", "oracle.ord.html.Fi
leUploadField");
pageContext.getSession().putValue
("oracle_ord_im_OrdAudioDomain_EditRenderer", "oracle.ord.html.Fi
leUploadField");
pageContext.getSession().putValue
("oracle_ord_im_OrdVideoDomain_EditRenderer", "oracle.ord.html.Fi
leUploadField");
pageContext.getSession().putValue
("oracle_ord_im_OrdVirDomain_EditRenderer", "oracle.ord.html.File
UploadField");
protected synchronized void registerApplicationModule()
PoolMgr vPoolMgr = PoolMgr.getInstance();
try
if (!vPoolMgr.isPoolCreated(fApplicationName))
// Parse the ConfigName
String vConfigPackage =
fConfigName.substring(0, fConfigName.lastIndexOf('.'));
String vConfigSection = fConfigName.substring
(fConfigName.lastIndexOf('.') + 1);
//Strip out the AM Class
vConfigPackage =
vConfigPackage.substring(0, vConfigPackage.lastIndexOf('.'));
Properties vProps = new Properties();
vProps.put("ConfigName",fConfigName);
ApplicationPool vAppPool =
vPoolMgr.createPool(fApplicationName,vConfigPackage,
vConfigSection, vProps);
vAppPool.setUserName
(this.fUsername);
vAppPool.setPassword
(this.fPassword);
catch (Exception ex)
ex.printStackTrace();
throw new RuntimeException(ex.toString
* release() called after doEndTag() to reset state
public void release()
super.release();
fApplicationName = null;
fConfigName = null;
fUsername = null;
fPassword = null;
fConnectionURL = null;
fIiopUserName = null;
fIiopPassword = null;
JSPApplicationRegistry fAppRegistry = null;
Another thing is that the JSPApplicationRegistry contains a bug
(I think)
It doesn't use the HttpSessionTimeOut variable at all (see
following code)
this piece of code is a Method from the
JSPApplicationRegistry.java File taken from package
oracle.jbo.html.jsp;
static synchronized public void
registerApplicationFromPropertyFile(HttpSession session, String
sPropFileName)
if(!mPoolManager.isPoolCreated(sPropFileName))
registerApplicationFromPropertyFile(sPropFileName);
if (!PropertyConstants.TRUE.equals((String)session.getValue
(SESSION_INITIALIZED)))
Hashtable settings = getAppSettings(sPropFileName);
/* The timeout variable is declared here */
int nTimeOut = 300;
if (settings != null)
// see if we have a setting for the session timeout
String sTimeOut;
/* get the HttpSessionTimeOut variable */
if(settings.get("HttpSessionTimeOut") != null)
sTimeOut = (String)settings.get
("HttpSessionTimeOut");
if(sTimeOut != null)
/* Put the value in the variable... and that's the last thing it
does. nTimeOut isn't used anywhere in the class */
nTimeOut = Integer.parseInt(sTimeOut);
if(settings.get("ImageBase") != null)
session.putValue("ImageBase", settings.get
("ImageBase"));
else
settings.put("ImageBase", "/webapp/images");
session.putValue("ImageBase", "/webapp/images");
if(settings.get("CSSURL") != null)
session.putValue("CSSURL",settings.get("CSSURL"));
else
settings.put("CSSURL", "/webapp/css/oracle.css");
session.putValue
("CSSURL", "/webapp/css/oracle.css");
// place default renderers into session, these will not
be
// exposed via config file
session.putValue
("oracle_ord_im_OrdImageDomain_Renderer", "oracle.ord.html.OrdBui
ldURL");
session.putValue
("oracle_ord_im_OrdAudioDomain_Renderer","oracle.ord.html.OrdBuil
dURL");
session.putValue
("oracle_ord_im_OrdVideoDomain_Renderer","oracle.ord.html.OrdBuil
dURL");
session.putValue
("oracle_ord_im_OrdVirDomain_Renderer", "oracle.ord.html.OrdBuild
URL");
session.putValue
("oracle_ord_im_OrdImageDomain_EditRenderer", "oracle.ord.html.F
ileUploadField");
session.putValue
("oracle_ord_im_OrdAudioDomain_EditRenderer", "oracle.ord.html.F
ileUploadField");
session.putValue
("oracle_ord_im_OrdVideoDomain_EditRenderer", "oracle.ord.html.F
ileUploadField");
session.putValue
("oracle_ord_im_OrdVirDomain_EditRenderer", "oracle.ord.html.F
ileUploadField");
session.putValue(SESSION_INITIALIZED,
PropertyConstants.TRUE);
Am I mistaken or is it a bug?
Thank you for your fast response.
Greetings,
Ief CuynenFirst of all we get an JBO-30003: "The application pool, {AM Name}, failed to checkout an application module
instance."
The JBO-30003 exception is thrown whenever the pool cannot
properly create/recycle an application module. Please see the
exception details (scan the exception stack to find the exception
details) for more information regarding the "root" cause of the
exception.
We haven't found a way to alter the BC4J container timeout. Where do we customize the timeout?
The BC4J container is timed out when the HttpSession is timed
out. The session timeout is configurable via the web.xml file
for the J2EE application. Your servlet container may also
include another mechanism for setting a session timeout.
Second problem is that the J2EE Container stops functioning after a couple of requests. Even if an other browser
is started (on the same or different machine) the Container does
not respond to any request. We have found a Thread on technet
handling this kind of problem but the solution doesn't work in
our case.
The issue sounds like a deadlock. Please use kill -3 (Solaris)
or ctrl-break (NT) at the java server console to print the thread
stack trace to stdout. This will contain more information
regarding which threads are blocked and where. If you would like
you can send the stack trace to me via mail and I can take a look
at it.
The solution of synchronizing your pages with the HttpSession
context is required only if you are using the BC4J datatags with
HTML frames (i.e. have multi-threaded application module
access for a given session). Please note that this solution may
have a performance impact and should not be implemented unless
absolutely necessary.
Another thing is that the JSPApplicationRegistry contains a bug (I think). It doesn't use the HttpSessionTimeOut variable
at all (see following code)
This parameter was deprecated after 3.1. It looks like the code
which used the parameter may have been removed prematurely.
Sorry for the confusion. Please use the J2EE compliant
mechanisms mentioned above to configure the session timeout in
3.2.
Finally, please note that JDeveloper9i includes new integrated
features for the often requested feature of supporting different
db users with the same application pool! Please stay tuned. -
Is there any way to customize the way bc4j creates its temporary tables? Specifically, I would like to change how this one is created. Right now it is:CREATE TABLE "PS_WebsiteService_10"
ID NUMBER(20),
PARENTID NUMBER(20),
COLLID NUMBER(10),
CONTENT BLOB,
KEYCONT BLOB
LOGGING
NOCACHE
NOPARALLEL;
CREATE UNIQUE INDEX PS_WEBSITESERVICE_10_PK ON "PS_WebsiteService_10"
(COLLID, ID)
LOGGING
NOPARALLEL;
ALTER TABLE "PS_WebsiteService_10" ADD (
CONSTRAINT PS_WEBSITESERVICE_10_PK PRIMARY KEY (COLLID, ID));My DBAs would like to put NOLOGGING in there. Apparently there are some insane logs going on in the database. Something to do with a BLOB bug in the db version we have they tell me.Hi Steve/Nick,
I am facing a similar kind of problem in oracle 9iAS(90220). A few days back there was a lot of user activity in one of the application modules and 7 PS_<app.module.name(s)> tables were created with around 7GB of size which eventually filled up the entire tablespace(100%). I spoke to the developers about the attributes that need to be set for Row spill over feature discussed in this forum but they said after lots of testing they have set those values and cannot be changed.
Could you please suggest me how can I ensure that, next time any application module specific PS_ tables will get created I can route them to different tablespace based on the module name. (I donot want to move them after they are created, to a different tablespace) Please let me know asap so that I can implement it and avert any future problems.
Thanks & regards,
Ramana
Maybe you are looking for
-
IPod Touch 2nd Gen. / iOS 4.2 update, NO AirPlay!!!
I updated my iPod Touch 2nd Gen. this morning to iOS 4.2, and found that there is no AirPlay icon in ANY of my media apps (including the native players). There is also NO "text search" in Safari. I checked the "About" section on my Touch and it says
-
Finder window not appearing when selected from the Dock
Hi My Finder exhibits the following behavior: Right Click Finder in Dock Finder displays list of currently open windows, etc. I select one of the windows Nothing happens Note: If a select "New Finder Window" a new window is opened. This has become m
-
Web service error: WS Security can only be applied on a SOAP document
Hello, I am facing the problem that when calling a web service I got this error message: 005056B855B2002A0000013B000032C70005105EF7348C38 : WS Security can only be applied on a SOAP document. Some information about the webservice: Transport Binding:
-
How do I find my finger print software to register my finger print. I can see the driver is installed successfully but cant find the software itself to load and scan my finger for my files. Secondly, my wifi is on but only showing bluetooth connecti
-
Wifi connection on my iPhone not accepting password
Updated ios7 yesterday, Wifi was working in my iPhone 4S This morning wifi stopped working I turned off mobile and turn it on , still not working I restarted the modem and still not working I have reset network settings in the mobile and it is still