Jump to content
We've recently updated our Privacy Statement, available here ×

ralphskie

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by ralphskie

  1. Hi Hozawa

    here's the log

    ERROR CsrfGuard,http-apr-8080-exec-3:44 - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:127.0.0.1, method:POST, uri:/jasperserver/rest/login, error:required token is missing from the request)[/code]
     
    2017-01-06 16:40:50,877 ERROR CsrfGuard,http-apr-8080-exec-5:44 - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:127.0.0.1, method:POST, uri:/jasperserver/rest/login/, error:required token is missing from the request)[/code]
     
     
    Token is required?where should i get the token? or set it on the server?
    PS - notice the ending slash on the 2nd URI
  2. Thanks for linking it @hozawa manage to solve it with their answers there.

    Anyways will share what i have done so maybe it can help someone here.

    1.Need to configure META-INF/context.xml (located on JRSERVER_install_path/apache-tomcat/webapps/jasperserver)

    <Resource name="jdbc/Sqlite" 
                auth="Container" 
                type="javax.sql.DataSource" 
                driverClassName="org.sqlite.JDBC"
                url="jdbc:sqlite:/${catalina.home}/dbs/Application.db"
                factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory">
    </Resource>
     
    name= any name you want
    url =  the location of your database file - I copied my on the installation folder but no problems where you want to put it
    factory = org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory ----> for tomcat 8,if you have lower version kindly search for it
     
    2. Edit WEB-INF/web.xml (located on JRSERVER_install_path/apache-tomcat/webapps/jasperserver)
    <resource-ref>
            <description>Reviews Database</description>
            <res-ref-name>jdbc/Sqlite</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
    </resource-ref>
     
    3. Make a new datasource in JRServer
        Use JNDI Datasource
        Service name = jdbc/Sqlite or whatever you put on step 1 NAME
     
    Test it,Thats all http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/thumbs_up.gif

     

  3. Hello been exploring the JasperReports for a day now and its a great reporting tool.

    Ive succesfully installed the JRServer and JR Studio, been testing the MySQL database with JDBC Driver with good results both on JRServer & JR Studio.

    But now i want to test a datasource for SQLite, Downloaded a JDBC Driver here (https://github.com/xerial/sqlite-jdbc) and installed it on tomcat/lib.

    The problem is after testing the JRServer prompts a "Cannot get a connection, pool error" - please see attached image

    2017-01-0516_18_18-TIBCOJaspersoft_NewDataSource(1).png.ee47f07de4a09bb9e63021ee24ead65f.png

    Do you have any idea what this error is about?or suggestion for a good/working JDBC Driver for SQLite

     

    ps : I've tested this driver on JR Studio and it works well,did generate a report but once transfered to JRServer it wont and error still the same.

     

×
×
  • Create New...