Skip to content

Instantly share code, notes, and snippets.

View hferentschik's full-sized avatar

Hardy Ferentschik hferentschik

View GitHub Profile
@hferentschik
hferentschik / gist:716725
Created November 26, 2010 13:45
open terminal apple script
on run
tell application "Finder"
try
activate
set frontWin to folder of front window as string
set frontWinPath to (get POSIX path of frontWin)
tell application "Terminal"
activate
do script with command "cd \"" & frontWinPath & "\""
end tell
<?xml version='1.0' encoding='UTF-8'?>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ Copyright (c) 2010, Red Hat, Inc. and/or its affiliates or third-party contributors as
~ indicated by the @author tags or express copyright attribution
~ statements applied by the authors. All third-party contributions are
~ distributed under license by Red Hat, Inc.
~
~ This copyrighted material is made available to anyone wishing to use, modify,
@hferentschik
hferentschik / gist:765019
Created January 4, 2011 16:51
Switched JDKs on Mac
J_VERSIONS_DIRECTORY="/System/Library/Frameworks/JavaVM.framework/Versions"
J_COMMANDS_SUBPATH="Commands"
J_HOME_SUBPATH="Home"
function availableJVMs()
{
ls -1 $J_VERSIONS_DIRECTORY | grep ^[0-9].[0-9]
}
function listJava()
private <T, U, V, E extends ConstraintViolation<T>> void validateConstraintsForCurrentGroup(ValidationContext<T, E> validationContext, ValueContext<U, V> valueContext) {
BeanMetaData<U> beanMetaData = getBeanMetaData( valueContext.getCurrentBeanType() );
boolean validatingDefault = valueContext.validatingDefault();
boolean validatedBeanRedefinesDefault = beanMetaData.defaultGroupSequenceIsRedefined();
// if we are not validating the default group there is nothing special to consider
if ( !validatingDefault ) {
validateConstraintsForNonDefaultGroup( validationContext, valueContext );
return;
}
public void testFacetDrillDown() throws Exception {
Query luceneQuery = builder.keyword().onField( "make" ).matching( "Honda" ).createQuery();
FacetRequest request = builder.facet()
.name( facetName )
.onField( indexFieldName )
.createFacet();
FullTextQuery query = fullTextSession.createFullTextQuery( luceneQuery, Car.class );
query.enableFacet( request );
@hferentschik
hferentschik / Build log
Created April 7, 2011 12:50
BV TCK AS7 setup
mvn clean test -Dincontainer-as7
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hibernate Validator TCK Runner 4.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ hibernate-validator-tck-runner ---
[INFO] Deleting /Users/hardy/work/hibernate/git/validator/hibernate-validator-tck-runner/target
[INFO]
java.lang.RuntimeException: Unable to instantiate org.hibernate.validator.HibernateValidator
at org.hibernate.jsr303.tck.util.TestUtil.instantiateValidationProviderUnderTest(TestUtil.java:274)
at org.hibernate.jsr303.tck.util.TestUtil.getConfigurationUnderTest(TestUtil.java:75)
at org.hibernate.jsr303.tck.util.TestUtil.getValidatorFactoryUnderTest(TestUtil.java:69)
at org.hibernate.jsr303.tck.util.TestUtil.getValidatorUnderTest(TestUtil.java:58)
at org.hibernate.jsr303.tck.tests.validation.validatorcontext.ConstraintValidatorContextTest.propertyPathInIterable(ConstraintValidatorContextTest.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
package org.hibernate.search.test.query.facet;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
Test org.hibernate.metamodel.binding.BasicAnnotationBindingTests FAILED
Test org.hibernate.metamodel.binding.BasicHbmBindingTests FAILED
Test org.hibernate.metamodel.source.annotations.entity.EmbeddableBindingTests FAILED
Test org.hibernate.metamodel.source.annotations.entity.EmbeddedIdTests FAILED
Test org.hibernate.metamodel.source.annotations.entity.InheritanceBindingTest FAILED
Test org.hibernate.metamodel.source.annotations.entity.MappedSuperclassTests FAILED
Test org.hibernate.metamodel.source.annotations.xml.mocker.OverrideTest FAILED
> Building > :hibernate-core:test > 239 tests completed, 17 failures
public abstract class SearchTestCase extends TestCase {
...
protected void buildConfiguration() {
try {
setCfg( new Configuration() );
configure( cfg );
if ( recreateSchema() ) {