Foros de discusión
IPC LIb JasperReport error
Nestor cruz, modificado hace 6 años.
IPC LIb JasperReport error
Junior Member Mensajes: 48 Fecha de incorporación: 15/02/15 Mensajes recientes
Greetings community
I have a problem using jasperreport with ipc, everything works fine without using the library, when I include the library, it throws this error
I'm using
liferay 7.0
faces.api.version 2.2
iferay.faces.bridge.ext.version 5.0.1
liferay.faces.bridge.impl.version 4.1.0
mojarra.version 2.2.14
for jasper Report use
groupId: net.sf.jasperreports
artifactId: jasperreports
version: 6.4.0
Beforehand thank you very much
I have a problem using jasperreport with ipc, everything works fine without using the library, when I include the library, it throws this error
18:55:02,459 ERROR [http-nio-8080-exec-2][render_portlet_jsp:131] null
java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.portlet.Event.getQName()Ljavax/xml/namespace/QName;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, com/munaysoft/historialPagos/handler/ClienteIdEventHandler, and the class loader (instance of java/net/URLClassLoader) for the method's defining class, javax/portlet/Event, have different Class objects for the type javax/xml/namespace/QName used in the signature
at com.munaysoft.historialPagos.handler.ClienteIdEventHandler.handleEvent(ClienteIdEventHandler.java:23)
at com.liferay.faces.bridge.internal.BridgePhaseEventImpl.execute(BridgePhaseEventImpl.java:127)
at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:136)
at javax.portlet.faces.GenericFacesPortlet.processEvent(GenericFacesPortlet.java:602)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:87)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:58)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletExceptionAdapter.service(ServletExceptionAdapter.java:68)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:99)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.FilterExceptionAdapter.doFilter(FilterExceptionAdapter.java:46)
at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:530)
I'm using
liferay 7.0
faces.api.version 2.2
iferay.faces.bridge.ext.version 5.0.1
liferay.faces.bridge.impl.version 4.1.0
mojarra.version 2.2.14
for jasper Report use
groupId: net.sf.jasperreports
artifactId: jasperreports
version: 6.4.0
Beforehand thank you very much
Neil Griffin, modificado hace 6 años.
RE: IPC LIb JasperReport error
Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Hi Nestor,
I tried to reproduce the problem by adding the following dependency to a simple Java portlet project:
But that caused approximately 40 transitive dependencies to be added to the project:
WEB-INF/lib/aopalliance-1.0.jar
WEB-INF/lib/bcmail-jdk14-1.38.jar
WEB-INF/lib/bcmail-jdk14-138.jar
WEB-INF/lib/bcprov-jdk14-1.38.jar
WEB-INF/lib/bcprov-jdk14-138.jar
WEB-INF/lib/bctsp-jdk14-1.38.jar
WEB-INF/lib/castor-core-1.3.3.jar
WEB-INF/lib/castor-xml-1.3.3.jar
WEB-INF/lib/commons-beanutils-1.9.0.jar
WEB-INF/lib/commons-collections-3.2.2.jar
WEB-INF/lib/commons-digester-2.1.jar
WEB-INF/lib/commons-lang-2.6.jar
WEB-INF/lib/commons-logging-1.1.1.jar
WEB-INF/lib/core-3.2.1.jar
WEB-INF/lib/ecj-4.3.1.jar
WEB-INF/lib/icu4j-57.1.jar
WEB-INF/lib/itext-2.1.7.js5.jar
WEB-INF/lib/jackson-annotations-2.1.4.jar
WEB-INF/lib/jackson-core-2.1.4.jar
WEB-INF/lib/jackson-databind-2.1.4.jar
WEB-INF/lib/jakarta-regexp-1.4.jar
WEB-INF/lib/jasperreports-6.4.0.jar
WEB-INF/lib/javax.inject-1.jar
WEB-INF/lib/jcommon-1.0.23.jar
WEB-INF/lib/jfreechart-1.0.19.jar
WEB-INF/lib/lucene-analyzers-common-4.5.1.jar
WEB-INF/lib/lucene-core-4.5.1.jar
WEB-INF/lib/lucene-queries-4.5.1.jar
WEB-INF/lib/lucene-queryparser-4.5.1.jar
WEB-INF/lib/lucene-sandbox-4.5.1.jar
WEB-INF/lib/olap4j-0.9.7.309-JS-3.jar
WEB-INF/lib/spring-aop-3.0.6.RELEASE.jar
WEB-INF/lib/spring-asm-3.0.6.RELEASE.jar
WEB-INF/lib/spring-beans-3.0.6.RELEASE.jar
WEB-INF/lib/spring-context-3.0.6.RELEASE.jar
WEB-INF/lib/spring-core-3.0.6.RELEASE.jar
WEB-INF/lib/spring-expression-3.0.6.RELEASE.jar
WEB-INF/lib/stax-1.2.0.jar
WEB-INF/lib/stax-api-1.0-2.jar
WEB-INF/lib/stax-api-1.0.1.jar
My recommendation would be that you <exclude> all of these transitive dependencies, and only add back the ones that you really need.
In particular, I think that the error you reported is caused by the presence of stax-api.jar in WEB-INF/lib. It's actually included twice: Version 1.0.1 and 1.0-2.
Kind Regards,
Neil
I tried to reproduce the problem by adding the following dependency to a simple Java portlet project:
<dependency>
<groupid>net.sf.jasperreports</groupid>
<artifactid>jasperreports</artifactid>
<version>6.4.0</version>
</dependency>
But that caused approximately 40 transitive dependencies to be added to the project:
WEB-INF/lib/aopalliance-1.0.jar
WEB-INF/lib/bcmail-jdk14-1.38.jar
WEB-INF/lib/bcmail-jdk14-138.jar
WEB-INF/lib/bcprov-jdk14-1.38.jar
WEB-INF/lib/bcprov-jdk14-138.jar
WEB-INF/lib/bctsp-jdk14-1.38.jar
WEB-INF/lib/castor-core-1.3.3.jar
WEB-INF/lib/castor-xml-1.3.3.jar
WEB-INF/lib/commons-beanutils-1.9.0.jar
WEB-INF/lib/commons-collections-3.2.2.jar
WEB-INF/lib/commons-digester-2.1.jar
WEB-INF/lib/commons-lang-2.6.jar
WEB-INF/lib/commons-logging-1.1.1.jar
WEB-INF/lib/core-3.2.1.jar
WEB-INF/lib/ecj-4.3.1.jar
WEB-INF/lib/icu4j-57.1.jar
WEB-INF/lib/itext-2.1.7.js5.jar
WEB-INF/lib/jackson-annotations-2.1.4.jar
WEB-INF/lib/jackson-core-2.1.4.jar
WEB-INF/lib/jackson-databind-2.1.4.jar
WEB-INF/lib/jakarta-regexp-1.4.jar
WEB-INF/lib/jasperreports-6.4.0.jar
WEB-INF/lib/javax.inject-1.jar
WEB-INF/lib/jcommon-1.0.23.jar
WEB-INF/lib/jfreechart-1.0.19.jar
WEB-INF/lib/lucene-analyzers-common-4.5.1.jar
WEB-INF/lib/lucene-core-4.5.1.jar
WEB-INF/lib/lucene-queries-4.5.1.jar
WEB-INF/lib/lucene-queryparser-4.5.1.jar
WEB-INF/lib/lucene-sandbox-4.5.1.jar
WEB-INF/lib/olap4j-0.9.7.309-JS-3.jar
WEB-INF/lib/spring-aop-3.0.6.RELEASE.jar
WEB-INF/lib/spring-asm-3.0.6.RELEASE.jar
WEB-INF/lib/spring-beans-3.0.6.RELEASE.jar
WEB-INF/lib/spring-context-3.0.6.RELEASE.jar
WEB-INF/lib/spring-core-3.0.6.RELEASE.jar
WEB-INF/lib/spring-expression-3.0.6.RELEASE.jar
WEB-INF/lib/stax-1.2.0.jar
WEB-INF/lib/stax-api-1.0-2.jar
WEB-INF/lib/stax-api-1.0.1.jar
My recommendation would be that you <exclude> all of these transitive dependencies, and only add back the ones that you really need.
In particular, I think that the error you reported is caused by the presence of stax-api.jar in WEB-INF/lib. It's actually included twice: Version 1.0.1 and 1.0-2.
Kind Regards,
Neil
Nestor cruz, modificado hace 6 años.
RE: IPC LIb JasperReport error
Junior Member Mensajes: 48 Fecha de incorporación: 15/02/15 Mensajes recientes
Thanks Neil for the quick response
I tell you that I made the following exclusion and does not throw the error
but it still does not work, I've related tests in a portlet that does not have ipc, and it worked perfectly, for these tests I have not made exclusions
this problem is being generated when jasperReport is run together with ipc
I tell you that I made the following exclusion and does not throw the error
<dependency>
<groupid>net.sf.jasperreports</groupid>
<artifactid>jasperreports</artifactid>
<version>6.4.3</version>
<exclusions>
<exclusion>
<groupid>stax</groupid>
<artifactid>stax</artifactid>
</exclusion>
<exclusion>
<groupid>javax.xml.stream</groupid>
<artifactid>stax-api</artifactid>
</exclusion>
</exclusions>
</dependency>
but it still does not work, I've related tests in a portlet that does not have ipc, and it worked perfectly, for these tests I have not made exclusions
this problem is being generated when jasperReport is run together with ipc
Neil Griffin, modificado hace 6 años.
RE: IPC LIb JasperReport error
Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Hi Nestor,
When you wrote "IPC" were you referring to "Inter Portlet Communication" or something else?
Also, I recommend excluding ALL of the transitive dependencies and only adding back the ones that are truly needed at runtime, one-at-a-time, testing to see which one causes things to not work.
Finally, I would need more details as to why it still does not work, meaning any server side or client-side error messages.
Kind Regards,
Neil
When you wrote "IPC" were you referring to "Inter Portlet Communication" or something else?
Also, I recommend excluding ALL of the transitive dependencies and only adding back the ones that are truly needed at runtime, one-at-a-time, testing to see which one causes things to not work.
Finally, I would need more details as to why it still does not work, meaning any server side or client-side error messages.
Kind Regards,
Neil
Nestor cruz, modificado hace 6 años.
RE: IPC LIb JasperReport error
Junior Member Mensajes: 48 Fecha de incorporación: 15/02/15 Mensajes recientes
effectively ipc = inter Portlet Communication
I commented that I put the suggestions into practice but I did not find a solution to the problem and the only error that is displayed is the aforementioned
to give solution to the need to create a pdf I used itext5
I thank you for the help given and any suggestion will be well received
I commented that I put the suggestions into practice but I did not find a solution to the problem and the only error that is displayed is the aforementioned
to give solution to the need to create a pdf I used itext5
I thank you for the help given and any suggestion will be well received
Neil Griffin, modificado hace 6 años.
RE: IPC LIb JasperReport error
Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Hi Nestor,
If your requirement is to simply export a PDF, then I recommend that you take a look at our jsf-export-pdf-portlet demo. The source can be found here.
It uses a JSF 2 ResourceHandler in conjunction with the Portlet 2.0 RESOURCE_PHASE in order to provide a downloadable PDF.
Kind Regards,
Neil
If your requirement is to simply export a PDF, then I recommend that you take a look at our jsf-export-pdf-portlet demo. The source can be found here.
It uses a JSF 2 ResourceHandler in conjunction with the Portlet 2.0 RESOURCE_PHASE in order to provide a downloadable PDF.
Kind Regards,
Neil