我已经在这个网络应用程序上工作了一年多,这是迄今为止没有带来任何问题的配置:
现在我的问题,自上个月以来发生,我无法弄清楚如何解决,是:我的应用程序在本地运行得很好(从eclipse或者也只是手动部署到glassfish使用maven来构建战争和玻璃鱼管理部署的界面),当我尝试在远程服务器上的glassfish上部署相同的战争时出现错误...这是我得到的错误:
[ERROR] com.sun.enterprise.admin.cli.CommandException: remote failure: Exception while loading the app : java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'analysisDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Post-processing of the FactoryBean's object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.methodSecurityMetadataSourceAdvisor': Cannot resolve reference to bean 'org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource#0' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.security.access.expression.method.ExpressionBasedAnnotationAttributeFactory] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'expressionHandler' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'expressionHandler' defined in ServletContext resource [/WEB-INF/spring/security-config.xml]: Cannot resolve reference to bean 'projectPermissionEvaluator' while setting bean property 'permissionEvaluator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectPermissionEvaluator': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: public fr.inra.means.services.interfaces.IProjectService fr.inra.means.services.security.ProjectPermissionEvaluator.projectService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in ServletContext resource [/WEB-INF/spring/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.VerifyError: Expecting a stackmap frame at branch target 43 in method fr.inra.means.model.application.Projet.equals(Ljava/lang/Object;)Z at offset 4
我第一次提出这个问题,认为我必须遇到maven配置问题:java.lang.VerifyError when deploying the new version of my Java EE web application但是在本地使用相同的maven配置,所以它必须是关于glassfish配置的!
我甚至试图切换到jdk1.6(这是一种痛苦,因为我不喜欢改变它的想法,因为我已经用jdk1.7开发了一年了)...它解决了部署问题(但是,同样的方式,当它在本地运行时非常好,当我在服务器上运行应用程序时,一个函数在到达此行时崩溃“CriteriaBuilder cb = em.getCriteriaBuilder();”... (并且在我的日志中找不到异常......)
您是否知道可能导致2个glassfish服务器之间存在这种行为差异的原因? 我的2个glassfish服务器之间有什么配置差异可以解释这个错误?
我的想法(和希望)已经不多了所以任何帮助都会很棒!
答案 0 :(得分:0)
您是在“Domain Admin Server”或独立实例中部署应用程序吗?
如果是,请在本地创建独立实例并尝试在那里部署。
应用程序不应该在生产中的“Domain Admin Server”中运行。某些框架的行为有所不同,因为“Domain Admin Server”默认使用不同的安全管理器IIRC。