当前位置:编程学习 > JAVA >>

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

本人在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高手帮忙解决一下此问题。                                                                                                                                                                        --------------------编程问答-------------------- 。。。debug信息居然当异常了。。。。LZ你太有才了

把log4j的日记级别调成info级别就可以了,这些信息是给开发人员调试用的 --------------------编程问答-------------------- 我当然知道把logo4的级别调成info就不会显示此异常信息,LZ我就是开发人员,看的就是DEBUG信息,看到这样的异常信息,作为一个专业的开发人员,本人抱着学习态度请教为何会产生次异常,难道可笑吗??我只是想知道为什么会产生这样的异常,从中学到更多的知识。log4j中debug报的Spring异常就不是系统异常吗??
x19881216 一定是个不咋地的开发人员 --------------------编程问答-------------------- DUBUG.......不是异常,没有问题
异常........没发现上面有出现

log4j中debug报的Spring异常就不是系统异常吗??
我当你是不了解神马是异常和DUBUG而说出来的笨话

x19881216 一定是个不咋地的开发人员
就算人家说得有什么不合理,需要这么说人家么? --------------------编程问答-------------------- 你的pojo实现java.io.Serializable了吗? --------------------编程问答--------------------
引用 3 楼 soli11722984 的回复:
DUBUG.......不是异常,没有问题
异常........没发现上面有出现

log4j中debug报的Spring异常就不是系统异常吗??
我当你是不了解神马是异常和DUBUG而说出来的笨话

x19881216 一定是个不咋地的开发人员
就算人家说得有什么不合理,需要这么说人家么?


我算是明白为什么解决不了了。 --------------------编程问答-------------------- 你去掉了事务的注解肯定不会有异常啊,他就是管你AOP的。
至于这个异常
throws org.springframework.aop.framework.AopConfigException   
取决于你用的是什么代理? JDK  CGLIB 哪出的问题
--------------------编程问答-------------------- 实现了,我一直追踪Spring异常到org.springframework.aop.framework.Cglib2AopProxy类的
getProxy(ClassLoader classLoader)方法
if (this.constructorArgs != null) {
proxy = enhancer.create(this.constructorArgTypes, this.constructorArgs);
}
else {
proxy = enhancer.create(); //执行这句是会开始抛出此异常
}
enhancer实例是cglib包中net.sf.cglib.proxy.Enhancer类的实例,create() 方法如下:
public Object create()
    {
        classOnly = false;
        argumentTypes = null; 
        return createHelper(); //执行这句跑异常
    }
createHelper() 方法如下:
private Object createHelper()
    {
        validate();
        if(superclass != null)
            setNamePrefix(superclass.getName());
        else
        if(interfaces != null)
            setNamePrefix(interfaces[ReflectUtils.findPackageProtected(interfaces)].getName());
        return super.create(KEY_FACTORY.newInstance(superclass == null ? null : superclass.getName(), ReflectUtils.getNames(interfaces), filter, callbackTypes, useFactory, interceptDuringConstruction, serialVersionUID));
    }
我的能力就只能追踪到此了,希望那位高手,能帮我解决此问题,让我能对Spring框架更熟悉,谢谢 --------------------编程问答-------------------- 是因为加了注解,而跑不起来了吗?还是 只是出现了这些调试提示信息呢? --------------------编程问答-------------------- 。。好吧。。你如果去掉了@Transactional,这个注解的话。你有没想过AOP的实现原理呢?
SPRING在实例化对象的时候,如果有@Transactional注解,就会生成代理了。所谓的代理,一般有两种,一个是JDK的动态代理,不过这个代理技术,局限于一定要是通过接口。
从你的DEBUG来看,你用的是一个叫CGLIB的代理方式,你可以去看下CGLIB的应用,是通过继承实现运行时动态代理的。其实代理技术,很多地方都用的到,你在HIBERNATE的延迟对象,也是同样的原理。

。才疏学浅,若有不对,请你纠正~

。楼主,既然你是来问的,就不要抱着群嘲的思想。CSDN是个学习社区,有高手,有新手。。
你说x19881216,是一个不咋地的开发人员。
你自己又如何呢?你为何不到SPRING的论坛上去问呢?(起码我开发遇到问题,多数会跑去官方上问,如果是BUG就上报) --------------------编程问答-------------------- 不算异常 最多就是警告 我记得看过一篇文章关于CGLIB创建代理对象出现警告的 好像是某些方法不能被重写的事情 具体的真的是忘记了... --------------------编程问答-------------------- Debug打印出来的是调试信息,  

    从打印信息来看,你的代码没有出现异常。也没有报错。。。

x19881216 一定是个不咋地的开发人员

估计比起楼主还是要好很多 --------------------编程问答-------------------- public class AopConfigException
extends NestedRuntimeException

例外,那就是获取非法AOP配置参数抛出。  --------------------编程问答-------------------- [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 --------------------编程问答-------------------- 本人说:x19881216 一定是个不咋地的开发人员,从他解决问题的方法看出他不求甚解,logo4j中debug级别异常就不系统异常吗??出了异常好的开发人员至少会去了解为什么会产生异常,如何排除,而不是改个info级别就完事。 --------------------编程问答--------------------
引用 11 楼 zl3450341 的回复:
Debug打印出来的是调试信息,  

  从打印信息来看,你的代码没有出现异常。也没有报错。。。

x19881216 一定是个不咋地的开发人员

估计比起楼主还是要好很多

我的Spring 事务配置如下:
<context:annotation-config />
<tx:annotation-driven transaction-manager="transactionManager" />
请问还需要在其中配置其他参数吗?? --------------------编程问答--------------------
引用 14 楼 striveforbest 的回复:
本人说:x19881216 一定是个不咋地的开发人员,从他解决问题的方法看出他不求甚解,logo4j中debug级别异常就不系统异常吗??出了异常好的开发人员至少会去了解为什么会产生异常,如何排除,而不是改个info级别就完事。

那个异常应该是个业务逻辑(这里的业务是生成代理)。。是代码里面,不符合某种情况,抛出来,然后记录到LOG里的。。。不是所有的异常,都代表系统出问题了的。。 --------------------编程问答-------------------- 我承认 x19881216 一定是个不咋地的开发人员而且他解决问题的方法看出他不求甚解,我错了,我对不起LZ。

另外再不咋地一下, debug 信息真不是异常。

好了,不要再讨论我专不专业啦。祝LZ好运。 --------------------编程问答-------------------- 在这里都拉上山头了,呵呵,你们真的都很有才撒!!! --------------------编程问答-------------------- 这里面有毛的异常。。。 --------------------编程问答-------------------- 这都说不咋地的开发人员是什么情况呀,不过LZ这DEBUG的东西肿么就是异常了 --------------------编程问答-------------------- 带上眼镜也没看到有异常 --------------------编程问答-------------------- 本人是抱着学习的态度,想要弄明白Spring AOP为什么会在配置@Transactional做事务处理时,由Spring创建业务层实例时,为什么Spring会抛出这样异常,是Spring框架自身的问题,还是我自己对Spring AOP Transanctioanl的配置理解错误,配置问题导致??? --------------------编程问答-------------------- 说句公道话,从另一个帖子的传送门进来的,Ctrl+F了一下Exception后对LZ表示深切的同情,既然LZ都跟踪到Spring源代码里了,我相信LZ绝对不是大家所想当然认为的把DEBUG当Exception的水平,下次吸取下教训,发帖时把Exception相关行加红色或者标下行号吧
大家在喷之前还是应该自己先查找一下

以上发言仅代表个人观点 --------------------编程问答-------------------- 敢问楼主  log.debug("这是异常么"); debug异常? --------------------编程问答--------------------
引用 23 楼 guujiang 的回复:
说句公道话,从另一个帖子的传送门进来的,Ctrl+F了一下Exception后对LZ表示深切的同情,既然LZ都跟踪到Spring源代码里了,我相信LZ绝对不是大家所想当然认为的把DEBUG当Exception的水平,下次吸取下教训,发帖时把Exception相关行加红色或者标下行号吧
大家在喷之前还是应该自己先查找一下

以上发言仅代表个人观点



那是人家方法写的 抛出异常 并没说程序出现异常  我还真没找到异常 --------------------编程问答-------------------- 擦,我承认我大脑短路了
throws org.springframework.aop.framework.AopConfigException
应该是和前面的public abstract ...连在一起的,属于方法签名的一部分,看来这个log是打出每一个被advise的方法的签名

另外想说的是,有没有发生异常不是根据LOG级别来决定的,假如某天一时手误把catch块里本该写成log.error(e.getMessage())的写成了log.debug(e.getMessage()),或者不是手误,也许本意就是要忽略这个异常,所以采用debug级别,这种情况不能因为日志没记到debug就认为没有发生异常

当然这个帖子算是个特例,那个throws Exception太具有迷惑性了 --------------------编程问答-------------------- x19881216 一定是个不咋地的开发人员


x19881216的名声基本被断章取义的毁掉了。。。 --------------------编程问答-------------------- 这样说别人还是不好的 毕竟别人是进来帮你解决问题 提供意见的啊! --------------------编程问答--------------------
引用 15 楼 striveforbest 的回复:
引用 11 楼 zl3450341 的回复:
Debug打印出来的是调试信息,

从打印信息来看,你的代码没有出现异常。也没有报错。。。

x19881216 一定是个不咋地的开发人员

估计比起楼主还是要好很多

我的Spring 事务配置如下:
<context:annotation-config />
<tx:annotation-driven transaction-……

在加一句<aop:aspectj-autoproxy/>试试 --------------------编程问答--------------------
引用 24 楼 john057 的回复:
敢问楼主 log.debug("这是异常么"); debug异常?

看来你对log4j对Spring的配置支持不死很熟吗?回去好好看在来吧 --------------------编程问答--------------------
引用 29 楼 sky_walker85 的回复:
引用 15 楼 striveforbest 的回复:
引用 11 楼 zl3450341 的回复:
Debug打印出来的是调试信息,

从打印信息来看,你的代码没有出现异常。也没有报错。。。

x19881216 一定是个不咋地的开发人员

估计比起楼主还是要好很多

我的Spring 事务配置如下:
<context:annotation-config />
<tx:an……

多谢老兄,你的方法我试过了,还是没用 --------------------编程问答-------------------- 楼主 相当肤浅, 不管你们信不信 我反正信了 --------------------编程问答--------------------
引用 32 楼 xx753277 的回复:
楼主 相当肤浅, 不管你们信不信 我反正信了

你也回去学几年在来吧 --------------------编程问答-------------------- 工作多年代过不下几十个项目 仍然看不懂楼上在说啥。。。。 --------------------编程问答-------------------- 我觉得吧  LZ很高傲 很自大 根本就没有虚心学习的那种意思。 回答不好的就直接说人家。 --------------------编程问答-------------------- 没素质的人真多。。。。唉~ --------------------编程问答-------------------- @Service
@Scope("prototype")
可以接受
@Transactional
无视 --------------------编程问答--------------------
引用 17 楼 x19881216 的回复:
我承认 x19881216 一定是个不咋地的开发人员而且他解决问题的方法看出他不求甚解,我错了,我对不起LZ。

另外再不咋地一下, debug 信息真不是异常。

好了,不要再讨论我专不专业啦。祝LZ好运。



你不要这样嘛。。。。。 --------------------编程问答--------------------
引用 30 楼 striveforbest 的回复:
引用 24 楼 john057 的回复:
敢问楼主 log.debug("这是异常么"); debug异常?

看来你对log4j对Spring的配置支持不死很熟吗?回去好好看在来吧


你也太牛了!人家好心给你说,不采纳就算了还这样给人家恢复。

正如你的标题,3天没人给你解决知道为什么吗?因为一看你的结贴率就没心情给你解决了,在看你给人家的回复直接就有骂人的冲动了。 --------------------编程问答-------------------- [com.shj.order.utils.ReflectionUtils]-[WARN] MenuManager$$EnhancerByCGLIB$$93922635's superclass not ParameterizedType   

楼主的意思是这个地方发生异常???
建议记录异常使用logger.warn(infoString, exceptionObj);
这样会输出exceptionObj的调用堆栈。

不知楼主所云(就是楼主说的“异常”) --------------------编程问答-------------------- 哎。。。 --------------------编程问答--------------------
引用 40 楼 skzr_org 的回复:
[com.shj.order.utils.ReflectionUtils]-[WARN] MenuManager$$EnhancerByCGLIB$$93922635's superclass not ParameterizedType   

楼主的意思是这个地方发生异常???
建议记录异常使用logger.warn(infoString, exceptionObj);
这样会输出ex……

补充下,这个地方是MenuManager与UserManager何干??
猜测如下:

@Service
public class MenuManager {
    @Autowired
    private UserManager userManager;
}

???

现象的环境描述不清,浪费大家的时间和精力。 --------------------编程问答-------------------- 怎么大家都楼主这个学习方法不理解呢,我在学习第三方开源框架时碰到问题时也是打开 log 级别到 all,让它把所有 log 全部打印出来,这能方便查找所有的可能的 warning,有时候这些 warning 能告诉我们哪个地方不正确,因为有些 warning 只在个别情况下出错,所以 api 并不会把 warning 当成 exception,但它可能导致后续的 exception 出现。

[com.shj.order.utils.ReflectionUtils]-[WARN] MenuManager$$EnhancerByCGLIB$$93922635's superclass not ParameterizedType 

这里有个 warning,但从贴出来的 log 没有 Exception Stack Trace,不是很明白你说的 enhancer.create() 抛出的异常是什么消息来着。也贴出来看看。

另外再看看把下面这个也弄成带参数化的试试嘛,会不会是 UserManager 固定成 <User,Integer> 时才会出错呢?
public class UserManager extends EntityManager<User, Integer> {
}

--------------------编程问答-------------------- [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[/color[color=#FF0000]][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[/color[color=#FF0000]][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()  
看到异常在哪儿了吧,请没有仔细看过内容的,说这个是debug的在好好看看,我没标清异常是我的错,你没看清内容就干跳出来说话,就是你的错了 --------------------编程问答--------------------
引用 33 楼 striveforbest 的回复:
引用 32 楼 xx753277 的回复:
楼主 相当肤浅, 不管你们信不信 我反正信了

你也回去学几年在来吧

这句话送给楼主:http://mtnt2008.iteye.com/blog/745321 ,先搞清楚你打印出来的是什么东西再来。

引用楼主 striveforbest 的回复:
public Object getProxy(ClassLoader classLoader)方法抛出了此异常,请哪位大仙帮忙解决一下此问题


这个方法是生成一个代理。打印出的那些东西(你所谓的异常)就是spring使用反射机制生成代理过程中查找并优化方法的过程,最后那一个警告是因为你的EntityManager<User, Integer> 是个带参数化的类,而你继承了他却没有明确指定参数化类型


如果你还要继续鄙视我的话,我不介意
--------------------编程问答--------------------
引用 45 楼 x19881216 的回复:
引用 33 楼 striveforbest 的回复:

引用 32 楼 xx753277 的回复:
楼主 相当肤浅, 不管你们信不信 我反正信了

你也回去学几年在来吧

这句话送给楼主:http://mtnt2008.iteye.com/blog/745321 ,先搞清楚你打印出来的是什么东西再来。


引用楼主 striveforbest 的回复:
public Obje……

你有看到异常在哪儿抛出吗,你有仔细看过内容吗,log4j我也用了3年了,不用你给我发资料,最后的警告,我自己写东西我能不知道是什么,你平时做事一定不怎么认真吧,没仔细看过内容就出来乱评论,我刚把异常出在哪儿标出从发了一遍,就在你的回答上面,你都不看,更我说警告。你还真不咋地啊 --------------------编程问答-------------------- [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[/color][org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] [color=#FF0000]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这个东西叫方法签名

Unable to apply any optimisations to advised method翻译成中文  无法再对声明的方法进行任何优化 --------------------编程问答-------------------- 请允许我用下面这幅图片表达对楼主的景仰之情





































[img=http://hi.csdn.net/space-6103715-do-album-picid-876513-goto-down.html][/img] --------------------编程问答-------------------- --------------------编程问答--------------------
引用 47 楼 x19881216 的回复:
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.addAdvisor(org.springframework.aop.Ad……

我承认我英文不咋地,可我还会用翻译软件,java抛出的异常虽然是英文的不用翻译软件我还看到懂,不需要你来翻译,有能力就告诉我为什么Spring在创建业务层实例会抛出AopConfigException, 不能你就敬仰我吧!!! --------------------编程问答--------------------
引用 50 楼 striveforbest 的回复:
引用 47 楼 x19881216 的回复:
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.framework.Advised.addAdvisor(o……


没人抛出,自己去看看API,那个只是一个方法的完整签名(包括修饰、返回值、参数、可能会抛的异常)

看API --------------------编程问答--------------------
引用 42 楼 skzr_org 的回复:
引用 40 楼 skzr_org 的回复:

[com.shj.order.utils.ReflectionUtils]-[WARN] MenuManager$$EnhancerByCGLIB$$93922635's superclass not ParameterizedType

楼主的意思是这个地方发生异常???
建议记录异常使用logger.warn(infoString, ex……

你回去多学学在来回答别人的问题吧,不用你猜,你能力有限 --------------------编程问答-------------------- 我很少用注解。 --------------------编程问答--------------------
引用 51 楼 soli11722984 的回复:
引用 50 楼 striveforbest 的回复:

引用 47 楼 x19881216 的回复:
[org.springframework.aop.framework.Cglib2AopProxy]-[DEBUG] Method is declared on Advised interface: public abstract void org.springframework.aop.……

你懂得 --------------------编程问答-------------------- lz貌似很屌嘛!
口气很大 --------------------编程问答-------------------- 这个楼主还真得够二的。
代码学得差,说话又冲,而且表述非常不清楚。 --------------------编程问答--------------------
引用 56 楼 dandan_liag 的回复:
这个楼主还真得够二的。
代码学得差,说话又冲,而且表述非常不清楚。

想你这样不是来解答我问题的,不用留言了,浪费网页面积,你个小二 --------------------编程问答-------------------- debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病 --------------------编程问答--------------------
引用 57 楼 striveforbest 的回复:
引用 56 楼 dandan_liag 的回复:
这个楼主还真得够二的。
代码学得差,说话又冲,而且表述非常不清楚。

想你这样不是来解答我问题的,不用留言了,浪费网页面积,你个小二

异常有啥好研究的,你程序写helloworld不就行啦 --------------------编程问答--------------------
引用 57 楼 striveforbest 的回复:
引用 56 楼 dandan_liag 的回复:
这个楼主还真得够二的。
代码学得差,说话又冲,而且表述非常不清楚。

想你这样不是来解答我问题的,不用留言了,浪费网页面积,你个小二

我只会for循环哈哈哈 --------------------编程问答--------------------
引用 55 楼 wtc860104 的回复:
lz貌似很屌嘛!
口气很大

不是我口气大,你有能力帮我解决我的问题,我就佩服你,不要连仔细看内容都做不到,就敢跳出来乱说别人,这样的人,我还就口气大了。 --------------------编程问答--------------------
引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病

就因为想你这样的人太多,中国软件才没希望 --------------------编程问答--------------------
引用 62 楼 striveforbest 的回复:
引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病

就因为想你这样的人太多,中国软件才没希望

要求不高混混日子只要吃饱就行 --------------------编程问答--------------------
引用 62 楼 striveforbest 的回复:
引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病

就因为想你这样的人太多,中国软件才没希望

垃圾真垃圾,你太空了!!!!!!!!写写helloworld不蛮好嘛 --------------------编程问答--------------------
引用 63 楼 forever_kimi 的回复:
引用 62 楼 striveforbest 的回复:

引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病

就因为想你这样的人太多,中国软件才没希望

要求不高混混日子只要吃饱就行

你研究只能混饭吃了,其他你还真不行 --------------------编程问答--------------------
引用 65 楼 striveforbest 的回复:
引用 63 楼 forever_kimi 的回复:
引用 62 楼 striveforbest 的回复:

引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病

就因为想你这样的人太多,……

你他妈的只会钻牛角尖,作为一个开发人员,有必要把每个细节都搞清楚么?得过且过最好,楼主人渣一个,鉴定完毕 --------------------编程问答--------------------
引用 65 楼 striveforbest 的回复:
引用 63 楼 forever_kimi 的回复:
引用 62 楼 striveforbest 的回复:

引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病

就因为想你这样的人太多,……
中国软件业好不好和我有啥关系,我只要会写System.out.println()就行了 --------------------编程问答--------------------
引用 65 楼 striveforbest 的回复:
引用 63 楼 forever_kimi 的回复:
引用 62 楼 striveforbest 的回复:

引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做到现在好好的!!楼主有毛病

就因为想你这样的人太多,……

垃圾,煞笔
--------------------编程问答--------------------
引用 68 楼 forever_kimi 的回复:
引用 65 楼 striveforbest 的回复:

引用 63 楼 forever_kimi 的回复:
引用 62 楼 striveforbest 的回复:

引用 58 楼 forever_kimi 的回复:
debug调试信息还真当回事?楼主吃饱饭没事做了,研究这东西,浪费时间,直接把日志级别调高不就行了,垃圾一个!!!没事找事!我是一个开发人员,程序抛异常了从来不研究部照样做……

本来老子不想骂你,可是你TMD没事找骂,就让老子好好骂骂你个GSS,老子不小心没带T,让你妈把你个GD挤了出来,老子现在这叫一后悔那,EB --------------------编程问答-------------------- 楼主再高傲自大,也不过就是个写代码的 --------------------编程问答-------------------- --------------------编程问答--------------------
引用 70 楼 daryl715 的回复:
楼主再高傲自大,也不过就是个写代码的

我是写代码,可我不装B,不想有些人 --------------------编程问答-------------------- 孬种!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
老子让你天天写打印语句玩死你 --------------------编程问答-------------------- 我开发干了三个月了,你能跟我比? --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 你会说上海话么??狗逼 --------------------编程问答-------------------- 垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾 --------------------编程问答-------------------- 就不告诉你就不告诉你··········没人回答你的提问的 --------------------编程问答--------------------
引用 77 楼 forever_kimi 的回复:
你会说上海话么??狗逼

老子在上海待了3年就是因为,把你妈肚子搞大有了你个GD,老子才决定离开上海的,你说的那种方言,老子我没兴趣学,GD有种你别说普通话,别用汉字,就用上海那个小地方的方言,一辈子别出上海,上海在中国算个蛋,在世界上是个p,国际化大都市个P啊 --------------------编程问答-------------------- 主页看到,进来逛逛,怎么是个口水贴。。。。。 --------------------编程问答-------------------- 这样的帖子应该赶紧从主页中剔除。 --------------------编程问答--------------------
引用 2 楼 striveforbest 的回复:
我当然知道把logo4的级别调成info就不会显示此异常信息,LZ我就是开发人员,看的就是DEBUG信息,看到这样的异常信息,作为一个专业的开发人员,本人抱着学习态度请教为何会产生次异常,难道可笑吗??我只是想知道为什么会产生这样的异常,从中学到更多的知识。log4j中debug报的Spring异常就不是系统异常吗??
x19881216 一定是个不咋地的开发人员

                你还专业开发员?   我看你是业余的。  也且还是业余的不能业余了,  可能过了hello word关吧 --------------------编程问答-------------------- lz啊, 别人好心帮助你, 你呢, 看你回的那些话,    不懂自己要承认。  看你那狡辩样, 真不好怎么说你呢。  不管你会不会说上海话, 程序是无国界的。 --------------------编程问答-------------------- Study a tool is good, but you play a developer log4j, only shows you're a 2, you cow you is not at CSDN, without good communication skills, arrogant tone, not people skills. You in this life is over, identification is completed. --------------------编程问答--------------------
引用 85 楼 zs_hyb 的回复:
Study a tool is good, but you play a developer log4j, only shows you're a 2, you cow you is not at CSDN, without good communication skills, arrogant tone, not people skills. You in this life is over,……


亮了 看lz怎么回复。 --------------------编程问答-------------------- 哈哈。。lss大亮 --------------------编程问答-------------------- 看着就火大,CSDN中还是有很多高手的,像你这样,谁给你解题,说实话,我没有看你帖出来的代码,不过看到你回复的那些评论,我想,我也没必要去看你帖出来的信息。 --------------------编程问答-------------------- 我们都是不专业的程序员,我们第一程序都是 hello world!
楼主是个专业的程序员,楼主的第一个程序是 holy shit ! --------------------编程问答-------------------- what a wonderful reply!
--------------------编程问答-------------------- 难到Spring高手都是这个素质吗? --------------------编程问答-------------------- 看了一下,觉得楼主是火星人,鉴定完毕........... --------------------编程问答-------------------- 既然出现警告毕竟是有什么问题,或许在系统运行中不会出现什么问题,但很有可能在特定的环境下出错,到时候再解决就晚了,我还是比较欣赏lz的,中国的软件水平为什么这么烂,就是大家的凑合心里。当然我也是这样,学的表表面面、用的表表面面,我还是很希望深入了解的,无奈e文太差,看的累。 --------------------编程问答-------------------- 楼主就是典型的中国式写代码的小人物,貌似喜欢钻研技术,缺忘记了软件的本质,在一些牛角尖上浪费了时间和精力,而且很高傲自大,不知道什么叫上善若水,厚德载物,几句话不对付就开始口无遮拦,一看就是没有经历过高等教育,或者说浪费了高等教育

总而言之,没什么发展,再牛也不过是个工人,只不过建筑工人流汗板砖,他得颈椎病搬字母而已

正应为软件行业有楼主这样的人,在我做了10多年研发后,选择急流勇退,退出这个行业,这个贴这么火,我就发个广告吧

工作转行,低价转让大量正版JAVA技术类书籍 联系QQ:341157 索取图书目录,非诚勿扰


--------------------编程问答-------------------- 其实lz意思是想更透彻的了解下,只是表达不尽如人意,呵呵,没关系,大家喜怒 --------------------编程问答-------------------- 还有,看楼主疯狂的说“老子是上海人”,生怕别人不知道,我想说的是,如果实在上世纪90年代初,你说你是上海人,说不定还挺让人羡慕,夜上海的确不错,超越全国。不过现在,你说你是上海人,就是嘴欠了,上海人最大的弱点就是觉得自己是天王老子,而且还是自封的那种,在自己的精神世界里自我感觉良好 --------------------编程问答-------------------- 呵呵。~~我不记得我们公司会收这样的开发人员,不管技术如何,没有素质的人,在任何行业,地域都不会受欢迎的 --------------------编程问答--------------------
引用 95 楼 ilrxx 的回复:
其实lz意思是想更透彻的了解下,只是表达不尽如人意,呵呵,没关系,大家喜怒



很多做开发的都不懂得如何进行人与人交流,只喜欢把自己封闭在自己搭建的小窝里面,并乐此不疲 --------------------编程问答-------------------- 还一点,其实可以心平气和的,不管你问的问题是啥,你确实说错了,你想深入探讨debug信息的含义,没问题,但是它却是不是异常啊。。只是辅助你调试程序的,也没看到任何的exception和error,所以这点上要虚心些 --------------------编程问答-------------------- lz的学习精神很好,可是没有中国传统的“不耻下问”,用一种高高在上的语气在找答案,所以还没有找到答案。。。
在软件开发行业中没有谁一定比谁知道的多,可能一个刚入门的开发者都知道一个你不知道的点,这就是软件开发,
补充:Java ,  Java EE
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,