Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
调用init方法失败;嵌套的异常是java.lang.NoSuchMethodError:org.objectweb.asm.ClassWriter。_Java_Eclipse_Spring_Hibernate_Maven - Fatal编程技术网

调用init方法失败;嵌套的异常是java.lang.NoSuchMethodError:org.objectweb.asm.ClassWriter。

调用init方法失败;嵌套的异常是java.lang.NoSuchMethodError:org.objectweb.asm.ClassWriter。,java,eclipse,spring,hibernate,maven,Java,Eclipse,Spring,Hibernate,Maven,这个错误随处可见,但我仍然找不到解决部署问题的方法。 我正在使用Eclipse Luna、jdk6、Spring、hibernate 3.3.2 GA和maven 3.2.3,我在glassfish 3.1.2服务器上运行应用程序,然后在服务器日志中收到此错误: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stateMachineManager

这个错误随处可见,但我仍然找不到解决部署问题的方法。 我正在使用Eclipse Luna、jdk6、Spring、hibernate 3.3.2 GA和maven 3.2.3,我在glassfish 3.1.2服务器上运行应用程序,然后在服务器日志中收到此错误:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stateMachineManager' defined in URL [jar:file:/C:/glassfish3/glassfish/domains/domain2/applications/moon-web-1.0/WEB-INF/lib/moon-commons-1.0.jar!/spring/context/orm/applicationContext-orm.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [jar:file:/C:/glassfish3/glassfish/domains/domain2/applications/moon-web-1.0/WEB-INF/lib/moon-commons-1.0.jar!/spring/context/orm/applicationContext-orm.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V

据我所知,init方法用于在字节码中实现构造函数。所以我认为有一个错误的构造函数调用。没有接受布尔参数的ClassWriter构造函数。请尝试使用最新的asm jar。

因此我已经解决了这个问题。我注意到在我的glassfish服务器的日志文件中有一个错误,提到无法找到我对Web服务的handlerchain的引用。在谷歌上搜索后,我发现这是glassfish的3.1.2.2版本中报告的一个bug。因此,解决方案就是升级服务器。当然,我目前使用相应的jre7运行glassfish 4.1,并且成功部署了我的应用程序。
谢谢大家,我希望有一天这能解决别人的问题

这是一个相当奇怪的问题,因为几天前,代码运行得很好,我只是在一些Web服务上添加了代码,没有涉及其他内容。我甚至恢复到初始状态,但它不再工作了。嗨,再次@mathasmlang,我注意到你的编辑,我仍然在处理同样的问题。这一次,我尝试部署旧版本的war,它过去部署得很好。当glassfish再次抛出同样的错误时,我感到惊讶。然后我重新安装了glassfish,问题依然存在。然而,我将尝试包括最新的asm版本,但正如我上面所说的,我使用了cglib nodep,这使得asm不再需要,并且仍然遇到了相同的问题。我比以往任何时候都更困惑了。大家好,很抱歉最近的评论,我和maven有一些问题,所以我尝试了最新版本的ASM。这并没有解决问题。
 [#|2014-12-19T16:09:41.997+0100|SEVERE|oracle-glassfish3.1.2|com.sun.xml.ws.server.http|_ThreadID=21;_ThreadName=Thread-2;|WSSERVLET11 : échec de l'analyse du descripteur d'exécution : java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError