在 JasperReports Server 中安装 Webservice 数据源
Install Webservice Datasource in JasperReports Server
我实际上是JasperReports Server的新手,我需要安装WebService数据源,我知道我应该添加一些已经下载到JRS安装文件夹中的WEB-INF文件夹中的文件,但我不知道哪个文件夹因为有很多命名为WEB-INF.
请告诉我您是否有任何想法。
提前致谢。
编辑------
复制文件后,出现以下异常:
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)
编辑----------------
我遇到了以下异常:
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)
提前致谢。
我想你已经看到了 the docs:
The unzipped folder will be referenced as [WS_DS_DIR] from now on.
Install in JasperReports Server
Localize your JasperReports Server (JRS) web application folder. We'll reference it as [JRS_DIR] from now on
Open the folder [WS_DS_DIR]\JRS\WEB-INF
Copy all the folder's content
Stop your web server running JRS
Open the folder [JRS_DIR]\WEB-INF
Backup this folder before executing next step!
paste the previously copied files. Please note that it is not supposed to override any existing file.
Start your web server running JRS
您的 Web 应用程序文件夹是服务器应用程序部署到的文件夹。所以在例如Linux 和 Tomcat 这可能看起来像:
/opt/jasperreports/apache-tomcat/webapps/jasperserver
相对于该路径,您必须按照说明进行操作。这意味着以下路径将是您要查找的路径:
/opt/jasperreports/apache-tomcat/webapps/jasperserver/WEB-INF
如果您的配置不同,请务必特别执行第 6 步。
编辑
根据堆栈跟踪,另一个名为 com.tonbeller.tbutils.res
的组件似乎有问题。其他人也有 this problem:
Try adding a file named resfactory.properties under WEB-INF/classes containing the following line:
tbeller.usejndi=false
然后再次检查日志,错误应该消失了。
** 编辑 **
假设您使用的是 Jasper Server v6.2 的社区版,社区版与数据源之间似乎存在不兼容问题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.
很遗憾,数据源似乎与您的 Jasper Report Server 版本不兼容,无法使用。您的安装看起来不错。
我实际上是JasperReports Server的新手,我需要安装WebService数据源,我知道我应该添加一些已经下载到JRS安装文件夹中的WEB-INF文件夹中的文件,但我不知道哪个文件夹因为有很多命名为WEB-INF.
请告诉我您是否有任何想法。
提前致谢。
编辑------
复制文件后,出现以下异常:
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)
编辑----------------
我遇到了以下异常:
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)
提前致谢。
我想你已经看到了 the docs:
The unzipped folder will be referenced as [WS_DS_DIR] from now on.
Install in JasperReports Server
Localize your JasperReports Server (JRS) web application folder. We'll reference it as [JRS_DIR] from now on
Open the folder [WS_DS_DIR]\JRS\WEB-INF
Copy all the folder's content
Stop your web server running JRS
Open the folder [JRS_DIR]\WEB-INF
Backup this folder before executing next step!
paste the previously copied files. Please note that it is not supposed to override any existing file.
Start your web server running JRS
您的 Web 应用程序文件夹是服务器应用程序部署到的文件夹。所以在例如Linux 和 Tomcat 这可能看起来像:
/opt/jasperreports/apache-tomcat/webapps/jasperserver
相对于该路径,您必须按照说明进行操作。这意味着以下路径将是您要查找的路径:
/opt/jasperreports/apache-tomcat/webapps/jasperserver/WEB-INF
如果您的配置不同,请务必特别执行第 6 步。
编辑
根据堆栈跟踪,另一个名为 com.tonbeller.tbutils.res
的组件似乎有问题。其他人也有 this problem:
Try adding a file named resfactory.properties under WEB-INF/classes containing the following line:
tbeller.usejndi=false
然后再次检查日志,错误应该消失了。
** 编辑 **
假设您使用的是 Jasper Server v6.2 的社区版,社区版与数据源之间似乎存在不兼容问题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.
很遗憾,数据源似乎与您的 Jasper Report Server 版本不兼容,无法使用。您的安装看起来不错。