Estou tentando compilar um relatorio no Ireport…
Tenho um Bean onde um dos seus atributos eh outro Bean, ex:
[code]Class Comensal{
ComensalId comensalid;
getComensalId() { ... }
}
Class ComensalId{
String Matricula;
getMatricula() { ... }
}[/code]
Quero entao acessar o atributo Matricula, utilizando no Ireport
((ComensalId)$F{comensalid}).getMatricula()
E quando COMPILO para gerar o .jasper o ireport me da o seguinte ERRO:
Compiling to file… P:\RU\SCR\Reports\Residentes.jasper ->
P:\RU\SCR\Reports\RelModelo.java Errors compiling P:\RU\SCR\Reports\Residentes.jasper! P:\RU\SCR\Reports\RelModelo.java:94: cannot access ComensalId
bad class file: C:\report\ComensalId.class
class file contains wrong class: SCR.scrbeans.ComensalId
Please remove or make sure it appears in the correct subdirectory of the classpath.
value = (java.lang.String)(((ComensalId)((java.lang.Object)field_comensalid.getValue())).getMatricula()); ^ 1 error net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: See error messages above. at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:155) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:137) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:142) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:130) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:336) at java.lang.Thread.run(Unknown Source)
Obs: Eu coloquei a classe no ClassPath.
Alguem ja passou por erro semelhante ou sabe como resolve-lo?
Qualquer ajuda sera util e bem-vinda.
Obrigado.
Glaudison