Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8201993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:00:35+00:00 2026-06-07T07:00:35+00:00

I have Jasper Server 4.5.0 64-bit running on Linux. One of the many data

  • 0

I have Jasper Server 4.5.0 64-bit running on Linux.

One of the many data sources the Jasper Server plugs into is a SQL Server with no Local SQL authentication parameters available.

How can I connect to the database using an Active Directory account instead of a local SQL account?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:00:36+00:00Added an answer on June 7, 2026 at 7:00 am

    Assumptions: REMOTE_IP is the ip address sql server is bound to port 1433 listening for tcp/ip traffic. And database name is jasper.

    Instead of using the plain ole sqljdbc.jar driver to connect to SQL Server, we will utilize a product called jTDS to connect to the SQL Server. This is because it allows JDBC to connect to SQL server using Windows Authentication mode instead of SQL mode.

    Steps:

    1) Install jasper server 4.5.x

    2) Get jTDS 1.2.5 (or whatever is latest should work).

    You may have noticed that there are a few DLLs in that jTDS package. Don’t worry! The driver still works in Linux. You just cannot do single-sign on in Linux of course like Windows can.

    Extract jtds-*.jar to $jasperserver/apache-tomcat/lib

    3) Edit $jasperserver/apache-tomcat/conf/Catalina/localhost/jasperserver.xml and add the following element before </Context>

    <Resource name="jdbc/sqlserver"
                 auth="Container"
                 type="javax.sql.DataSource"
                 driverClassName="net.sourceforge.jtds.jdbc.Driver"
                 url="jdbc:jtds:sqlserver://REMOTE_HOST:1433;DatabaseName=jasper;useCursors=false;domain=COM;username=Administrator;password=XXXXXXX;user=Administrator"
                 user="Administrator"
                 password="XXXXXXX"
                 maxActive="20"
                 maxIdle="20"
                 maxWait="60000"
                 removeAbandoned="true"
                 logAbandoned="true"         
                 removeAbandonedTimeout="300"
                 validationQuery="SELECT 1"/>
    

    4) Edit $jasperserver/apache-tomcat/webapps/jasperserver/WEB-INF/web.xml and add a new <resource-ref> for the new datasource:

       <resource-ref>
         <description>Connection Description</description>
         <res-ref-name>jdbc/sqlserver</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
    

    5) Create a new database name “jasper” and grant read* permissions to the Active Directory account you desire to use.

    6) Run this script for test purposes:

    create table test (test varchar(50) NULL) 
    insert into test values ('1')
    insert into test values ('2')
    insert into test values ('3')
    

    7) Create a new JSP file $jasperserver/apache-tomcat/webapps/jasperserver/test.jsp

    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    
    <sql:query var="rs" dataSource="jdbc/sqlserver">
      select test from test
    </sql:query>
    
    <html>
      <head>
        <title>DB Test</title>
      </head>
      <body>
        <h2>Results</h2>
    
        <c:forEach var="i" items="${rs.rows}">
          Text Message: <c:out value="${i.test}"/><br>
        </c:forEach>
      </body>
    </html>
    

    8) Start jasperserver’s tomcat. Login, and test http://localhost:8080/jasperserver/test.jsp

    You should see the rows 1, 2 and 3 from the test table.

    If it doesn’t work… review the previous steps and see what went wrong.

    9) Simply create a jasper server JNDI datasource by going to: Datasources -> New Data source -> Type: JNDI data source. -> JNDI lookup is: /jdbc/sqlserver

    Create your tables and test your report.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple jasper report which shows some data from database. The jasper
I have installed a new tomcat server (5.5) and I get this exception: org.apache.jasper.JasperException:
I have created a JSP test framework but running into this issue if I
I have the following exception at the time of running JSF program. org.apache.jasper.JasperException: An
I have created jrxml file and deployed it on jasper server. It provides its
I am new to Jasper Reports. I have included many jars with jasperreports-4.5.1 but
I have a Hibernate POJO with 1.an one-to-one association to another object 2.one-to-many association(collection)
I have created a jasper report. In that report in detail areaI have serialNumber
I have this problem having to display my jasper report on my grails application.
I am using Jasper Report 4.5 My problem is I have list of employees

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.