升级从gson 2.3到2.8.9/2.10.1在部署中失败 – java.io.IOException: 无效的常量类型:19

huangapple go评论48阅读模式
英文:

Upgrade from gson 2.3 to 2.8.9/2.10.1 failed in deployment -java.io.IOException: invalid constant type: 19

问题

升级至2.8.9或任何更新的版本在部署时失败,出现以下异常。
org.jboss.deployers.spi.DeploymentException: 部署错误 ***: 无效的常量类型: 19

编译完全正常。我在我的应用程序中使用Ant构建系统。
有人遇到过这样的问题并成功升级吗?

尝试了版本2.8.0,2.8.4,2.8.5,一切都顺利。
验证了引起问题的较新版本2.8.6、2.8.9和2.10.1的清单,它们的结果是 Build-Jdk-Spec: 11
Bundle-RequiredExecutionEnvironment: JavaSE-1.7,JavaSE-1.8

我正在使用Java 8,而Bundle-RequiredExecutionEnvironment中有Java 8。所以我猜Java应该不是问题。但不确定。

英文:

As gson 2.3 is vulnerable ,upgrading to 2.8.9 or any newer versions failed in deployment with the below exception.
org.jboss.deployers.spi.DeploymentException: Error deploying ***: invalid constant type: 19

Compilation is completely fine .I am using Ant build system in my application
Anyone gone through such issue and upgraded successfully?

Tried versions 2.8.0 ,2.8.4,2.8.5 everything goes success.
verified the manifest of the problem causing newer versions 2.8.6 , 2.8.9 and 2.10.1 they result this Build-Jdk-Spec: 11
Bundle-RequiredExecutionEnvironment: JavaSE-1.7, JavaSE-1.8

I am using java 8 and in the Bundle-RequiredExecutionEnvironment has java 8 . So i guess java won't be an issue.But not sure .

答案1

得分: 0

问题通过升级位于我的JBoss服务器lib文件夹中的javassist来解决。根据此链接 https://github.com/jboss-javassist/javassist/issues/147 中的建议,版本已更新为3.22.0-GA。

javaassist更改:
javassist ConstPool类中的"readOne"方法没有module-info标签。

ConstPool类的readOne方法没有const 19

在3.29.0-GA中的修复(最近发布的版本)
ConstPool类的readOne方法包含const 19

英文:

Issue resolved by upgrading javassist which sits in my jboss server lib folder . The version fixed as per this https://github.com/jboss-javassist/javassist/issues/147 is 3.22.0-GA .

javaassist change :
The "readOne" method in javassist ConstPool class doesn't have the module-info tag

ConstPool class readOne method didn't have const 19

The fix in 3.29.0-GA (recent release)
ConstPool class readOne method has const 19

huangapple
  • 本文由 发表于 2023年3月7日 14:50:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/75658770.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定