Class Constructor fails throwing Exception on Class Loading
===

I have a constructor that fails on the first call to `new` because an Exception of class `javax.persistence.NoResultException` being catch in one of the Class' methods. 

If I remove the import to `javax.persistence.NoResultException` and catch just a generic `Exception e`, the code works.

My questions are:

 1. Why is the code inside a method which hasn't been called is affecting the Constructor? (is not being called in the constructor either)
 2. Why is the ClassLoader throwing an exception which is not supposed to throw? [ClassLoader.loadClass()][1] throws `ClassNotFoundException` according to JavaDoc.

that catch for javax.persistence.NoResultException as well as the import are old code which managed to survive between versions, I removed it and it's fixed, however I'd like to now the reason behind this.

**Go to the end to see the step by step images of the debugger and the moment it fails**
 
**FAILING CODE:**

    // ClassB.java
    
    import javax.persistence.NoResultException; // NOTICE THE IMPORT

    public ClassB{
        private UserInfo user;
        private WebServiceBDelegate port;
        private Connection conn;

        public ClassB (UserInfo user, Connection conn) throws Exception {
            System.out.println("CLASS B CONSTRUCTOR");
            this.user = user;
            this.conn = conn;
            this.port = new WebServiceBService().getForwardingPort();
        }

        public boolean methodB(List<String> list){
            try{
                // Check some stuff on database using this.conn
            } catch(NoResultException nre){         // NOTICE THE CATCH
                String something = getSomething();
            }
            // Get the values to invoke SOAP service using this.conn
            status = port.operationB(values);
            if(status > 0)
                return true;
            return false;
        }
    }

**WORKING CODE:**

    // ClassB.java

    public ClassB{
        private UserInfo user;
        private WebServiceBDelegate port;
        private Connection conn;

        public ClassB (UserInfo user, Connection conn) throws Exception {
            System.out.println("CLASS B CONSTRUCTOR");
            this.user = user;
            this.conn = conn;
            this.port = new WebServiceBService().getForwardingPort();
        }

        public boolean methodB(List<String> list){
            try{
                // Check some stuff on database using this.conn
            } catch(Exception e){         // THIS IS THE CHANGED CATCH
                String something = getSomething();
            }
            // Get the values to invoke SOAP service using this.conn
            status = port.operationB(values);
            if(status > 0)
                return true;
            return false;
        }
    }

Here are the step by step images from the debugger when entering INTO the class constructor, to the JVM default ClassLoader and the moment it fails:

[STEP INTO when calling new ClassB gets me to loadClassInternal(String)][2]
![STEP INTO when calling new ClassB gets me to loadClassInternal(String)][3]

[STEP INTO loadClassInternal(String), gets me to loadClass(String,boolean)][4]
![STEP INTO loadClassInternal(String), gets me to loadClass(String,boolean)][5]

[STEP INTO loadClass(String,boolean), as far as I can get, now STEP RETURN][6]
![STEP INTO loadClass(String,boolean), as far as I can get, now STEP RETURN][7]

[STEP RETURN gets me to loadClass(String][8])
![STEP RETURN gets me to loadClass(String)][9]

[STEP OVER gets me to loadClassInternal(String)][10]
![STEP OVER gets me to loadClassInternal(String)][11]

[STEP OVER gives me javax.persistence.NoResultException][12]
![STEP OVER gives me javax.persistence.NoResultException][13]

STEP OVER TAKES ME BACK TO A FINALLY IN MY CODE AND ENDS EXECUTION


  [1]: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassLoader.html#loadClass%28java.lang.String%29
  [2]: http://i.stack.imgur.com/a1z4N.png
  [3]: http://i.stack.imgur.com/a1z4N.png
  [4]: http://i.stack.imgur.com/e2CEu.png
  [5]: http://i.stack.imgur.com/e2CEu.png
  [6]: http://i.stack.imgur.com/E0IUQ.png
  [7]: http://i.stack.imgur.com/E0IUQ.png
  [8]: http://i.stack.imgur.com/d39PK.png
  [9]: http://i.stack.imgur.com/d39PK.png
  [10]: http://i.stack.imgur.com/NjiwW.png
  [11]: http://i.stack.imgur.com/NjiwW.png
  [12]: http://i.stack.imgur.com/C9N4C.png
  [13]: http://i.stack.imgur.com/C9N4C.png