2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 By: Cameron Taggart - ctaggart Classpath problems w/ a JRDataSourceProvider 2006-06-15 23:20 I'm having difficulties with a custom JRDataSourceProvider. I put my library containing the JRDataSourceProvider and its dependencies in the ./lib directory. One of the dependencies is Spring. Spring is in the ./lib folder, but I keep getting errors like: java.lang.IllegalArgumentException: interface org.springframework.aop.framework.Advised is not visible from class loader at java.lang.reflect.Proxy.getProxyClass(Unknown Source) at java.lang.reflect.Proxy.newProxyInstance(Unknown Source) at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:104) at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:94) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:72) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:101) at org.springframework.remoting.caucho.HessianProxyFactoryBean.afterPropertiesSet(HessianProxyFactoryBean.java:52) at I can't help but think it has something to do with: Object obj = Class.forName((String)jTextFieldJRDataSourceProvider.getText().trim(), true, MainFrame.getMainInstance().getReportClassLoader()).newInstance(); Any idea what I'm doing wrong? What does ReportClassLoader do? Will it not load the Spring jar? Cameron By: Martyn - martyn-hi-ss-nl RE: Classpath problems w/ a JRDataSourceProvi 2006-06-17 05:35 Have you added both jar files to the class path in iReport? Dont forget about the bug where your classpath is deleted when you reload iReport. It's possible your classpath is empty. By: Cameron Taggart - ctaggart RE: Classpath problems w/ a JRDataSourceProvi 2006-06-17 11:07 I placed all necessary jars in the "lib" directory to add them to the classpath. Is anything else needed? I haven't heard about that bug yet. Simple editing the source code and changing it to get "this"'s ClassLoader works. I also changed the remote communication protocol from Hessian to Spring Framework's HttpInvoker, which gives a lot clearer error messages. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now