We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Culture Name: en-DE is not a supported culture and NoClassDefFoundError

Hi there,


we’re using Aspose Total in an EJB-Application that is running in Glassfish. Currently we’re using Slides 7.8.0 which is working fine.

When I try to update to 8.3.0 or 8.4.0 I’m getting really strange errors. Everything else stays the same, just the slides version has been updated.

When trying to convert PPT to PDF I’m getting the following Exception:
class com.aspose.ms.System.f: Culture Name: en-DE is not a supported culture
com.aspose.ms.System.Globalization.i.a(Unknown Source)
com.aspose.ms.System.Globalization.i.(Unknown Source)
com.aspose.ms.System.Globalization.i.b(Unknown Source)
com.aspose.ms.System.l.w.beV(Unknown Source)
com.aspose.ms.System.Globalization.i.beV(Unknown Source)
aspose.pdf.Pdf.(Unknown Source)

When trying to convert PPTX to PDF I’m getting the following:
java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.PresentationEx

The class com.aspose.slides.Presentation however can be found.

The files itself do not matter, this occurs with every PPT or PPTX.

Has anyone run into these kinds of problems as well?


Thanks,
Tim

Hi Tim,

Thanks for inquiring Aspose.Slides.

I have observed the issue shared by you. The issue seems to be with some locale setting. Can you please share the sample code with us along with the Operating system and JDK version details with us. I will investigate it on my end to help you further.

Many Thanks,

Hi,


we’re running the app in GF 3.1.2.2 with Java 1.7 under SUSE Linux Enterprise Server 10 (x86_64).

This is the code we use:

public byte[] convertPowerpoint(InputStream is, RenditionGroup group) throws RenditionException {
String method = “convertPowerpoint”;
LOG.enter2(method, “inputStream={0}, group={1}”, is, group);
checkLicense();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
switch (group) {
case POWERPOINT:
Presentation presentation = new Presentation(is);
presentation.save(baos, SaveFormat.Pdf);
break;
case POWERPOINTX:
PresentationEx presentationEx = new PresentationEx(is);
presentationEx.save(baos, SaveFormat.Pdf);
break;
default:
throw RenditionException.internalError(new Exception(“Wrong rendition group.”));
}
LOG.exitOK(method);
return baos.toByteArray();
} catch (Exception ex) {
LOG.exitNOK(method);
throw RenditionException.internalError(ex);
} finally {
IOUtils.closeQuietly(is);
IOUtils.closeQuietly(baos);
}
}


Thanks,
Tim

Hi Tim,

I have observed the sample code shared by you and request you to pleas share the sample code that is only using Aspose.Slides for Java on your end and reproducing the issue. Unfortunately, I am unable to to use the shared code from you owing to custom classes used in it. Also, I am unable to find information about locale setting in the shared code as well. Please share the subset of code with which you are able to reproduce the issue on your end. I will use that to investigate it further and help you out.

Many Thanks,

Hi,


basically this is the code we use (according to the input, PPT or PPTX):

Presentation presentation = new Presentation(is);
presentation.save(baos, SaveFormat.Pdf);

or

PresentationEx presentationEx = new PresentationEx(is);
presentationEx.save(baos, SaveFormat.Pdf);

“is” is the InputStream, and baos a new ByteArrayOutputStream object.

We do not have any locale specific settings, do we need any? - Why and how?


Thanks,
Tim

Hi Tim,


I mentioned locales because in your very first post it is mentioned that Culture Name: en-DE is not a supported culture in exception information. That is why I have requested the locale detail from you. Can you please confirm that the Linux version that you are using has English Dutch as regional setting.

Please also try using the following statement in your application and share your feedback for this as well.

Locale.setDefault(new Locale(“en-us”));


Many Thanks,

Hi,


the first thing that came to my mind: en-DE makes no sense whatsoever, there is no german version of english. I don’t know where this comes from.

However, adding the locale default part solved the issue.

Thanks,
Tim

Hi Tim,


That is good that things have worked on your end with provided sample code. Please share if I may help you further in this regard.

Many Thanks,