baidu / baidu/Jprotobuf-rpc-socket

升级到了3.5.8版本,报错 java.lang.ClassFormatError: Truncated class file

Open
#48 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
535
Forks
216
PR merge metrics
No merged PRs in 30d

Description

升级到了3.5.8版本,但是导致项目无法启动,报错 java.lang.ClassFormatError: Truncated class file
跟踪源码发现每次启动时都会加载com.baidu.jprotobuf.pbrpc.meta.RpcServiceMetaList$$JProtoBufClass这个类

![image](https://user-images.githubusercontent.com/17697169/29816686-a66fa456-8ce7-11e7-8d6e-d350f40286fd.png)

该jar包下JProtoBufClass这个类的大小是0

![image](https://user-images.githubusercontent.com/17697169/29816697-ae4e3a8e-8ce7-11e7-9f94-ed260eae596d.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce startup after upgrading to version 3.5.8 and inspect loading of com.baidu.jprotobuf.pbrpc.meta.RpcServiceMetaList$$JProtoBufClass. Check the generated class inside the affected JAR and trace why it has zero size or is truncated. Done means the class is valid and the project starts without ClassFormatError.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.