IllegalArgumentException for DBSequence

In using JHeadstart 10.1.3 I have run into problems using the entity attribute type of DBSequence. On loading the page I get the following error
500 Internal Server Error
java.lang.IllegalArgumentException: 'value' is not of type java.lang.Number'
at oracle.adf.view.faces.convert.NumberConverter.getAsString(NumberConverter.java:270)I see that a few people have had the same problem and you were able to reproduce it
Re: JHS 10.1.3 DBSequence problems
As Frank Nimphus pointed out on the JDeveloper forum, the error is becuase the DBSequence type cannot be converted into a number. The JHeadstart generator however has included a <f:convertNumber> tag (presumably becuase the database type is NUMBER ?). By removing the <f:convertNumber> tag, the error no longer occurs.
I have solved this by creating custom velocity templates for tableTextInput and formTextInput templates removing the #NUMBER_CONVERTER() and overriding the template used at the individual item level for each item I have set as DBSequence.
If my solution is indeed the correct approach, is it possible to consider this as future enhancement ?
Please let me know if there is another way.
Cheers,
Brent

JHeadstart Team,
I am still receiving the error when I use DBSequence with the current version.
java.lang.IllegalArgumentException: 'value' is not of type java.lang.Number'     at oracle.adf.view.faces.convert.NumberConverter.getAsString(NumberConverter.java:270)     at oracle.adfinternal.view.faces.convert.NumberConverter.getAsString(NumberConverter.java:44)
Please confirm if the fix never made to the new release.
Thank you.
John.

Similar Messages

  • Triggers for DBSequence fields

    It's possible to customize the trigger generated for DBSequence fields?
    Example:
    Instead of:
    select seqName.nextVal into :new.id from dual;
    I wish
    if :new.id is not null then
    select seqName.nextVal into :new.id from dual;
    end if;
    thanks

    Hi,
    As you have this trigger defined in the database (on the database table), yes you can using PLSQL
    Frank

  • Java.lang.IllegalArgumentException for listener in web.xml with weblogic12.1.1

    Hi.
    Im trying to upgrade the weblogic version from 10 to 12 for my application.
    Im getting below mentioned error while deploying ear file in weblogic 12 which works fine with version10.
    " java.lang.IllegalArgumentException:[HTTP:101164] User defined class com.ab.util.session object is not a listener as it doesnt implement the correct interface."
    Deployment is getting failed because of this error.
    If i comment out listener, deployment is success.

    HI Timo,
    Old Weblogic version: 10.3.3
    New weblogic version:12.1.1
    Using Struts frame work.
    SessionObject class:
    public class SessionObject implements HttpSessionBindingListener{
    public void valueBound( HttpSessionBindingEvent  event)
    public voind valueUnbound (HttpSessionBindingEvent  event)
    web.xml:
    <listener>
    <listener-class>com.ab.util.SessionObject</listener-class>
    <listener>
    I want to know that why im getting  " java.lang.IllegalArgumentException:[HTTP:101164] User defined class com.ab.util.session object is not a listener as it doesnt implement the correct interface"  error while deploying the ear file under version 12.1.1 when it is working fine with version 10.3.3.
    Should i make any changes in web.xml or should i include any jars???

  • DBSequence type no longer available for entity attributes?

    I'm puzzled by this, if not scared.
    Every version of JDev till 11.1.1.2.0 has had out-of-the-box support for DBSequence as an entity attribute type.
    When you set it for your PK, JDev disables a few options, automatically sets "refresh after insert" (and maybe other stuff) and handles everything about it.
    Now, I see that in new applications created with 11.1.1.2.0 that option is no longer present...!
    It's available only for apps migrated from previous versions.
    If you create a new application, you no longer have DBSequence in the Type dropdown.
    Here's what the documentation (Oct 2009 DevGuide, par 4.10.10) says:
    In the Edit Attribute dialog, you can set the value of the Type field to the built-in data
    type named DBSequence and the primary key will be assigned automatically by the
    database sequence. Setting this data type automatically selects the refresh after Insert
    checkbox.Where on Earth is this built-in data type named DBSequence in Jdev 11.1.1.2.0?

    Thanks Paul.
    It seems JDev broke my application.
    It only shows the native Java types in the dropdown, and does not show any of the Oracle types including Number, DBSequence and all the rest.
    (Note that all the connections I work with use the Oracle type map, of course - it's automatic.)
    I tried a new quick test with a new application and again, no Oracle types, just the java types.
    Then closed and reopened my applications as well as JDev and I can now see all the types in my quick test.
    However, my original application still "sees" no Oracle types, it's stuck with the Java types.
    I'll try to see if I can repair it in some way... I'll eventually put it down as one of the gazillion one-time bugs that JDev shows daily.

  • How do I copy a dbsequence key from one entity to another

    using the SRDEMO database as an exemple. I created a new table called BOOK. Book is a kind of product. THe primary key of book is the primary key of product. In jdev I created a new updatable entity based on book and a view combining product and book. The product ID gets generated by a trigger, as currently defined in srdemo db. When I run my view in the tester, the product id shows with a negative number, which is the expected behavior for dbsequence ID. The book ID is blank, which is also expected since its value must be copied from the product ID. Book ID is of type NUMBER. So I created a new create method in my viewImpl:
    protected void create(AttributeList attributeList) {
    System.out.println("in create prodview...");
    Number no=this.getProdId().getSequenceNumber(); // get the generated prodid from the sequence
    System.out.println("BookId="+no);
    this.setBookId(no); // initialise book id with product id
    Now when I run the tester I see the same negative number for productID and BookID, as expected. But when I commit my change I get a ORA-02291 on BookID. How do I get BookID initialize with the actual productID ? I'm using jdev 10.1.3.3
    Edited by: yvesg2 on Oct 1, 2009 9:12 AM

    How about this?
    oracle.jbo.server.SequenceImpl sequence = new oracle.jbo.server.SequenceImpl("<Sequence_Name>(Eg. BOOK_ID_SEQ)", getDBTransaction()); // Name of the sequence in DB that generates your Book ID
            if(sequence != null) {
              int no = sequence.getSequenceNumber().intValue();
              System.out.println("BookId="+no);
              this.setBookId(no); // initialise book id with product id
           }-Arun
    Untested

  • IllegalArgumentException, getKeyCode

    Anyone know why I get an IllegalArgumentException from the following code in the constructor of an extended Canvas:
    prevMonthKey = getKeyCode(Canvas.KEY_NUM9);
    (I get IllegalArgumentException for all KEY_NUM{0-9} but Canvas.LEFT and Canvas.RIGHT works fine.)
    (The project is written in Midp1.0)
    Please help! thanks!

    LEFT, RIGHT, UP, DOWN, FIRE and the GAME_x constants are game actions. getKeyCode() will take one of those game actions and return the key code of the key (could be one of many) that corresponds to the game action.
    KEY_STAR, KEY_POUND and the KEY_NUMx constants are already keyCodes so there is no need to get the key code that corresponds to them. If you send them as parameters to getKeyCode() then you get the exception.
    shmoove

  • Currency: valid ISO 4217 codes still throw IllegalArgumentExceptions

    java.util.Currency is supposed to support ISO 4217 currency codes (as written in its javadoc). But I still get IllegalArgumentExceptions for the currency codes GHS, RSD, SDG that are still active as I read in wikipedia (http://en.wikipedia.org/wiki/ISO_4217). I also get this exception for some other currency codes that are obsolete but still valid (XEU, ZAL, ...).
    It seems that java.util.Currency only supports a subset of the ISO 4217 currency codes. That makes it unusable as I have to work with the currency codes (Strings) to also handle these other (valid) currency codes. What is this class good for if it only can handle a subset and you can't create your own (new) Currency objects?

    yup. I guess the Currency class was someone's idea of a bright idea at the time, like so many things.
    But someone (probably that same someone) didn't think about the consequences of implementing it the way they did and now Sun's stuck with it.
    Can't remove it because someone may depend on it, and maintenance is expensive and never fast enough for some yet always too quick for others (who have come to depend on the exact content).

  • PassivateStateForUndo stores temporary DBSequence after db error ?

    I'm noticing something strange with our DBSequence attributes, perhaps you could help us out here.
    Whenever we try to create a new Entity instance a temporary negative value is generated for the DBSequence attributes (which is correct). Then, when we Commit the outstanding changes. Before posting our changes to the database, we use "passivateStateForUndo" to create a savepoint for the ApplicationModule.
    Next, a "before insert row" trigger is waiting in the database to create a new value using a sequence. But, we have a number of business rules implemented using PL/SQL and when one of them raises a ORA-exception we call "activateStateForUndo" to revert to the previous state.
    When we modify our data, so our business rules are all validated ok, and commit the changes ... the Entity is succesfully stored in the database using the "temporary negative number". When we query the db we see, for example, ID = -16. This tells us that the temporary value is actually passed to the database.
    This is the code in the trigger we use to generate a new value :
          IF (br$row.ID IS NULL)
          THEN
             SELECT rbs_klm_seq.NEXTVAL
               INTO br$row.ID
               FROM DUAL;
          END IF;The described behaviour is not displayed when, for example, a mandatory attribute is left empty. This is caught on the middle tier before any changes get posted to the database.
    Could it be that the passivateStateForUndo is passivating just a little too much ? Should the temporary negative value for DBSequence attributes really be posted to the database in the postChanges(TransactionEvent) ?
    In other words, am I missing something ? Or is this overeagerly behaviour of the passiveStateForUndo / activateStateForUndo method ?
    We're using :
    ==========
    - Jdeveloper 10g 10.1.2.1.0 (build 1913)
    - Jheadstart 10g 10.1.2.1 (build 27) --> But, my guess is that Jhs has nothing to do with this issue.
    Regards,
    Pascal Prins

    As you can see in your plsql statement you test for null values only.
    In my opinion you should add a test if sequence is negatif to your condition.
    We use sequences:
    1) Sequence fetched in ADF create method
    2) Sequence fetched in DB pre-insert trigger
    When 2) is implemented we check the flag requery on insert in the entity and the condition is:
    field is null or field < 0 => select sequence
    Hope this helps.
    Regards
    Fred

  • Addition in a linked list

    Hi,
    I want to add numbers in a linked list. For example when i pass in the string 123456789, i reverse it so that it appears as 987654321 in the linked list. If i add this to the string 954 which appears as 459 in the linked list, i am supposed to get 123457743 but i get 1743. How do i rectify this from my code.
    import java.util.LinkedList;
    import java.util.ListIterator;
    public class LargeInteger {
    /** Constructs a new LargeInteger object from the specified String.
    * The String parameter will contain the digits comprising the number
    * to be represented by this LargeInteger object. The number may be
    * either positive or negative, so be sure to check for a sign.
    * You should throw an IllegalArgumentException if the string which is
    * passed in does not contain a valid number. An invalid String would
    * be one which contains any character other than a digit (however the
    * first character may be a negative sign).
    * @param value A String representing the number to be represented.
    &nbs! p; * @throws IllegalArgumentException This exception is thrown if the
    * parameter doesn't contain a valid number.
    LinkedList digits = new LinkedList();
    public LargeInteger(String value) throws IllegalArgumentException {
    //Declare variables
    boolean neg = false;
    int num = 0;
    int start = 0;
    char ch = ' ';
    Integer tempObj = new Integer(num);
    //If the first character is not a - sign or it is less than the character 0
    //or it is greater than the character zero, then throw
    //IllegalArgumentException
    //else add digits into linked list as integers
    if(value.startsWith("-")) {
    neg = true;
    start = 1;
    } else if ( !Character.isDigit(value.charAt(0)) ) {
    throw new IllegalArgumentException();
    for (int j = value.length()-1; j >= start; j--) {
    ch = value.charAt(j);
    if (Character.isDigit(ch)) {
    num = Character.getNumericValue(ch);
    tempObj = new Integer(num);
    digits.add(tempObj);
    } else {
    throw new IllegalArgumentException();
    } // end Constructor
    public static void main(String[] args) {
    LargeInteger a = new LargeInteger("954");
    LargeInteger b = new LargeInteger("123456789");
    LargeInteger c = a.plus(b);
    System.out.println( c.toString() );
    System.out.println( a.toString() );
    System.out.println( b.toString() );
    /** Calculates the sum of this LargeInteger object with the one passed
    * as a parameter.
    * @param other The number to add to the current value.
    * @return The sum of this LargeInteger and the value passed as a
    * parameter.
    public LargeInteger plus(LargeInteger other) {
         int i = 0;
    LargeInteger result = new LargeInteger("0");
    int carry = 0;
    ListIterator onfiltered = digits.listIterator();
    ListIterator two = other.digits.listIterator();
    //Add digits in linked list
    for (; i < digits.size() && i < other.digits.size(); i++) {
    result.digits.addFirst(
    new Integer(
    (((Integer) digits.get(i)).intValue()
    + ((Integer) other.digits.get(i)).intValue()
    + carry)
    % 10));
    carry =
    (((Integer) digits.get(i)).intValue()
    + ((Integer) other.digits.get(i)).intValue()
    + carry)
    / 10;
    onfiltered.next();
    two.next();
    //Append any remaining digits from this value to the result's
    //left
    for(; i < digits.size();i++){
         result.digits.addFirst(new Integer((((Integer)digits.get(i)).intValue() + carry) % 10));
         carry = (((Integer)digits.get(i)).intValue() + carry) / 10;
         onfiltered.next();
    //Append any remaining digits from the other value to the result's
    //left
    for(; i < digits.size();i++){
         result.digits.addFirst(new Integer((((Integer)other.digits.get(i)).intValue() + carry) % 10));
         carry = (((Integer)other.digits.get(i)).intValue() + carry) / 10;
         two.next();
    if(carry != 0){
         result.digits.addFirst(new Integer(carry));
    return result;
    } // end plus

    Use a debugger.
    Or put in some debugging statements.

  • Sequence number in ADF FORM.

    hi All,
    I have a table with ID as primary key and have a sequence created for this primary key and have a trigger for generating sequence number while inserting the record in table.
    How can i map this Sequence in ADF so while inserting record from Form i can skip the ID column.
    Regards,
    Suresh kumar

    I am using MySQL and primary key is auto incremented in my table. Therefore I have selected
    SQL Plateform     :     SQL92     
    Data Type Map     :     Java
    When I am trying to create entiry object, I do not get option of selecting DBSequence. I did some documents reading, I found out that DBSequence is part of "*Java Extended for Oracle*" Data type Map.
    While creating the EO , in the Attribute Settings, I click the Browse and search for DBSequence. I found out oracle.jbo.domain.DBSeqence.
    Can someone please let me know that I am going to face any problem in future by using DBSequence in his manner?
    Thanks in Advance.

  • Imported project from CVS not working.

    Hi all,
    I am experiencing a weird problem with the use of CVS.
    I am a new user of CVS, i installed a cvs server and i am trying to test its functionnalities within JDEV so that i can explain to the team i am working with how to use and benefit from it use.
    But right now i have a hard time using it. I imported the project to CVS using the command line and then i checked it out using jdev. the problem is that when i compile i get an error on every jspx page the error is a java.lang.IllegalArgumentException for the following lines in the source of the jspx :
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces">
    Also the the design view of the page is in designer mode and not in normal edit mode.(i only see embedded boxes one inside the other)
    I did a test i took the project from the folder that i used to import it to cvs and this version is working perfectly no errors at all.
    What could be the cause of this problem.
    I am using jdev 10.1.3.3 with cvs version: 1.11.17
    If further information is needed just ask me!
    Any help will be appreciated
    and thank you for your time
    Regards,
    Carl

    Hi all and thx for your time,
    I did some more extensive testing and i actually got it to work on a redhat machine. But i tried on 2 different windows machine and it does not want to work!!! But as i said from the redhat machine it worked right out of the box!!!
    On the windows machines i tried the jdev native cvs client and i also tried to install a newer version of cvsnt and i specified the path in my project unsuccesfully. I am running out of tests to try... Could it have to do with file permissions since the server is on a redhat machine and i try to import into windows!!! (i dont think this is even an issue but i am ready to consider every options)
    Thanks again for your time and involvement.
    Regards,
    Carl

  • Parsing input stream into named value pairs

    Hi everyone. I figured I would post this scenario, and hope to get some 'expert' opinions on what the best way to handle this would be.
    I have an input stream being returned to me and I need to separate them into name/value pairs. I receive this as two lines of strings. The first line is the variable names, and the second line is the values. This is the format:
    "Variable1","Variable2","Variable3","Variable4"
    "Value1","Value2","Value3","Value4"
    I need to separate this out into:
    Variable1 = "Value1"
    Variable2 = "Value2"
    What I was thinking of doing is to create a hashtable, read the first line in and assign those as the keys, then read the second line in and assign those as the values. I'm not quite sure if this is even possible as of yet, but thats my original game plan. My primary goals are:
    1. Seperate each variable name and match it with its appropriate value
    2. Be able to retrieve each value by calling the appropriate variable name.
    Any advice/opinion on this is greatly appreciated!!! Thanks!

    You could choose to feed the String through an InputStream and use a StreamTokenizer, which is substantially more powerful than StringTokenizer. I would personally, however, choose to parse it myself, as antequated as that might seem. ;)
    Presume that s1 is equal to
    "Var1", "Var2", "MoreVars", "EvenMoreVars" , "LastVar"
    And that s2 is equal to
    "Hello","9900", ":)", "He said \"hi\".", "Hi, there."
    These would make good sample data, but aren't necessarily the case.
    String s1 = ...;
    String s2 = ...;
    HashMap map = null;
    String[] keys = parseQuotedByCommas(s1);
    String[] values = parseQuotedByCommas(s2);
    if (keys.length==values.length)
        map = new HashMap();
        for (int i=0;i<keys.length;i++)
            map.put(keys, values[i]);
    } else
    // Error!
    // throws IllegalArgumentException for improperly formatted strings
    public static String[] parseQuotedByCommas(String s)
         ArrayList acc = new ArrayList();
         char[] ch = s.toCharArray();
         int i = 0;
         try
              while (i < ch.length)
                   while (ch[i] == ' ') i++;
                   if (i < ch.length)
                        if (ch[i] != '"')
                             throw new IllegalArgumentException(
                             "Expected '\"', receieved '" + ch[i] + "'");
                        i++;
                        StringBuffer sb = new StringBuffer();
                        boolean stop = false;
                        while (!stop)
                             switch (ch[i])
                                  case '"':
                                       if (ch[i - 1] == '\\')
                                            sb.append('"');
                                       else
                                            stop = true;
                                       break;
                                  case '\\':
                                       int j = i;
                                       boolean write = true;
                                       while ((j >= 0) && (ch[j] == '\\'))
                                            write = !write;
                                            j--;
                                       if (write) sb.append('\\');
                                       break;
                                  default:
                                       sb.append(ch[i]);
                             i++;
                        acc.add(sb.toString());
                   if (i < ch.length)
                        while (ch[i] == ' ') i++;
                        if (i < ch.length)
                             if ((ch[i] != ',') && (ch[i] != '"'))
                                  throw new IllegalArgumentException(
                                  "Expected ',' or '\"', received '" + ch[i] + "'");
                             i++;
         } catch (IndexOutOfBoundsException oob)
              throw new IllegalArgumentException("Unexpected end of string.");
         return (String[]) (acc.toArray(new String[0]));
    That should work for anything formatted as
    <String> ::= [<WhiteSpace>] <Stmt> [ [<WhiteSpace>] , [<WhiteSpace>] <Stmt> ] *
    <Stmt> ::= " <Characters> "
    <Characters> ::= \" | \\ | <AnyCharacterExceptQuoteOrBackslash>
    <WhiteSpace> ::= <Space>*
    Any questions?
    Oh, BTW, that was all blue 'cause the code tag doesn't take well to '"'.

  • Using assert or exception?

    I have been struggling with the methodology of using assertions for some time
    now and would like to have an objective viewpoint. It primarily has to
    do with the use of assertions for pre-conditions.
    Let's say we have some class, for demonstration purpose only, as this one:
    public class MyClass {
        private final String str;
        public MyClass(String str)
            this.str = str;
        private int getLength(String x, String y)
            return x.length() + y.length();
        public int getTotalLength(String x)
            return  getLength(str, x);
    }Let's say I want to make sure that the classes methods and constructor is not
    called with any null parameter. Of course I will get a NullPointerException
    eventually automatically anyway, but let's say I want to know as soon
    as possible to something is wrong. Or maybe I am dealing with a complicated
    class in which it is not so clear yet.
    Anyway the Sun Java documentation says the following:
    http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html#preconditions
    "Do not use assertions to check the parameters of a public method."
    Instead it should throw some particular exception. In this case a
    NullPointerException in the MyClass constructor if the str parameter is
    null. Conventation say that assertion can be used for private methods
    however, such as the getLength method.
    I always try to keep my classes relatively small. So often I feel no desire
    to include assertions in private methods to check parameters if I can
    already see that the parameters are checked in the public methods.
    So in this case why add assertions in getLength if I can already clearly
    see that the parameters have been checked in the MyClass constructor and
    the getTotalLength method?
    Maybe I am wrong, but I am afraid that using such rigurous parameter testing
    in every public method might influence performance too much, because in
    contrary of assertions these normal checks are done always. I cannot
    remove these normal checks, because that would mean it could trigger
    an assertion in one of the private methods, and I could as well move
    the assertions from the private to the public methods.
    What I don't feel comfortable about is this big distinction between
    assertions and run-time exceptions. Why not use assertions in
    public methods for parameter testing? They are just exceptions
    too anyway. And they have the benefit of not impacting performance
    for production environments.
    There is an article about challenging the Sun Assert convention here.
    http://www.javaworld.com/javaworld/jw-12-2001/jw-1214-assert-p2.html
    I would like you to read it and give your objective opinion. Weighing
    the positive and negative implications of it and tell me what you
    think and why.

    I don't have the time to read that article. IMO
    assertions are to be used to validate the state of
    your instance and its internal works.So you do not think that assertions should be used for any pre-conditions of parameters?
    They are not
    exceptions, by the way. Failure will result in an
    AssertionError.Yes, I should have said errors or throwables.
    It's quite overkill IMO to use those for the
    validation of parameters provided by someone else.Why? Isn't it overkill to impact the performance by
    using run-time exceptions instead of assertions?
    If
    your API declares the legit value range of an
    argument, a NullPointerException for null and an
    IllegalArgumentException for values outside bounds,
    that gives me more flexibility to react and handle
    error states (it could be user input - null would
    mean there's a bug, out of bounds would mean I have
    to ask the user again) than merely firing of a "big"
    assertion error.But the whole idea of pre-conditions is that the method never must be called with invalid values. Your example might make sense for some class close to the front-end, but most classes are deep inside everything and have no idea what to do with a NullPointerException or IllegalArgumentException at that point. I would let a facade near the front-end deal with invalid user input and explicitly prevent the invalid input progress deeper inside my code.
    The article I linked goed deeper in about why it is a good idea to give a "big" assertion error at that point.
    There's probably no hard or objective rule when you
    should use what anyway, otherwise, there wouldn't be
    different opinions in this matter. If you're looking
    for one, you'll most likely not find it.I have certain ideas about assertions and I would like to know if these ideas are reasonable. Especially because they go against the Sun convention and I usually am a follower of standards.

  • Appending namespaces attributes

    Hi there,
    We have a proxy service (pswsdl) and business service (bswsdl)
    I am currently working on transforming xml payload from proxy service (pswsdl) to the xml as compliant with business service (bswsdl).
    I grab the payload from the proxy service via Xquery using $body/subject/person and store it in a variable.
    I need to pass Person object to the business service (bswsdl) which points to a live web service deployed.
    The Person object is the input to Bswsdl web service.
    Now Person element contains a deep level of child nodes. Here is how the fetched object looks like
    <Person xsi:type="imy:com_sample_app_model_PersonInput" xmlns:imy="http://com.sample.app.facade/IMyWebService1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Details>
    <name>Tom</name>
    <age>29</age>
    <address> 11 Park St</address>
    <Details>
    </Person>
    Now when I run the composite I run into an error No Deserializer found to deserialize using encoding style 'null'. [java.lang.IllegalArgumentException] for the Details object. As in the sample payload above the namespace attribute info for the Details object is missing.
    Is there a way in OSB11g Xquery functions to provide an instruction to set the namespace to xml elements automatically. Like in the above case the Person object automatically gets the namespace attributes without any configuration from my side. How can I set this for all the containing xml elements
    Let me know your thoughts.
    Thanks,

    THe xsd for Person does have the type defined for Details object. Since we have developed the web services using the bottom-up approach.
    I tried manually adding the type in the xml elements like this (Details xsi:type="imy:com_sample_app_model_DetailsInput") but still the same error.
    Here is what I tried to do. I have a business service(testBS) based out of live webservice (wsdl). I have a proxy service(testPS) defined using the same wsdl but in the body of the proxy service we delegate the call to testBS. This scenario works perfectly fine.
    Now I have combined two wsdl's (one of them being the same as used for TestBS) and created a proxy service based out of this comined wsdl.
    In the body of the proxy service we make a call to the testBS passing it the only the xml node expected by its operation but this fails though the xml node contains the right xsd type. The top root element gets passed correctly as mentioned in my initial post (the Person node) but its the inner node that fails.
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382500</con:errorCode>
    <con:reason>
    OSB Service Callout action received SOAP Fault response
    </con:reason>
    <con:details>
    <con1:ReceivedFaultDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:faultcode>soapenv:Client</con1:faultcode>
    <con1:faultstring>
    No Deserializer found to deserialize a ':Details' using encoding style 'null'. [java.lang.IllegalArgumentException]
    </con1:faultstring>
    <con1:http-response-code>500</con1:http-response-code>
    </con1:ReceivedFaultDetail>
    </con:details>
    Let me know your thoughts.
    Thanks,

  • Call to super must be first statement

    I'm new to Java and I have a question regarding super(). I'm implementing a design where we have a custom exception which extends Exception. The design calls for null messages to lead to throwing an IllegalArgumentException, but Exception's constructor does not throw an IllegalArgumentException for a null message.
    Here is what I want to do, but not allowed to since super must be the first statement in the constructor:
    public CustomException(String message) {
        if (message == null) {
            throw new IllegalArgumentException("message cannot be null.");
        super(message);
    }I could call super first and then throw an exception if the message is null, but that doesn't seem like a good solution.

    public CustomException(String message) {
        super(nullCheck(message));
    static String nullCheck(String message) {
        if (message == null) {
            throw new IllegalArgumentException("message cannot be null.");
        return message;
    }

Maybe you are looking for