iText merge pdf error in Android, with latest libraries - java

I have read this question :
iText merge pdf error in Android
Which basically explains my problem, but the solution proposed - upgrading to the latest Android version of iText doesn't solve the issue.
I am using itextgoogle-5.4.0.jar, but I still get the same compile error.
Obviously when I get the project working I'll be happily paying the license fee, but the merging of PDF's is a requirement.

I have fixed this issue and re-uploaded 5.4.0 to the repository:
http://repo.itextsupport.com//android_gae/com/itextpdf/itextgoogle/5.4.0/
Could you confirm the fix?

There appears to be some compilation bugs in the iText port 5.4.0, it still has references to some of the java.awt classes. You'll notice this when you start using PdfContentByte.
I rolled back to the previous version 5.3.5 which is here :
http://repo.itextsupport.com//android_gae/com/itextpdf/itextgoogle/

Related

JaCaMo cannot satisfy dependencies in Eclipse. Missing requirement

I am trying to follow the JaCaMo Eclipse Plugin instructions. I am getting a problem when installing a new software. Can anyone help? enter image description here
I tried to follow instructions but cannot solve the issue above. I have looked but cannot see anyone having the same problem.
I had the same issue. The problem is with the version of Eclipse. I'm assuming you're using a version that's 2021-12 or later. After the whole fiasco with Log4j at the end of 2021, I believe they stopped using it or changed something about it in Eclipse, and hence the error. Using Eclipse with versions 2021-09 or before will solve the issue.

openjdk8 for Android 7.1.2 version

When I compiled the andriod 7.1.2. I encountered this problem. I had checked my openjdk version. It is openjdk8. So, what is another possibility?
ninja: error: 'out/host/linux-x86/obj32/SHARED_LIBRARIES/libopenjdkjvm_intermediates/export_includes', needed by 'out/host/linux-x86/obj32/SHARED_LIBRARIES/libopenjdk_intermediates/import_includes', missing and no known rule to make it
One solution is from here:
https://groups.google.com/forum/#!topic/android-building/Gz3joT38lVk
Do disable ninja to compile. However, it also has this problem.
So, what is the solution for this?
Finally I solved my problem with deleting and downloading the AOSP again. I suppose that the problem is caused by the multiple and various android version downloading.

java.lang.VerifyError: Expecting a stackmap frame at branch target 29

Exception Details:
Location:
com/sonicsw/mf/comm/jms/ConnectorClient.setRequestTimeout(J)V #3: ifnonnull
Reason:
Expected stackmap frame at this location.
at com.sonicsw.jndi.mfcontext.MFContext.<init>(MFContext.java:101)
at com.sonicsw.jndi.mfcontext.MFContextFac
Can anyone resolve this issue? Googled it for over a week and tried every possible alternatives . Used -XX:-UseSplitVerifier . It is also not working . With noverify option it works fine. Java version is 1.7.0_51 . Working fine with 7.6 sonic libraries . We recently upgraded those libraries from 7.6 to 2015 and after that moment we are getting this error.
Even I also faced the same challenge when migrate my application from 1.6 to 1.7.
After huge struggle, we found a fix for this issue.
Approach 1: Either you can use -XX:-UseSplitVerifier argument will resolve this issue and you don't need to worry about to upgrade the library files.
Approach 2: I have followed the below steps to overcome the issue.
Step 1: Identify and keep a list of external libraries consumed by your application.
Step 2: Once you identify the list, keep removing one by one external library files and plug in upgraded version library files which will help you to isolate the library which might causing the issue.
In my case: j2ee.jar and openjpa-1.2.2 jar files created an issue and then I have upgraded these libraries which had resolved the migration issues.
Hence, It is bit of slow and painful process to figure out which library causing the issue and arrest it.
I hope, this information might be useful because it is based out of my real time experience.

Upgrading JasperReports 1.3.1 to JasperReports 4.6

I am upgrading my JasperReports version as mentioned in the title.
I don't know much about the JasperReports version upgrade. Which all things I have to change to make it work. I have latest .jar files of everything. But when I print my .PDF report it gives me this error.
error:could not open file because its damaged or not supported.
In eclipse it shows this exception
java.lang.NoSuchFieldError: PRINTSCALING at
net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExpor‌​ter.java:532) at
net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java‌​:396) at
net.sf.jasperreports.engine.JasperExportManager.exportToPdf(JasperExportManager.‌​java:212) at
net.sf.jasperreports.engine.JasperExportManager.exportReportToPdf(JasperExportMa‌​nager.java:536) at
com.sibisoft.northstar.util.JasperReportGenerator.getPdfByteArray(JasperReportGe‌​nerator.java:679)
Please help me.
The issue is not with JasperReports but with the version of the iText library you are using. You need to download version 2.1.7 to work with that version of JasperReports. You can get it from here.
I happened to know this one off the top of my head, as I ran into it in the past, but as a helpful note in the future, this is the process I used to figure it out originally.
Since JasperReports is open source, the code can be found online easily. So I google:
site:grepcode.com
net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream
To find the code online. (GrepCode basically provides a cool site to look through many open source projects source code.)
At the top of the GrepCode page they have the version of the project, so make sure it is pointing to which ever version you are using.
Then find the method or line number in the error message.
From here it is just like debugging local code. You can see what the offending class is, and what package it belongs to. In this case it points to the itext libray as the culprit.
Hope that helps you out in the future, and happy reporting.

What are the Working versions of Jars required in the Compilation of a report made with iReport 4.1.3

i made a couple of Reports using iReport 4.1.3 and i want to compile them through a java application.
but i don't know exactly the version of the jars that works with iReport 4.1.3.
i'm using the following jars :
commons-beanutils-core-1.8.0
commons-collections-3.1
commons-digester-2.0
commons-logging-1.1.1
groovy-all-1.0-jsr-02
itext-1.1.4
jasperreports- 3.1.4
and i get this Error while creating the reports from the Java Application :
Exception in thread "main"java.lang.NoSuchMethodError:com.lowagie.text.pdf.PdfWriter.setRgbTransparencyBlending(Z)V
so, can you please help, by Providing versions, or links.
Thank you very much for your time.
I use iText 2.1.5, in which com.lowagie.text.pdf.PdfWriter.setRgbTransparencyBlending(Z)V
is available.
As per your error, certainly problem is with your iText jar. Try out with the latest version of iText.

Categories

Resources