Exception is being thrown

I tried out this small code for using hashset but it gives exceptions. I have no idea why is it so?
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
class Students implements Comparable
     private String name;
     private float gpa = 0.0F;
     Students(String n, float g)
          name = n;
          gpa = g;
     Students(){}
     public String getName() {
          return name;
     public float getGpa() {
          return gpa;
     @Override
     public int compareTo(Object o) {
          // TODO Auto-generated method stub
          if(this.getGpa() > ((Students)o).getGpa())
               return 1;
          else if(this.getGpa() < ((Students)o).getGpa())
               return -1;
          else
               return 0;
     public boolean equals(Object o){
          if(this.getGpa() == ((Students)o).getGpa())
               return true;
          else
               return false;
     public int hashCode(){
          return (int)(10*gpa);
public class HashFunction {
     public static void main(String args[]){
          Students s1= new Students("Fred", 3.0F);
          Students s2 = new Students("Sam", 3.1F);
          Students s3 = new Students("Steve", 3.5F);
          Set s = new HashSet();
          s.add(s1);
          s.add(s2);
          s.add(s3);
          Iterator i = s.iterator();
          while(i.hasNext())
               System.out.println(((Students)i.next()).getName() + " " + ((Students)i.next()).getGpa());
}The exception trace that is generated is as follows:
Exception in thread "main" java.util.NoSuchElementException
     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
     at HashFunction.main(HashFunction.java:68)

roaan wrote:
I had one more question. I am reading from the file like this
          String word;
          word = file.nextWord();
          try{
               while(word != null)
                    word = word.toLowerCase();
                    wf.put(word);
                    word = file.nextWord();
          catch(Exception e){
               e.printStackTrace();
     }Now when the end of the file is reached word contains null and throws a nullpointer exception. I am catching that exception but is there a way out that when my word is null i should simply exit out of the loop (i check that word is not equal to null in my while loop but still it throws an excpetion).Nothing there can throw NPE from word being null. The only possibilities of NPE in the code you posted are
1. if file is null
2. if wf is null
3. if NPE is being thrown inside nextWord(), which has nothing to do with word being null.
Once you make sure that the above are not happening, that code will be fine and you won't need to catch NPE. And in fact, catching NPE like that is bad practice anyway.

Similar Messages

  • Exception not being thrown

    I added code to throw an exception when a user-initiated search returned no rows, but for some reason, the exception isn't being raised on the browser. Code:
    mnVo.setWhereClause(queryparams);
    mnVo.executeQuery();
    if(mnVo.first() == null)
    throw new oracle.jbo.JboException("No records on file");
    If I step through the code, I see the throw statement executing, but it is never surfaced. What does get raised is:
    JBO-29000: Unexpected exception caught: java.lang.ArrayIndexOutOfBoundsException, msg=0
    This gets raised (apprently) outside of my code, and the debugger can't find it. What do I need to have in place in order to handle this condition?

    I'm a java newby, so I 'think' I understand what you mean, and I 'think' I already did? Here's the code now:
    if(mnVo.first() == null)
    throw new oracle.jbo.JboException("No records on file");
    catch (Exception e)
    { throw new oracle.jbo.JboException("No Records Found");}
    This behaves identically as it did before...I can see it being thrown in the debugger, but the browser never gets it, and it gets the other error which is pretty non-sensical to a user.
    I failed to mention earlier that this code is in the Application Module in the Client Interface, in case that makes a difference?

  • Exception not being thrown in try statement

    I am trying to write a small program to handle exceptions. However, the program will not compile because it is giving me an error saying the exception InvalidDocumentCodeException will never be thrown in body of coresponding try statement. Here are the two programs:
    public class InvalidDocumentCodeException extends Exception {
    InvalidDocumentCodeException (String message) {
    super(message);
    and
    import java.util.Scanner;
    public class Main2 {
    // Creates an exception object and possibly throws it.
    public static void main (String[] args) {
    char designation;
    String input = null;
    int valid = 0;
    Scanner scan = new Scanner (System.in);
    System.out.print ("Enter a 2-digit designation starting " + "\n" +
    "with U, C, or P, standing for unclassified, " + "\n" +
    "confidential, or proprietary: ");
    input = scan.nextLine();
    try {
    designation = input.charAt(0);
    if(designation == 'U')
    valid++;
    else if(designation == 'C')
    valid++;
    else if(designation == 'P')
    valid++;
    else if(designation == 'u')
    valid++;
    else if(designation == 'c')
    valid++;
    else if(designation == 'p')
    valid++;
    catch (InvalidDocumentCodeException problem) {
    System.out.println("Invalid designation entered " +
    problem);
    System.out.println ("End of main method.");
    can anyone tell me what I am doing wrong here?

    kenporic wrote:
    Forgive me, This is the first time I have used this sight and I should have been more precise. Thanks for all the help, but this is an excercise in how to handle exceptions in Java. One way is to "throw" the exception to another class to be handled. The other is to handle the exception within the running class. The throws program That I have works. The problem that I am having is handling the exception within the class without coding the "throws" statement. I am supposed to use the try-catch method in doing this. In the example I was given to follow, the code did not specifically throw the exception. If the input was not handled in the processing code then the catch statement is supposed to call to the exception class somehow?Okay, there are two families of exceptions--checked and unchecked.
    Checked: These are for things that are not part of the "happy path" of your code, but that your code may reasonably be expected to deal with. They're not necessarily signs of a bug in your code, nor do they indicate a problem in the JVM that's beyond your control. They're for things like when a file you're looking for doesn't exist (so maybe you handle it by asking the user to pick a different file), or a network connection being lost (so maybe you handle it by waiting a few seconds and trying again).
    When a checked exception occurs, since it's an expected and recoverable occurrence, you're expected to deal with it. So, when one of these exceptions can occur in your method, your method is required to either a) handle it (with catch) or b) let the caller know that HE might be asked to deal with it.
    We must either handle it:
    void doFileStuff(String path) {
      try {
        do file stuff
      catch (IOException exc) {
        retry--which means the whole try catch would be in a loop
        or maybe just substitute some default values that don't have to come from a file
    }Or let our caller know that he's going to have to handle it (or pass it on to his own caller):
    void doFileStuff(String path) throws IOException) {
      // this might throw an exception, but it's not this method's job to handle is, so it bubbles up to our caller
      do file stuff;
    Unchecked: These are things that are either bugs in your code (like a NullPointerException) or serious problems with the JVM that are beyond our control (like OutOfMemoryEror). These can occur anywhere, and it's not generally our code's job or our caller's job to deal with them, so they don't need to be caught or declared like checked exceptions do. You can catch them, and there are some places where it's appropriate to do so, but leave that aside for now.
    Unchecked exceptions are RuntimeException, Error, and every class that descends from them. Checked exceptions are everything else under Throwable, and Throwable itself.
    Now, when you do
    void foo() throws SomeException {You're telling the compiler that this method might throw that exception.\
    If SomeException is a checked exception, the compiler is able to tell whether your claim that you might throw it is true. Since it's checked, every method that might throw it must declare it. So the compiler can look at all the methods you call and see if they throw SomeException. If none of them do, and you don't explicitly put throw new SomeException(...); in your foo() method, then the compiler can be absolutely sure that there's no way foo() will throw SomeException. So it won't let you claim to throw it.
    On the other hand, is SomeException is unchecked, then since methods aren't required to report the unchecked exceptions they can throw, the compiler has no way of knowing whether some method you call might throw SomeException, so it always lets you declare it (and never requries you to).

  • SQLException(original cause) in throw new EJBException(SQLException) is being lost, when the remote exception is being thrown by the container (ejbStore()) in IPlanet. Works in WL and WS

    (IPlanet 6 - SP4)
    we have something like this in the EntityBean :
    ejbstore()
    try {
    myDAO.Update();
    catch(SQLException se)
    throw new EJBException(se);
    But in the SessionBean, where we set the detail (which
    causes ejbStore() to fire), I'm seeing a TransactionRolledBack exception with no trace of the
    original exception within it (The "detail" attribute
    too is null ). The same thing works in WL and WS.
    Any suggestions appreciated.

    Turn your checked exceptions into unchecked exceptions and retrieve the cause later:
    RuntimeException unchecked = new RuntimeException(checked);
    Throwable t = unchecked.getCause();Stephen

  • Stopping exceptions from being handled earlier

    Hi,
    I am writing a program that uses some code that I wrote and some code that others wrote. In one part of the code, an exception often comes up in the part of code that other people wrote. They handle that exception themselves by printing the stack trace. However, I do not want the stack trace to be printed out. The exception is already handled so if I put in a catch block it does nothing.
    Is there any way I can stop the exception from being caught or handled before? Or is there a way I can prevent the stack trace from being printed and call a different method if this exception was ever thrown or caught?
    Thanks, and tell me if part of what I wrote was unclear then tell me.

    Sky,
    Your problem description is perfectly clear. 10/10.
    But, Sorry.... It ain't good news.
    1. The short answer is "No".
    2. The longer and far more correct answer is "maybe", so long as the dodgy booger who wrote that code gave you the hooks which allow you to (a) supply an error handler; or (b) override the offending method by extending the class and reimplementing all it's constructors and that messy method, and you can change all the code which references that class to use your subclass... ie: Not bluddy likely.
    3. The correct answer is of course: "Yes, anything is possible, just some things cost more than others"... Decompilers, Custom byte-code modifying class-loaders, A wee ASM to filter the JVM's
    standard error stream... I can hear the boss now "What do you porkchops think you're playing at!".
    I get the feeling that the stackTrace is just an annoyance factor, and it really isn't worth the effort to solve this problem. My advice is to learn to live with it.
    Keith.

  • Why the exception is being caught - Suggestion is required.

    hi,
    Acording to the knowledge i have both theoretical and practial
    when a method declares that it throws an ExceptionType then that method never handles that exception at all even though there exists a catch(Exception e) block in the try block.
    The above scenario and ethics is violated when i run the following program.
    I want to knw why the Exception block is catching the IllegalArgumentException ?
    public class TestClass {
    private void testMethod() throws IllegalArgumentException {
    try {
    int i = 0;
    throw new IllegalArgumentException("IA");
    } catch (Exception e) {
    System.out.println("Test message 2");
    e.printStackTrace();
    public static void main(String[] args) {
    try {
    new TestClass().testMethod();
    } catch (IllegalArgumentException iae) {
    System.out.println("Exception caught in main method");
    When I run the above program the exception being thrown is caught in the testMethod only and the message Test message 2" is being printed
    Why is it happening ?
    Thanx in advance
    Mahesh

    Hi,
    What ever u said is not real. When a method declares that it throws an exception it will never be caught by the generic Exception method.
    This what is happened.
    Generally in my programming i throw a BusinnesException when input data violates some business exception. ( I declare that my method throws BusinessException ).
    I also catch Exception as generic to avoid abnormal termination due to other exception causes.
    What i knw is that if a method declares that it is throws an exception ti will never handle that even though it has a catch block to catch parent exception class
    mahesh

  • DefaultTreeNode exception when being modified from a different thread

    Hi,
    I have two panels, each one displays a separate tree structure, when I attempt to copy from one tree to another in a different thread I get the following exception.
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 84 >= 83
         at java.util.Vector.elementAt(Vector.java:427)
         at javax.swing.tree.VariableHeightLayoutCache.getNode(VariableHeightLayoutCache.java:976)
         at javax.swing.tree.VariableHeightLayoutCache.getPreferredHeight(VariableHeightLayoutCache.java:274)
         at javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(BasicTreeUI.java:1872)
         at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:2015)
         at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:2003)
         at javax.swing.JComponent.getPreferredSize(JComponent.java:1627)
         at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
         at java.awt.Container.layout(Container.java:1432)
         at java.awt.Container.doLayout(Container.java:1421)
         at java.awt.Container.validateTree(Container.java:1519)
         at java.awt.Container.validate(Container.java:1491)
         at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:639)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:127)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)Obviously if I revert back the copying to the same thread the problem is avoided, however the program appears to be frozen for the duration of the copying. I also tried changing the way that the information is displayed (ie in a table) and that did not throw exceptions.
    I also found this http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4704869 on the Sun Website, however there was no solution.
    Therefore, how do I construct a tree that can be modified from a separate thread.
    Any assistance greatly appreciated.

    The bug you referred to states that the exception is due to the tree being modified by a thread not being the EDT.
    What kind of thread are you using? The �correct� way of doing this would be by using SwingWorker: http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html
    If you were not, please give SwingWorer a try and tell us if the exception is still thrown!

  • Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --- System.NullReferenceException: Object reference not set to an instance of an object

    Hi,
    (1) I am trying to get the data from a database table and import into a text file.
    (2) If the record set have the data then it runs ok
    (3) when the record set not having any data it is giving the below error
    Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
    Could you please let me know why this is happening?
    Any help would be appriciated
    Thanks,
    SIV

    You might ask them over here.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral%2Ccsharpgeneral%2Cvcgeneral&filter=alltypes&sort=lastpostdesc
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Exception has been thrown by the target of an invocation error while updating picture in user Profile

    Hi,
    I am working on updating picture of user profile in sharepoint 2013.
    I am getting error "exception has been thrown by the target of an invocation" while creating Thumbnail at the below line.
    "file = (SPFile)mi_CreateThumbnail.Invoke(null, new object[] { original, idealWidth, idealHeight, folder, fileName, null });"
    I have added SPUtility.ValidateFormDigest() before calling this method. but no luck.
    Please help me on this.
    Thanks
    Hareesh

    Hi,
    According to your post, my understanding is that you want to update picture in user Profile.
    If we are giving an option to change the Profile picture in our custom component, we need to create 3 different files and update the reference in User Profile property.
    To create Thumbnail, we can use the code as below:
    /// Get sealed function to generate new thumbernails
    public SPFile CreateThumbnail(Bitmap original, int idealWidth, int idealHeight, SPFolder folder, string fileName)
      SPFile file = null;
      Assembly userProfilesAssembly = typeof(UserProfile).Assembly;
    Type userProfilePhotosType = userProfilesAssembly.GetType("Microsoft.Office.Server.UserProfiles.UserProfilePhotos");
      MethodInfo [] mi_methods = userProfilePhotosType.GetMethods(BindingFlags.NonPublic | BindingFlags.Static);
      MethodInfo mi_CreateThumbnail = mi_methods[0];
      if (mi_CreateThumbnail != null)
        file = (SPFile)mi_CreateThumbnail.Invoke(null, new object[] { original, idealWidth, idealHeight, folder, fileName, null });
      return file;
    Then we can invoke the method as below:
    using (MemoryStream stream = new MemoryStream(buffer))
    using (Bitmap bitmap = new Bitmap(stream, true))
    CreateThumbnail(bitmap, largeThumbnailSize, largeThumbnailSize, subfolderForPictures, accountName + "_LThumb.jpg");
    CreateThumbnail(bitmap, mediumThumbnailSize, mediumThumbnailSize, subfolderForPictures, accountName + "_MThumb.jpg");
    CreateThumbnail(bitmap, smallThumbnailSize, smallThumbnailSize, subfolderForPictures, accountName + "_SThumb.jpg");
    More information:
    Update User Profile picture programmatically in SharePoint
    Upload User Profile Picture programmatically in SharePoint 2013
    Upload User Profile Pictures Programmatically – SharePoint 2013
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Error occurred in deployment step 'Activate Features':EXCEPTION HAS BEEN THROWN BY THE TARGET OF AN INVOCATION?

    Hi All,
    While building event handler to call webservice facing "Error occurred in deployment step 'Activate Features':EXCEPTION HAS BEEN THROWN BY THE TARGET OF AN INVOCATION"; If comment webservice, then build successfully. How to fix this issue?
    Thanks in advance!

    hi
    if you call WCF service in feature event receiver you need to ensure that proxy is properly configured. In most cases proxy is configured via web.config file using <system.serviceModel> section, but if it is used in feature receiver it depends on how
    you activate the feature:
    1. if feature is added to onet.xml of custom web template which is used for creating site collection from Central Administration you will need to modify web.config file of CA
    2. similar to previous but instead of site collection you try to create sub site using custom web template: in this case you will need to modify web.config of your Sharepoint web application
    3. if you activate feature from timer job somehow, you will need to modify owstimer.exe.config
    4. if you activate feature form powershell, most probably you will need to modify or create powershell.exe.config, but I didn't try it
    The most simple way which will work in all cases is to configure WCF proxy programmatically. See the following forum thread for details:
    How can I set an HTTP Proxy (WebProxy) on a WCF client-side Service proxy.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • Exception is not thrown immediately in Hibernate 3.  Why??

    I am using Hibernate 3.
    If I execute "session.update" and the update is not successful (e.g. value too large), the exception is not thrown immediately.
    For example,
    System.out.println ("pass 1");
    session.update(dataBean) ;
    System.out.println ("pass 2");
    session.getTransaction().commit();
    System.out.println ("pass 3");
    I find if session.update(dataBean) fails, "pass 1" and "pass 2" are printed but "pass 3" is not printed. That meams Hibernate will not throw exception until I execute "commit". Can I force it to throw immediately (i.e. only "pass 1" will be printed) ?
    Thanks in advance.

    O/R mappers such as Hibernate and JDO generally defer communications with the database for as long as possible; for an insert or update transaction that will be until commit().
    This is for several reasons:
    1) general efficiency - a series of update() calls may modify the same attribute of an object multiple times; it's substantially more efficient to update the database just once
    2) database efficiency - when a transaction is in progress, even when nothing is occuring in that transaction, more resources are consumed inthe database than when no transaction is active. For example, if a transaction updates a row and then 10 minutes later commits, then during that interval the database has to keep track of 2 different versions of that row and know which connections see which version of the row.
    3) connection management - DB connections are expensive resources and once a transaction has started updating the DB, it has to tie up a connection for the duration.
    In other words, no matter how long it takes to set up your transaction in Java, a good O/R mapper is not going to begin a database transaction until the last possible moment, which is at commit().
    Can I force it to throw immediatelyYou can call commit() any time you want.
    It sounds like you want the database to do your input data validation for you. That's wrong. You need to validate input (for size, length, whatever) before you attempt to put it in the database.

  • An unhandled exception has been thrown in the ESB system-400 Bad request

    Hi,
    When i try to call a ESB Routing Service in a BPEL Flow, i am getting the error below,
    An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 400 Bad request
    i tried to call same routing servive via SoapUI and i got the same error.
    Any ideas welcome.
    <messages><input><Invoke_SFA_Persist_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ListOfTcAccountInterface"><ListOfTcAccountInterface xmlns:ns2="http://turkcell.com.tr/esb/Common_BO_OUTBOUND_BO_ROUTING_SERVICE" xmlns:ns1="http://oracle.com/esb/namespaces/Common_BO_OUTBOUND_BO_ROUTING_SERVICE" xmlns:inp1="http://www.turkcell.com.tr/xml/BO_Account_Interface" xmlns="http://www.turkcell.com.tr/xml/BO_Account_Interface">
    <inp1:Header>
    <inp1:Transaction_Id>1120000000000279727</inp1:Transaction_Id>
    <inp1:System_Id>1001</inp1:System_Id>
    <inp1:Process_Code>BO_FL1003_SUBSCRIBE_SERVICE_PROCESS</inp1:Process_Code>
    <inp1:Transaction_Date>8/8/2008 12:47:47</inp1:Transaction_Date>
    <inp1:Operation_Type>SubscribeService</inp1:Operation_Type>
    </inp1:Header>
    <inp1:TcAccountIntegration>
    <inp1:IntegrationId>16853952</inp1:IntegrationId>
    <inp1:UUID>1E01D469-4189-11dc-A07A-00144F6ABAE8</inp1:UUID>
    <inp1:ListOfTcAgreementIntegration>
    <inp1:TcAgreementIntegration>
    <inp1:IntegrationId>16903908</inp1:IntegrationId>
    <inp1:AgreementStartDate>7/28/1996 0:0:0</inp1:AgreementStartDate>
    <inp1:AgreementStatus>0</inp1:AgreementStatus>
    <inp1:ListOfTcAgreementAssetIntegration>
    <inp1:TcAgreementAssetIntegration>
    <inp1:BarringStatus/>
    <inp1:AssetNumber>16903908</inp1:AssetNumber>
    <inp1:AdditionalInfo/>
    <inp1:AssetDescription>PostPaid GSM</inp1:AssetDescription>
    <inp1:MSISDN>5322776665</inp1:MSISDN>
    <inp1:Reason/>
    <inp1:BSCSCustomerId>512914</inp1:BSCSCustomerId>
    <inp1:BSCSCO_ID>438781</inp1:BSCSCO_ID>
    <inp1:Status>0</inp1:Status>
    <inp1:Type>1</inp1:Type>
    <inp1:ListOfTcChildAssetIntegration>
    <inp1:TcChildAssetIntegration>
    <inp1:BarringStatus/>
    <inp1:AssetNumber>437894069</inp1:AssetNumber>
    <inp1:AdditionalInfo>9999</inp1:AdditionalInfo>
    <inp1:AssetDescription>FCT</inp1:AssetDescription>
    <inp1:MSISDN/>
    <inp1:Reason>Service Subscription</inp1:Reason>
    <inp1:BSCSCustomerId>1</inp1:BSCSCustomerId>
    <inp1:BSCSCO_ID>9999</inp1:BSCSCO_ID>
    <inp1:Status>0</inp1:Status>
    <inp1:Type>52</inp1:Type>
    </inp1:TcChildAssetIntegration>
    </inp1:ListOfTcChildAssetIntegration>
    </inp1:TcAgreementAssetIntegration>
    </inp1:ListOfTcAgreementAssetIntegration>
    </inp1:TcAgreementIntegration>
    </inp1:ListOfTcAgreementIntegration>
    </inp1:TcAccountIntegration>
    </ListOfTcAccountInterface>
    </part></Invoke_SFA_Persist_InputVariable></input><fault><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>ESBMessageProcessingFailed</code>
    </part><part name="summary"><summary>null</summary>
    </part><part name="detail"><detail>&lt;detail>
    &lt;EventName xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">Common.BO_OUTBOUND.BO_SFA.BO_Persist_Account_CRM_Routing_Service.Persist&lt;/EventName>
    &lt;Cause xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 400 Bad request
         at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeOperation(WSIFOperation_JaxRpc.java:1723)
         at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1465)
         at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.executeRequestResponseOperation(WSIFOperation_JaxRpc.java:1186)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:507)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:430)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:447)
         at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:184)
         at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:112)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:158)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:121)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1986)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1465)
         at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:105)
         at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:273)
         at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(InitialEventDispatcher.java:297)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(InitialEventDispatcher.java:279)
         at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:118)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1986)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1465)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(EventOracleSoapProvider.java:343)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(EventOracleSoapProvider.java:190)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:190)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:539)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:430)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:447)
         at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:184)
         at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:112)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:158)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:121)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1986)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1465)
         at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:105)
         at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:273)
         at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(InitialEventDispatcher.java:297)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(InitialEventDispatcher.java:279)
         at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:118)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1986)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1465)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(EventOracleSoapProvider.java:343)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(EventOracleSoapProvider.java:190)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:190)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: org.collaxa.thirdparty.apache.wsif.WSIFException: exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 400 Bad request
         at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeOperation(WSIFOperation_JaxRpc.java:1723)
         at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1465)
         at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.executeRequestResponseOperation(WSIFOperation_JaxRpc.java:1186)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:507)
         ... 39 more
    &lt;/Cause>
    &lt;/detail>
    </detail>
    </part></remoteFault></fault></messages>

    Is this error just for this message, or all messages?
    Is the xml valid against the payload. You will need to use a tool like XML spy to check.
    Are you able to see the response coming back, if so does it conform to the response schema.
    cheers
    James

  • Using Linq Query in our program error is thrown :Exception has been thrown by the target of an invocation.

    Hi All,
      I am writing the below linq query to fetch the record from the database ,
    var individualres = (from c in orgContext.CreateQuery("contact")
                                                 join a in orgContext.CreateQuery("annotation")
                                                      on c["contactid"] equals a["objectid"]
                                                 where (bool)a["isdocument"] == true && a["objectid"] == r.GUID &&
    a["filename"] != null
                                                 select new
                                                     FirstName = c["firstname"],
                                                     LastName = c["lastname"],              
                                                     CreatedDate=a["createdon"],
                                                     DocumentBody = (a["documentbody"] == null) ? "" : a["documentbody"],
                                                     GUID = c["contactid"],
                                                     FileName = a["filename"],
                                                     WorkStatus = (c["new_workstatus"] == null) ? "" : c["new_workstatus"],
                                                     Rank = (c["new_rank"] == null) ? "" : c["new_rank"],
                                                     State = (c["address1_stateorprovince"] == null) ? "" : c["address1_stateorprovince"],
                                                     City = (c["address1_city"] == null) ? "" : c["address1_city"]
    But it is throwing the error   Exception has been thrown by the target of an invocation.
    if this error is related to null values into the columns , then i am handling those by using the 
    ternary operator.
    Can anybody help me out for this issue.
    thanks in advance.

    Hello EmpAnsar,
    >>But it is throwing the error   Exception has been thrown by the target of an invocation.
    From your LINQ query, it is hard to tell what the caused reason is since we do not have your exact tables and data. My suggestion is that you could narrow this issue by reducing items you want to fetch, for example, you could firstly write a sample query
    without where clause and select new syntax as:
    var individualres = (from c in orgContext.CreateQuery("contact")
    join a in orgContext.CreateQuery("annotation")
    on c["contactid"] equals a["objectid"]
    select c).ToList();
    To check if it would work, if so, you could add these filters and items you want step by step until reproducing this issue, this would help locate the root reason.
    Update:
    For this exception, i found some related threads which might be helpful to you:
    http://stackoverflow.com/questions/11809530/linq-and-exception-has-been-thrown-by-the-target-of-an-invocation
    http://stackoverflow.com/questions/4074058/exception-raised-when-using-a-linq-query-with-entity-framework
    http://stackoverflow.com/questions/7674105/linq-aggregate-produces-error-exception-has-been-thrown-by-the-target-of-an-in
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • This exception is never thrown from the try statement body

    try {
                   SimpleFileReader.openFileForReading("fileName.text");
              } catch (FileNotFoundException fnfe) {
                   System.out.println("");
              }This is part of a method, if that helps. In Eclipse I get the error message "Unreachable catch block for FileNotFoundException. This exception is never thrown from the try statement body." I saw another post similar to this one, but it's not quite clear what the solution is. Could anyone clarify for a beginner?
    Thanks

    It actually does if the file it's opening is not really a text file, or if it's read-protected. Or is that where I'm going wrong? I'm just trying to open the file's name(already in the field) and know that it is .text or will return the error.
    Edited by: meme_kun_345k on Jan 15, 2008 7:18 PM

  • An unhandled exception has been thrown in the ESB system

    Hi Experts,
    we are using SOA suite 10.1.3.1.0 with Jdev 10.1.3.1.0, when we are trying to deploy the FullfillmentESB(of SOA Order booking application) to Integration server, prompted with the following error:
    Entity Deployment Failed
    error code: 0 : 10
    summary: An unhandled exception has been thrown in the ESB system. The exception reported is: "java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:203)
    at oracle.tip.esb.lifecycle.AuxiliaryFileHandler.unzip(Unknown Source)
    at oracle.tip.esb.configuration.deployment.JDevDeploymentManager.deploy(Unknown Source)
    at oracle.tip.esb.configuration.deployment.DeploymentServlet.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Below are more details about the above mentioned issue.We have created a new user and assigned the oc4jadmin roles to it.
    we are trying to deploy the soa order booking application projects from jdev 10.1.3.1.0.We could deploy all the other modules except the following:
    FullFillmentESB
    OrderBookingESB
    OrderBookingBPEL
    Is this an issue with configuring the new user which we using to deploy the soa order booking application.Although we could create Application Server Connection And Integration Server Connection Successfully(tested) with new user credentials.
    When we opened the ESB console we could see the default system and bpel system.
    SOA Suite is installed on Windows Platform on a Remote System.
    Thankx
    peter.

    I solved the issue by freeing up the space in my AIA OC4J server. When SOAserver does not have sufficient space you get this error. Please make sure atleast you have 2% free unused space on the server while deploying.
    Guna

Maybe you are looking for

  • Namespace prefix in SOAP Elements causes problems in XI

    Hi guys, I'm using code generated by NW Developer Studio for use inside Portal components acting as a web service consumer. The problem is that the code generated includes a namespace prefix for each element in the body of the message, but XI doesn't

  • IMac not detecting earbuds.

    I had bought a new pair of earbuds yesterday, they work on my iPad but not my iMac, The things I had done too try and fix this is: Reset PRAM / NVRAM. Fiddle around with the audio jack with a toothpick & clear it out with a can of air. Turn off my iM

  • CAF  entity and application service

    hi           when we are importing RFC or Webservice  for  external service             can we use application service directly  instead of  entity service                is it possible to use only  external service and  without entity  service  .

  • Forms and Reports 10g run on the other client machine

    Dear Sir, Please tell me how to run forms/reports which is compiled/build in ORACLE 10g. I mean that I have build some forms and reports in Oracle 10g now I want to run them on another client machine without creating oracle application server. Is the

  • Itunes 7 does not playback 5.1 audio

    hi i am using Audigy1 Platinum with the latest unified drivers. i use Creative Inspire 5300 5.1 sound system. but itunes 7 only plays audio thru the front left and right speakers. When i use another application to play mp3 i hear sound from all the s