users@glassfish.java.net

[gf-users] Re: Re: Issue with Web Servcies after Updating to Glassfish 4.1

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 23 Sep 2014 20:35:58 -0400

jar containing org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor is hibernate-validator ....be sure to pickup the correct version at this location
http://grepcode.com/project/repo1.maven.org/maven2/org.hibernate/hibernate-validator/

dynamic loading not enabled:
Edit the deployment descriptor files (ejb-jar.xml and sun-ejb-jar.xml) by hand. Execute an Ant build command (such as build jar) to reassemble the JAR module.then deploy to GF using asadmin e.g.
asadmin>asadmin deploy --type ejb --instance inst1 hibernate-validator-<version>.jar
bounce server e.g.
asadmin stop-domain domain1
asadmin start-domain domain1
http://docs.oracle.com/cd/E19644-01/817-5049/deassemb.html#wp80687ng

if dynamic loading enabled:

If you make code changes to an enterprise bean and dynamic reloading is
enabled, you do not need to redeploy the enterprise bean or restart the
server. You can simply drop the changed files into the application’s
deployed directory
(such as, instance-dir/applications) and the changes will be picked up.

 
To enable dynamic reloading with the Administration interface:

 In the Administration interface, select your server instance Select Applications.
The Application Properties page is displayed.
 Check the Reload Enabled box to enable dynamic reloading. Enter a number of
seconds in the Reload Poll Interval field to set the interval at which
applications and modules are checked for code changes and dynamically
reloaded. Click Save.
 
For details, see the Sun Java System Application Server Administration Guide.

 
In addition, to load new servlet files, reload EJB related changes, or
reload deployment descriptor changes, you must do the following:

 Create an empty file named .reload at the root of the deployed application:
instance_dir/applications/j2ee-apps/app_name/.reload


 
or individually deployed module:
 
instance_dir/applications/j2ee-modules/module_name/.reload


 Explicitly update the .reload file’s timestamp (touch .reload in UNIX) each time you make changes to the bean or deployment descriptor.
The reload monitor thread periodically looks at the timestamp of the .reload files to detect any changes. This interval is, by default, two seconds and can be modified by changing the value of dynamic-reload-poll-interval-in-seconds in the server.xml file.

http://docs.oracle.com/cd/E19644-01/817-5049/deassemb.html#wp80687

Report back any errors/exceptions

HTH,
Martin-
From: molnar_at_unavco.org
Date: Tue, 23 Sep 2014 11:48:29 -0600
To: users_at_glassfish.java.net
Subject: [gf-users] Re: Issue with Web Servcies after Updating to Glassfish 4.1


Sorry forgot to add that.
[2014-09-23T10:15:37.589-0600] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=177 _ThreadName=admin-listener(25)] [timeMillis: 14114
88937589] [levelValue: 1000] [[
  Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor
        at com.sun.ejb.containers.BaseContainer.setStartedState(BaseContainer.java:962)
        at org.glassfish.ejb.startup.EjbApplication.markAllContainersAsStarted(EjbApplication.java:140)
        at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:152)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        ....
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor
        at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1783)
        at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
        at com.sun.ejb.containers.interceptors.InterceptorManager.buildEjbInterceptorChain(InterceptorManager.java:431)
        at com.sun.ejb.containers.interceptors.InterceptorManager.<init>(InterceptorManager.java:131)
        at com.sun.ejb.containers.BaseContainer.initializeInterceptorManager(BaseContainer.java:3396)
        at com.sun.ejb.containers.BaseContainer.setStartedState(BaseContainer.java:950)
        ... 83 more




Could you please share the full stack trace ?



Thanks,

Romain



On 9/23/14 6:44 PM, Collin Molnar wrote:


Hello,



I recently updated one of our test servers to use Glassfish 4.1. I am having an

issue deploying our Web Services to Glassfish after this update. When deploying

the application I get the message "Error occurred during deployment:

Exception while loading the app : java.lang.ClassNotFoundException:

org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor” (see full

stack trace below).



I originally thought this issue revolved around a customized Guava jar (added

a beans.xml to circumvent compatibility issue) we use. I rebuilt the

application using the newest Guava release (18) and still ran into the same

issue deploying to Glassfish 4.1. The application has no issues deploying to

Glassfish 4.0 with the latest Guava version.



Thanks,

Collin