Examples of initCause()


Examples of javax.net.ssl.SSLKeyException.initCause()

        innerFactory = sslCtx.getSocketFactory();
      }
      catch(GeneralSecurityException x) {
        xx = new SSLKeyException("Failed to create SSLContext for " +
            algorithm);
        xx.initCause(x);
        throw xx;
      }
    }
    return innerFactory;
  }
View Full Code Here

Examples of javax.net.ssl.SSLPeerUnverifiedException.initCause()

                  {
                    peerUnverified(peerCerts);
                    SSLPeerUnverifiedException e =
                      new SSLPeerUnverifiedException ("could not verify peer certificate: "+
                                                      peerCerts[0].getSubjectDN());
                    e.initCause (x);
                    throw e;
                  }
                session.peerCerts = peerCerts;
                session.peerVerified = true;
              }
View Full Code Here

Examples of javax.persistence.NonUniqueResultException.initCause()

      return getSingleResult(getQueryForCriterias(entityClass, true, criterias), (T) null);

    } catch (NonUniqueResultException ex) {
      NonUniqueResultException e = new NonUniqueResultException("Expected single result for entitiy " + entityClass.getSimpleName()
          + " with criterias : " + StringUtils.join(criterias, ","));
      throw (NonUniqueResultException) e.initCause(ex);
    }
  }

  @Override
  public <T> List<T> getResults(Class<T> entityClass, Object... criterias) {
View Full Code Here

Examples of javax.resource.NotSupportedException.initCause()

      if (logRCFailures) {
        jmse.printStackTrace();
      }
      NotSupportedException nse = new NotSupportedException(
          "MQRA:EC:Error:createRemoteMessageConsumer failed:aborting due to:" + jmse.getMessage());
      nse.initCause(jmse);
      throw nse;
    }

       
        // success
View Full Code Here

Examples of javax.resource.ResourceException.initCause()

        checkEnv("commit");
        try {
            env.getThreadTransaction().commit();
        } catch (DatabaseException DE) {
            ResourceException ret = new ResourceException(DE.toString());
            ret.initCause(DE);
            throw ret;
        } finally {
            env.setThreadTransaction(null);
        }
View Full Code Here

Examples of javax.resource.spi.ResourceAdapterInternalException.initCause()

            adminPassFile,new EffectiveBrokerProps());
        lbr.start();
      } catch (Exception lbse) {
        ResourceAdapterInternalException raie = new ResourceAdapterInternalException(_lgrMID_EXC
            + "start:Aborting:Exception starting LOCAL broker=" + lbse.getMessage());
        raie.initCause(lbse);
        _loggerL.severe(raie.getMessage());
        _loggerL.info(this.toString());
        lbse.printStackTrace();
        _loggerL.throwing(_className, "start()", raie);
        throw raie;
View Full Code Here

Examples of javax.resource.spi.ResourceAllocationException.initCause()

            StringManager localStrings =
                    StringManager.getManager(DataSourceObjectBuilder.class);
            String msg = localStrings.getString("jdbc.cannot_allocate_connection"
                    , sqle.getMessage());
            ResourceAllocationException rae = new ResourceAllocationException(msg);
            rae.initCause(sqle);
            throw rae;
        }

        com.sun.gjc.spi.ManagedConnection mc = constructManagedConnection(
                null, dsConn, pc, this);
View Full Code Here

Examples of javax.script.ScriptException.initCause()

            if (value != null) {
                if (value instanceof Wrapper) {
                    value = ((Wrapper) value).unwrap();
                }
                if (value instanceof Throwable) {
                    se.initCause((Throwable) value);
                }
            }

            // if the cause could not be set, overwrite the stack trace
            if (se.getCause() == null) {
View Full Code Here

Examples of javax.security.auth.RefreshFailedException.initCause()

            RefreshFailedException rfException
                = new RefreshFailedException("Failed to renew Kerberos Ticket "
                                             + "for client " + client
                                             + " and server " + server
                                             + " - " + e.getMessage());
            rfException.initCause(e);
            throw rfException;
        }

        /*
         * In case multiple threads try to refresh it at the same time.
View Full Code Here

Examples of javax.security.auth.callback.UnsupportedCallbackException.initCause()

                    ((PasswordCallback) cb).setPassword(getHash(_protocolSession.getPassword()));
                }
                catch (NoSuchAlgorithmException e)
                {
                    UnsupportedCallbackException uce = new UnsupportedCallbackException(cb);
                    uce.initCause(e);
                    throw uce;
                }
            }
            else
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.