JAVA operator precedence table is wrong.

I can not understand why JAVA auto-increment/decrement operator does not follow the rules of Operator Precedence table at http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html
The precedent order is as follow:
postfix: expr++ expr--
unary: ++expr --expr +expr -expr ~ !
multiplicative: * / %
From the above we know that x++/x-- is higher then ++x/--x and multiplicative is the lower then both.
I tested the following in JAVA:
int y,x = 2;
y = --x * x++;
System.out.println(x); //Output is 1.
Why?
Theoretically, x++ must be performed before --x, finally then the multiplication (*) and the answer should be
x++ value=2, stored variable=3
--x value=2, stored variable=2
Therefore 2 * 2 = 4.
Why JAVA is not following the rules that it setup for itself??
After much research, my conclusion is JAVA Operator Precedence table in java.sun.com website is wrong. The right version should be the same as this website: http://www.sorcon.com/java2/precedence.htm.
Please run your example code in JAVA before you want to prove me wrong.
Thank you.

Hi jsalonen, thank you for your reply. Yes, I see your theory but sorry to say that I don't agree with you. Let's take your example -x++ for our discussion below:
First let's agree with this:
x = 2;
y = -x;
System.out.println("y = " + y); // y = -2
System.out.println("x = " + x); // x = 2
From the above, we can see that by using the negation operator doesn't mean that we have changed the value of x variable. The system just assigns the value of x to the expression but still keeping the value of variable x. That's why we got the output above, agree?
Now, let's evaluate your example:
int y, x = 2;
y = -x++;
System.out.println("y = " + y); // -2
System.out.println("x = " + x); // 3
Hence below is the sequence of process:
1. -x is evaluated first. Value in variable x is assigned to the expression. At this point the value of x is 2 and this value get negated. However the variable x still storing 2.
2. Now x++ get evaluated, since this is a postfix increment operator, the value will get assigned first then increase. However x is already assigned, we can not assign it twice, just like if you perform x++ first, you have assigned x then increase and you didn't assign it again for the negation operator. If you did, x would be 3 and get negated to -3. Note that system also cannot perform 2++ because 2 is not a variable. Therefore it is logical to say that x is assigned to the expression and got negated by negation operator then increase the varaible x by 1. So here we increase the value of x by 1 and the result is 3. Therefore variable x is storing 3.
Now, try the follwing
x = 2;
y = -x + x++;
What is the value of x after -x? It's 2. Remember 2 is assign back to expression but x still retained the original value. If not we would expect x++ to be (-2)++, right?
But see the output for yourself:
System.out.println("y = " + y); // 0
System.out.println("x = " + x); // 3
As for the subexpression theory, sorry to say that I don't agree with you as well. See the expression below:
y = -x + x++;
We can identify that there are 4 operators in this statement, right? (assignment operator, negation operator, addition operator and increment operator)
since JAVA has defined all the operators in the table and already given each of them a priory and associativity, I don't see any subexpression here. If yes why didn't they mention about subexpression rule in the table? Shouldn't that be defined explicitly so that it doesn't confuse people?
In conclusion, I still think that JAVA need to correct the operators precedence table at http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html so that they don't confused people for another 10 years. :) Moreover the table is not complete because it did not include . and [ ] and (params) operators.

Similar Messages

  • (Error in documentation?) Math operator precedence problem

    Hello,
    I apologize in advance, while I do know programming (I'm a PHP and Perl programmer) I'm fairly new to Java so this may well be a silly question, but that's why I am here. I hope you'll show me where my error is so I can finally set this to rest before it drives me mad :)
    (Also, I hope I'm posting this in the right forum?)
    So, I am taking a Java class, and the question in the homework related to operand precendence. When dealing with multiplication, division and addition, things were fine, the documentation is clear and it also makes sense math-wise (multiplication comes before addition, etc etc).
    However, we got this exercise to solve:
    If u=2, v=3, w=5, x=7 and y=11, find the value assuming int variables:
    u++ / v+u++ *w
    Now, according to the operator precedence table (http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html) the unary operator u++ comes first, before multiplication, division and addition.
    This would mean I could rewrite the exercise as:
    ((u+1)/v) + ((u+1)*w) = (3/3) + (4*5) = 1+20 = 21
    However, if I run this in Java, the result I get is 15.
    I tried breaking up the result for the two values in the Java code, so I could see where the problem is with my calculation.
    For
    System.out.println(u++ /v);
    I get 0
    For
    System.out.println("u++ *w");
    I get 15
    My professor suggested I attempt to change the values from int to float, so I can see if the division came out to be something illogical. I did so, and now I get:
    For
    System.out.println(u++ /v);
    I get 0.66667
    For
    System.out.println("u++ *w");
    I get 15.0000
    Which means that for the first operation (the division) the division happens on 2/3 (which is 0.6667) and only afterwards the u value is increased. That is, the u++ operation is done after the division, not before. The same happens with the multiplication; when that is carried out, the value of u is now 3 (after it was raised by one in the previous operation) and the first to be carried out is the multiplication (3*5=15) and only then the u++.
    That is entirely against the documentation.
    This is the script I wrote to test the issue:
    public class MathTest {
         public static void main (String [] args) {
              float u=2, v=3, w=5, x=7, y=11;
              System.out.println("Initial value for 'u': " + u);
              float tmp1 = u++ /v;
              System.out.println("u++ /v = " + tmp1);
              System.out.println("First ++ value for 'u': " + u);
              float tmp2 = u++ *w;
              System.out.println("u++ *w= " + tmp2);
              System.out.println("Second ++ value for 'u': " + u);
              System.out.println(tmp1+tmp2);
    The output:
    Initial value for 'u': 2.0
    u++ /v = 1.0
    First ++ value for 'u': 3.0
    u++ *w= 20.0
    Second ++ value for 'u': 4.0
    21.0
    Clearly, the ++ operation is done after the division and after the multiplication.
    Am I missing something here? Is the documentation wrong, or have I missed something obvious? This is driving me crazy!
    Thanks in advance,
    Mori

    >
    The fact that u++ is evaluated but in the calculation itself the "previously stored" value of u is used is completely confusing.
    >
    Yes it can be confusing - and no one is claiming otherwise. Here are some more thread links from other users about the same issue.
    Re: Code Behavior is different in C and Java.
    Re: diffcult to understand expression computaion having operator such as i++
    Operator Precedence for Increment Operator
    >
    So, when they explain that ++ has a higher precedence, the natural thing to consider is that you "do that first" and then do the rest.
    >
    And, as you have discovered, that would be wrong and, to a large degree, is the nut of the issue.
    What you just said illustrates the difference between 'precedence' and 'evaluation order'. Precedence determines which operators are evaluated first. Evaluation order determines the order that the 'operands' of those operators are evaluated. Those are two different, but related, things.
    See Chapter 15 Expressions
    >
    This chapter specifies the meanings of expressions and the rules for their evaluation.
    >
    Sections in the chapter specify the requirements - note the word 'guarantees' in the quoted text - see 15.7.1
    Also read carefully section 15.7.2
    >
    15.7. Evaluation Order
    The Java programming language guarantees that the operands of operators appear to be evaluated in a specific evaluation order, namely, from left to right.
    15.7.1. Evaluate Left-Hand Operand First
    The left-hand operand of a binary operator appears to be fully evaluated before any part of the right-hand operand is evaluated.
    If the operator is a compound-assignment operator (§15.26.2), then evaluation of
    the left-hand operand includes both remembering the variable that the left-hand
    operand denotes and fetching and saving that variable's value for use in the implied
    binary operation.
    15.7.2. Evaluate Operands before Operation
    The Java programming language guarantees that every operand of an operator (except the conditional operators &&, ||, and ? appears to be fully evaluated before any part of the operation itself is performed.
    15.7.3. Evaluation Respects Parentheses and Precedence
    The Java programming language respects the order of evaluation indicated explicitly by parentheses and implicitly by operator precedence.
    >
    So when there are multiple operators in an expression 'precedence' determines which is evaluated first. And, the chart in your link shows 'postfix' is at the top of the list.
    But, as the quote from the java language spec shows, the result of 'postfix' is the ORIGINAL value before incrementation. If it makes it easier for then consider that this 'original' value is saved on the stack or a temp variable for use in the calculation for that operand.
    Then the evalution order determines how the calculation proceeds.
    It may help to look at a different, simpler, but still confusing example. What should the value of 'test' be in this example?
    i = 0;
    test = i++; The value of 'test' will be zero. The value of i++ is the 'original' value before incrementing and that 'original' value is assigned to 'test'.
    At the risk of further confusion here are the actual JVM instructions executed for your example. I just used
    javap -c -l Test1to disassemble this. I manually added the actual source code so you can try to follow this
            int u = 2;
       4:iconst_2       
       5:istore  5
            int v = 3;
       7:iconst_3       
       8:istore          6
            int w = 5;
      10:iconst_5       
      11:istore          7
            int z;
            z = z = u++ / v + u++ * w;
       13:  iload   5
       15:  iinc    5, 1
       18:  iload   6
       20:  idiv
       21:  iload   5
       23:  iinc    5, 1
       26:  iload   7
       28:  imul
       29:  iadd
       30:  dup
       31:  istore  8
       33:  istore  8The Java Virtual Machine Specification has all of the JVM instructions and what they do.
    http://docs.oracle.com/javase/specs/jvms/se7/jvms7.pdf
    Your assignment to z and formula starts with line 13: above
    13: iload 5 - 'Load int from local variable' page 466
    15: iinc 5, 1 - 'Increment local variable by constant' page 465
    18: iload 6 - another load
    20: idiv - do the division page
    21: iload 5 - load variable 5 again
    23: iinc 5, 1 - inc variable 5 again
    26: iload 7 - load variable 7
    28: imul - do the multiply
    29: iadd - do the addition
    30: dup - duplicate the top stack value and put it on the stack
    31: istore 8 - store the duplicated top stack value
    33: istore 8 - store the original top stack value
    Note the description of 'iload'
    >
    The value of the local variable at index
    is pushed onto the operand stack.
    >
    IMPORTANT - now note the description of 'iinc'
    >
    The value const is first sign-extended to an int, and then
    the local variable at index is incremented by that amount.
    >
    The 'iload' loads the ORIGINAL value of the variable and saves it on the stack.
    Then the 'iinc' increments the VARIABLE value - it DOES NOT increment the ORIGINAL value which is now on the stack.
    Now note the description of 'idiv'
    >
    The values are popped
    from the operand stack. The int result is the value of the Java
    programming language expression value1 / value2. The result is
    pushed onto the operand stack.
    >
    The two values on the stack include the ORIGINAL value of the variable - not the incremented value.
    The above three instructions explain the result you are seeing. For postfix the value is loaded onto the stack and then the variable itself (not the loaded original value) is incremented.
    Then you can see what this line does
      21:  iload   5 - load variable 5 againIt loads the variable again. This IS the incremented value. It was incremented by the 'iinc' on line 15 that I discussed above.
    Sorry to get so detailed but this question seems to come up a lot and maybe now you have enough information and doc links to explore this to any level of detail that you want.

  • Help with operator precedence.

    I'm having trouble telling whether + and - signs are unary or binary in figuring out operator precedence. I understand that the unary makes things positive and negative and that the binary is addition and subtraction. here is an example from my notes.
    a + b > - c I I ! d && e == f - g % h. It says that the a+b is the first order of evaluation. Heres the full order is gives for the order of evaluation. (132948765) What I don't understand is how the first plus is unary and not binary because it seems to be addition, and I was under the influence that the unary+ is not used very much. Could someone clear this up. Thanks
    Edited by: javaguy84 on Oct 4, 2007 10:38 PM
    Edited by: javaguy84 on Oct 4, 2007 10:39 PM

    What I don't understand is how the first plus is unary and not binary because it seems
    to be additionYou're right the first plus is a binary operator - otherwise the "a" would be left stranded: unconnected to the rest of the expression.
    In trying to figure out why the plus is the first operator (first in order of operation I mean, not leftmost) it might be helpful to bear in mind: With binary operations (and other places) Java evaluates things left to right. The left hand operand will be completely evaluated before work starts on the right hand operand.
    This is in addition to operator precedence and parentheses.
    See if that helps figure out the order.
    jverd is correct this is a dumb question. It has as much to do with expressions and their evaluation as a crossword puzzle has to English literature. Its dumbness is not of your making, but you might like to raise with your teacher that view that expressions like this would be wrong even if they were correct.
    (Finally there isn't really an order completely defined for this expression because some of the subexpressions may - or may not - ever be evaluated.)
    Post back if you can't figure it out. But give your reasons. Ie list step by step how you think the expression would be evaluated.
    [Edit] Except that assignment operators are evaluated right to left!

  • Operator precedence and associatively

    Greetings,
    I'm a Java newbie, and reflecting that is this concept questions. I'm trying to understand operator precedence and associatively. I understand that operator associatively is how items are read in an expression - like, they (items) are read from left to right. The book I'm trying to learn from talks a lot about this but it all blows over my head.
    I was wondering if one of you Java wizards could explain this concept to me in greater detail. I would really appreciate any thoughts.
    thanks a lot!
    Stephen

    Thousands will disagree with me, but IMHO you should use brackets to make things clear rather
    than assume everyone knows all the precedence rules.
    Basically the concept is:
    1 + 2 * 3 : Does the plus get done first (leaving 3 * 3) or does the the multiply (leaving 1 + 6) ?
    * has a higher precedence so you get 1 + (2 * 3). If you had written it that way in the first place
    you would be less likely to get it wrong when debugging at 3am.
    Associativity comes in when you have two operators of the same precedence.
    Hope this helps !

  • Minus operations on table

    Hi everyone,
    I am trying to find a way to do minus operations on table. I know this is possible in SQL, but I have yet to find out how to do it in ABAP. Can anyone help?
    What I need to do is the following.
    Let table A = (A,B,C,D,E) and table B = (B,C,E), then A minus B would return (A,D). Is there a function in ABAP for this?
    Thank you very much in advance.
    Philip R. Jarnhus

    hello,
    u can use subqueries:
    http://help.sap.com/saphelp_NW04/helpdata/en/dc/dc7614099b11d295320000e8353423/content.htm
    it is easy, but wrong way to solve your problem. This select will make a lot of calls to your DB.
    better way:
    1) two selects from table 1 and table 2 into two different internal tables.
    define two internal tables in your code. One table should have standard tables type and another hashed tables type with unique.
    2) subtract the result:
    loop at it_1 into ls_1.
      lv_tabix = sy-tabix.
      read table lt_1 transporting no fields with table key column_name =  ls_1-column_name.
    check sy-subrc eq 0.
      delete it_1 index lv_tabix.
    endloop.
    this solution will speed up your application.

  • Storage of Java object in table column

    Hello,
    We have developed an application that requires some Java objects to be stored in tables.
    With JDataStore, Cloudscape or InstantDB the operation is rather straightforward. We can use something like:
    pstmt = conn.prepareStatement("INSERT INTO TABLEOBJ(ID,OBJ) VALUES (?,?)");
    pstmt.setLong(1,i);
    pstmt.setObject(2,myObject);
    psmt.executeUpdate();
    Some of our clients would like us to use Oracle Lite rather than any of the previously mentioned databases. The only problem is that the above simple code does not work with Oracle.
    What is then the easiest way to save Java Object in table column?
    Thanks in advance,
    Benoit Marchal

    found part of the answer in another newsgroup.
    But is Oracle Lite 4.0 offering the same possibility? Is it going to be implemented in Oracle Lite 5.0?
    Benoit
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alexander Day ([email protected]):
    Another little tidbit from ORacle's documentation:
    "Important: The JDBC 2.0 specification states that PreparedStatement methods setBinaryStream() and setObject() can be used to input a stream value as a BLOB, and
    that the PreparedStatement methods setAsciiStream(), setUnicodeStream(), setCharacterStream(), and setObject() can be used to input a stream value as a CLOB. This
    bypasses the LOB locator, going directly to the LOB data itself. In the implementation of the Oracle JDBC drivers, this functionality is supported only for a configuration using an 8.1.6 database and
    8.1.6 JDBC OCI driver. Do not use this functionality for any other configuration, as data corruption may result."<HR></BLOCKQUOTE>
    null

  • How to use EVS with different data in each row, in a Java Web Dynpro table?

    Hi all,
    I am using EVS in a column of java web dynpro table.
    Let's say the name, and context attribute, of this column is column1.
    It's filled dynamically using an RFC, that uses as input parameter the value of another column, and related context attribute, from the same table (Let's call it column2).  Obviously, from the same row. So, in other words: the values of the EVS in column1 of row1, are dependent of the value of column2 of row1. And the values of the EVS in column1 of row2, are dependent of the value of column2 of row2. And so on... Hope i could explain myself ok.
    The code I'm using works great for filling the EVS dynamically:
    IWDAttributeInfo attrInfo = wdContext.nodeDetail().getNodeInfo().getAttribute(nodeElement.COLUMN1);
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    value.clear();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for (int i = 0; i < wdContext.nodeRFCresult().size(); i++){
              value.put(wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgort()
                 , wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgobe());
    In this code, nodeElement is the context row of the table that is passed dynamically to the method when the value of colum2 is changed.
    HOWEVER, the problem I'm having is that after executing this code, EACH NEW ROW that is added to the table has by default the same values as the first row, in the column1 EVS. And, for example, if I refresh the values of the column1 EVS in row 2, all EVS values in the other rows are also refreshed with the same values as the ones of EVS in row 2.
    How can I make sure each row EVS has its own set of independent values, so they don't mess with each other?
    Hope you guys can help me. And please, let me know if I didn't explain myself correctly!
    Thanks!

    I just did as you said (I think), but it's still having the same behaviour as before (same data for all EVS in the table).
    Here´s what I did:
    I
    In node "Detail" (cardinality 0...n, singleton set to true), which is binded to the table, I created a child node named "Column1Values" wth cardinality 1...1 and singleton set to false.
    "Column1Values" node has an attribute called "column1", of type String.
    I did the binding between attribute "column1" and the column1 inputfield celleditor in the table.
    I created an event called Column2Changed and binded it to the column2 celleditor of the table. I added a parameter called nodeElement of type IPrivateCompView.IDetailElement to this event, and mapped it to the column2 editor in the table so that I can dynamically get the nodeElement that is being affected.
    I added the following code to the onActionColumn2Changed(wdEvent, nodeElement) method that gets created in the view:
    IWDAttributeInfo attrInfo = nodeElement.nodeColumn1Values().getNodeInfo().getAttribute("column1");
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for(int i =0; i < wdContext.nodeRFCresults().size(); i++){
              value.put(wdContext.nodeRFCresults().getRFCresultsElementAt(i).getId(),
                                  wdContext.nodeRFCresults().getRFCresultsElementAt(i).getDesc());
    And with this, I still get the original problem... When the EVS of one row is updated, ALL other EVS of the table get also updated with the same values.
    What am I missing? Sorry Govardan, I bet I'm not seeing something really obvious... hopefully you can point me in the right direction.
    Thanks!

  • Java.lang.Exception: Couldn't find a matching Java operation for WSDD

    Hi all,
    i used Eclipse to create a web service. actually i created a class with the following code:public class Add2Num {
         public int Add2Numbers(int x,int y)
              return x+y;
    }then i tried to generate wsdl file for this class, after i generate the wsdl file, i tried to run it but the following exception appear:
    org.apache.axis.InternalException <init>
    SEVERE: Exception:
    java.lang.Exception: Couldn't find a matching Java operation for WSDD operation "add2Numbers" (2 args)
         at org.apache.axis.InternalException.<init>(InternalException.java:71)
         at org.apache.axis.description.JavaServiceDesc.loadServiceDescByIntrospection(JavaServiceDesc.java:891)
         at org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:477)
         at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:285)
         at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500)
         at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
         at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
         at org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:427)
         at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:231)
         at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
         at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755)
         at org.apache.axis.handlers.http.URLMapper.invoke(URLMapper.java:50)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:239)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         at java.lang.Thread.run(Thread.java:595)

    The cause is case mismatch.
         Your method signature : public int Add2Numbers(int x,int y) --- Upper Case
    But the signature produced is
    ouldn't find a matching Java operation for WSDD operation "add2Numbers" (2 args)
    ( from the error trace ) -- Lower case.
         Change the case of your method to add2number (lowercase ) as per conventions and you code will work.
    Rgdz,
    Saroj Kumar

  • Java dictionary database table in web dynpro application

    Hi,
    I want to access java dictionary database table in my web dynpro application in java.
    Right now I have created one java dictionary DC.
    and in that Dc i have created two database table .
    Now I want to use this table in my web dynpro application.
    Can anyone help me.

    You can use the Dictionary Projects to create tables in Database. You must use codes to access these database tables that is created using Dictionary projects.
    You have to use the DataSource in order to get connection ; Use Visual Administrator to see the data source name.
    You can use the following code to access the database table.
    ResultSet result = null;
    try
         InitialContext initialcontext = new InitialContext();
         DataSource datasource = (DataSource)initialcontext.lookup("jdbc/<DataSourceName>");
            Connection connection = datasource.getConnection();
         Statement statement = connection.createStatement();
         result = statement.executeQuery( <Query>);
         connection.close();
    } catch (NamingException e) {
         // TODO Auto-generated catch block          
              e.printStackTrace();
    } catch (SQLException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    Regards
       Vinod

  • BAPI step by step to connect JAVA for catsdb table

    BAPI step by step to connect JAVA for catsdb table,
    Points will be rewarded,
    full points with example of catsdb table in bapi for JCO JAVA
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    Check the thread..
    https://forums.sdn.sap.com/click.jspa?searchID=3587428&messageID=3647918
    Regards,
    Omkar.

  • Error - Caused By: java.lang.NoClassDefFoundError: t : T (wrong name t)

    I am getting below error when the weblogic server starts. Can somebody help on this.
    DS (XreferenceDB) creation was successful but could not test (Not available in Testing tab).
    ####<Jul 3, 2012 7:18:14 PM IST> <Error> <Deployer> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323294981> <BEA-149231> <Unable to set the activation state to true for the application 'XreferenceDB'.
    java.lang.NoClassDefFoundError: t : T (wrong name t)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:101)
         at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.rmi.internal.GenericMethodDescriptor.getActualClassName(GenericMethodDescriptor.java:216)
         at weblogic.rmi.internal.GenericMethodDescriptor.access$100(GenericMethodDescriptor.java:19)
         at weblogic.rmi.internal.GenericMethodDescriptor$TypeParameter.<init>(GenericMethodDescriptor.java:250)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseParams(GenericMethodDescriptor.java:111)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseGenericParameter(GenericMethodDescriptor.java:151)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseParams(GenericMethodDescriptor.java:109)
         at weblogic.rmi.internal.GenericMethodDescriptor.computeGenericMethodSignature(GenericMethodDescriptor.java:75)
         at weblogic.rmi.internal.GenericMethodDescriptor.computeGenericMethodSignature(GenericMethodDescriptor.java:46)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.initRemoteMethods(BasicRuntimeDescriptor.java:715)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.initializeRuntimeDescriptor(BasicRuntimeDescriptor.java:244)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:155)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:139)
         at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:106)
         at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
         at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
         at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
         at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
         at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
         at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
         at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
         at weblogic.rmi.extensions.server.ServerHelper.replaceAndResolveRemoteObject(ServerHelper.java:403)
         at weblogic.jndi.internal.WLEventContextImpl.copyObject(WLEventContextImpl.java:381)
         at weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:276)
         at javax.naming.InitialContext.bind(InitialContext.java:400)
         at weblogic.jdbc.common.internal.JDBCUtil.bindDeeply(JDBCUtil.java:147)
         at weblogic.jdbc.common.internal.JDBCUtil.bindAll(JDBCUtil.java:85)
         at weblogic.jdbc.common.internal.RmiDataSource.start(RmiDataSource.java:394)
         at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:136)
         at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:97)
         at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:347)
         at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:531)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:165)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:157)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:42)
         at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ###<Jul 3, 2012 7:18:15 PM IST> <Info> <Common> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323295059> <BEA-000626> <Free resources in pool "mds-owsm" will be tested every "300" seconds.>
    ####<Jul 3, 2012 7:18:15 PM IST> <Info> <JDBC> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323295075> <BEA-001124> <Created Connection Pool named mds-owsm.>
    ####<Jul 3, 2012 7:18:15 PM IST> <Info> <JDBC> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323295122> <BEA-001174> <Creating Data Source named mds-owsm, JNDI Name = jdbc/mds/owsm.>
    ####<Jul 3, 2012 7:18:15 PM IST> <Error> <Deployer> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323295122> <BEA-149231> <Unable to set the activation state to true for the application 'mds-owsm'.
    java.lang.NoClassDefFoundError: t : T (wrong name t)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:101)
         at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.rmi.internal.GenericMethodDescriptor.getActualClassName(GenericMethodDescriptor.java:216)
         at weblogic.rmi.internal.GenericMethodDescriptor.access$100(GenericMethodDescriptor.java:19)
         at weblogic.rmi.internal.GenericMethodDescriptor$TypeParameter.<init>(GenericMethodDescriptor.java:250)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseParams(GenericMethodDescriptor.java:111)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseGenericParameter(GenericMethodDescriptor.java:151)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseParams(GenericMethodDescriptor.java:109)
         at weblogic.rmi.internal.GenericMethodDescriptor.computeGenericMethodSignature(GenericMethodDescriptor.java:75)
         at weblogic.rmi.internal.GenericMethodDescriptor.computeGenericMethodSignature(GenericMethodDescriptor.java:46)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.initRemoteMethods(BasicRuntimeDescriptor.java:715)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.initializeRuntimeDescriptor(BasicRuntimeDescriptor.java:244)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:155)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:139)
         at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:106)
         at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
         at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
         at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
         at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
         at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
         at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
         at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
         at weblogic.rmi.extensions.server.ServerHelper.replaceAndResolveRemoteObject(ServerHelper.java:403)
         at weblogic.jndi.internal.WLEventContextImpl.copyObject(WLEventContextImpl.java:381)
         at weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:276)
         at weblogic.jdbc.common.internal.JDBCUtil.bindDeeply(JDBCUtil.java:147)
         at weblogic.jdbc.common.internal.JDBCUtil.bindAll(JDBCUtil.java:85)
         at weblogic.jdbc.common.internal.RmiDataSource.start(RmiDataSource.java:394)
         at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:136)
         at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:97)
         at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:347)
         at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:531)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:165)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:157)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:42)
         at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Edited by: 944382 on Jul 4, 2012 2:34 AM

    Error while creating and saving the DS...
    ####<Jul 3, 2012 7:18:13 PM IST> <Info> <JDBC> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323293059> <BEA-001517> <Connection Pool "XreferenceDB" using Driver: "Oracle JDBC driver", Version: "11.1.0.7.0-Production".>
    ####<Jul 3, 2012 7:18:14 PM IST> <Info> <Common> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323294856> <BEA-000628> <Created "1" resources for pool "XreferenceDB", out of which "1" are available and "0" are unavailable.>
    ####<Jul 3, 2012 7:18:14 PM IST> <Info> <JDBC> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323294856> <BEA-001124> <Created Connection Pool named XreferenceDB.>
    ####<Jul 3, 2012 7:18:14 PM IST> <Info> <JDBC> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323294903> <BEA-001174> <Creating Data Source named XreferenceDB, JNDI Name = Xreference.>
    ####<Jul 3, 2012 7:18:14 PM IST> <Error> <Deployer> <PC165237> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1341323294981> <BEA-149231> <Unable to set the activation state to true for the application 'XreferenceDB'.
    java.lang.NoClassDefFoundError: t : T (wrong name t)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:101)
         at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.rmi.internal.GenericMethodDescriptor.getActualClassName(GenericMethodDescriptor.java:216)
         at weblogic.rmi.internal.GenericMethodDescriptor.access$100(GenericMethodDescriptor.java:19)
         at weblogic.rmi.internal.GenericMethodDescriptor$TypeParameter.<init>(GenericMethodDescriptor.java:250)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseParams(GenericMethodDescriptor.java:111)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseGenericParameter(GenericMethodDescriptor.java:151)
         at weblogic.rmi.internal.GenericMethodDescriptor.parseParams(GenericMethodDescriptor.java:109)
         at weblogic.rmi.internal.GenericMethodDescriptor.computeGenericMethodSignature(GenericMethodDescriptor.java:75)
         at weblogic.rmi.internal.GenericMethodDescriptor.computeGenericMethodSignature(GenericMethodDescriptor.java:46)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.initRemoteMethods(BasicRuntimeDescriptor.java:715)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.initializeRuntimeDescriptor(BasicRuntimeDescriptor.java:244)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:155)
         at weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:139)
         at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:106)
         at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
         at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
         at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
         at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
         at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
         at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
         at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
         at weblogic.rmi.extensions.server.ServerHelper.replaceAndResolveRemoteObject(ServerHelper.java:403)
         at weblogic.jndi.internal.WLEventContextImpl.copyObject(WLEventContextImpl.java:381)
         at weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:276)
         at javax.naming.InitialContext.bind(InitialContext.java:400)
         at weblogic.jdbc.common.internal.JDBCUtil.bindDeeply(JDBCUtil.java:147)
         at weblogic.jdbc.common.internal.JDBCUtil.bindAll(JDBCUtil.java:85)
         at weblogic.jdbc.common.internal.RmiDataSource.start(RmiDataSource.java:394)
         at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:136)
         at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:97)
         at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:347)
         at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:531)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:165)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:157)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:42)
         at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Edited by: 944382 on Jul 5, 2012 4:28 AM

  • Java.io.IOException: HTTPS hostname wrong:  should be localhost

    I'm having problems verifying an SSL client using Tomcat v5.x. I create a key in a particular keystore, let's call it C:\tomcat. I start tomcat specifying this file as the keystore to use. I then connect to the server on port 8443 with Internet Explorer and save the certificate returned from the server in a file. I then import the certificate into a keystore, let's say C:\tomcat_client. In my SSL client code I am specifiying the keystore to use with a System.setProperty("javax.net.ssl.trustStore", "C://tomcat_client"); However when I try to retrieve an output stream from a HttpURLConnection I receive the above exception. Any ideas what is happening ?
    Exception : java.io.IOException: HTTPS hostname wrong: should be <localhost>
    I have tried a variety of other options including importing the certificate into jssecacerts in the lib/security directory of the jre I am using to execute the SSL client, using the same keystore file for tomcat and the SSL client, etc.

    Hi Everybody!
    I've had a lot of problems with HTTPS connection. But finally I found a solution that works for me. So here is the Servlet:
    * File name: TestServlet.java
    * Created on 2005.01.21.
    package georgie.test.servlet;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.URL;
    import javax.net.ssl.HostnameVerifier;
    import javax.net.ssl.HttpsURLConnection;
    import javax.net.ssl.SSLSession;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    * @author Gy�rgy Nov�k
    public class TestServlet extends HttpServlet
        protected void doGet(HttpServletRequest request,
                HttpServletResponse response) throws ServletException, IOException
            try
                trustAllHttpsCertificates();
                String urlStr = request.getParameter("url");
                HttpsURLConnection.setDefaultHostnameVerifier(hv);
                URL url = new URL(urlStr == null ? "https://www.verisign.com/"
                        : urlStr);
                debug("URL READY");
                BufferedReader in = new BufferedReader(new InputStreamReader(url
                        .openStream()));
                debug("INPUT READY");
                int buff;
                while ((buff = in.read()) != -1)
                in.close();
                debug("EVERYTHING IS DONE!!!");
            catch (Exception e)
                e.printStackTrace();
        HostnameVerifier hv = new HostnameVerifier()
            public boolean verify(String urlHostName, SSLSession session)
                System.out.println("Warning: URL Host: " + urlHostName + " vs. "
                        + session.getPeerHost());
                return true;
        private void debug(String s)
            System.out.println("[DEBUG] -- TestServlet -- \n" + s);
        private static void trustAllHttpsCertificates() throws Exception
            //  Create a trust manager that does not validate certificate chains:
            javax.net.ssl.TrustManager[] trustAllCerts =
            new javax.net.ssl.TrustManager[1];
            javax.net.ssl.TrustManager tm = new miTM();
            trustAllCerts[0] = tm;
            javax.net.ssl.SSLContext sc =
            javax.net.ssl.SSLContext.getInstance("SSL");
            sc.init(null, trustAllCerts, null);
            javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(
            sc.getSocketFactory());
        public static class miTM implements javax.net.ssl.TrustManager,
                javax.net.ssl.X509TrustManager
            public java.security.cert.X509Certificate[] getAcceptedIssuers()
                return null;
            public boolean isServerTrusted(
                    java.security.cert.X509Certificate[] certs)
                return true;
            public boolean isClientTrusted(
                    java.security.cert.X509Certificate[] certs)
                return true;
            public void checkServerTrusted(
                    java.security.cert.X509Certificate[] certs, String authType)
                    throws java.security.cert.CertificateException
                return;
            public void checkClientTrusted(
                    java.security.cert.X509Certificate[] certs, String authType)
                    throws java.security.cert.CertificateException
                return;
    }Wish You all the best:
    Georgie

  • Different "java.io.IOException: HTTPS hostname wrong:  should be ..." error

    Hi
         I am experiencing some problems using SSL with Java 1.4.2_12 which appear to be subtly different to the ones posted earlier in this forum.
         ProcessA is trying to establish an HTTPS connection with an Apache server but gets the following error whilst trying to open the stream:
         java.io.IOException: HTTPS hostname wrong: should be <nnn.nnn.nnn.n>
         ProcessA obtains the IP to connect to from local config and this exactly matches the IP the IOEXception says it should be! Consequently I am confused as to why JSSE complains.
         I checked the certificates in the local keystore and the CN is also identical to the supplied IP
         I do not have the authority to tinker with the Apache configuration so I can't try anything else out. I must have missed a step somewhere but I am at a loss as to what. If anyone can shed some light on what may be happening here, I'd be obliged.
         thanks

    Ejp: please accept my apologies for the hugely late response to this.
    The problem was indeed at the server end. I had already employed the HostnameVerifier but after some badgering of the server admin the problem was nailed as exactyly what you said.
    Thanks (and apologies) again.

  • IW31/32 Operation User Status visible as a field on  Operation tab table

    Hello,
    Is there a way to add the "Operation User Status" as a field visible on the Operation tab table for IW31/32.
    Your help will be very much appreciated.
    Thanks.

    jay23r 
    Not as standard.. and its the same with the used-fields which should be displayed on the Operation tab table (it is in the task list..)
    I don't know why SAP haven't sorted these out...
    Open an OSS Message to SAP - the more requests they get, the more chance there is of them fixing it in the future
    What we have done a few times in the past is to utilise the Header Enhancement tab (user-exit IWO10018) to add a table control to show these fields. Its not elegant, but it works
    PeteA

  • 2 TopLink Java Object from Table to be used in single selectOneChoice

    Hello everyone, can I ask for help on how to solve my problem....
    Here's my scenario, I have 2 tables namely tblCollege and tblCourse, they are related through tblCourse.CollegeCode = tblCollege.Code.
    I use the jdeveloper wizard using TopLink -> Java Object from Table to add these table to my project. I created an EJB Data Control so that I can use them to my Userinterface using ADF Faces.
    What I really want to do is that I need to have selectOneChoice component displaying:
    tblCollege.Name + tblCourse.Name, and it should have a value of tblCollege.Code + tblCourse.Code,
    so for example in my
    tblCollege:
    Code---------Name
    1---------------Science
    2---------------Music
    tblCourse
    Code-------Name-----------CollegeCode
    1-------------Biology----------1
    2-------------Computer-------1
    3-------------Guitar------------2
    what I want in my selectOneChoice is like this:
    value----------display
    1-1--------------Science-Biology
    1-2--------------Science-Computer
    2-3--------------Music-Guitar
    I'm a little stuck on how I'm going to that. Thanks.

    Bawasi,
    I see a couple of angles of attack, but this really depends on the technologies involved. If you are using ADF Bindings in combination with ADF Faces then you need to shape the data at the entity level. If ADF Bindings are no the in equation, you can take a less aggressive approach and shape the data in a managed bean. What is not clear to me is the end-to-end use-case. I see the read-only (i.e. how to get data to the drop box), but I am
    not certain what attribute on an entity you are attempting to set. Are you trying to set the course for the current user or for a master schedule? Finally, notice that the final shape of your data set shows a unique combinations, you could increase the performance of your use-case and ease of development simply by denormalizing your schema.
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • How to mail excel file as an attachment daily...

    Dear BOBJ Experts, I have an excel located in my server . I would like to mail this excel as an attachment to the recipients . This is a daily activity. Is this possible with mailer.exe . What is the difference between mailer.exe and smtp_mailer.exe

  • Converting Final Cut Express to Final Cut Pro

    Is it possible to open a final cut express file in final cut pro and edit it using the pro appilcation?

  • Group By in sql statement....

    I have the following sql statement: SELECT ROWNUM AA, EPONYMO||' '||ONOMA FNAME ,CODE_ERGAZOMENOY_TYPE_ID,MV_SIGK_KATAST_MINA.SUM_ODOIP_EXODA, MV_SIGK_KATAST_MINA.SUM_HMERISIA_APOZIMIOSI, MV_SIGK_KATAST_MINA.SUM_SINOLO, MV_SIGK_KATAST_MINA.SUM_KRATIS

  • Why can't I get my 122min movie on a DVD-DL

    Hi everyone. I am new to FCPX, but I was a quite confortable user to iMovie. As I have to get a 122min movie on a DVD, I am obviously using dual layers. First, I tried to do it with FCPX itself, using the Share > DVD... menu. Setting it to Double lay

  • New Travel Schema

    Hi Gurus, I have a question regarding travel schema. Our issue is that, we need to create new travel schema where not all expense types should be assigned. At the same time, remove some expense types to already created travel schema. How to configure