[BUG] com.alibaba.fastjson2.JSONException: input not end, offset 65, character :, line 1, column 65, fastjson-version 2.0.53 开发环境好使,打成jar包咋也不行
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 问题描述
*com.alibaba.fastjson2.JSONException: input not end, offset 65, character :, line 1, column 65, fastjson-version 2.0.53*
### 环境信息
spring boot 3.3.4、jdk21、redis7.2.5
- OS信息: ubuntu24.04
- JDK信息: jdk21.0.4
- 版本信息:2.0.53
### 重现步骤
*如何操作可以重现该问题:*
传相同的ID,期间数据在redis里面没有任何改动,从redis里面查询,不同的调用方法 就会报错。
public Enterprise getEnterpriseByEnterpriseId(Long id) throws RuntimeException {
EnterpriseVO enterpriseVO = (EnterpriseVO) redisTemplate.opsForHash().get(RedisKeyConstant.REDIS_KEY_ENTERPRISE_ALL, String.valueOf(id));
if (enterpriseVO != null) {
return EnterpriseVO.convertToVO(enterpriseVO);
}
// 从数据库拿
Enterprise enterprise = this.baseMapper.selectById(id);
if (enterprise != null) {
return enterprise;
}
return enterprise;
}

```java
//可在此输入示例代码
```
### 期待的正确结果
*对您期望发生的结果进行清晰简洁的描述。*
### 相关日志输出
*请复制并粘贴任何相关的日志输出。*
#### 附加信息
*如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。*
Contributor guide
Research direction
Start at getEnterpriseByEnterpriseId and inspect the RedisTemplate hash lookup, comparing the development run with the packaged JAR while using the same ID and unchanged Redis data. The report does not name a source file or test and provides no complete log or expected result; progress would require a minimal reproduction and the serialized value that triggers the parser error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis, spring-boot
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100