weblogic 整合hibernate valildation 2个问题的解决
1.java.lang.AbstractMethodError:
<property name="traversableResolver">
<bean class="com.....ExtTraversableResolver"></bean>
</property>
</bean>
其中ExtTraversableResolver代码如下:
import java.lang.annotation.ElementType;
import javax.validation.Path;
import javax.validation.TraversableResolver;
public class ExtTraversableResolver implements TraversableResolver {
public final boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
return true;
}
public final boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
return true;
}
}
2.ava.lang.NoSuchMethodError: javax.persistence.Persistence.getPersistenceUtil()Ljavax/persistence/PersistenceUtil;
引用C:\Program Files\Java\jdk1.6.0_30\jre\lib\ext\hibernate-jpa-2.0-api-1.0.0.Final.jar