OSBI.FR - Open Source Business Intelligence

Colonnes dynamiques dans un Table Component (Pentaho CDE)

Voici un nouvel article pour répondre à l’interrogation d’un client à la question suivante :

« Comment afficher dynamiquement les colonnes d’un tableau CTools ? »

Réponse : en utilisant Kettle (encore lui..) comme source de données à votre tableau !

Introduction

Et oui, si on utilise une source de données de type SQL dans un Table Component d’un Dashboard Pentaho CTools, la seule chose qu’on peut rendre paramétrable dans le tableau, ce sont les enregistrements renvoyés via un(des) filtre(s) de la clause WHERE SQL.

Pour plus de détail, se référer à cette question dans  l’article Requêtage dynamique SQL dans Pentaho CDE.

J’étends aujourd’hui le sujet pour permettre au tableau d’afficher autant de colonnes que souhaitées :

  • soit via une sélection côté utilisateur (cf la vidéo ci-dessous)
  • soit via une gestion automatisée, par exemple une construction dynamique du tableau en fonction de « champs flexibles » stockés dans une base de données (c’est le cas de mon client)

Mise en œuvre

1/ Tout d’abord, vous devez créer une transformation Kettle permettant de générer dynamiquement les colonnes à retourner via une étape « Extraction depuis table ». Ces colonnes seront stockées dans un paramètre (selected_fields) qu’on n’oubliera pas de déclarer comme paramètre de la transformation :

2/ Ensuite, vous devez importer cette transformation PDI sur votre Pentaho BI Server en tant que « datasource Kettle » et déclarer que celle-ci prend comme paramètre « selected_fields ». On aura bien sûr créé au préalable un paramètre global « selected_fields » (composant « Simple Parameter »)

On déclare ensuite la transformation comme source de données du tableau, sur lequel on active un Listener sur « selected_fields » :

3/ Il vous reste ensuite à rendre votre tableau (enfin les colonnes du tableau) paramétrables, par exemple sur un Select Component :

4/ Puis enfin afin que tout fonctionne correctement, il faut placer la fonction ci-dessous dans la méthode Pre-Execution du Table Component (sinon celui-ci ne sera pas capable de reconstruire dynamiquement les colonnes de votre tableau) :

 function() { 
   this.chartDefinition.colHeaders = []; 
   this.chartDefinition.colTypes = []; 
   this.chartDefinition.colFormats = []; 
 }

Une fois tout cela effectué vous obtiendrez le résultat souhaité !

Téléchargement

Vous pouvez télécharger l’exemple présenté et l’importer sur votre serveur Pentaho (version 6 minimum). Nota : Les données présentées reposent sur la base de données interne SampleData.

A bientôt pour un article sur une autre utilisation de PDI comme source de données dans un dashboard CTools 😉

17 Comments

  1. JE te remercie pour ce magnifique travail , merci beaucoup , J’ai un problème concernant Kettle query l’heure de l’exécution !! le server m’affiche des erreurs comme suit :
    javax.ws.rs.WebApplicationException: pt.webdetails.cda.dataaccess.QueryException: Cannot find the specified transformation step output
    at pt.webdetails.cda.CdaUtils.doQuery(CdaUtils.java:185)
    …..
    S’il te plait j’ai besoin d’aide

  2. Bonjour
    L’étape dans votre transformation KETTLE s’appelle-t’elle bien « output » (car c’est ça le pb : « Cannot find the specified transformation step output »)

  3. Hello,

    do you hava any idea how to add a coment in cell of table component ?
    thanks

  4. Hello,
    It requires some specific developments : javascript code to add commentc cell in table component + SQL (or Kettle endpoint) to update database with all comments
    Probably a way to start : BISSOL Table Editor (BI server plugin)

  5. Hey, I’m getting error while uploading the .ktr file in pentaho cde 7.1. The is like this: org.pentaho.platform.plugin.services.importer.PlatformImportException: Could not import: General Error : {0}

    Please, help me.

  6. Hi, have you check config file « importexport.xml » in /pentaho-solutions/system folder ? Ktr and kjb extensions should be present !

  7. OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    27-Aug-2019 09:31:34.176 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.43
    27-Aug-2019 09:31:34.179 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar 28 2017 14:42:59 UTC
    27-Aug-2019 09:31:34.179 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.43.0
    27-Aug-2019 09:31:34.179 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
    27-Aug-2019 09:31:34.179 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.0-157-generic
    27-Aug-2019 09:31:34.179 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
    27-Aug-2019 09:31:34.179 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Private Build
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/pentaho-server/tomcat
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /home/pentaho-server/tomcat
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/pentaho-server/tomcat/conf/logging.properties
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
    27-Aug-2019 09:31:34.180 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx2048m
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=256m
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.rmi.dgc.client.gcInterval=3600000
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.rmi.dgc.server.gcInterval=3600000
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dh2.bindAddress=localhost
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/home/pentaho-server/tomcat/endorsed
    27-Aug-2019 09:31:34.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/pentaho-server/tomcat
    27-Aug-2019 09:31:34.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/home/pentaho-server/tomcat
    27-Aug-2019 09:31:34.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/pentaho-server/tomcat/temp
    27-Aug-2019 09:31:34.182 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
    27-Aug-2019 09:31:34.883 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [« http-nio-8081 »]
    27-Aug-2019 09:31:34.913 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler [« http-nio-8081 »]
    java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:350)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:810)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:476)
    at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:871)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)

    27-Aug-2019 09:31:34.916 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8081]]
    org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8081]]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:871)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
    Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    … 12 more
    Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:350)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:810)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:476)
    at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
    … 13 more

    27-Aug-2019 09:31:34.917 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [« ajp-nio-8009 »]
    27-Aug-2019 09:31:34.919 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler [« ajp-nio-8009 »]
    java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:350)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:810)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:476)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:871)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)

    27-Aug-2019 09:31:34.920 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[AJP/1.3-8009]]
    org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:871)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
    Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    … 12 more
    Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:350)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:810)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:476)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
    … 13 more

    27-Aug-2019 09:31:34.921 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2731 ms
    27-Aug-2019 09:31:34.958 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
    27-Aug-2019 09:31:34.958 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.43
    27-Aug-2019 09:31:34.981 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/pentaho-server/tomcat/webapps/ROOT
    27-Aug-2019 09:31:42.464 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    27-Aug-2019 09:31:42.632 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/pentaho-server/tomcat/webapps/ROOT has finished in 7,645 ms
    27-Aug-2019 09:31:42.632 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/pentaho-server/tomcat/webapps/sw-style
    27-Aug-2019 09:31:43.941 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    27-Aug-2019 09:31:43.945 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/pentaho-server/tomcat/webapps/sw-style has finished in 1,313 ms
    27-Aug-2019 09:31:43.945 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/pentaho-server/tomcat/webapps/pentaho
    27-Aug-2019 09:31:44.014 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property ‘docbase’ to ‘webapps/pentaho/’ did not find a matching property.
    27-Aug-2019 09:32:44.895 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    09:32:52,315 WARN [PentahoSolutionSpringApplicationContext] Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.h2.tools.Server’ defined in file [/home/pentaho-server/pentaho-solutions/system/GettingStartedDB-spring.xml]: Invocation of init method failed; nested exception is org.h2.jdbc.JdbcSQLException: Exception opening port « 9093 » (port may be in use), cause: « java.net.BindException: Address already in use (Bind failed) » [90061-131]
    09:32:52,320 ERROR [ContextLoader] Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.h2.tools.Server’ defined in file [/home/pentaho-server/pentaho-solutions/system/GettingStartedDB-spring.xml]: Invocation of init method failed; nested exception is org.h2.jdbc.JdbcSQLException: Exception opening port « 9093 » (port may be in use), cause: « java.net.BindException: Address already in use (Bind failed) » [90061-131]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: org.h2.jdbc.JdbcSQLException: Exception opening port « 9093 » (port may be in use), cause: « java.net.BindException: Address already in use (Bind failed) » [90061-131]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
    at org.h2.message.DbException.get(DbException.java:156)
    at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:175)
    at org.h2.util.NetUtils.createServerSocket(NetUtils.java:141)
    at org.h2.server.TcpServer.start(TcpServer.java:200)
    at org.h2.tools.Server.start(Server.java:330)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1706)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1645)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    … 25 more
    Caused by: java.net.BindException: Address already in use (Bind failed)
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
    at java.net.ServerSocket.bind(ServerSocket.java:375)
    at java.net.ServerSocket.(ServerSocket.java:237)
    at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:173)
    … 35 more
    27-Aug-2019 09:32:52.367 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
    27-Aug-2019 09:32:52.367 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/pentaho] startup failed due to previous errors
    09:32:55,752 ERROR [Logger] misc-org.pentaho.platform.web.http.context.PentahoSystemReadyListener: Cannot obtain JCR repository. Exiting
    27-Aug-2019 09:32:56.326 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [jackrabbit-pool-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    sun.misc.Unsafe.park(Native Method)
    java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
    java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
    java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    java.lang.Thread.run(Thread.java:748)
    27-Aug-2019 09:32:56.327 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.327 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.328 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.333 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.334 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.335 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.337 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-7] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.338 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.338 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-9] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.339 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [DefaultQuartzScheduler_Worker-10] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.lang.Object.wait(Native Method)
    org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:540)
    27-Aug-2019 09:32:56.340 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [jackrabbit-pool-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    sun.misc.Unsafe.park(Native Method)
    java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1088)
    java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
    java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    java.lang.Thread.run(Thread.java:748)
    27-Aug-2019 09:32:56.340 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [pentaho] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
    java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
    java.net.InetAddress.getLocalHost(InetAddress.java:1501)
    org.quartz.utils.UpdateChecker.getClientId(UpdateChecker.java:150)
    org.quartz.utils.UpdateChecker.buildParamsString(UpdateChecker.java:121)
    org.quartz.utils.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:115)
    org.quartz.utils.UpdateChecker.doCheck(UpdateChecker.java:57)
    org.quartz.utils.UpdateChecker.checkForUpdate(UpdateChecker.java:48)
    org.quartz.utils.UpdateChecker.run(UpdateChecker.java:39)
    java.util.TimerThread.mainLoop(Timer.java:555)
    java.util.TimerThread.run(Timer.java:505)
    27-Aug-2019 09:32:56.580 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/pentaho-server/tomcat/webapps/pentaho has finished in 72,634 ms
    27-Aug-2019 09:32:56.581 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/pentaho-server/tomcat/webapps/pentaho-style
    27-Aug-2019 09:32:56.920 INFO [Timer-0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.net.URLEncoder]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
    java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.net.URLEncoder]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
    at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1353)
    at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1341)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1206)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    at org.quartz.utils.UpdateChecker.urlEncode(UpdateChecker.java:157)
    at org.quartz.utils.UpdateChecker.buildParamsString(UpdateChecker.java:123)
    at org.quartz.utils.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:115)
    at org.quartz.utils.UpdateChecker.doCheck(UpdateChecker.java:57)
    at org.quartz.utils.UpdateChecker.checkForUpdate(UpdateChecker.java:48)
    at org.quartz.utils.UpdateChecker.run(UpdateChecker.java:39)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

    27-Aug-2019 09:32:58.800 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    27-Aug-2019 09:32:58.803 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/pentaho-server/tomcat/webapps/pentaho-style has finished in 2,223 ms
    27-Aug-2019 09:32:58.823 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 83902 ms
    27-Aug-2019 09:32:58.824 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8006]:
    java.net.BindException: Address already in use (Bind failed)
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
    at java.net.ServerSocket.bind(ServerSocket.java:375)
    at java.net.ServerSocket.(ServerSocket.java:237)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:438)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:717)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:663)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

    27-Aug-2019 09:32:58.824 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [« http-nio-8081 »]
    27-Aug-2019 09:32:58.825 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [« ajp-nio-8009 »]
    27-Aug-2019 09:32:58.825 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
    27-Aug-2019 09:32:58.975 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler [« http-nio-8081 »]
    27-Aug-2019 09:32:58.976 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [« http-nio-8081 »]
    27-Aug-2019 09:32:58.977 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler [« ajp-nio-8009 »]
    27-Aug-2019 09:32:58.978 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [« ajp-nio-8009 »]

  8. Bonjour. 2 instances de pentaho tournent en parallèle, c’est sans doute la cause du pb.
    « Caused by: java.net.BindException: Address already in use »

    Il faut tuer TOUS les process pentaho existants puis faire un start-pentaho.sh

  9. Hey, please can you tell me how to kill the existing process. I’m using ubuntu 16.04.

  10. In command line : ps -ef | grep pentaho

    Return all pentaho process id : [12345] & [54321] for example.

    Then :
    kill -9 12345
    kill -9 54321

    Must be done for all process id you’ll find for pentaho server instance.

    Then start properly pentaho server : start-pentaho.sh

  11. Hello Sir, Thank you for your response. That error is solved. But still whenever i upload .ktr file it shows error.

  12. I just think ktr transformation in the sample package is no more compatible with pentaho 7.1. Will try to fix this as soon as possible ! All the best

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée.


*