License setting problem

Hi,

I am using aspose.slides for Java 1.7

Setting License works fine in a standalone application. but when it is running on a weblogic server it gives the following stacktrace.

om.aspose.slides.AsposeLicenseException: License parsing error.
at com.aspose.slides.License.setLicense(SourceFile:206)
at com.oracle.presentation.SuperBATPresentation.setLicence(SuperBATPresentation.java:120)
at bmt.PPTOutput(bmt.java:2109)
at bmt.MetricDownloads(bmt.java:2016)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1245)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:87)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:298)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:91)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:87)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:87)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:298)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:91)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:81)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.NullPointerException
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1190)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:787)
at oracle.xml.util.XMLError.setLocale(XMLError.java:173)
at oracle.xml.parser.v2.XMLParser.setLocale(XMLParser.java:446)
at weblogic.xml.jaxp.RegistryParser.setupParser(RegistryParser.java:424)
at weblogic.xml.jaxp.RegistryParser.getParserInternal(RegistryParser.java:344)
at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:142)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:364)

This is the below code I use.

FileInputStream fstream=new FileInputStream("C:\\Aspose.Slides.lic.xml");
//Instantiate the License class
License license=new License();
//Set the license through the stream object
license.setLicense(fstream);

if its a problem with the weblogic libraries -XML Parsers. How else can I set the license? I am stuck here

Thanks,

Prashanth

Dear Prashanth,

I have discussed the issue with our development team and according to their advice its is convenient to use the latest available version of Aspose.Slides for Java 2.4.0 with trial license. If you feel any issue with the mentioned version then please share with us, so that we may investigate and help you resolving the issue. You may please download the latest version of Aspose.Slides for Java from here and can avail the trial license from this link.

Thanks and Regards,

Hi,

It does work perfectly with a standalone java program. The license parse error is only in while running it inside web application weblogic server. Is it a problem with the ResouceBundle .... ? How doe the License class work? please suggest a solution since I am in a fix also I do not want to renew to the lastest version for only this problem

Thx

It seems like the Locale is null? I dont know how the License class works?

Dear Prashant,

I have discussed the issue with our development team and according them there had been a problem with loading license on some app servers existed in old versions because wrong ClassLoader was used. This issue has been fixed in the later versions. So, we recommend you to please upgrade your product and subscription.

Thanks and Regards,