Search code examples
datasourcejasperserver

Install Webservice Datasource in JasperReports Server


I am actually new to JasperReports Server, I need to install the WebService Datasource, I know that I should add some files already downloaded in the folder WEB-INF located in the JRS installation folder, but I don't know which folder since there are many named WEB-INF.

Please, tell me if you have any ideas.

Thanks in advance.

Edit-------

After copying files, I got the following exception:

2016-05-25 11:09:46,143 ERROR JNDIResourceProvider,localhost-startStop-2:75 - error closing context
javax.naming.OperationNotSupportedException: Le Contexte est en lecture seule
    at org.apache.naming.NamingContext.checkWritable(NamingContext.java:960)
    at org.apache.naming.NamingContext.close(NamingContext.java:760)
    at com.tonbeller.tbutils.res.JNDIResourceProvider.close(JNDIResourceProvider.java:72)
    at com.tonbeller.tbutils.res.CompositeResourceProvider.close(CompositeResourceProvider.java:56)
    at com.tonbeller.tbutils.res.ResourcesFactory.initialize(ResourcesFactory.java:163)
    at com.tonbeller.tbutils.res.ResourcesFactory.<init>(ResourcesFactory.java:92)
    at com.tonbeller.tbutils.res.ResourcesFactory.<clinit>(ResourcesFactory.java:89)
    at com.tonbeller.tbutils.res.ResourcesFactoryContextListener.contextInitialized(ResourcesFactoryContextListener.java:23)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1071)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1721)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Edit-----------------

I got thie following exception:

25-May-2016 13:29:56.349 SEVERE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStart Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener
 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'queryLanguagesPro' is defined
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)
    at com.jaspersoft.jasperserver.api.common.util.spring.AbstractBeanPropertyProcessor.postProcessBeanFactory(AbstractBeanPropertyProcessor.java:59)
    at com.jaspersoft.jasperserver.api.common.util.spring.GenericBeanUpdater.postProcessBeanFactory(GenericBeanUpdater.java:78)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:696)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:679)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1071)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1721)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

25-May-2016 13:29:56.469 SEVERE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStart Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) com.jaspersoft.jasperserver.war.util.SpringBeanServletContextPlublisher
 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'queryLanguagesPro' is defined
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)
    at com.jaspersoft.jasperserver.api.common.util.spring.AbstractBeanPropertyProcessor.postProcessBeanFactory(AbstractBeanPropertyProcessor.java:59)
    at com.jaspersoft.jasperserver.api.common.util.spring.GenericBeanUpdater.postProcessBeanFactory(GenericBeanUpdater.java:78)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:696)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:679)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1071)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1721)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Thanks in advance.


Solution

  • I suppose that you have seen the docs:

    The unzipped folder will be referenced as [WS_DS_DIR] from now on.

    Install in JasperReports Server

    1. Localize your JasperReports Server (JRS) web application folder. We'll reference it as [JRS_DIR] from now on

    2. Open the folder [WS_DS_DIR]\JRS\WEB-INF

    3. Copy all the folder's content

    4. Stop your web server running JRS

    5. Open the folder [JRS_DIR]\WEB-INF

    6. Backup this folder before executing next step!

    7. paste the previously copied files. Please note that it is not supposed to override any existing file.

    8. Start your web server running JRS

    Your web application folder is the folder where the server app gets deployed into. So on e.g. Linux and Tomcat this could look like:

    /opt/jasperreports/apache-tomcat/webapps/jasperserver

    Relative to that path you have to follow the instructions. This means the following path would be the one you are looking for:

    /opt/jasperreports/apache-tomcat/webapps/jasperserver/WEB-INF

    Make sure to execute especially step 6 if your configuration is different.

    EDIT

    According to the stack trace, there seems to be a problem with another component called com.tonbeller.tbutils.res. Someone else had this problem, too:

    Try adding a file named resfactory.properties under WEB-INF/classes containing the following line:

    tbeller.usejndi=false

    Then check the logs again, the error should be gone.

    ** EDIT **

    Assuming you are using the community edition of Jasper Server v6.2, there seems to be an incompatibility between the community edition and the data source as seen here:

    I've also got it on 6.2 - changing "queryLanguagesPro" to "queryLanguagesCe" inside the package removes the error and allows starting of the server, and publishing of the report from Studio to Server. However, you get an error when running the report on the server (stack below). This looks like there is a dependency of the Pro fork that is incompatible with the Community version.

    Unfortunately, it seems that the data source is not compatible with your Jasper Report Server version and cannot be used. Your installation seems fine.