GeneratePDF with JasperReport Library and MongoDB

后端 未结 1 1537
日久生厌
日久生厌 2021-01-24 02:24

So mongoDB is running on 27017 and my collection name is test.

  try {
            // - Connection to base
            String mongoURI = \"mongodb://localhost:27         


        
1条回答
  •  北海茫月
    2021-01-24 02:46

    I agree with @AdamC: you need log4j. But I would say that it's not a matter of "installing" it; you just need to add a log4j.jar file to your project classpath. Your code looks fine.

    EDIT: moving info from my comment into the answer.

    In addition to adding log4j.jar to the classpath, you also need a file called log4j.properties to configure log4j. You can create your own, or you can grab the copy from the MongoDB connector source on jasperforge. Look for src/main/resources/log4j.properties.

    0 讨论(0)
提交回复
热议问题