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?

Similar Messages

  • 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).

  • Thrown validation exception not being showed in jspx page

    Hi,
    I have a page with af:table which uses one view object.That view object is using one entity object. In one of the method of the EntityImpl class of my entity object i throw ValidationException.I debugged the application and i saw that it is throwing the exception.But it is not being shown in the page. What might be wrong here?
    try{
    setAttributeInternal(BANKTYPE, value);
    catch(TooManyObjectsException e) {
    e.printStackTrace();
    throw new ValidationException ("You are trying to add existing record");
    My jspx page is having *<af:messages id="m1"/>*
    Does the jspx page need any configuration to show the thrown exception in a popup?
    Regards,
    Priya.

    Hi vinod,
    I tried it and it worked.Thanks a lot :). Can you please tell me why it was not happening with the ValidationException?
    Regards,
    Priya.

  • 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.

  • 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

  • Exception not thrown on Key Exists

    using c# api:
    I have a Btree DB configured with two secondary DB's and a custom comparer, I have initialized the DB with 'DuplicatesPolicy.NONE'. To my understanding this should cause an exception to be raised if I try to enter a duplicate. On Put(), I get no such exception.
    Why? Am I supposed to throw this from comparer? (Actually tried this but it looks like it leaves cursor in undefined state). How Do I get the KeyExists Exception to be raised when a key exists???
    To my understadning I cannot use PutNoDuplicate() as a primary with secondaries cannot have duplicates configured, and you can only use PutNoDuplicate if there is a sorted duplicate policy...
    Any suggestions?

    Hi,
    The documentation could be a little misleading here. If you specify DuplicatesPolicy.NONE for a database, then duplicates will not be allowed in the database, and when trying to put a key/data pair in the database when the key already exist will fail:
    "Insertion when the key of the key/data pair being inserted already exists in the database will fail. "
    Failing here means that there will be no duplicate created, without any exception being thrown as the default behavior is to "Store the key/data pair in the database, replacing any previously existing key if duplicates are disallowed"; see the Database.Put() methods (BTreeDatabase extends from / is a sub-class of Database).
    You should use the PutNoOverwrite method. When the key that your are trying to insert already exists in the database, you will get a KeyExistException exception.
    Regards,
    Andrei

  • 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.

  • My toshiba external hard drive is not being recognized, except when I eject it. I have the preferences checked to show icon and have checked utilities folder. nothing. Help!

    I have a iMac, Yosemite 10.10 and my toshiba external hard drive is not being recognized, except when I eject it!. I have the preferences checked to show icons and have looked in the utilities folder..nothing. I have also changed ports. ??

    A few things to try:
    1-Repair permissions and restart your computer.
    2-Zap the PRAM
    3-Use Software Update/App Store to update your OS to OS 10.10.3.  Also, update everything SU/AS has to offer for your computer.  When done, repair permissions and restart your computer. 

  • Wait - interrupt  Why Exception not thrown?

    Hello. I expected that calling interrupt() on a waiting thread should result in InterruptedException thrown by wait(). Nevertheless, in the code below no Exception is thown as if there were no interrupt() call. Actually this snippet prints the same output irregardless of whether interrupt() is called.
    public class Runner {
        synchronized public void foo(){
            System.out.println("before wait in foo()");
            try {
                wait();
            } catch (InterruptedException e) {
                System.out.println("InterruptedException");
                e.printStackTrace();
            System.out.println("after wait in foo()");
        synchronized public void bar(){
            System.out.println("before sleep in bar()");
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            System.out.println("after sleep in bar()");
            notify();
            System.out.println("after notify in bar()");
        public static void main(String[] args) {
            final Runner runner = new Runner();
            Thread t1 = new Thread(new Runnable(){
                public void run() {
                    runner.foo();
            Thread t2 = new Thread(new Runnable(){
                public void run() {
                    runner.bar();
            t1.start();
            t2.start();
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            t1.interrupt();
            System.out.println("t1 interrupted");
    }

    Thanks for your response.
    Still the whole thing is not clear to me.
    Why InterruptedException is not deterministic in this
    case?
    Where is the ?non-deterministic? code in this
    example?The fact that t1.start() is written before t2.start() in you code does not guarantee that foo() method will always be called first. Either the bar() method or foo() method can be invoked firstly, because this is how threads work in Java. Try to invert: put t2.start() before t1.start(), and see what happens. Probably the exception will be thrown in this case, but this behaviour is still non deterministic.
    Please pay attention to timing -
    t1.interrupt() is called in about 5 seconds after
    both threads are started, at the time when one thread
    is in sleep(10000) and the other in wait(). I believe
    that above condition may be taken for granted taking
    in account 5 seconds interval between calls.You know that when you invoke the notify() method inside the bar method() you are making the foo() method not waiting anymore, don?t you? Therefore, if foo() method is called firstly, then the InterruptedException probably won?t be thrown. I said "probably" because the behaviour is non deterministic. Time is relative. If your processor is fast, then probably the exception will never be thrown, but you will never be completely sure. Maybe if there are other executions using your processor, then the processor might be slow for your program, and then the InterruptedException might be thrown. If you want to make your program have the same behaviour always, then you have to use semaphore variables, that indicate when exactly one thread is permitted to run.

  • Global exception handler not being called

    Hi,
    I have a wli process that has a global excepton handler. One of the controls throws a NullPointerException but it is not being handled by the group exception handler nor the global exception handler.
    Does anyone have any idea what may be causing this behaviour?
    Thanks,
    Dale

    I have discovered that using -memalign=Ns with N greater than 1 does not work for me. For example, if I remove a VME card from the system and try to use an unsigned short pointer to access a 16-bit register in the card's vacated VME address space, my signal handler gets called when I compile the code with N=1, but for any other N, my handler is ignored and my program cores.
    Unfortunately, using N=1 causes other code that works with higher N to fail. I have one VME card where I need to access a register as a 16-bit read. The code the compiler generates to access the unsigned short pointer value results in two single-byte load instructions - this causes the device to cry foul and as a result, the driver raises SIGBUS, which my program handles. For higher N, the compiler generates one two-byte load instruction, and the device is happy to send back the data.
    So it would appear there is some kind of problem with -xmemalign=Ns for N > 1. It seems like the SIGBUS handler typically imployed by the compiler to handle the misalignment problems when -xmemalign=Ni is used is being invoked.
    Any other ideas?

  • My iPhone 5c is not being recognized by my mac except to charge it. I'm up to date on all updates and don't know what else to do. I have restarted several times. I have even tried to update my iPhoto and I can't even do that with iPhoto 9.0, but can't.

    My Iphone 5c is not being recognized by my Mac computer. I have done all of the upates, restarted several times and I'm not sure what else to do. I have searched and searched and searched and have come up with nothing. Also, my Iphoto can not be updated. I'm still using version 8. something, and it won't update without this update and that update. It needs 9.0 but I can't find that download anywhere. The only one that I can find is 9.1. That won't update. Is there anything that I can do, or should I just bite it and take it to apple to get looked at?

    Does iTunes not see the phone?
    If not, make sure you're running the current version of iTunes.
    If you are running the current version and it still doesn't recognize it, see this: http://support.apple.com/kb/TS1591?viewlocale=en_US&locale=en_US
    As for iPhoto, you will have to purchase a newer version. It's not a free upgrade. Or, you can use Image Capture, which is built into OS X, to import the photos.

  • Exception has been thrown by the target of an invocation. Object reference not set to an instance of an object....when I do test map

    Hello
    I have a c# code in which I am calling a web service, and c# code returns a string value.
    I am calling that c# code from Biztalk Map script function as an external assembly
    but when I do test map I get the above above error...Can some one please answer...i m working on BTS2006R2 and i have also tried to test the c# code from a test windows applciation and where does return the values as expected..

    Hi,
    "Exception has been thrown by the target of an invocation" is a very generic exception. you need the inner exception to see the actual error. You can also try to test the map in the MapTester tool. It also shows also
    the inner exception. It's designed for BizTalk 2010 but with the .exe file you maybe also can test BizTalk 2006 maps,.
    http://code.msdn.microsoft.com/Execute-a-BizTalk-map-from-26166441
    Kind regards,
    Tomasso Groenendijk
    Blog 
    |  Twitter
    MCTS BizTalk Server 2006, 2010
    If this answers your question please mark it accordingly

  • Popularity trend/usage report is not working in sp2013. Data was not being processed to EVENT STORE folder which was present under the Analytics_GUID folder.

    Hi
     I am working in a sharepoint migration project. We have migrated one SharePoint project from moss2007 to sp2013. Issue is when we are clicking on Popularity trend > usage report,  it is throwing an error.
    Issue: The data was not being processed to EVENT STORE folder which was present under the
    Analytics_GUID folder. Also data was not present in the Analytical Store database.
    In log viewer I have found the bellow error.
    HIGH -
    SearchServiceApplicationProxy::GetAnalyticsEventTypeDefinitions--Error occured: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly
    secured fault was received from the other party.
    UNEXPECTED - System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail,
    System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: We're sorry, we weren't able to complete the operation, please try again in a few minutes.
    HIGH - Getting Error Message for Exception System.Web.HttpUnhandledException
    (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party.
    CRITICAL - A failure was reported when trying to invoke a service application:
    EndpointFailure Process Name: w3wp Process ID: 13960 AppDomain Name: /LM/W3SVC/767692721/ROOT-1-130480636828071139 AppDomain ID: 2 Service Application Uri: urn:schemas-microsoft-
    UNEXPECTED - Could not retrieve analytics event definitions for
    https://XXX System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: We're sorry, we weren't able to complete the operation, please try again in a few minutes.
    UNEXPECTED - System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail,
    System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: We're sorry, we weren't able to complete the operation, please try again in a few minutes.
    I have verified few things in server which are mentioned below
    Two timer jobs (Microsoft SharePoint Foundation Usage Data Processing, Microsoft SharePoint Foundation Usage Data Import) are running fine.
    APPFabric Caching service has been started.
    Analytics_GUID folder has been
    shared with
    WSS_ADMIN_WPG and WSS_WPG and Read/Write access was granted
    .usage files are getting created and also the temporary(.tmp) file has been created.
    uasage  logging database for uasage data being transported. The data is available.
    Please provide pointers on what needs to be done.

    Hi Nabhendu,
    According to your description, my understanding is that you could not use popularity trend after you migrated SharePoint 2007 to SharePoint 2013.
    In SharePoint 2013, the analytics functionality is a part of the search component. There is an article for troubleshooting SharePoint 2013 Web Analytics, please take a look at:
    Troubleshooting SharePoint 2013 Web Analytics
    http://blog.fpweb.net/troubleshooting-sharepoint-2013-web-analytics/#.U8NyA_kabp4
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Exception not always caught in Sun Studio 12

    Hi,
    We're using Sun Studio 12 (Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25) on a Solaris 10 SPARC machine. In our applications an exception thrown is sometimes not caught in the try/catch statement and the program continues at an outer catch statement (which usually leads to the program exiting). So far I've not been able to reduce the code down to a simple example and I don't yet know what conditions causes this behaviour.
    In general the code has a big try/catch statement in main. Somewhere deep in the code there is a second try/catch statement which protects against a piece of code which we know may throw an exception. This is usually a smart pointer being dereferenced. The act of dereferencing the smart pointer in turn causes an exception to be thrown which is caught internally in a third try/catch inside the dereference code. The exception is successfully caught and some clean up is done. Then the exception is re-thrown by either using a throw; statement or a new throw xmsg("...");. All our exceptions are always of type xmsg which simply takes a string argument.
    When the problem manifests itself the second try/catch is ignored and the re-thrown exception is instead caught in the outer catch statement in main which causes the program to log an error and exit.
    We have lots of code which is structured the same way and the same style of code works in many cases only to fail in some specific case. It's an elusive problem because the problem moves around and it also depends on how the program is compiled. It only seems to happen when compiled in debug mode. If I compile with -xO4 the problem seems to go away.
    The problem also goes away or moves to a different place if the code has changed somewhere between compiles, i.e. some other developer has modified some code, not necessarily in the same are where the problem originally happened.
    One thing we have is a function we call DoThrow (used to suppress a warning on an older compiler) defined like this:
    void DoThrow(const std::string& msg)
      throw xmsg(msg);
    }As an experiment I replaced the call to DoThrow with a straight throw xmsg(...) at a place where the first exception was thrown and the problem went away. I'm not sure if removing the call to DoThrow fixed the problem or if the minor restructuring of the code was enough to move the problem elsewhere.
    For production releases we still use WorkShop 6, update 2 which does not have any problems like this. We really would like to upgrade to Sun Studio 12 because it's a much better compiler over all. We can't upgrade until we feel confident we have a workaround.
    Does anyone have any thoughts on what might be wrong or any ideas on what I can do to narrow down the problem?
    Thanks,
    Krister

    Many thanks. You've given me a few areas to focus on and I'll bring my house in order.
    The only external C++ library we depend on is STLport 5.0.2 which we compile ourselves. It's currently compiled with 5.3 on Solaris 8 and I will recompile it with 5.9 on Solaris 10. All other external libraries are C libraries. Our own code is put in static libraries and linked statically. I've read that exceptions thrown in shared libraries can be problematic.
    Your comment about complex conditional expressions (a ? f() : g()) is interesting. We've been bitten before by compiler bugs affecting those types of expressions. Destructors called twice or destructors called for temporaries never created. We may still have some conditional expressions like that.
    The exception is of type xmsg, defined this way:
    class xmsg
      public:
        xmsg(const char* s) : _msg(s) {}
        xmsg(const std::string& s) : _msg(s) {}
        const std::string& why() const { return _msg; }
      private:
        const std::string _msg;
    };There are three catch blocks involved and all the try/catch statement look like this:
    try
    catch(const xmsg& msg)
    }Here is a stack trace from dbx at the point where the exception is thrown the first time.
      [1] __exdbg_notify_of_throw(0xffbf4ae8, 0xffbf4ad0, 0x959b292c, 0xffff0000, 0x0, 0xfc00), at 0xfb6549b4
      [2] _ex_debug_handshake1(0x0, 0x101cb84, 0x1, 0x14ffc, 0xfb66a67c, 0xfb66ad38), at 0xfb655728
      [3] _ex_throw_body(0xfb66af80, 0x80b2ac, 0xfb66a67c, 0x14d9c, 0x0, 0xfb66af80), at 0xfb655934
      [4] __Crun::ex_throw(0xfb66afd0, 0x1460bf8, 0x7ead20, 0x0, 0x16538, 0x1), at 0xfb6558bc
    =>[5] TransportSource<User>::Activate(this = 0x1624810, r = CLASS, _ARG3 = CLASS), line 39 in "TransportSource.H"
      [6] Source<User>::DoActivate(this = 0x162486c, r = CLASS, e = CLASS), line 272 in "Factory.H"
      [7] BaseFactory::Load(this = 0x16020a8, e = CLASS), line 2799 in "BaseFactory.C"
      [8] GPAuthorizationSource::Load(this = 0x15d2440), line 110 in "GPAuthorization.C"
      [9] ExchangeServer::ExchangeServer(this = 0xffbfa95c, argc = 8, argv = 0xffbfbaec), line 380 in "exchangeServer.C"
      [10] main(argc = 8, argv = 0xffbfbaec), line 1525 in "exchangeServer.C"Here is the code for the Activate function in stack frame 5. The exception thrown is the second one.
        virtual T& Activate(const Reference& r, Exemplar<T>&)
          _transport->In().Write(r);
          DemarshallStream out;
          _transport->Method(Process::Activate, out);
          if(!out.Data())
         throw xmsg("Failed to call Activate on server " + _transport->Name());
          if(!out.GetBool())
         throw xmsg("Server returned error: " + out.GetString());
          const ClassHandle& h = out.GetClassHandle(&_connection);
          // don't need to pass refresh flag here because a call to Activate
          // means the object is being loaded for the first time.
          BaseExemplar* x = _handle.GetFactory().Demarshall(h, out, false,
         &_connection, this);
          BaseTransportSource::DoActivate(out);
          if(!x)
         throw xmsg("Failed to activate ref: " + r.ExternalValue());
          return static_cast<T&>(*x->GetInstance());
        }The exception is caught (frame 7 in the stack trace above) and re-thrown in the below code, at the last throw statement.
    void BaseFactory::Load(BaseExemplar& e)
      SourceMap::iterator p = _sources.find(&e._key->Type());
      if(p == _sources.end())
        throw xmsg("Factory<" + _handle.Name() + ">::Load - no source for: "
          + e._key->ExternalValue());
      AutoPointer<BaseGuard> g(Guard());
      std::list<BaseSource*>::iterator i = p->second.begin();
      while(true)
        try
          (*i)->_currentExemplar = &e;
          BO& x = (*i)->DoActivate(*e._key, e);
          (*i)->_currentExemplar = 0;
          if(!e._instance)
         e._instance = &x;
         Activate(e, ActivatedOld, 0);
          return;
        catch(const xmsg& msg)
          (*i)->_currentExemplar = 0;
          ++i;
          if(i == p->second.end())
         throw;
    }There is a second try/catch one level up (stack frame 8, the call to GPAuthorizationSource::Load). Here's a snippet of that piece of code.
        try
          const Exemplar<User>& user = UserFactory::Instance().CreateExemplar(
         *new UserReference(authorizationTable._login.Value()));
          *user;
        catch(const xmsg& msg)
          Logger::Instance() << LogHeader << MsgClass(MsgClass::Error)
         << "Error PMAutorizationSource: " << msg.why() << EndMsg;
        // ...I put a break-point in the catch block in the above code but I never hit the break point and the exception is caught in an outer try/catch, an error is printed and the program exits.
      try
      catch(const xmsg& msg)
        std::cerr << "ERROR: " << msg.why() << std::endl;
      }I'm sorry I have not yet been able to produce a smaller example that can be compiled and tested in isolation. I know that's important in order to track down the problem. It seems like the smallest change in seemingly unrelated parts of the code makes the problem come or go.

  • WinSCP not being executed when package is ran from job

    I have a package in the SSIS catalog. It worked fine when it ran in the file system, but like so many others, died when I called it from a job. I ran the problem down to the fact that the account that the job was running under didn't have access to the directories
    that the package was trying to access. That solved half my problem.
    In my package I'm calling WinSCP from a script task. I can tell the executable is not getting called. No errors are being thrown. I gave the account in question full access to the folder where WinSCP resides but that didn't fix the issue. What else do I
    need to look at?

    Arthur, WinSCP has logging functionality. When the executable gets called a log file is created. No log file is being created. I did pull that particular piece of functionality out of the package and unit tested it and it worked fine which has only caused
    me further frustration.
    I am currently getting this series of errors which I only just found:
    The expression for the variable "InitialDirectoryFullPath" failed evaluation. There was an error in the expression.
    The variable "User:RootFileDirectory" was not found in the variables collection.
    Attempt to parse the expression "@[User:RootFileDirectory] + @[InitalDirectory]" failed and returned error code 0xC00470A6. The expression cannot be parsed.
    This makes no sense as it runs just fine in other environments under other accounts. Only when I push this thing to a certain box does it fail like this. RootFileDirectory is being populated by a Windows Environment Variable and I thought the problem was
    there except there are other parts of the package that use that variable and they work just fine.

Maybe you are looking for

  • WSUS and SQL login failures

    We're having problems with the WSUS configuration. In the wcm.log: System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'domain\localmachine$'.~~   at Microsoft.UpdateServices.Internal.BaseApi.SoapExceptionProcessor.DeserializeAndTh

  • Please fix date and time formatting in Hub and Calendar

    Hello, During initial setup I have used "English" as a setup language, but have since then changed it to "Croatian". In BlackBerry Hub, Calendar and Lock screens day and month names are still displayed and formatted in English. I noticed this bug bri

  • Post credit note

    Hi frns, Can anybody help me in creating a vendor credit note with the function module BAPI_ACC_INVOICE_RECEIPT_POST . Which field differentiates between a credit note and an invoice posted using the above function module. Thanks in Advance Somesh

  • 'Routine' is not available in version 'A'

    Hi, We are transporting process chain to QA system. At the time of collecting the objects for making transport request, gives following errors. Object '3RWUNFJ34X9ZGLXAL6VWXBPBA' (ROUT) of type 'Routine' is not available in version 'A' Above object i

  • Need Help  Endeca Dev to QA build process

    Hi, Could someone please guide me on how to move or publish a project from DEV to QA environment, along with the merchansising rules and page_builder_templates? Thanks, Shwetha