Jump to content
We've recently updated our Privacy Statement, available here ×

java.lang.ClassNotFoundException: org.apache.commons.digester.Digester


cezar_apulchro

Recommended Posts

I saw in the internet forums that this problem is some libs out off classpath then I have set up the classpath, below is my libs:

jasperreport-6.7.0.jar

jasperreport-fonts-6.7.0.jar

jasperreport-javaflow-6.7.0.jar

this first 3 libs was downloaded from jaspersoft site, "jasperreport library", the next libs was downloaded by search in the internet forums because the ocurred errors.

classmate-0.8.0.jar

commons-annotations-1.0.0.jar

commons-beanutils-1.9.2.jar

commons-collections-20040616.jar

commons-collections-3.2.1.jar

commons-dbcp-1.2.2.jar

commons-fileuplod-1.3.jar

commons-io-2.4.jar

commons-logging-1.2.1.1.jar

commons-math-1.0.jar

commons-pool-1.6.jar

commons-digester3-3.2.jar

The last lib was downloaded by http://commons.apache.org/proper/commons-digester/download_digester.cgi how JasperReports Ultimate Guide say, but my problem still the same.

Who can help me.

Thanks in advance.

Cezar Apulchro.

My class:

public class GeradorDeRelatorios
{
    public void geraPDF(String reportLoc,
                        Map parametros,
                        OutputStream saida) throws JRException
    {
        try
        {
            JasperReport jasper = JasperCompileManager.compileReport(reportLoc);
            JasperPrint printR = JasperFillManager.fillReport(jasper, parametros, new JREmptyDataSource());
            JRExporter exporter = new JRPdfExporter();
            JasperExportManager.exportReportToPdfStream(printR, saida);
            exporter.exportReport();
        } catch(JRException e)
        {
            throw new RuntimeException("Erro ao gerar relatório", e);
        }
    }
}

My servlet:

protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException
    {
        botaoacao = request.getParameter("acaobotao");
        
        Map parametros = new HashMap();
        
        if("LstEletro".equals(botaoacao))
        {
            try
            {
                PacientesDAO_W01 pcdao = new PacientesDAO_W01();
                DadosPaciente dpaciente = new DadosPaciente();
            
                dpaciente = pcdao.lstEletroDia();
                
                sendNome = dpaciente.getNome();
                sendSexo = dpaciente.getSexo();
                sendDNascimento = dpaciente.getData_Nascimento();
                sendTelefone = dpaciente.getTelefone_Residencial();
                System.out.println("Nome: " + sendNome);
            
                parametros.put("Nome", sendNome);
                parametros.put("Sexo", sendSexo);
                parametros.put("data_Nascimento", sendDNascimento);
                parametros.put("telefone_Residencial", sendTelefone);
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }            
        }
        
        ServletContext context = getServletContext();
        String reportLoc = "/ITCWEB/ListAgenda_Eletro_W001.jrxml";
        
        GeradorDeRelatorios geraPDF = new GeradorDeRelatorios();
        try {
            geraPDF.geraPDF(reportLoc, parametros, response.getOutputStream());
        } catch (JRException ex) {
            Logger.getLogger(ListAgenda_Eletro_S002.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

After removing org.springframework.beans-3.1.2.release and spring-core-1.0.2 I'm getting

java.lang.ClassNotFoundException: org.springframework.beans.factory.support.BeanDefinitionRegistry

In my jasperreport I have defined the fields Nome, Sexo, data_Nascimento,  telefone_Residencial and these fields are defined in "Dataset and Query Dialog" too. My report is very simple, these fields, title and one field of parameter to receive date.

Link to comment
Share on other sites

Your last contact you say, seems to be missing pring-beans artifact. I believe that is my problem. when I have created desktop reports using ireports I have defined the path of my bean class. in jaspersoft studio I can't define the path of my bean class. I'm defining the fields by 'add' and 'edit' button in 'java bean' of Dataset and Query Dialog screen. Is right? 

Link to comment
Share on other sites

  • 2 weeks later...

Hi, I have created a new report in JasperSoft Studio, now I have defined mysql db as source data. When I press preview button, all my fields defined in my sql "SELECT" are show in the manner  that I need. But the error now is: "

java.lang.ClassCastException: cannot assign instance of net.sf.jasperreports.engine.base.JRBaseStaticText to field net.sf.jasperreports.engine.base.JRBaseParagraph.paragraphContainer of type net.sf.jasperreports.engine.JRParagraphContainer in instance of net.sf.jasperreports.engine.base.JRBaseParagraph"

I can't understend what happen, I'm totally lost.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...