Strange Problem-------Call to Gothics of STRUTS

I m developing application on STRUTS frameork.
evrything is working fine , except for one thing.
Im having a dyna sction form , but when i invoke editQuestion.do
it gives me 500 error.
Can anybody find out why , it so ?
One more thing if i create one more dynaction form , and use this in my editQuestion.do , then it works , can u tellme why?
<?xml version="1.0" encoding="ISO-8859-1" ?>
Bean Definitions -->
<form-beans>
<form-bean
name="AddQuestionForm"
<form-property name="sectionId" type="java.lang.Integer"/>
<form-property name="active" type="java.lang.String"/>
<form-property name="answertext" type="java.lang.String[]" />
<form-property name="correct" type="java.lang.String[]" />
<form-property name="flag" type="java.lang.String"/>
<form-property name="subjective" type="java.lang.String"/>
</form-bean>
</form-beans>
<!-- =========================================== Action Mapping Definitions -->
<action-mappings>
<!-- Default "Welcome" action -->
<!-- Forwards to Welcome.jsp -->
<action
path="/addsection2"
type="SectionAction"
name="AddSectionDynaForm"
unknown="true"
scope="request"
validation="true"
input=".online.addSection" >
<forward
name="success"
path=".online.sectionAdded" redirect="false" />
<forward
name="addQuestionSubjective"
path="/AddQuestionSubjective.do" redirect="false" />
name="failure"
path="/failed.jsp" />
<forward
name="gotoaddQuestionObjective"
path="/failed.jsp" />
</action>
<action
path="/addQuestionObjective"
type="AddQuestionAction"
name="addQuestionForm"
scope="request"
validation="true"
input=".online.addQuestionObjective" >
<forward
name="success"
path=".online.questionAdded" redirect="false"/>
<forward
name="failure"
path="/failed.jsp" />
</action>
<action
path="/addQuestionSubjective"
type="AddQuestionAction"
name="addQuestionForm"
scope="request"
validation="true"
input=".online.addQuestionSubjective" >
<forward
name="success"
path=".online.questionAdded" redirect="false"/>
</action>
<action
path="/deleteQuestion"
type="DeleteQuestionAction"
validation="false"
scope="request" >
<forward
name="success"
path=".online.mainQuestion" redirect="false"/>
<forward
name="failure"
path="/failed.jsp" />
</action>
<action
path="/updateQuestion"
type="UpdateQuestionAction"
name="questionForm"
scope="request"
validation="true"
input=".online.editQuestion" >
<forward
name="success"
path=".online.questionAdded" redirect="false"/>
<forward
name="failure"
path="/failed.jsp" />
</action>
<action
path="/editQuestion"
type="EditQuestionAction"
name="questionForm"
validation="false"
scope="request" >
<forward
name="success"
path=".online.mainQuestion" redirect="false"/>
<forward
name="failure"
path="/failed.jsp" />
</action>
</action-mappings>
</struts-config>
In case if u want som more input s plz tell me

Bro when i specify "AddQuestionForm" , in editQuestion , then when i call , editQuestion.do , it shows me 500 Error (Not availaible),but if i declare another form bean "questionForm" which is a duplicate of AddQuestionForm , then it works.
Why is this so ?
Plz tell me bro

Similar Messages

  • Lync 2013 I have a strange problem concerning group call pickup in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having about 5-7 second Anybody out there having similar problems with call pickup Groups?

    HI
    I have a strange problem concerning  group call pickup  in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having  about 5-7 second
    Anybody out there having similar problems with call pickup Groups?

    Hi,
    Did you meet any other call delay when you using Lync?
    As the issue happen for Lync desktop client, it can be performance issue. Please check if there is any error message from FE Server when the issue happen.
    Also please check if you have updated Lync Server to the latest version, if not, update it and then test again.
    Best Regards,
    Eason Huang  
    Eason Huang
    TechNet Community Support

  • Strange problem with procedure calling from Java!!!

    I am using Oracle 8.1.7 Database, Oracle 8i Application server and WInNT platform.
    I am facing a strange problem while inserting a String from Java to Oracle database through Procedure. When i am passing the String containing single quotes(e.g "test' and ' and ' end") and without including any escape charactes for the single quotes I am passing the String by the setString() method then the procedure is inserting the single quotes without any problem.
    Of course when I am independently executing the procedure thru backend and passing the same String containing single quotes then the error message comes as " quoted string not properly terminated" which is justified,
    I have even printed the String in a file through sql on the runtime of the procedure when it is called by Java and then also the String contatins single quotes that is passed through java without any escape characters. This means that procedure is inserting the String into the column without any hassles!!!!!
    Can anyone tell me what may be the reason for the peculiar behaviour of Database?
    Thanks

    Sri Ram wrote:
    No actually in the documentation of oracle database 10g plsql user guide, oracle explains the concept of declaring nested plsql subprograms he gave the example but in the main block he gave NULL, without calling any procedure.Can you provide a link to where in the Oracle documentation you saw this example?
    in order to know which procedure is getting first i added a dbms statement in both the functions and called the function from the main block.
    the original example was
    DECLARE
    PROCEDURE proc1(number1 NUMBER); -- forward declaration
    PROCEDURE proc2(number2 NUMBER) IS
    BEGIN
    proc1(number2); -- calls proc1
    END;
    PROCEDURE proc1(number1 NUMBER) IS
    BEGIN
    proc2 (number1); -- calls proc2
    END;
    BEGIN
    NULL;
    END;
    ---------------------------------------------------------------------------------------------------------The original example is equivalent to:
    BEGIN
       NULL;
    END;That is, the main block never calls anything. Either you are misinterpreting the Oracle documentation, or if the example came from a non-Oracle source as I suspect, the author of that example has a deeply flawed understanding of how programming works.
    John

  • Submitting a form with enter key causing strange problems

    I am having a very strange problem with a webapp I am currently developing. I am using JSF 1.2 along with Facelets and RichFaces. I have coded a workflow/wizard 4-step process, and on some pages I have 4 submit buttons that all call different actions on the page. The users thought it would be useful to have the enter key submit the form, so I followed some online resources to trap a keypress using javascript, looking for the enter keycode and calling document.getElementById("elementName").click(). This works fine most of the time. Sometimes, though, it seems as if an entire new session is being created, and odd behavior starts happening. For example, my page will only include 2 of the 4 facelets on the screen -or- I will get NullPointerExceptions for objects that I know have been created in the session bean I am currently using -or- I will get a duplicate form Id after trying to re-submit the page. Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"? I'm really at my wit's end here (plus it's nearly 3 AM, that never helps things). All of the buttons being clicked are standard h:commandButtons. There is some setTimeout logic included to disable the buttons on the page to prevent double clicks (I cannot disable them onsubmit because disabled buttons don't pass the right values, perhaps that's causing it, but if so, clicking the buttons with the mouse would cause that issue too, right?)
    I am not posting the code (yet), but if anyone wants to take a look see and see if I am doing something really abhorrently wrong, I'm more than willing to, I'm just curious if anyone has had problems regarding javascript submission of forms via the click() method. Clicking the button does not exhibit this type of behavior. Just as a side note: I am doing different things with the enter key depending if a modal window is open (the enter key closes the modal if it's up, and if not, it submits the form via a button click).
    Any help is much appreciated, if anyone has any inkling about where I should start looking for answers it would be really helpful.
    Thank you.

    edfrost wrote:
    Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"?My guess is the second of these. You need to suppress the event handling after programmatically clicking the button.

  • Strange problems on Macbook Pro over past year...

    I'm about to do an erase and install after having numerous strange problems on my mid 2009 17" Macbook Pro (Leopard) over the past year, some of which I have opened threads for on these forums.
    They are listed bellow to see if anyone wants to give their final two cents as to what is causing them. They may or might not be related.
    1) I recently found the "Unknown" user classifications at second from top in the user priveleges for the main Macintosh HD folder and "Local Work" – which is my main folder for work.
    http://discussions.apple.com/thread.jspa?threadID=2741617&tstart=0
    2) Last Summer I had some very strange login problems which were well documented in this very long winding thread here:
    http://discussions.apple.com/thread.jspa?threadID=2485199&tstart=0
    3) Can't access iTunes store due to this error code -54. Thread opened here:
    http://discussions.apple.com/thread.jspa?threadID=2653733&tstart=0
    4) Some proceses I've seen in the activity monitor that are possibly a little sketchy are as follows:
    - "netsessionmac1" ... Akamai playing about?
    - "TaskManagerDaemo" ... with "Root" user, ... sounds a bit vague and possible malware according to google?
    5) In Skype I get constant warnings of other computers trying to connect from Little Snitch and Virus Barrier. I get so many of them one after they other pausing skype that I can only use Skype with Little Snitch off. I can only use it late at night also as there seems to be more attempts being blocked in virus barrier during the day that I can't even get past the login:
    Some examples in screen grabs:
    http://oi56.tinypic.com/xkwwtf.jpg
    http://oi55.tinypic.com/2v2w941.jpg
    And other examples of the hundreds of different IP addresses I've had asking to access computer on some obscure 4 digit port:
    http://whatismyipaddress.com/ip/86.178.52.58
    http://whatismyipaddress.com/ip/94.168.76.16
    http://whatismyipaddress.com/ip/94.171.116.123
    http://whatismyipaddress.com/ip/92.235.196.125
    http://whatismyipaddress.com/ip/92.239.25.70
    http://whatismyipaddress.com/ip/192.168.0.1
    http://whatismyipaddress.com/ip/92.235.208.101
    http://whatismyipaddress.com/ip/92.236.252.132
    http://whatismyipaddress.com/ip/85.15.190.49
    ... etc
    6) I have to constantly open and close Mail after it hangs on sending. Says there is a connection problem on port 110 or whatever, but words fine as soon as I open again. This problem happens particularly when I want to send from my 2nd or 3rd POP or IMAP other than my normal one.
    7) Slow Safari/Firefox and internet.
    8) I got this strange warning about my IP changing recently when downloading a file:
    http://oi53.tinypic.com/2z4b77o.jpg
    9) My internet cuts out for large periods of time while the other PC desktop in my house works perfectly fine.
    Well, any last suggestions much appreciated. Many thanks.
    Message was edited by: Scottishengineer

    I suppose your expanding battery problem could have caused some or all of these problems, but most of them sound like software issues.
    If I were you I'd try a few things:
    1. boot from your snow leopard install disk and repair your startup disk with disk utility.
    2. repeat the repairs until no repairs are reported (the toilet paper principle).
    3. repair permissions again.
    4. if the problems persist, trash the preferences files for the misbehaving apps.
    5. if the problems persist, delete the misbehaving apps and reinstall them.
    6. it the shutoffs persist, try a PMU reset.
    7. a PRAM reset would probably be a good idea too.
    8. if none of that works, archive and reinstall.
    there is a freeware utility called applejack that will also do most of this.
    Details on all of these will be readily available with a google search.

  • Problem calling a EJB Java Client from Java Activity Agent

    Hi,
    We have a wrapper java class that calls to an EJB through a JNDI lookup. The wrapper class is called from a workflow. The problem is that the call fail with the following message error:
    Error : getRemoteHome Lugar: ServiceLocator NamingException Mensaje Error: Receive timed out
    Mon Jan 09 15:32:13 EST 2006 Enqueuing VIC/97513 com.tallion.tax.workflow.assessment.Update
    F_FN_ERROR (MODULE=com.tallion.tax.workflow.assessment.Update) (ITEMTYPE=VIC) (ITEMKEY=97513) (ACTID=10617) (FUNCMODE=RUN) (ERRMESSAGE=getRemoteHome Lugar: ServiceLocator NamingException Mensaje Erro
    The wrapper class has in their classpath a jndi.properties as follows:
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.provider.url=69.0.137.120:1099
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    The call just works fine when we restart the Java Activity Agent and then, after a while it fails again with the same error.
    Any ideas/workaround?
    Thanks.

    I have a situation that is a bit similar. I have successfully used beans for storing methods used in JSPs and used by other methods in the same class as was suggested above. Now I would like to break some methods into another (utility) class since they are lower level and can be used by lots of things. They are for database operations (given a String query and String dbname, it queries and returns ResultSet for example). I want to have them in a separate class for reusability and OOP.
    I am having problems calling those public static methods in the public class from my bean that communicates with the JSP. I can't compile the class that calls the method in the database ops class. I get an error like :
    loginHelper.java:45: cannot find symbol
    symbol : variable sqlHelper
    location: class dbHelperBean.loginHelper
    and when I include the package name in the call I get
    loginHelper.java:45: cannot find symbol
    symbol : class sqlHelper
    location: package dbHelperBean
    That's strange since the package of both classes is dbHelperBean and the class is indeed called sqlHelper. I tried to compile it in the same directory as sqlHelper as well. What am I doing wrong?
    Thanks for any help.

  • Short code causes a strange problem - About the list again -- please read!

    Hi again people. Maybe you remember my project - has a list, that you can search thru using a text field. During the work I got stuck on a strange problem ( Again :-( ) My app has one text field, one combo box, one list and a text field once more. The code should do the following ->
    *1. Load the list, no problem with that.*
    *2. Show the elements of the list, that match the selected group in the combo box,no problem.*
    *3. Search thru the list using the text field,no problem.*
    4. When the user selects an element from the list, it should display its info in the second text field. This also works fine, but when after looking at info of one of the elements the things on numbers 2 and 3 ( look up! ) stop working. I must say that everything works fine until user selects an element from the list. I couldnt understand this kind of behavior so I am asking you to help me please.
    The code is very simple:
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    class the_window extends JFrame implements DocumentListener, ItemListener, ListSelectionListener {
        FileReader reader;
        String data_base[][];
        String first_pass[];
        int number_of_elements;
        DefaultListModel dflm = new DefaultListModel();
        JList list;
        JTextField text_field = new JTextField();
        JTextField info_field = new JTextField();
        String groups[] = {"1. group" , "2. group"};
        JComboBox groups_cmbx = new JComboBox(groups);
        the_window(){
            super("the Window!");
            JPanel panel = new JPanel(null);
            Container c = this.getContentPane();
            c.add(panel);
            text_field.setBounds(10,10,170,25);
            text_field.getDocument().addDocumentListener(this);
            panel.add(text_field);
            groups_cmbx.setBounds(10,45,170,25);
            groups_cmbx.addItemListener(this);
            panel.add(groups_cmbx);
            list = new JList(dflm);
            list.setBounds(10,90,170,190);
            list.setFixedCellHeight(20);
            list.addListSelectionListener(this);
            panel.add(list);
            info_field.setBounds(10,280,170,25);
            panel.add(info_field);
            load_the_base();
            refresh();
            this.setSize(190,350);
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            this.setResizable(false);
            this.setVisible(true);
        public void itemStateChanged(ItemEvent e){
            refresh();
        public void valueChanged(ListSelectionEvent e){
            String str = (String) dflm.getElementAt(list.getSelectedIndex());
            int index = 0;
            for(int i = 0; i < number_of_elements; i++){
                if(str.equals(data_base[0])){
    index = i;
    break;
    info_field.setText(data_base[index][1]);
    private void load_the_base(){
    String data = "";
    try{
    reader = new FileReader("data.txt";);
    int r = 0;
    while((r = reader.read()) != -1){
    char c = (char) r;
    data += c;
    reader.close();
    }catch(IOException e){}
    first_pass = data.split(";");
    number_of_elements = first_pass.length;
    data_base = new String[number_of_elements][];
    for(int i = 0; i<number_of_elements; i++){
    data_base[i] = first_pass[i].split("#");
    private void refresh(){
    String search_str = text_field.getText();
    int selektovano = groups_cmbx.getSelectedIndex();
    dflm.clear();
    for(int i = 0; i < number_of_elements; i++){
    int grupa = Integer.parseInt(data_base[i][2]);
    if(grupa == selektovano){
    String at_the_moment = data_base[i][0]; // if you change this to String at_the_moment = data_base[i][1]; it works perfectly
    if(at_the_moment.startsWith(search_str)){
    dflm.addElement(at_the_moment);
    public void changedUpdate(DocumentEvent e){
    refresh();
    public void removeUpdate(DocumentEvent e){
    refresh();
    public void insertUpdate(DocumentEvent e){
    refresh();
    public class Main {
    public static void main(String[] args) {
    JFrame f = new the_window();
    Now, can you please tell me whats wrong with this?
    For the "data.txt" make a new text file using *notepad* and copy the following line into the document:
    _1. element#1. info#0;2. element#2. info#0;3. element#3. info#1;4. element#4. info#1;5. element#5. info#1;_                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Darryl.Burke wrote:
    Keith, thanks for making that readable. So here's the diagnosis -
    In the refresh() method, calling defaultListModel.clear() results in a valueChanged(...) event in which this method calldefaultListModel.getElementAt(list.getSelectedIndex())results in the exception noted, as getSelectedIndex returns -1, the list being empty... you can't getElementAt(-1).
    I haven't analyzed all the code nor checked whether is now works as desired, but this small change to valueChanged counters the exception being thrown.   public void valueChanged(ListSelectionEvent e) {
    infoField.setText(""); // do this unconditionally
    if (list.getSelectedIndex() != -1) {
    String value = (String)defaultListModel.getElementAt(list.getSelectedIndex());
    for(int i = 0; i < numFields; i++){
    if(value.equals(matrix[0])){
    infoField.setText(matrix[i][1]);
    break;
    db
    Yea! You were right! I didnt think that calling *list_model.clear();* will result in calling *valueChanged()* ........
    That was some *clear()* thinking :-) Thank you!
    corlettk wrote:
    I cleaned up some variable & method names (tut tut), imports (very naighty), and some thread stuff... but it remains fundamentally the same codeIs it so important to "clean" the imports? How much does it slow down the loading time? Should I do this on all my projects, because they are all "very naighty"?
    ps. Thanks to all that gave some help to answering this strange question :-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Strange Problem in Oracle Forms.

    Hello,
    I have a strange problem of a form not opening in the migrated App Server but is working fine in the existing server.
    The problem is that we have now migrated to App Server 10.1.2.3.0 (patch applied to 10gR2 App Server installation) from 9.2.0.4.
    The issue is that the same form works perfectly fine in 9.2.0.4 but doesnt open up in the 10.1.2.3.0 server itself !
    The form is called using "new_form" procedure.
    I even cross checked by giving other form names; they work fine. But this set of forms (for which problem occurs) only doesnt open up.
    All the forms are compiled against 10.1.2.3 Compiler; All point to the same OLB and all of them have a common menu bar.
    Peculiar thing is WEBUTIL is working for all forms. Version is 1.0.6. No problems in WebUtil.
    Please help me making this sole out as we need to migrate this ASAP.
    Requesting one and all.
    Thanks.

    Solved it out..
    It was an error in frmwebutil.jar installation.
    Below is the link from Metalink:
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=421930.1
    Cheers !

  • Strange problem with Subviews on 1.0 Beta

    Hi,
    I'm having a strange problem with SubViews on 1.0 Beta. I'm not sure If I'm being stupid and have done something wrong, or if there's a problem here.
    My application is directly based on one of the examples, so the structure etc is almost identical. I've simplified the files below to avoid confusing the issue.
    The default landing page (greeting.jsp) looks like this:
    <%@ taglib declarations for HTML and CORE taglibs %>
    <HTML>
    <HEAD><title>Insulation Layer Demo</title></HEAD>
    <body bgcolor="white">
    <f:view>
    <jsp:include page="sysstatus.jsp" />
    <!-- other strictly HTML content -->
    </f:view>
    </body>
    </HTML>
    sysstatus.jsp looks like this:
    <%@ taglib declarations for HTML and CORE taglibs %>
    <f:subview id="SystemStatusView">
    <h:form id="systemStatusForm">
    <p><h:selectboolean_checkbox id="System1Available" value="#{SystemStatus.system1Available}"/>System 1<br/>
    <h:selectboolean_checkbox id="System2Available" value="#{SystemStatus.system2Available}"/>System 2</p>
    <p><h:command_button id="submit" action="success" value="submit" /></p>
    </h:form>
    </f:subview>When I view this page, the checkboxes all seem to work okay (in that their state is preserved across calls etc), but the formatting is very screwy. The resulting page looks something like:
    <chkbox1> <chkbox2> <Submit>
    System 1
    System 2
    <Other HTML content from greeting.jsp>When I look at the HTML source code being generated, it is genuinly being generated as above, that is, all the form tags first, and then the rest of the content. Interestinly, I tried adding a ${SystemStatus.system2Available} into the body text, and it was rendered as literal text (i.e. not evaluated as EL), which is very curious -- makes me wonder if the included file is included as text, rather than JSP, although the custom taglibs and <f:form> tags etc are not in the generated HTML.
    If I lift all the content between the <h:form> tags (inclusive) out of sysstatus.jsp and put it in greeting.jsp in place of the <jsp:include> tag, all is well.
    Any ideas? All help gratefully recieved!
    Thanks,
    Paul

    Personally, I think it is a bug in the rendering model of JSF itself because if you include any non-JSF tags, they don't get rendered according to my understanding of the what the spec says (in the location the tags are written).
    The only workaround that I could come up with is to use straight JSF tags in all of your layers. Things are then rendered the way that they "should" be rendered.
    You could try wrapping all of your HTML tags in <f:verbatim> tags and see if that helps.
    Good luck!
    David

  • A very Strange Problem!!!help me!!

    i encounter a very strange problem, in EJB
    i write two EJB, one Stateless Session called A, and one Entity called B.
    i want to call B's findByPrimaryKey method in one A's Business, but failed!!!
    but when i remove the statement that performed the findByPrimaryKey method to A's setSessionContext method, It's Success!!!!!
    what the Problem, i am useing the Borland 's AppServer.
    who can help

    how u create the entity bean B from A?
    using proper lookup?
    can u try by write a small function inside bean A
    that contain proper lookup to Bean B...
    then try to call finbyPrimaryKey...
    now tell me is it working?
    or else can u give code or clear idea..
    if i can help u ,,,, sure i will
    do mail me
    [email protected]

  • Strange problem while building a secondary index.

    Hi,
    I have a strange problem in creating a secondary index which is a part of primary data.
    I tested my program and a working sample program
    My data scheme looks like:
       Key = unique string
       Data = structure {
                        time_t timestamp;
        Secondary Key = timestamp in data (NOT unique)
    My BDB environment flags is "DB_CREATE | DB_INIT_CDB | DB_INIT_MPOOL | DB_THREAD"
    The primary DB is created as BTREE with a custom key compare function provided by calling DB->set_bt_compare.
    int my_key_compare(DB *db, const DBT *key1, const DBT *key2)
         const char *k1_v = (const char *)key1->data;
         const char *k2_v = (const char *)key2->data;
         return strcmp(k1_v, k2_v);
    The secondary Index DB is created as BTREE while permitting duplication. (DB_DUPSORT)
    It has two custom callback functions; one for data compare, the other for extracting a data from the primary data.
    int my_extract_timestamp(DB *db, const DBT *primary_key, const DBT *primary_data, DBT *secdondary_key)
         secondary_key->data = ( (MY_DATA *)(primary_data->data))->timestamp;
         secondary_key->size = sizeof(time_t);
         return 0;
    int my_secondary_dup_compare(DB *db, const DBT *key1, const DBT *key2)
         time_t      k1_v = *(time_t *)key1->data;
         time_t      k2_v = *(time_t *)key2->data;
         return k1_v - k2_v;
    The function 'my_extract_timestamp' is set by calling DB->associate().
    My problem is 'my_secondary_dup_compare' function called with a strange DBT values.
    I think the values should point to the value provided from my_extract_timestamp(), but they pointed to
    the key which provided when calling DB->put on the primary DB.
    Could somebody help me ?
    Any help highly appreciated.

    Hi,
    In the secondary database, the key is what you extract and the data is the key of the primary database. As your primary key is a unique string, your data in secondary database is also a unique string. The DB->set_dup_compare sets the comparison function for the duplicate data, so you are comparing time stamps on unique strings, not on what you extract.
    As you are comparing the time stamps which are the keys of secondary database, I guess here you want to set the bt_compare function instead of the dup_compare for the secondary database.
    Also, about this sentence:
    secondary_key->data = ( (MY_DATA *)(primary_data->data))->timestamp;
    The DBT.data should be an address, but this is a value here instead of an address.
    Regards,
    Winter, Oracle Berkeley DB

  • Stranger problems with my Lumia 800

    Hi everyone,
    Is there anybody help me determin these strange problem of my phone?
    The major questions are the follows:
    The Accelerometer is unavailable, the pictures and browsers cannot landscape mode.
    The Setting-> Brightness->Automatically adjust cannot be turned on, it would be turned off automatically.
    The light of screen will  always lightly even I answer an call.
    Then I press the ##634# to enter the diagnostics testing and find the following are unavailable:
    Accelerometer
    Magnetometer
    Proximity
    ALS
    Lights
    Is there anybody can tell me if it's hardware problem or just firmware problem of the mobile?
    Can it be fixed when the firmware is getting updated?
    Thanks.
    Yee

    Is it a new phone, or have these problems just started? Has it ever worked properly?
    If it's new and not working properly then I would return it to the store for replacement or Nokia Care for a check

  • There are some strange problems when i used swc files in my as3 project

    Hello everyone,
            My development environment:  fdk4.0,  flash cs5.5,  I publish fla file by using flash cs5.5,   publish setting is  fp version :10.0&10.1 ->swc. I imported swc files to my as3 project and  complied them by using flex sdk4.0. When i run my project,fp was crash.   when i republished on fp 10.2, the project works. Is there any reason?
            another strange problem, for example   a MovieClip's aslink named "A" in swc, it has a textfield named "subText".  I write code like below:
                            var mc:A = new A();
                            mc.subText.text = "test";  
             when mc called "subText" , fp throws null property error, it can't find  subText..  very small number of movieclips have this problem,  I sloved this by duplicating a new one and rename it.
             but i don't  know why ? 
              thank you for your reply.

    I should have figured that out from your original post. I think there is a possibility that your bookmarks/history database (places.sqlite) has a corrupted record. Rather than take drastic action on that immediately, could you do a test? The test is to exit Firefox, rename your existing database, and restart Firefox. Firefox should import your last bookmarks backup. You then could check whether the problem remains or whether you got a clean restore of bookmarks. After the test, assuming you prefer to retain your history, you could undo the procedure and try restoring your bookmark backup into the database to see whether that overwrites the problem record. If not, then we would go back to possible drastic action.
    '''Test procedure''':
    Open your current Firefox settings (AKA Firefox profile) folder using
    Help > Troubleshooting Information > "Show Folder" button
    Switch back to Firefox and Exit
    Pause while Firefox finishes its cleanup, then rename '''places.sqlite''' to something like places_20130614.sqlite. Keep this window open.
    Restart Firefox. By design, Firefox should import your last automatic bookmark backup.
    If you return to the Library dialog, how does it look?
    '''To reverse the test''' (but preserve a backup of your history/bookmark database):
    Exit Firefox
    Delete the newly created places.sqlite file
    Right-click copy and paste the places_20130614.sqlite and rename the copy to places.sqlite
    Restart Firefox and open the Library dialog. Should look like it did a few minutes ago before any changes.
    ''If the test showed no corruption,'' try to restore your last bookmarks backup. The procedure is described in this article: [[Restore bookmarks from backup or move them to another computer]].
    Does any of that get us closer to a solution?

  • Strange problem - APEX_ITEM.POPUPKEY_FROM_QUERY

    I am facing a strange problem when I use APEX_ITEM.POPUPKEY_FROM_QUERY in my report.
    When I select a value from LOV it returns the value to some different row and not to the row from where it was called.
    What should I do. I have long lists where cannot be displayed in Select List.

    I think this will happen if you have column sorting enabled and that seems to be a bug. Try turning the sorting off.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • A strange problem in smartform

    dear all,
    I define an internal table in the form interface of sm.
    and define a work area of the internal table in the global definitions.
    the workarea and the internal table like the same structure.
    and in the initialization of sm.
    I write the following code and set a break-point.
    loop at itab into wa_itab.
    endloop.
    the strange thing is :some of the  fields is  STCEG,BANKN,BANKA.
    eg:
    before the loop .
    itab-bankn = '360200051920001479'.
    itab-banka='agricultural bank of China'.
    after execute the  loop at itab into wa_itab.
    endloop.
    wa_itab-bankn = '     3602000519200'.
    wa_itab-banka='01479agricultural bank of China'.
    why occurs this strange problem?
    does anyone know this ?
    pls help me .
    thank you very much!

    Hi,
    Are you using the internal table with HEADER LINE in the program? If so, please clear the work area before calling the smartform.
    Regards,
    KK

Maybe you are looking for