CMDBuild Forum

Print card error

Hello,

 
I'm getting an error when I try to print a single card to pdf
 
This environment is running a clean, no-demo database.
 
Here's the stack trace:
 
Call: services/json/management/modreport/printcarddetails
----------------------------------------------------------
Error: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error executing SQL statement for : CMDBuild_card_detail_subreport
at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:782)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:331)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:384)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:358)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2046)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:778)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:288)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:151)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:932)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:849)
at org.cmdbuild.report.ReportFactory.fillReport(ReportFactory.java:95)
at org.cmdbuild.report.ReportFactoryTemplate.fillReport(ReportFactoryTemplate.java:73)
at org.cmdbuild.servlets.json.management.ModReport.printCardDetails(ModReport.java:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:97)
at org.cmdbuild.servlets.JSONDispatcher.doGet(JSONDispatcher.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:158)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:48)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:52)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for : CMDBuild_card_detail_subreport
at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:240)
at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1087)
at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:668)
at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1281)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:900)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:651)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:203)
... 3 more
Caused by: org.postgresql.util.PSQLException: ERROR: failed to find conversion function from unknown to text
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:304)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:233)
... 11 more
 
 
In our test instance that uses the demo database, the function works perfectly.  
 
My question is does anyone know what script/file I need to copy over to get the bare bones instance to work similarly?
 
Thanks,
Devin

We can not repeat the problem you reported, are you using the latest CMDBuild version ?

You wrote that you're using a clean database, but if it is an empty database which card you are trying to print ?

CMDBuild Team

Thanks for responding.
 
I'm sorry I forgot to include system details.  I'm running CMDBuild 2.2.1 on a CentOS 6.6 virtual guest.  Since you're not experiencing problems on the latest version I will try to upgrade the system and hopefully that will fix the problem.
 
The database began clean, I've created several classes and imported cards into them.  We are having trouble printing against those cards.
 
-Devin
 
Previously Tecnoteca wrote:

We can not repeat the problem you reported, are you using the latest CMDBuild version ?

You wrote that you're using a clean database, but if it is an empty database which card you are trying to print ?

CMDBuild Team

 

Alas, I've upgraded our dev instance to 2.2.2, and I am still seeing the same problem error when I try to print card as .pdf or .odt
 
Previously D Roark wrote:
Thanks for responding.
 
I'm sorry I forgot to include system details.  I'm running CMDBuild 2.2.1 on a CentOS 6.6 virtual guest.  Since you're not experiencing problems on the latest version I will try to upgrade the system and hopefully that will fix the problem.
 
The database began clean, I've created several classes and imported cards into them.  We are having trouble printing against those cards.
 
-Devin
 
Previously Tecnoteca wrote:

We can not repeat the problem you reported, are you using the latest CMDBuild version ?

You wrote that you're using a clean database, but if it is an empty database which card you are trying to print ?

CMDBuild Team

 

 

Hi,

 
same problem overhere, switched to version 2.3.0, still the same problem when trying to print a single card. After the failed print-to-PDF of a single card, the whole server is crashed and tomcat service will not respond to a stop/start. 
 
 
Call: services/json/management/modreport/printcarddetails
----------------------------------------------------------
Error: java.lang.OutOfMemoryError: PermGen space
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
	at java.lang.Class.getDeclaredMethods(Unknown Source)
	at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass$1.run(CachedSAMClass.java:90)
	at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass$1.run(CachedSAMClass.java:88)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getDeclaredMethods(CachedSAMClass.java:88)
	at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getAbstractMethods(CachedSAMClass.java:103)
	at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getSAMMethod(CachedSAMClass.java:167)
	at org.codehaus.groovy.reflection.ClassInfo.isSAM(ClassInfo.java:282)
	at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:272)
	at org.codehaus.groovy.reflection.ClassInfo.access$400(ClassInfo.java:37)
	at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:443)
	at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:434)
	at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
	at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
	at org.codehaus.groovy.reflection.ClassInfo.getCachedClass(ClassInfo.java:91)
	at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:107)
	at org.codehaus.groovy.reflection.CachedClass$4.initValue(CachedClass.java:131)
	at org.codehaus.groovy.reflection.CachedClass$4.initValue(CachedClass.java:128)
	at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
	at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
	at org.codehaus.groovy.reflection.CachedClass.getCachedSuperClass(CachedClass.java:238)
	at org.codehaus.groovy.reflection.CachedClass$8.initValue(CachedClass.java:204)
	at org.codehaus.groovy.reflection.CachedClass$8.initValue(CachedClass.java:190)
	at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
	at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
	at org.codehaus.groovy.reflection.CachedClass.getInterfaces(CachedClass.java:242)
	at org.codehaus.groovy.reflection.CachedClass.(CachedClass.java:228)
	at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:275)
	at org.codehaus.groovy.reflection.ClassInfo.access$400(ClassInfo.java:37)
	at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:443)
Tomcat 7 is already running with a huge amount of memory: 128 to 1024 Mb max.
Postgres is version 9.3
Java 1.6.45

Any help is higly appreciated :slight_smile:


The error massage:

    Error: java.lang.OutOfMemoryError: PermGen space

means that the memory allocated on Tomcat is not enough.

 

CMDBuild Team

Hi,

I already changed the values from 128(start)-256 Mb(max)   to  512(start)-1024 Mb(max).

I would think for a simple print command that would be more then enough. It doens't help: tomcat goes completely crazy and the app crashes.

 

This turns out to fix it:

use tomcat7w.exe and add to the Java options:
-XX:MaxPermSize=4096m

also set the initial and maximum meory size to 4096. A bit over the top, but it works

 

 

The suggested values for a normal installation are:  -XX:MaxPermSize=256M -XX:PermSize=512M

I suppose you were changing the Xms/Xmx values, that are used for the java.lang.OutOfMemoryError: Java heap space exception.

Best regards
CMDbuild Team
1 Like