Questions asked by Oliverhttps://answers.axonivy.com/questions/asked-by/539/oliver/?type=rssQuestions asked by <a href="/users/539/oliver" >Oliver</a>enFri, 11 Nov 2016 14:33:42 -0500Unable to use Apache POI - getting SchemaTypeLoaderExceptionhttps://answers.axonivy.com/questions/2179/unable-to-use-apache-poi-getting-schematypeloaderexception<p>I'm trying to use Apache POI (3.10 or 3.15) with XpertIvy Designer v5.0.18 and I'm getting the following exception:</p> <pre><code>SchemaTypeLoaderException: XML-BEANS compiled schema: Incompatible minor version - expecting up to 23, got 24 (schemaorg_apache_xmlbeans.system.sE130CAA0A01A7CDE5A2B4FEB8B311707.index) - code 3 java.lang.reflect.InvocationTargetException RuntimeException: Could not instantiate SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is the version of xbean.jar correct? </code></pre> <p>I saw a few older threads (<a href="http://answers.axonivy.com/questions/511/poi-conflicted-xmlbeans-jars">POI conflicted xmlbeans.jar</a> [2014] or <a href="http://answers.axonivy.com/questions/1225/what-is-axis-lib-used-for">what is axis lib used for</a> [2015]) regarding this issue.</p> <p>Is it really true that you <strong>still have to hack</strong> the designer plugins folder and some server folder too??? </p>OliverFri, 11 Nov 2016 14:33:42 -0500https://answers.axonivy.com/questions/2179/unable-to-use-apache-poi-getting-schematypeloaderexceptiondesignerbugHow to use dynamic p:graphicImage with StreamedContent?https://answers.axonivy.com/questions/1309/how-to-use-dynamic-p-graphicimage-with-streamedcontent<p>I try to use a dynamic p:graphicImage with a StreamedContent object but nothing is displayed. The img tag is rendered in the html markup but with firebug I can see that the img src attribute is causing a 404 - not found error.</p> <p>I'm using a similar approach as described <a href="http://stackoverflow.com/questions/8304967/how-to-use-pgraphicimage-with-streamedcontent-within-pdatatable">here</a>.</p> <p>In a custom java class I'm generating a StreamedContent object from a previously uploaded image. In an ivy script block I'm assigning the return value to a dataclass attribut of type StreamedContent.</p> <p>Here some code snippets:</p> <pre><code>java class MyImageUtil: public StreamedContent retrieveImageAsSC() { ... StreamedContent sc = new DefaultStreamedContent(inputStream, mimeType, fileName); return sc; } ... ivy script block: in.myDataClass.streamedContent = myImageUtil.retrieveImageAsSC(); ... jsf xhtml: p:graphicImage value="#{data.myDataClass.streamedContent}" /&gt; </code></pre> <p>The following URL is generated for the img src attribute: <a href="http://localhost:8081/ivy/faces/javax.faces.resource/dynamiccontent.properties?ln=primefaces&amp;pfdrid=pfdrid_945697ac-ead2-49e3-af3c-4185184fe927">http://localhost:8081/ivy/faces/javax.faces.resource/dynamiccontent.properties?ln=primefaces&amp;pfdrid=pfdrid_945697ac-ead2-49e3-af3c-4185184fe927</a> which isn't accessible.</p> <hr> <p>After a bit of research and debugging it seems to be an ivy designer bug :).</p> <p>As described over at <a href="http://stackoverflow.com/questions/8304967/how-to-use-pgraphicimage-with-streamedcontent-within-pdatatable">stackoverflow</a> you should use a method expression for the value attribute of the p:graphicImage. This method should be called twice:</p> <ol> <li>while rendering the html markup so the img tag is getting generated</li> <li>when the browser actually requests the image</li> </ol> <p>In ivy this method is only called <strong>once</strong>. I've tested it with v5.0.16 and v5.1.4 to no avail.</p> <p>As the mentioned solution from stackoverflow is working in a standalone jsf web application I assume that this is an ivy designer bug. I'm looking forward to any feedback to solve this issue.</p>OliverWed, 06 May 2015 14:40:43 -0400https://answers.axonivy.com/questions/1309/how-to-use-dynamic-p-graphicimage-with-streamedcontentjsfdesignerprimefaces