at org.hibernate.impl.SessionImpl.get(SessionImpl.java:998)
at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:781)
... 79 more
Caused by: org.postgresql.util.PSQLException: [b]不良的类型值 long : [/b]<div class="headerAd">
[#list adPosition.ads as ad]
[#if ad.hasBegun() && !ad.hasEnded() && ad.type == "image"]
[#if ad.url??]
<a href="${ad.url}">
<img src="${ad.path}" width="${adPosition.width}" height="${adPosition.height}" alt="${ad.title}" title="${ad.title}" />
</a>
[#else]
<img src="${ad.path}" width="${adPosition.width}" height="${adPosition.height}" alt="${ad.title}" title="${ad.title}" />
[/#if]
[/#if]
[/#list]
</div>
[b]
不良的类型值 是什么错误[/b] :D
at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:781)
... 79 more
Caused by: org.postgresql.util.PSQLException: [b]不良的类型值 long : [/b]<div class="headerAd">
[#list adPosition.ads as ad]
[#if ad.hasBegun() && !ad.hasEnded() && ad.type == "image"]
[#if ad.url??]
<a href="${ad.url}">
<img src="${ad.path}" width="${adPosition.width}" height="${adPosition.height}" alt="${ad.title}" title="${ad.title}" />
</a>
[#else]
<img src="${ad.path}" width="${adPosition.width}" height="${adPosition.height}" alt="${ad.title}" title="${ad.title}" />
[/#if]
[/#if]
[/#list]
</div>
[b]
不良的类型值 是什么错误[/b] :D
本文探讨了一个具体的Hibernate查找问题,即在使用Hibernate进行实体查找时遇到的由不良的类型值(long)引发的PSQL异常。文章深入分析了此错误的原因,并排除了与前端广告代码相关的干扰信息。
1万+

被折叠的 条评论
为什么被折叠?



