Problem with binding of a selectManyCheckbox inside a dataTable
Hi,
first i want to point out that my english is not the best. :)
A german version is followed at the end of the english text.
I have a class "MyClass" with few attributes like:
private long id;
private String text;
private Set<MyClass2> childs;
An a second class "MyClass2" wich also have some attributes:
private long id;
private String text;
Now i have a List with lots of objects from typ "MyClass":
List myList = new ArrayList();
// Sample Data!!
for (int i=0; i<100; i++)
MyClass1 m1 = new MyClass1();
m1.setId(i);
m1.setText("MyClass1 Line " + i);
// Now add some "childs":
for (int j=0; j<i*2; j++)
MyClass2 m2 = new MyClass2();
m2.setId( i );
m2.setText("Sample "+ i);
m1.getChilds().add(m2);
myList.add ( m1 );
So now i want to show the ID and text every Object of MyClass1 on my "test.jsp" (width JSF Tags).
The Collections inside this class should display as checkboxes (value = id, label = text).
Sample:
ID: +1+ TEXT: MyClass1 Line 1
CHECKBOXES:
[x] Sample 0
[x] Sample 1
ID: +2+ TEXT: MyClass1 Line 2
CHECKBOXES:
[x] Sample 0
[x] Sample 1
[x] Sample 2
[x] Sample 3
Okay i think you know what i mean. ;-)
I tryed it also with a dataTable to iterate in "myList" and use a selectOneMenu with selectItems to generate the checkboxes.
Here is the code:
<h:dataTable value="#{myBean.myList}" var="rowInstance" binding="#{myBean.dataTable}" id="dataTable">
<h:column>
<h:outputText value="ID: #{rowInstance.id}" />
<h:outputText value="TEXT: #{rowInstance.text}" />
</h:column>
<h:column>
<h:selectManyCheckbox id="cbox" styleClass="checkbox">
<f:selectItems value="#{myBean.childs}"/>
</h:selectManyCheckbox>
</h:column>
</h:dataTable>
Maybe you see the that i've used childs in the selectItems.
This is a methode like that:
public SelectItem[] getChilds()
MyClass1 mc1 = (MyClass1) dataTable.getRowData();
// now i iterate the childs and make for each a SelectItem()
Also you maybe see that i have no binding on selectManyCheckbox, because i have no idea how it works. :-)
I've tried to bind it to a String[] but and the end this String[] always contain the last low.
My Question is now:
When the user pressed the submit Button how can i figure out which Checkboxen the user clicked ?
Thank you a lot.
Now the german version (surley better explained):
Hallo nochmal,
ich habe versucht auf englisch mein Problem zu schildern.
Was mit sicherheit nicht zu 100% gelungen ist, deshalb hier noch mal eine deutschsprachige Version (maybe some germans out there).
Wie oben abgeblidet habe ich im Prinzip zwei Klassen.
Die erste Klasse "MyClass1" hat eine Collection die Objekte von der Klasse "MyClass2" enth�lt.
Nun m�chte ich auf meiner JSP Seite die JSF Tags benutzt eine Liste von Objekten (die vom Typ "MyClass1" sind) abbilden.
Die Collection innerhalb dieser Klasse soll als Checkboxen dargestellt werden.
Ich habe es ohne gro�e Probleme hinbekommen, dass er das so anzeigt wie ich das m�chte.
Nur habe ich z.Z. noch Probleme damit wie ich sp�ter herausfinde, welche der Checkboxen denn nun angew�hlt sind.
Normalerweise w�rde man ja ein binding machen, so k�nnte man alle ausgew�hlten Checkboxen (getSelectedValues()) ja bekommen.
Da aber die Anzahl der Objekte immer unterschiedlich ist kann ich nicht die entsprechenden Variablen anlegen.
Deshalb die Frage: Wie bekomme ich mit welche der Checkboxen ausgew�hlt wurden? Wie muss das binding aussehen?
Vielen Dank.
Greetings from Germany. :)
Just bind it to the row object.
JSF<h:dataTable value="#{myBean.myDataList}" var="myData">
<h:column>
<h:selectManyCheckbox value="#{myData.selectedItems}">
<f:selectItems value="#{myData.selectItems}" />
</h:selectManyCheckbox>
</h:column>
</h:dataTable>MyDataprivate List<String> selectedItems; // + getter + setter
private List<SelectItem> selectItems; // + getter
Similar Messages
-
Problem with binding in rich:tabPanel
I have the problem with binding in rich component. In the first request the tabPanel work fine, but in the second request the component is not displayed. When i remove binding="#{organizationController.tabPanel}" everything works well. Anybody can help me? thanks.
<rich:tabPanel style="height : 63px; width:auto; border:0px;" id="panelOrganizationForm" binding="#{organizationController.tabPanel}" >
<rich:tab label="Dados da organizacao" id="tab1">
<h:panelGrid columns="2" id="panelGridOrganizationForm">
<h:outputText value="Id: " id="idlabel"/>
<h:inputText value="#{organizationController.organization.organizationId}" styleClass="input" id="organizationId" required="true"/>
<h:outputText value="Nome: " id="nameLabel"/>
<h:inputText size="60" value="#{organizationController.organization.organizationName}"
styleClass="input" id="organizationName"/>
</h:panelGrid>
</rich:tab>
</rich:tabPanel>
<a4j:commandButton value="Voltar" action="back" id="bot" immediate="true"/>Guys
Thanks a lot, both of your replies are immensely instructive. Maybe a little background on what I'm trying to do. In the table, I have header rows with dependent line rows. When a check box is ticked in the header, I want the corresponding check boxes in the dependent lines to be checked automatically (in slave fashion and ideally without using JavaScript). My idea was to update the bound components (for the lines) from within the Bean (in response to change on the header). However, given there's only a single component for each column in the table, this of course doesn't make sense.
I'm trying to get to the typical MVC workflow of a) user updates a View component, b) Controller detects the change and updates the Model, c) The Model fires a property change event, which the View detects and updates appropriately. What's the way to achieve this in JSF (by design)?
Here's a simple fragment (which does not work):
<h:dataTable value="#{bean.lines}" var="line">
<h:column>
<h:outputText value="#{line.id}"/>
</h:column>
<h:column>
<!-- (1) This is the master and (2) should refresh on update here --/>
<h:selectBooleanCheckbox onchange="submit()" value="#{line.lineSelected}"/>
</h:column>
<h:column>
<!-- (2) This is the slave and I want this to update in response to a change of (1) above --/>
<h:selectBooleanCheckbox value="#{line.slaveSelected}"/>
</h:column>
</h:dataTable>In the setter method for lineSelected, I'm setting slaveSelected to the new value but the View is not refreshing based on this. How do I get the View to update (each dependent line) based on the new values for slaveSelected?
Thanks again
Lance -
Problem with binding in h:dataTable
Hi
I have a problem with h:dataTable, where the table rows are bound to objects (Bean$Line) nested within a backing bean (Bean).
JSP:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<html>
<f:view>
<head>
<link href="styles.css" rel="stylesheet" type="text/css"/>
<title>Sandbox</title>
</head>
<body>
<h:form>
<h:dataTable value="#{bean.lines}" var="line">
<h:column>
<h:outputText value="#{line.id}"/>
</h:column>
<h:column>
<!-- using value = line.lineSelected here works (assuming boolean property Line.lineSelected) --/>
<h:selectBooleanCheckbox binding="#{line.lineSelected}"/>
</h:column>
</h:dataTable>
</h:form>
</body>
</f:view>
</html>Bean:
package com.test;
import java.util.ArrayList;
import java.util.List;
import javax.faces.component.UISelectBoolean;
public final class Bean {
private final List<Line> lines;
public Bean() {
lines = new ArrayList<Line>();
lines.add(new Line("one"));
lines.add(new Line("two"));
lines.add(new Line("three"));
public List<Line> getLines() {
return lines;
* Nested class in order to access containing class
* properties etc.
public static class Line {
//private boolean lineSelected = false;
private UISelectBoolean lineSelected;
private String id;
public Line(String id) {
this.id = id;
/*public boolean isLineSelected() {
return lineSelected;
public void setLineSelected(boolean lineSelected) {
this.lineSelected = lineSelected;
public UISelectBoolean getLineSelected() {
return lineSelected;
public void setLineSelected(UISelectBoolean lineSelected) {
this.lineSelected = lineSelected;
public String getId() {
return id;
public void setId(String id) {
this.id = id;
} // Line
}The setup works when I use value="#{line.lineSelected}" (assuming the property is defined as boolean in Bean$Line) but as soon as I use a binding, I get the following exception:
com.sun.rave.web.ui.appbase.ApplicationException: javax.servlet.ServletException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'line' resolved to null
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
faces_config:
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<application>
<locale-config>
<default-locale>en_GB</default-locale>
<supported-locale>en_GB</supported-locale>
</locale-config>
</application>
<managed-bean>
<managed-bean-name>bean</managed-bean-name>
<managed-bean-class>com.test.Bean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>What am I missing here?
Help much appreciated
LanceGuys
Thanks a lot, both of your replies are immensely instructive. Maybe a little background on what I'm trying to do. In the table, I have header rows with dependent line rows. When a check box is ticked in the header, I want the corresponding check boxes in the dependent lines to be checked automatically (in slave fashion and ideally without using JavaScript). My idea was to update the bound components (for the lines) from within the Bean (in response to change on the header). However, given there's only a single component for each column in the table, this of course doesn't make sense.
I'm trying to get to the typical MVC workflow of a) user updates a View component, b) Controller detects the change and updates the Model, c) The Model fires a property change event, which the View detects and updates appropriately. What's the way to achieve this in JSF (by design)?
Here's a simple fragment (which does not work):
<h:dataTable value="#{bean.lines}" var="line">
<h:column>
<h:outputText value="#{line.id}"/>
</h:column>
<h:column>
<!-- (1) This is the master and (2) should refresh on update here --/>
<h:selectBooleanCheckbox onchange="submit()" value="#{line.lineSelected}"/>
</h:column>
<h:column>
<!-- (2) This is the slave and I want this to update in response to a change of (1) above --/>
<h:selectBooleanCheckbox value="#{line.slaveSelected}"/>
</h:column>
</h:dataTable>In the setter method for lineSelected, I'm setting slaveSelected to the new value but the View is not refreshing based on this. How do I get the View to update (each dependent line) based on the new values for slaveSelected?
Thanks again
Lance -
Problem with Bind Variable in 11.2
Hi
I have a slow statement with bind Variables. With literals it works fine. Is there a way to replace the bind by literal in advanced ? I use Release 11.2.0.2.3
Thank you904062 wrote:
I have a slow statement with bind Variables. With literals it works fine. Is there a way to replace the bind by literal in advanced ? I use Release 11.2.0.2.3This specific scenario is very much an exception to the rule - and you need to back your statement up with execution plans of the SQL with bind variables and with literals, and run stats that show the difference between these two execution plans.
See the {message:id=9360003} from the {forum:id=75} forum's FAQ for details on how to post a SQL performance tuning question. -
BAM: Problem with 'Binding' while creating event linkage
Hello colleagues.
We have an ECC 6.0 and a PI 7.1 system. I want to create a prototype using the features of BAM.
In transaction SWF_BAM, i tried to create a binding for the OB proxy parameters and the event object parameters. Unfortunately, the proxy class no longer has the method 'EXECUTE_ASYNCHRONOUS' and hence i am unable to create the binding.
Any pointers on how to go about this. Please also let me know if i am not doing it the right way.
Regards,
KeshavHI Keshav,
Try writing the method which u create in the same name as the implementing class; also known as the provider class. I have faced the same problem, and when writing the method, use the operation name, which is used in PI 7.1, while creating the interface, and there shouldn't be any problem during Binding.
Regards,
Abhisek. -
Problem in assigning id to DIV inside a datatable
In our JSF application, we have a requirement to display a separate DIV for each row which is iterated inside a datatable.
In order to display the contents under a particular DIV, we need to capture the id of that DIV.
But since the DIV resides within verbatim inside the datatable, a unique identifier could not be associated to each DIV.
The code looks like this�.
<h:dataTable id="product_entity_data_table" width="690" border="0" cellspacing="1" columnClasses="clsTableBodyL"
rowClasses="clsAlignTop clsListDarkBackground,clsAlignTop clsListLightBackground"
headerClass="clsTableHeaderBottomL" value="#{entityImpactListBean.currentProductsDSIDetailBeanList}"
var="productDSIDetail" rendered="#{impactListBean.entityProductFlag}">
<h:column>
<f:facet name="header">
</f:facet>
<h:panelGrid id="product_ent_dsidetail_newDataValue_pg" columns="1">
<clsFields:radio id="dsi_newdatavalue" value="#{productDSIDetail.newProductValue}"
onclick="formDivContent(#{productDSIDetail.productName}, #{productDSIDetail.dataLevelID}, this.id);">
<f:selectItems value="#{impactListBean.radioValueList}" />
</clsFields:radio>
<h:outputText id="product_ent_dsidetail_errorMessage" styleClass="clsErrorMessageB"
value="#{productDSIDetail.errorMsg}" rendered="#{productDSIDetail.errorMsgFlag}">
</h:outputText>
</h:panelGrid>
<f:verbatim>
<div id="div<%=divCount++%>" style="display:none;">
<iframe name="frame<%=frameCount++%>" width="0" height="0" align="center"
frameborder="0" onload='showData(this);'></iframe>
</div>
</f:verbatim>
</h:column>
</h:dataTable>
Inspite of introducing divCount (code highlighted in blue), every time the id associated to every DIV is the same, which is �div1�.
Any help in this regard will help us solve this issue.Hi ,
If your are not sure about user name , use the wildcard pattern , but make sure you use only a single *
i.e
1)IF User = shilpa*
THEN Portal Desktop = dekstop path
2)IF User =* shilpa *
THEN Portal Desktop = dekstop path
Here 1st option will work , 2nd will not work. " use only a single * "
Regards,
Sunitha Hari -
Problem with bind variable in subselect
Using the Oracle 9i JDBC Driver and a query of the form:
select * from atable a where a.thing = ? and a.id in (select id from btable where b.something = ?)
via a PreparedStatement, the second parameter is not being set correctly. The query executes but does not return the expected results. If I hard code the param value into the query it works fine. I think the second parameter is being set to an empty string (hence the query executes OK but no results returned). This seems to be peculiar to bind variables in sub-selects.
Has anyone else encountered this problem?ps.setLong(1, along);
ps.setString(2, astring);
I've checked this against different driver versions. It's OK with the 10.2 driver but fails with the 10.1. So I've moved to the 10.2. -
Problem with binding sequences to attributes
Hello everyone.
[you may directly jump to the question at the bottom of this post and if you don't understand what the heck I'm asking, feel free to read the whole post ;)]
I wanted to crate a table node where several attributes are for rows only.
Because i want it to be a CustomNode, the table should be created dynamically (one should at least be able to define different amounts of rows and columns at the initialization).
My problem is a combination of "creating dynamically" and binding attributes.
To create an arbitrary amount of rows i use a "while(i < x) CustomNode{}" loop.
To store the value of an attribute for a row i use sequences. So during the loop i do the following:
someValue: bind sequenceValue[i]
After quite some frustration i finally discovered that all the attributes will be bound to sequenceValue[last value of i].
I don't find the right words right now, so here's some code to demonstrate the problem:
package javafxtestbench;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.CustomNode;
import javafx.scene.Node;
import javafx.scene.Group;
import javafx.scene.input.KeyEvent;
var t1 = [true, true, false];
Stage {
title: "Application title"
width: 250
height: 500
scene: Scene {
content: [
Text {
font : Font {
size : 16
x: 10
y: 30
content: "Application content"
createFubar(),
function createFubar(): Group{
var grp : Group = Group{
content:[
//this works
/*b1{ blob: bind t1[0]}
b1{ blob: bind t1[1]}
b1{ blob: bind t1[2]}*/
//this doesnt
createSomeBs(),
onKeyPressed: function( e: KeyEvent ):Void {
println("=== KeyPressed ===");
if (t1[2] == true) t1[2] = false
else t1[2] = true;
println("new sequence value: {t1}");
grp.requestFocus();
return grp;
function createSomeBs(): Node[]{
var i = 0;
var grp : Node[];
while(i < 3){
insert b1{
blob: bind t1[i]
}into grp;
i++;
println("Sequence @ startup: {t1}");
return grp;
class b1 extends CustomNode{
public var blob = true on replace{
println("attribute value b1.blob: {blob}");
override function create():Node{
Group{
}As you can see i created a CustomNode (b1) and use two different methods to add it to the scene.
First method: i add b1 thee times to the scene and set the attribute
or
2nd method: i use a loop (its index to bind the corresponding sequence entries to the attributes)
finally i added a key listener, which changes the value of the last sequence value if an arbitrary key has been hit.
output for using the "this works" block (1st method) after pressing some keys:
=== KeyPressed ===
attribute value b1.blob: true
new sequence value: truetruetrue //contains {true, true, true}
=== KeyPressed ===
attribute value b1.blob: false
new sequence value: truetruefalse //contains {true, true, false}and here for the "this doesnt" (2nd method) part:
=== KeyPressed ===
attribute value b1.blob: false
attribute value b1.blob: false
attribute value b1.blob: false
new sequence value: truetruetrueSo even though all elements in the sequence say "true", the attribute values of all CustomNodes will keep saying "false".
Here it's due to the fact that "i" is in the end greater than the sequence (cause by the increment at the end of the loop).
In the end all attributes will be bound to the same entry. So messing around with the index, so it doesn't get beyond the sequence size, won't help.
So to finally bring this post to an end ;P, here's my question:
How do you create an arbitrary amount of Nodes containing attributes which are bound to a list entries?
Edited by: Mr._Moe on 08.09.2009 20:17HI
May be you can fetch the data from the table with looping the table size and catching the
index of the elements . To be more clear .
1 . get the size of the table .
int leadSelection= wdcontext.node<TableName>.getLeadSelection();
for (int i=0 ;i<n;i++)
if(wdcontext.node<tablename>.isMultiselected(leadSelection))
String name = wdcontext.node<tablename>.getelementatindex(leadSelection).getname();
similarly fetch the size of the other elements from the table .
and set to other RFC as
ZClass abc = new ZClass();
abc.setName(name);
wdcontext.node<NameName>.bind(abc);
and othere thing is when you use Abstract class you can insert only one element at a time .
or may be you may want to set the values direclty to the RFC
AbstractList lst = new ZClass.ZClassList();
ZClass cls = new ZClass();
clas.setName(name)
lst.add(class);
wdcontext.currentRFcNameElement.modelObject.setName(lst);
and
execute the RFC .
murali -
A problem with binding a visual control to a class property defined with a getter&setter pair
hi,
I am having the following problem (simplified here for
clarity):
I am using a class for data model with a property named
x (using a getter & setter) as follows:
quote:
[Bindable]
public class MyData
private var _x :String;
public function MyData()
_x = "default value";
public function set x(value:String):void {
trace("setting x with: '" + value + "'");
_x = String(value);
public function get x():String {
trace("getting x: '"+_x+"'");
return _x;
I then linked (binded) the
x property to a TextInput, as follows:
quote:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
[Bindable]
private var _data:MyData = new MyData();
]]>
</mx:Script>
<mx:TextInput id="inputX"
text="{_data.x}" />
</mx:Application>
When loaded,
inputX is set with the "default value". However, when
changing the value of
inputX the value of
_data.x remains unchanged (in this sample - there are no
trace messages from the setter).
I have tried numerous variations using <mx:Bindind
...>, mx.bindinding.utils.BindingUtils, changing order of setter
and getter, and more.
The only solution i could find for now is to add a change
event handler to the
inputX control as follows:
quote:
<mx:TextInput id="inputX" text="{_data.x}"
change="_data.x=inputX.text"/>
Is there something i did wrong? or is it ... simply ... a bug
thanx,hi,
thanx for your quick reply.
The actual problem was the that _data.x initialization should
not be done in the MyData constructor, but after the object is
fully created, as follows:
[Bindable]
private var _data:MyData = new MyData();
// called in the application's initialize event
public function init():void {
_data.x = "default value";
After this, adding the <mx:Binding> does the trick for
the inputX.text --> _data.x binding, and there's no need to add
"this". I simply have assumed (being a novice flex developer) that
using <mx:TextInput id="inputX" text="{_data.x}" /> binds for
both directions inputX.text <--> _data.x.
thanx again,
yaron -
A problem with bind variables in a shuttle
Hi
After days of research I cannot come up with a solution to this problem which I hope will be easy to describe.
I'm working on an apex.oracle.com workspace (4.02).
I have a page with
a) a region with tree which works well populated by a list of roles and users
b) a region with a shuttle with the following sql
List of values
select SOB_DISPNAME, SOB_ID
from VIEW_SYSTEMOBJECT
order by SOB_DISPNAME
Source
SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID
:P19_SELECTED_ID is a hidden textbox with the currently selected users id.
The above works very well - I select a user from the tree and the shuttle lhs populates with unselected object names and the rhs with objects selected for the user. A submit button drives a page process which clears out and then inserts the selection into a the table (objectsecurity)
So far so good.
I added a list box to the shuttle region (:P19_SOB_TYPE_LIST) so that the data being worked on could be filtered by type, its driven by a LOV that produces a value or 'PAGE', 'REPORT' ... etc.
I updated the above SQL to be
List of Values
select SOB_DISPNAME, SOB_ID
from VIEW_SYSTEMOBJECT WHERE SOB_TYPE = :P19_SOB_TYPE_LIST
order by SOB_DISPNAME
and the source
SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID AND SOB_TYPE = :P19_SOB_TYPE_LIST
So now I would expect that if 'PAGE' is selected in the list box then only objects that are pages will be seen.
However nothing at all appears.
If I substitute the bind variable :P19_SOB_TYPE_LIST for 'PAGE' ... WHERE SOB_TYPE = 'PAGE' it works perfectly. So why does :P19_SELECTED_ID do it's job but not P19_SOB_TYPE_LIST ?
I am probably making some ridiculously simple mistake but I just cannot spot it; is my syntax wrong?.
The session state is persisting so that I can see the value of :P19_SOB_TYPE_LIST being set to PAGE
Any help with this would be very much appreciated.Hi Dirk
Thanks for that which looked promising!
I added P19_SOB_TYPE_LIST as the Cascading LOV Parent Item and removed it from the where clauses of both SQL's and the result was that all types are shown; corresponding to my original position.
I then added the where clause back to the LOV SQL and both shuttle boxes are blank again
I added back to the source SQL and again both boxes empty
Finally I removed the where clause from the LOV SQL (the only other combination) and again lhs box populated with all rows (not filtered) and rhs box blank.
So unfortunately that doesn't seem to have fixed it.
Many thanks for the help and any more will be greatly appreciated.
Regards
Charles -
Problem with bind method of Visibroker 4.5 and 6.5 for java
I am facing following problem when I am trying to compile my CORBA application using javac.
bind (java.lang.String,java.lang.String,java.lang.String,org.omg.CORBA.BindOptions) in com.inprise.vbroker.CORBA.ORB cannot be applied to (java.lang.String,java.lang.String,java.lang.String,com.inprise.vbroker.CORBA.BindOptions)
[javac] return narrow(((com.inprise.vbroker.CORBA.ORB)orb).bind(id(), name, host, _options), true);
Please let me know what needs to be done to to solve the compilation problemHi,
Have you applied patches to DB 4.5.20? There's one in particular that you might need. Please visit the following web page:
http://www.oracle.com/technology/products/berkeley-db/db/update/4.5.20/patch.4.5.20.html
Patch #2 on that page is the one I'm thinking of (although as long as you're there, I suppose you might as well take both of them).
If that doesn't help, can you build DB in debug mode (configure with enable-debug)? The stack trace shows a SEGV at __rep_process_message+0x1d2 it would be nice to be able to see the Berkeley DB source code line number.
Finally, to answer your question, the Berkeley DB Base replication API doesn't care whether you use TCP/IP or any other transport mechanism, as long as it meets the documented requirements. (It looks as if you're using the Base API, rather than the Replication Manager API.) Please see "Building the communications infrastructure" in the Reference Guide.
Alan Bram
Oracle -
Problems with binding Object (JNDI/WebSphere)
Hello.
I'm trying to bind my objects on WebSphere Application Server 5.0 from stand-alone java application running on remote machine (IBM JRE).
Java source code on remote JVM:
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(Context.PROVIDER_URL, corbaloc:iiop:tisproject:2811);
final InitialContext ctx = new InitialContext(props);
Object obj = ctx.lookup("");
ctx.bind("MailService", new MailService());class MailService, of course, implements Serializable
I also use property file on client side to connect to remote WAS: sas.client.props with following properties:
com.ibm.CORBA.authenticationTarget=BasicAuth
com.ibm.CORBA.loginSource=properties
com.ibm.CORBA.loginUserid=wpsadmin
com.ibm.CORBA.loginPassword=wpspassword
I consider, that the problem is a kind of security issue, but i can't find the solution. Please, tell me what should I do.
I have the following stacktrace:
12:03:54.967 com.ibm.CORBA.iiop.ClientDelegate@69143a7a invoke:777 P=34108:O=0:CT ORBRas[default] Received SystemException org.omg.CORBA.NO_PERMISSION:
Trace from server: 209891810 at host tisproject.tf.local >>
org.omg.CORBA.NO_PERMISSION: not authorized to perform bind_java_object operation. vmcid: 0x0 minor code: 0 completed: No
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.performAuthorizationCheck(WsnOptimizedNamingImplBase.java:2808)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.bind_java_object(WsnOptimizedNamingImplBase.java:844)
at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(Unknown Source)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:608)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:461)
at com.ibm.rmi.iiop.ORB.process(ORB.java:432)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1728)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2227)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
<< END server: 209891810 at host tisproject.tf.local
vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:44)
at java.lang.reflect.Constructor.newInstance(Constructor.java:315)
at com.ibm.rmi.iiop.ReplyMessage._getSystemException(ReplyMessage.java:199)
at com.ibm.rmi.iiop.ReplyMessage.getSystemException(ReplyMessage.java:148)
at com.ibm.rmi.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:207)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:526)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1150)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:748)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1180)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:486)
at com.ibm.WsnOptimizedNaming._NamingContextStub.bind_java_object(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosBindJavaObject(CNContextImpl.java:3229)
at com.ibm.ws.naming.jndicos.CNContextImpl.doBind(CNContextImpl.java:1929)
at com.ibm.ws.naming.jndicos.CNContextImpl.bind(CNContextImpl.java:577)
at com.ibm.ws.naming.util.WsnInitCtx.bind(WsnInitCtx.java:164)
at javax.naming.InitialContext.bind(InitialContext.java:369)
at ru.teleform.mail.reporterclient.MailReporterClient2.main(MailReporterClient2.java:34)
, p1=<null> Server logs:
[15.08.06 12:03:54:762 MSD] bcf7d89 RoleBasedAuth E SECJ0306E: No received or invocation credential exist on the thread. The Role based authorization check will not have an accessId of the caller to check. The parameters are: access check method bind_java_object on resource NameServer and module /com/ibm/ws/naming/bootstrap/xml/NameServer.xml. The stack trace is java.lang.Exception: dump thread stack for debugging
at com.ibm.ws.security.role.RoleBasedAuthorizerImpl.checkAccess(RoleBasedAuthorizerImpl.java:291)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.performAuthorizationCheck(WsnOptimizedNamingImplBase.java:2791)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.bind_java_object(WsnOptimizedNamingImplBase.java:844)
at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(Unknown Source)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:608)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:461)
at com.ibm.rmi.iiop.ORB.process(ORB.java:432)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1728)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2227)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
[15.08.06 12:03:54:762 MSD] bcf7d89 RoleBasedAuth A SECJ0305I: Role based authorization check failed for security name <null>, accessId no_cred_no_access_id while invoking method bind_java_object on resource NameServer and module /com/ibm/ws/naming/bootstrap/xml/NameServer.xml.
[15.08.06 12:03:54:778 MSD] bf43d89 RoleBasedAuth E SECJ0306E: No received or invocation credential exist on the thread. The Role based authorization check will not have an accessId of the caller to check. The parameters are: access check method bind_java_object on resource NameServer and module /com/ibm/ws/naming/bootstrap/xml/NameServer.xml. The stack trace is java.lang.Exception: dump thread stack for debugging
at com.ibm.ws.security.role.RoleBasedAuthorizerImpl.checkAccess(RoleBasedAuthorizerImpl.java:291)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.performAuthorizationCheck(WsnOptimizedNamingImplBase.java:2791)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.bind_java_object(WsnOptimizedNamingImplBase.java:844)
at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(Unknown Source)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:608)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:461)
at com.ibm.rmi.iiop.ORB.process(ORB.java:432)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1728)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2227)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))I have no idea, why properties is not passing onto the server.Hi, I was wondering if you ever managed to resolve this issue. I am having a similar problem. I'm wanting to store an object in JDNI so that it can be referenced by all the servers in our distributed environmant. It works ok for me in mt developemt environment (RAD 6), but that is only because I have global security turned off, as soon as it's deployed to a server with global security turned on it doesn't work, I have read soo much over the past few days and have found that it is to do with the permissions that are set up in the admin console under Server>Environment>naming there are two roles here one is All_Users and the other is All_Authenticated, by default All_Users has read access only.
This is as far as I have got at the moment, I am now looking at how to use these roles from my application without expecting the user of the app to log on, I have found some articles about using JAAS to do this, but I haven't found any good explanations about it or any good examples.
Aside from that is you are just wanting to make your MailService globally available you should look at Dynamic caching, this is a Distributed Map API that will allow you to hold an object in the jndi Tree in a Map using a key, I have gone this route, but am still needing to know how to work with JNDI directly for storing objects.
This is the code I am using:
//lookup name given to the distributed map object
private static final String JNDI_DIST_MAP_LOOKUP = "services/cache/distributedmap";
private void cacheTree(Collection tree) {
logger.debug("TreeNodeManager: cacheTree called");
//TreeNodeManager.tree=tree;
try {
DistributedMap distMap = (DistributedMap) getContext().lookup(
JNDI_DIST_MAP_LOOKUP);
if (logger.isDebugEnabled()) {
logger
.debug("TreeNodeManager: cacheTree: Storing tree in distributedMap '"
+ JNDI_DIST_MAP_LOOKUP
+ "' using Key:'"
+ DIST_MAP_KEY + "'");
distMap.put(DIST_MAP_KEY, tree);
} catch (NamingException e) {
logger.error(e);
} -
Problem with binding value on the UI from a calculated column in the view
I have calculated field "Readiness" in my db view, which gets calculated based on other columns in the same table. I have added new column to my EO using "Add from table" option and added the same column from to VO using "Add from EO" option. In my application, I will update a particular date field in the UI and this calculated column "Readiness" in the db will be set to yes or no and this logic is working fine, both date date field and calculated field are in same view object. I have added a attribute binding to this "Readiness" column in my view page. The problem is the calculated column value does not reflect the new value in the db, it shows the old value. I have tried different refresh option for the iterator and ppr option for the field binding. Even after reloading the page, the value shown on the UI page is different from the value in db, other bindings on the UI page works fine, not sure any special settings are required for the Calculated columns. any ideas are appreciated.
Thanks for your help,
SuryaI tried to add soms debugging statements in the EO and getters method, the calcaulated column is not picking the value in db view. I'm not any special iterator/field settings are required at BC level. I'm a newbie, any help is appreciated.
Thanks,
Surya -
Problem with bind in a CFSELECT
I am trying to get a CFSELECT to populate using bind. If I use:
<CFSELECT bind="http://www.myDomain.com/CFC/file.cfc?method=getSizes({materialColor})">
</CFSELECT>
my bind works... somewhat.
But if I use:
<CFSELECT bind="cfc:myCFC.file.getSizes({materialColor})">
</CFSELECT>
I get:
"The specified CFC myCFC.file could not be found. The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings."
The Coldfusion exception log says the same. myCFC is setup as a mapping to the D:/wwwroot/CFC directory in Coldfusion Administrator. I've tried putting the .cfc file in the same directory as the .cfm that calls it but I get the same error. It seems no matter where I put it and tell Coldfusion to look for it, unless I use http: I get that error.
I've tried using the cfdebug parameter on the page after enabling debugging in Administrator but it doesn't seem to do anything.
I'm using Coldfusion 9 Developer with Apache 2.2.14 and PHP 5.2.11.
Thanks for the help.What you describe should work. I only have doubts about D:/wwwroot/CFC.
I successfully tested with something like this:
1) Component: c:\Coldfusion9\wwwroot\CFC\file.cfc
2) In the mappings page Administrator
Logical path: /myCFC
Directory path: c:\Coldfusion9\wwwroot\CFC
3) <CFSELECT bind="cfc:myCFC.file.getSizes({materialColor})"></CFSELECT -
Hi,
I need to get bind variables on SIEBEL to test the performance of query and my problem is on BIND :3 because it's impossible to interprete this.
NAME POSITION LAST_CAPTURED VALUE_STRING
:1 1,00 02/17/2010 11:54:25 1-15BVYY
:2 2,00 02/17/2010 11:54:25
:3 3,00 02/17/2010 11:54:25 W1B 1AH%
:1 1,00 02/17/2010 12:48:04 1-15BVYY
:2 2,00 02/17/2010 12:48:04
:3 3,00 02/17/2010 12:48:04 TQ3 3BJ%
Thanks for your helpI have no erros.
I just want to get the real value of bind variable to run my query, but the problem is on bind 2.
When i run this
select name,position,last_captured,value_string
from DBA_HIST_SQLBIND
where sql_id='&SQLID'
i obtain this
NAME POSITION LAST_CAPTURED VALUE_STRING
:1 1,00 02/17/2010 11:54:25 1-15BVYY
:2 2,00 02/17/2010 11:54:25
:3 3,00 02/17/2010 11:54:25 W1B 1AH%
:1 1,00 02/17/2010 12:48:04 1-15BVYY
:2 2,00 02/17/2010 12:48:04
:3 3,00 02/17/2010 12:48:04 TQ3 3BJ%
What is the value of bind :2
Thanks
Maybe you are looking for
-
Error in Login page of Portal30
Hai, I have installed Oracle 9iAS for WinNT platform. While trying to login to the Portal i get the following error message Error: You cannot login because there is no configuration information stored in the enabler configuration table. (WWC-41439) P
-
How to find out which queries are being used ?
We have a number of InfoSet Queries which the users are calling from SQ00. Some of them are very old. I would like to find out which queries are being used, so we can have the idle queries decommissioned. How can this be done ? Best regards, Peter
-
WAS Error at the time of BSP page execution
Hi All, in my system icm is running properly only, but when i try to execute any sample bsp application it is giving the error as "connection time out" is the error of WAS communication? here i am putting the error!!! <b>500 Connection timed out Conn
-
I am working on a project and shot guerilla style footage with a Go Pro camera, which produced .MP4 files incompatible with FCP7. When I converted the files to .MOV, I realized the rendering time in the sequence editor is impossibly long. I am workin
-
Webinar: How to implement secure scenarios with SAP NW PI 7.1
SAP Intelligence Platform & NetWeaver RIG APJ Expert Call Dear valued SAP Experts, Next SAP Intelligence Platform & NetWeaver RIG Expert Call Session will take place on Tuesday, August 18. The SAP Intelligence Platform & NetWeaver RIG Expert Call Ses