How to publish data source on new Jaspersoft Server install

0

I have recently installed Jaspersoft Server community on a windows box with vanilla defaults for a small project I'm doing.

From Jaspersoft studio I can created data adapters (SQL server on port 1433) and run reports.

From Jaspersoft studio I can open the new JaserReports server, but I am unable to create a new Data Source.

 

I can import the working Data Adapters from the local install of Studio but when I try to save them I get an exception.  The Reason is blank.

Maybe there is no SQL Server driver on a clean install of Jaspersoft server.

Can anyone point me in the right direction on how to setup Data Sources on a server?

 

 

org.apache.http.client.HttpResponseException: 

    at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleException(RESTv2ExceptionHandler.java:80)
    at com.jaspersoft.studio.server.protocol.restv2.ARestV2ConnectionJersey.toObj(ARestV2ConnectionJersey.java:47)
    at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.addOrModifyResource(RestV2ConnectionJersey.java:568)
    at com.jaspersoft.studio.server.protocol.ProxyConnection.addOrModifyResource(ProxyConnection.java:332)
    at com.jaspersoft.studio.server.WSClientHelper.saveResource(WSClientHelper.java:307)
    at com.jaspersoft.studio.server.WSClientHelper.saveResource(WSClientHelper.java:264)
    at com.jaspersoft.studio.server.wizard.resource.ResourceWizard$1.run(ResourceWizard.java:86)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:980)
    at com.jaspersoft.studio.server.wizard.resource.ResourceWizard.performFinish(ResourceWizard.java:78)
    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:778)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:417)
    at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
    at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
    at org.eclipse.jface.window.Window.open(Window.java:794)
    at com.jaspersoft.studio.server.action.resource.PropertiesAction.run(PropertiesAction.java:76)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
    at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at com.jaspersoft.studio.rcp.intro.Application.start(Application.java:91)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
 

danoldenkamp@gmail.com's picture
Joined: Aug 29 2018 - 11:12am
Last seen: 10 hours 24 min ago

Thank you so much JosenG.

Yes when looked at the datasources through the Jasper server I saw the driver wasn't installed.

This article set me in the right direction and it is working now:

https://community.jaspersoft.com/wiki/downloading-and-installing-database-drivers

Thank you!

danoldenkamp@gmail.com - 1 month 5 days ago

Actually the Datasource doesn't work when running reports on the server.

I can copy the datasource from the server and the datasource loses the password.  When I enter the password the data source will work on studio, but reports that are run from the web do not run.

Error Message

There was an error on the server. Try again or contact site administrators.

2019-09-12 10:29:50,792 ERROR JRFillSubreport,pool-4-thread-10:948 - Fill 1: exception
com.jaspersoft.jasperserver.api.JSSecurityException: An error has occurred. Please contact your system administrator. (6632)
Arguments: 
    at com.jaspersoft.jasperserver.api.security.validators.Validator.newSecurityException(Validator.java:553)
    at com.jaspersoft.jasperserver.api.security.validators.Validator.validateSQL(Validator.java:542)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:143)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1257)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:726)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:457)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:578)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:814)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
    at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
    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)
2019-09-12 10:29:50,793 ERROR AsyncJasperPrintAccessor,pool-4-thread-10:321 - Error during report execution
com.jaspersoft.jasperserver.api.JSSecurityException: An error has occurred. Please contact your system administrator. (6632)
Arguments: 
    at com.jaspersoft.jasperserver.api.security.validators.Validator.newSecurityException(Validator.java:553)
    at com.jaspersoft.jasperserver.api.security.validators.Validator.validateSQL(Validator.java:542)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:143)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1257)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:726)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:457)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:578)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:814)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
    at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
    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)
2019-09-12 10:29:50,799 ERROR SecureExceptionHandlerImpl,http-nio-8080-exec-5:116 - There was an error on the server. Try again or contact site administrators. (Error UID: bbf98340-202a-44ca-83ad-7be4161e0489)
2019-09-12 10:29:50,800 ERROR ErrorPageHandlerAction,http-nio-8080-exec-5:118 - Error UID bbf98340-202a-44ca-83ad-7be4161e0489
com.jaspersoft.jasperserver.api.JSSecurityException: An error has occurred. Please contact your system administrator. (6632)
Arguments: 
    at com.jaspersoft.jasperserver.api.security.validators.Validator.newSecurityException(Validator.java:553)
    at com.jaspersoft.jasperserver.api.security.validators.Validator.validateSQL(Validator.java:542)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:143)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1257)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:726)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:457)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:578)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:814)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
    at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
    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)
2019-09-12 10:32:55,200 ERROR JRFillSubreport,pool-4-thread-11:948 - Fill 1: exception
com.jaspersoft.jasperserver.api.JSSecurityException: An error has occurred. Please contact your system administrator. (6632)
Arguments: 
    at com.jaspersoft.jasperserver.api.security.validators.Validator.newSecurityException(Validator.java:553)
    at com.jaspersoft.jasperserver.api.security.validators.Validator.validateSQL(Validator.java:542)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:143)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1257)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:726)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:457)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:578)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:814)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
    at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
    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)
2019-09-12 10:32:55,202 ERROR AsyncJasperPrintAccessor,pool-4-thread-11:321 - Error during report execution
com.jaspersoft.jasperserver.api.JSSecurityException: An error has occurred. Please contact your system administrator. (6632)
Arguments: 
    at com.jaspersoft.jasperserver.api.security.validators.Validator.newSecurityException(Validator.java:553)
    at com.jaspersoft.jasperserver.api.security.validators.Validator.validateSQL(Validator.java:542)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:143)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1257)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:726)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:457)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:578)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:814)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
    at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
    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)
2019-09-12 10:32:55,207 ERROR SecureExceptionHandlerImpl,http-nio-8080-exec-3:116 - There was an error on the server. Try again or contact site administrators. (Error UID: b21fe327-04e9-4033-9e01-abff0cef5609)
2019-09-12 10:32:55,208 ERROR ErrorPageHandlerAction,http-nio-8080-exec-3:118 - Error UID b21fe327-04e9-4033-9e01-abff0cef5609
com.jaspersoft.jasperserver.api.JSSecurityException: An error has occurred. Please contact your system administrator. (6632)
Arguments: 
    at com.jaspersoft.jasperserver.api.security.validators.Validator.newSecurityException(Validator.java:553)
    at com.jaspersoft.jasperserver.api.security.validators.Validator.validateSQL(Validator.java:542)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:143)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1257)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:726)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:457)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:578)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:814)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
    at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
    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)
 

danoldenkamp@gmail.com - 1 month 5 days ago

I have removed the driver and re-added the driver. Rebooted the jasperserver.

Looks like JDBC 6.0 driver instead of 7.4 is the Jaspersoft recommended driver. Although I have tried both.

 sqljdbc_6.0 https://www.microsoft.com/en-us/download/details.aspx?id=11774

with JDBC 6.0 I have tried both jre7 and java runtime 8 drivers.

Any suggestions are greatly appreciated.

danoldenkamp@gmail.com - 1 month 5 days ago

2 Answers:

1

Answered my own question.

 

Watch this video if setting up a new SQL Server connection:

https://community.jaspersoft.com/wiki/connecting-jasper-report-server-ms-sql-server-video-tutorial

Copied the JDBC driver directly onto the tomcat server path and rebooted the server to resolve.

JDBC 6.0 uses the same JDBC 4.1 java libraries.

Copy: sqljdbc41.jar to wherever you Tomcat library files are.

Mine was installed to:

C:\Jaspersoft\jasperreports-server-cp-7.2.0\apache-tomcat\lib

 

danoldenkamp@gmail.com's picture
Joined: Aug 29 2018 - 11:12am
Last seen: 10 hours 24 min ago
1

You want to do it via the jaspestudio only ? 
You can log into the jasperserver via admin and set a new datasource up or you can make use of the jasperserver rest services to register a datasource. 
Most of the time drives are the issues, cause they are not loaded onto jasperserver yet. 
So maybe try to do a manual registeration via admin first, test the conneciton from jasperserver and then just try and recreate new one via jasperstudio. 
Also remember that jasperstudio versions and jasperserver version also play apart. If different libs being used, could also cause an issues.

joseng62's picture
701
Joined: Dec 5 2014 - 2:43am
Last seen: 6 days 15 hours ago
Feedback