@Override public void reportError(String message) { LOG.error( message ); errorList.add( message ); }
public void close() throws SQLException { try { int allocationCount = allConnections.size() - availableConnections.size(); if(allocationCount > 0) { log.error( "Connection leak detected: there are " + allocationCount + " unclosed connections upon shutting down pool " + getUrl()); } } finally { for ( Connection connection : allConnections ) { connection.close(); } } }
private <R extends Service> void applyInjections(R service) { try { for ( Method method : service.getClass().getMethods() ) { InjectService injectService = method.getAnnotation( InjectService.class ); if ( injectService == null ) { continue; } processInjection( service, method, injectService ); } } catch (NullPointerException e) { log.error( "NPE injecting service deps : " + service.getClass().getName() ); } }
@Override public void reportError(RecognitionException e) { reportError( e.toString() ); recognitionExceptions.add( e ); LOG.error( e.toString(), e ); }
LOG.error( sqlException.getMessage() ); previousErrorMessages.add( sqlException.getMessage() );
/** * Open an InputStream to the URL represented by the incoming path. First makes a call * to {@link #locateConfig(java.lang.String)} in order to find an appropriate URL. * {@link java.net.URL#openStream()} is then called to obtain the stream. * * @param path The path representing the config location. * * @return An input stream to the requested config resource. * * @throws HibernateException Unable to open stream to that resource. */ public static InputStream getConfigStream(final String path) throws HibernateException { final URL url = ConfigHelper.locateConfig( path ); if ( url == null ) { String msg = LOG.unableToLocateConfigFile( path ); LOG.error( msg ); throw new HibernateException( msg ); } try { return url.openStream(); } catch (IOException e) { throw new HibernateException( "Unable to open config file: " + path, e ); } }
LOG.error( LOG.unableToUpdateHiValue( tableName ), sqle ); throw sqle;
public HibernateProxy deserializeProxy(SerializableProxy serializableProxy) { final ByteBuddyInterceptor interceptor = new ByteBuddyInterceptor( serializableProxy.getEntityName(), serializableProxy.getPersistentClass(), serializableProxy.getInterfaces(), serializableProxy.getId(), resolveIdGetterMethod( serializableProxy ), resolveIdSetterMethod( serializableProxy ), serializableProxy.getComponentIdType(), null, ReflectHelper.overridesEquals( serializableProxy.getPersistentClass() ) ); // note: interface is assumed to already contain HibernateProxy.class try { final Class proxyClass = buildProxy( serializableProxy.getPersistentClass(), serializableProxy.getInterfaces() ); final HibernateProxy proxy = (HibernateProxy) proxyClass.newInstance(); ( (ProxyConfiguration) proxy ).$$_hibernate_set_interceptor( interceptor ); return proxy; } catch (Throwable t) { final String message = LOG.bytecodeEnhancementFailed( serializableProxy.getEntityName() ); LOG.error( message, t ); throw new HibernateException( message, t ); } }
public static HibernateProxy deserializeProxy(SerializableProxy serializableProxy) { final JavassistLazyInitializer initializer = new JavassistLazyInitializer( serializableProxy.getEntityName(), serializableProxy.getPersistentClass(), serializableProxy.getInterfaces(), serializableProxy.getId(), resolveIdGetterMethod( serializableProxy ), resolveIdSetterMethod( serializableProxy ), serializableProxy.getComponentIdType(), null, ReflectHelper.overridesEquals( serializableProxy.getPersistentClass() ) ); final javassist.util.proxy.ProxyFactory factory = buildJavassistProxyFactory( serializableProxy.getPersistentClass(), serializableProxy.getInterfaces() ); // note: interface is assumed to already contain HibernateProxy.class try { final Class proxyClass = factory.createClass(); final HibernateProxy proxy = ( HibernateProxy ) proxyClass.newInstance(); ( (Proxy) proxy ).setHandler( initializer ); initializer.constructed(); return proxy; } catch ( Throwable t ) { final String message = LOG.bytecodeEnhancementFailed( serializableProxy.getEntityName() ); LOG.error( message, t ); throw new HibernateException( message, t ); } }
LOG.error( "Initialization failure [" + entityName + "#" + id + "]", e ); throw new LazyInitializationException( e.getMessage() );
public void reportError(String message) { LOG.error(message); errorList.add( message ); }
public void reportError(String message) { LOG.error(message); errorList.add( message ); }
private <R extends Service> void applyInjections(R service) { try { for ( Method method : service.getClass().getMethods() ) { InjectService injectService = method.getAnnotation( InjectService.class ); if ( injectService == null ) { continue; } processInjection( service, method, injectService ); } } catch (NullPointerException e) { LOG.error("NPE injecting service deps : " + service.getClass().getName()); } }
private <R extends Service> void applyInjections(R service) { try { for ( Method method : service.getClass().getMethods() ) { InjectService injectService = method.getAnnotation( InjectService.class ); if ( injectService == null ) { continue; } processInjection( service, method, injectService ); } } catch (NullPointerException e) { log.error( "NPE injecting service deps : " + service.getClass().getName() ); } }
public RuntimeException mapStatusCheckFailure(String message, SystemException systemException) { LOG.error( LOG.unableToDetermineTransactionStatus(), systemException ); return new TransactionException( "could not determine transaction status in beforeCompletion()", systemException ); }
public RuntimeException mapStatusCheckFailure(String message, SystemException systemException) { LOG.error( LOG.unableToDetermineTransactionStatus(), systemException ); return new TransactionException( "could not determine transaction status in beforeCompletion()", systemException ); }
public void reportError(RecognitionException e) { reportError( e.toString() ); recognitionExceptions.add( e ); LOG.error(e.toString(), e); }
public void reportError(RecognitionException e) { reportError( e.toString() ); recognitionExceptions.add( e ); LOG.error(e.toString(), e); }