iReport - java.lang.ClassNotFoundException
我使用的是 iReport 3.7.6。
我有一个具有以下参数类的参数:at.gv.domain.print.impl.ParameterClass
。
为了使用该类,我执行了以下操作:
-->附加内容 -->选项-->类路径 -->添加文件夹-->
C:\Development\Projectname\workspace\DomainProject\target\classes
在 C:\Development\Projectname\workspace\DomainProject\target\classes\at\gv\domain\print\impl
下有我的 ParameterClass.class
。
现在,如果我想编译 .jrxml
我会收到以下错误:
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. java.lang.ClassNotFoundException: at.gv.domain.print.impl.ParameterClass
有人可以告诉我为什么吗?我添加了类路径条目,为什么找不到该类?
我尝试为我的域项目创建一个 .jar
- 如果我添加找到了该类。目标目录有问题吗(我使用Maven)?
Im using iReport 3.7.6.
I have a Parameter with following parameter class: at.gv.domain.print.impl.ParameterClass
.
For using that class I did following:
--> Extras --> Option --> Classpath --> Add Folder -->
C:\Development\Projectname\workspace\DomainProject\target\classes
Under C:\Development\Projectname\workspace\DomainProject\target\classes\at\gv\domain\print\impl
there are my ParameterClass.class
.
Now if I wanna compile the .jrxml
I get following error:
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. java.lang.ClassNotFoundException: at.gv.domain.print.impl.ParameterClass
Someone can tell me why? I added the classpath entry so why the class got not found?
I tried to make a .jar
of my Domain project - if I added that the class got found. Is there any problem with target directory (Im using Maven)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的问题出在ireport的jar上,我认为ireport的版本与IDE中使用的jar不一样,如果是的话尝试更改jar就可以了,希望这有帮助。
Your probleme is with the jar of ireport, I think that the version of ireport is not the same as the jar used in the IDE, if it's true try to change the jar that's all, hope this help.