Javassist Enhancement Fails on Deployment

我的未来我决定 提交于 2019-12-20 03:52:32

问题


I am encountering an error specified in the stacktrace at the bottom of this question. Main error message:

ERROR pojo.BasicLazyInitializer - Javassist Enhancement failed

I do not know how often it has occurred already, because the deployment still succeeded. I just stumbled upon this error when trying to fix the issue linked above. I am trying to deploy to a glassfish app server (test environment).

Basically, my app works fine in my local environment, also with test run-war (see my previous question for further detail). I opened a new question because i feel like this could lead to the root of many problems on the app server, since the enhancement fails on every deployment.

There is already a JIRA on that one, but the workaround relates to the webflow plugin, which is not even used in my project. I know there must be a dependency issue related to javassist, but I fail to find any useful information in the JIRA or elsewhere on the internet what other plugins might have a javassist dependency as well. In my Grails Dependencies, I can only see one javassist jar.

Local Environment:

  • Java 1.6.0_45
  • Grails Tomcat plugin 7.0.5.3 (for run-war)

App Server:

  • Glassfish 3.0.1 build 22
  • Java 1.6.0_07

ORM strategy: Table per Subclass


回答1:


As my environment overview in the question already seems to imply, it was a problem with the Glassfish application server. I don't know what causes this bug, but this is definitely not expected behaviour.

I was able to reproduce the same exceptions on deployment in a local Glassfish 3.0.1 environment. Then, fortunately, in a local Glassfish 3.1.2.2 environment, everything worked fine on deployment.

Grails 1.3.7 runs well on Glassfish 3.0.1; however, after upgrading to Grails 2.4.x (first 2.4.0, then 2.4.1, then 2.4.2), this exception was thrown on deployment. I don't know if it really was the Grails update that caused this to happen -- especially since I made a lot of other changes in the project, e.g. to the domain model, new hibernate version --, but if you run into similar issues with grails 2.4.x and Glassfish deployment, give Version 3.1.2. a shot.

I have answered another question of mine that was directly related to the exceptions on deployment.



来源:https://stackoverflow.com/questions/26252600/javassist-enhancement-fails-on-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!