SPRING高手进,CSDN中3天无人能解决的问题

striveforbest 2011-08-01 09:33:14
本人在java1.6环境下使用Struts2.2.3 + Spring 3.1 + hiberante 3.3搭建一系统,系统从dao层到业务逻辑层的配置都是用Annotation完成的,业务逻辑层使用Spring Annotatio如下:
@Service
@Scope("prototype")
@Transactional
public class UserManager extends EntityManager<User, Integer> {
}
在Spring实例化UserManager时回报如下异常:
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Found finalize() method - using NO_OVERRIDE
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Found 'equals' method: public boolean java.lang.Object.equals(java.lang.Object)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Unable to apply any optimisations to advised method: public java.lang.String java.lang.Object.toString()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Found 'hashCode' method: public native int java.lang.Object.hashCode()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Unable to apply any optimisations to advised method: protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract int org.springframework.aop.framework.Advised.indexOf(org.aopalliance.aop.Advice)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract int org.springframework.aop.framework.Advised.indexOf(org.springframework.aop.Advisor)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract boolean org.springframework.aop.framework.Advised.isFrozen()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract org.springframework.aop.Advisor[] org.springframework.aop.framework.Advised.getAdvisors()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract org.springframework.aop.TargetSource org.springframework.aop.framework.Advised.getTargetSource()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.addAdvisor(org.springframework.aop.Advisor) throws org.springframework.aop.framework.AopConfigException
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.addAdvisor(int,org.springframework.aop.Advisor) throws org.springframework.aop.framework.AopConfigException
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.setTargetSource(org.springframework.aop.TargetSource)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.setPreFiltered(boolean)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract boolean org.springframework.aop.framework.Advised.isProxyTargetClass()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.setExposeProxy(boolean)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract boolean org.springframework.aop.framework.Advised.isExposeProxy()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract boolean org.springframework.aop.framework.Advised.isPreFiltered()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract java.lang.Class[] org.springframework.aop.framework.Advised.getProxiedInterfaces()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advis2011-8-1 9:25:57 org.apache.catalina.startup.HostConfig deployDirectory
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.removeAdvisor(int) throws org.springframework.aop.framework.AopConfigException
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract boolean org.springframework.aop.framework.Advised.removeAdvisor(org.springframework.aop.Advisor)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract boolean org.springframework.aop.framework.Advised.replaceAdvisor(org.springframework.aop.Advisor,org.springframework.aop.Advisor) throws org.springframework.aop.framework.AopConfigException
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.addAdvice(int,org.aopalliance.aop.Advice) throws org.springframework.aop.framework.AopConfigException
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.addAdvice(org.aopalliance.aop.Advice) throws org.springframework.aop.framework.AopConfigException
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract boolean org.springframework.aop.framework.Advised.removeAdvice(org.aopalliance.aop.Advice)
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract java.lang.String org.springframework.aop.framework.Advised.toProxyConfigString()
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract java.lang.Class org.springframework.aop.TargetClassAware.getTargetClass()
[com.shj.order.utils.ReflectionUtils]-[WARN] MenuManager$$EnhancerByCGLIB$$93922635's superclass not ParameterizedType
所有业务逻辑层的实例化都会抱同样测异常,如果去掉@Transactional标签就不会报抱此异常,请Spring高手帮忙解决一下此问题。
...全文
6876 177 打赏 收藏 转发到动态 举报
写回复
用AI写文章
177 条回复
切换为时间正序
请发表友善的回复…
发表回复
Sky15978986 2013-07-02
  • 打赏
  • 举报
回复
好吧..我承认我也看完了
长笛党希望 2013-07-01
  • 打赏
  • 举报
回复
引用 5 楼 cl61917380 的回复:
[Quote=引用 3 楼 soli11722984 的回复:] DUBUG.......不是异常,没有问题 异常........没发现上面有出现 log4j中debug报的Spring异常就不是系统异常吗?? 我当你是不了解神马是异常和DUBUG而说出来的笨话 x19881216 一定是个不咋地的开发人员 就算人家说得有什么不合理,需要这么说人家么? [/Quote] 我算是明白为什么解决不了了。
+10086
WEIWEIDANNY123 2013-06-28
  • 打赏
  • 举报
回复
楼主来点真金白银 肯定有人给你解决。
多云转大雨 2013-06-26
  • 打赏
  • 举报
回复
我居然看完了,次奥
关键我是洛哥 2013-06-26
  • 打赏
  • 举报
回复
引用 80 楼 striveforbest 的回复:
[Quote=引用 77 楼 forever_kimi 的回复:] 你会说上海话么??狗逼 [/Quote] 老子在上海待了3年就是因为,把你妈肚子搞大有了你个GD,老子才决定离开上海的,你说的那种方言,老子我没兴趣学,GD有种你别说普通话,别用汉字,就用上海那个小地方的方言,一辈子别出上海,上海在中国算个蛋,在世界上是个p,国际化大都市个P啊
楼主 你是不是人品有问题? 看看别人回你的贴子 为什么都不是支持你的?看不下去了!!! 你很牛B吗?敢不敢亮出你的姓名和你的工资啊?你觉得你的工资有资格说上海是一个小地方?我觉得你的工资放到上海也就屌丝一个!!!
Zh_java_2009 2013-06-26
  • 打赏
  • 举报
回复
发表于: 2011-08-01 09:33:14 我深表无奈,谁TM没事做草出这个帖子
小丑哥_V5 2013-06-26
  • 打赏
  • 举报
回复
说着说着都开始打架了...找个时间约一起吧,包个场看看谁厉害点...
alixiaoyao 2013-06-26
  • 打赏
  • 举报
回复
亲,学spring不是这么学滴~ 亲,学exception不是这么学滴~ 亲,3年的log4j。。。。。。你的文学功底应该很深刻了,log.fatal("这里鸟语花香,这里晴空万里。。。");
SunRiseFirst 2011-10-11
  • 打赏
  • 举报
回复
这个帖子本来不该回的,可我遇到了这样的问题,说下我自己的看法。
首先这个不是错误,是打印出来的日志(是提示信息)
其次这个问题不好解决,原因看下面:
用了spring我估计你肯定用了<context:component-scan base-package="*.*.*.service"/>
它首先扫描了这个包,反射了里面的service类。
其次你在类级别用了@Transactional,它再次扫描这些类,所以出现了Method is declared on Advised interface:的提示信息。
最后你不管用Aop的声名式事务还是注解式事务都会出现这样的问题。
解决方法真正找寻中。
一年经验的小子
fellatioyzx 2011-08-20
  • 打赏
  • 举报
回复
标题党,不是三天没人解决吧,我看是三天没人理你。。。
chinaunderworld 2011-08-19
  • 打赏
  • 举报
回复
LZ是个2B,总以为自己没问题,DEBUG,那么多,你他妈的怎么不一个个的都去看啊.
hackersun12345 2011-08-19
  • 打赏
  • 举报
回复
总之,轻易武断是不对的,骂人更不对。对于做技术的人来说,太伤人,不好不好
ychatou1220 2011-08-19
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 striveforbest 的回复:]

我当然知道把logo4的级别调成info就不会显示此异常信息,LZ我就是开发人员,看的就是DEBUG信息,看到这样的异常信息,作为一个专业的开发人员,本人抱着学习态度请教为何会产生次异常,难道可笑吗??我只是想知道为什么会产生这样的异常,从中学到更多的知识。log4j中debug报的Spring异常就不是系统异常吗??
x19881216 一定是个不咋地的开发人员
[/Quote]

看来楼主一看到Exception就小兔乱撞丫,一看就知道小学语文不过关。

你懂得……
kkkkgggg1987 2011-08-19
  • 打赏
  • 举报
回复
楼主这态度,有人愿意给你解决了才怪
keaixiaozhu7688 2011-08-19
  • 打赏
  • 举报
回复
事务别用注解写、事务写在XML中
虽然注解狠方便但是有些时候还得写XML
go_boy111 2011-08-10
  • 打赏
  • 举报
回复
有时候去逛逛看看国外的帖子我怎么觉得国外的人都很有礼貌,有时候会看到 Dear、hello、希望我的回答能够帮助你(看得懂,翻译不来)等等。这样和谐一点我觉得很好,学习时候一心学习,回答问题的时候针对问题就行了,不要针对人,不要带有什么个人情感!但是好像大家都很难做到。
追逐网 2011-08-10
  • 打赏
  • 举报
回复
mark.。
dkwen1985 2011-08-10
  • 打赏
  • 举报
回复
被标题吸引。来了下了,结果发现口水仗。
hp8952 2011-08-10
  • 打赏
  • 举报
回复
为了10分,好下载资料,飘过,昨天遇到同样问题纠结了2小时,还是决定.回iteye好点!
pandengzhegt 2011-08-10
  • 打赏
  • 举报
回复
我是向看小说一样看完评论的
加载更多回复(154)

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧