Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException: ZUGFeRDExporterFromA3 cannot be cast to ZUGFeRDExporterFromPDFA #389

Closed
langfr opened this issue Jun 1, 2024 · 2 comments

Comments

@langfr
Copy link
Contributor

langfr commented Jun 1, 2024

When using
IZUGFeRDExporter ze = new ZUGFeRDExporterFromPDFA();
then
ze.setProfile( Profiles.getByName( "extended" ) );
leads to a class cast exception:

	at org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromPDFA.setProfile(ZUGFeRDExporterFromPDFA.java:151)
	at org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromPDFA.setProfile(ZUGFeRDExporterFromPDFA.java:40)
	at biz.mbisoftware.fn.ejb.session.sales.InvoiceExport.buildInvoiceZugferdPdf(InvoiceExport.java:523)
	at biz.mbisoftware.fn.ejb.session.sales.InvoiceExport.processInvoice(InvoiceExport.java:403)
@jstaerk jstaerk closed this as completed in 8c16d43 Jun 3, 2024
jstaerk added a commit that referenced this issue Jun 3, 2024
Fix #389: ClassCastException: ZUGFeRDExporterFromA3 cannot be cast to…
@msccip
Copy link

msccip commented Aug 16, 2024

I get the opposite message with version Mustang-CLI-2.12.0.jar: ...FromPDFA cannot be cast to class ...FromA3

class org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromPDFA cannot be cast to class org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3 (org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromPDFA and org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3 are in unnamed module of loader 'app')

@langfr
Copy link
Contributor Author

langfr commented Aug 16, 2024

Please create a new issue.
Where does this Exception exactly happen ? Main.java:726 ? The complete stacktrace would be helpful.
Share the command line you're using, so that somebody is able to reproduce this issue. java -jar Mustang-CLI-2.12.0.jar .... ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants