users@glassfish.java.net

Re: Glassfish ...

From: <forums_at_java.net>
Date: Sun, 10 Jul 2011 07:56:14 -0500 (CDT)

 Hi Seifi!   I will try to describe how i've fixed this problem.   So
let's start it:   1) First download and unzip the wished glassfish
distribution in some independent directory   2) Go into the directory 'where
your root directory of glassfish is/glassfish/modules' 3) Find
bean-validator.jar and unpack it in a temporary directory (It is important,
because you need to rebuild the package) 4) Go into 'where bean-validator is
unpacked/META-INF/maven/org.glassfish.hk2.external/bean-validator' 5) Open
pom.xml and find following expression '<hibernate-validator.version>'. Copy
the dependent version of hibernate-validator.   6) Go the following
link:sourceforge.net/projects/hibernate/files/hibernate-validator/ and
download the source of the hibernate-validator   7) Unpack the
hibernate-validator in some directory and open
hibernate-validator-4.1.0.Final/src/main/java/org/hibernate/validator/engine/resolver/DefaultTraversableResolver.java
  7.1) Find and replace the fixed DefaultTraversableResolver#isReachable()
method with the following code:   public boolean isReachable(Object
traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path
pathToTraversableObject, ElementType elementType) {    return
jpaTraversableResolver == null || (traversableProperty.getName() == null) ||
jpaTraversableResolver.isReachable(    traversableObject,
traversableProperty, rootBeanType, pathToTraversableObject, elementType  
 );   } 7.2) Go back to the root directory of the already unpacked
hibernate-validator and execute 'mvn package'   7.3) After successful build,
execute the following command to add the fresh build of the
hibernate-validator into your local repository: mvn install:install-file
-DgroupId=write groupId -DartifactId=write artifactId -Dversion=version of
hibernat-validator -Dpackaging=write packaging
-Dfile=hibernate-validator*.jar   8) Go back into the described in 4)
directory and execute 'mvn package'.  9) After the new bean-validator.jar is
built successful, copy it from 'target/' in the same directory and replace
the existing version from the directory described in 2) on glassfish. 10) Run
the server and enjoy it.   Cheers, Hristo


--
[Message sent by forum member 'hviagov']
View Post: http://forums.java.net/node/818719