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

  • SEARCH
  • Home
  • 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 9089743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:12:52+00:00 2026-06-16T22:12:52+00:00

I have problems getting the xmldatasource sample project running with Jython. This is my

  • 0

I have problems getting the xmldatasource sample project running with Jython.

This is my code:

#!/usr/bin/jython

"""
 - cd buildEnv/xmldatasource; ant javac
 - cd buildEnv/xmldatasource/build/classes; jar -cf xmldatasource.jar XmlDataSourceApp.class
 - copy buildEnv/xmldatasource/build/classes/xmldatasource.jar to deploy/lib/xmldatasource.jar
"""

import os
import sys

cwd = os.path.realpath(".")

sys.path.extend([cwd + '/lib/xmldatasource.jar'])
sys.path.extend([cwd + '/lib/jasperreports-5.0.0.jar'])
sys.path.extend([cwd + '/lib/ant-1.7.1.jar'])
sys.path.extend([cwd + '/lib/antlr-2.7.5.jar'])
sys.path.extend([cwd + '/lib/barbecue-1.5-beta1.jar'])
sys.path.extend([cwd + '/lib/barcode4j-2.1.jar'])
sys.path.extend([cwd + '/lib/batik-anim.jar'])
sys.path.extend([cwd + '/lib/batik-awt-util.jar'])
sys.path.extend([cwd + '/lib/batik-bridge.jar'])
sys.path.extend([cwd + '/lib/batik-css.jar'])
sys.path.extend([cwd + '/lib/batik-dom.jar'])
sys.path.extend([cwd + '/lib/batik-ext.jar'])
sys.path.extend([cwd + '/lib/batik-gvt.jar'])
sys.path.extend([cwd + '/lib/batik-parser.jar'])
sys.path.extend([cwd + '/lib/batik-script.jar'])
sys.path.extend([cwd + '/lib/batik-svg-dom.jar'])
sys.path.extend([cwd + '/lib/batik-svggen.jar'])
sys.path.extend([cwd + '/lib/batik-util.jar'])
sys.path.extend([cwd + '/lib/batik-xml.jar'])
sys.path.extend([cwd + '/lib/bcel-5.2.jar'])
sys.path.extend([cwd + '/lib/bsh-2.0b4.jar'])
sys.path.extend([cwd + '/lib/castor-1.2.jar'])
sys.path.extend([cwd + '/lib/commons-beanutils-1.8.0.jar'])
sys.path.extend([cwd + '/lib/commons-collections-2.1.1.jar'])
sys.path.extend([cwd + '/lib/commons-digester-2.1.jar'])
sys.path.extend([cwd + '/lib/commons-javaflow-20060411.jar'])
sys.path.extend([cwd + '/lib/commons-logging-1.1.1.jar'])
sys.path.extend([cwd + '/lib/dom4j-1.6.1.jar'])
sys.path.extend([cwd + '/lib/groovy-all-2.0.1.jar'])
sys.path.extend([cwd + '/lib/hibernate3.jar'])
sys.path.extend([cwd + '/lib/hsqldb-1.8.0-10.jar'])
sys.path.extend([cwd + '/lib/iText-2.1.7.js1.jar'])
sys.path.extend([cwd + '/lib/jackson-annotations-2.0.5.jar'])
sys.path.extend([cwd + '/lib/jackson-core-2.0.5.jar'])
sys.path.extend([cwd + '/lib/jackson-databind-2.0.5.jar'])
sys.path.extend([cwd + '/lib/jaxen-1.1.1.jar'])
sys.path.extend([cwd + '/lib/jcommon-1.0.15.jar'])
sys.path.extend([cwd + '/lib/jdt-compiler-3.1.1.jar'])
sys.path.extend([cwd + '/lib/jfreechart-1.0.12.jar'])
sys.path.extend([cwd + '/lib/jpa.jar'])
sys.path.extend([cwd + '/lib/jxl-2.6.10.jar'])
sys.path.extend([cwd + '/lib/log4j-1.2.15.jar'])
sys.path.extend([cwd + '/lib/mondrian-3.1.1.12687.jar'])
sys.path.extend([cwd + '/lib/png-encoder-1.5.jar'])
sys.path.extend([cwd + '/lib/poi-3.7-20101029.jar'])
sys.path.extend([cwd + '/lib/poi-ooxml-3.7-20101029.jar'])
sys.path.extend([cwd + '/lib/poi-ooxml-schemas-3.7-20101029.jar'])
sys.path.extend([cwd + '/lib/rhino-1.7R3.jar'])
sys.path.extend([cwd + '/lib/saaj-api-1.3.jar'])
sys.path.extend([cwd + '/lib/serializer.jar'])
sys.path.extend([cwd + '/lib/servlet-api-2.4.jar'])
sys.path.extend([cwd + '/lib/spring-beans-2.5.5.jar'])
sys.path.extend([cwd + '/lib/spring-core-2.5.5.jar'])
sys.path.extend([cwd + '/lib/velocity-1.7-dep.jar'])
sys.path.extend([cwd + '/lib/xalan-2.7.1.jar'])
sys.path.extend([cwd + '/lib/xbean.jar'])
sys.path.extend([cwd + '/lib/xercesImpl-2.9.0.jar'])
sys.path.extend([cwd + '/lib/xml-apis-ext.jar'])
sys.path.extend([cwd + '/lib/xml-apis.jar'])

import XmlDataSourceApp

from java import util
import java.io as javaio 
properties = util.Properties()
propertiesfis =javaio.FileInputStream("jasperreports.properties") 
properties.load(propertiesfis) 

javaObj = XmlDataSourceApp()

javaObj.fill()

As you see, all the dependencies should be load. When i try to call the fill() method, i receive the following error:
l

og4j:WARN No appenders could be found for logger (net.sf.jasperreports.extensions.ExtensionsEnvironment).
log4j:WARN Please initialize the log4j system properly.
Traceback (innermost last):
  File "java.py", line 84, in ?
at net.sf.jasperreports.engine.util.JRQueryExecuterUtils.getExecuterFactory(JRQueryExecuterUtils.java:114)
at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1082)
at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:667)
at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1258)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:877)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:126)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:464)
at net.sf.jasperreports.engine.JasperFillManager.fillToFile(JasperFillManager.java:249)
at net.sf.jasperreports.engine.JasperFillManager.fillToFile(JasperFillManager.java:155)
at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:678)
at XmlDataSourceApp.fill(XmlDataSourceApp.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)

net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRRuntimeException: No query executer factory registered for the 'xPath' language.

I run this code simply with jython java.py.

I think the code isnt work but I dont know how to set the properties correctly. According to the sample project, the property must be set as the following:

net.sf.jasperreports.xpath.executer.factory=net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory

But what if I use Jython?

  • 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-16T22:12:53+00:00Added an answer on June 16, 2026 at 10:12 pm

    I solved the problem of the java properties using PY4J instead of Jython.

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

Sidebar

Related Questions

I'm trying out KO but have problems getting observableArray to work, the code is
I have had a few problems getting this right, so I wanted to ask
i have some problems getting trac to be running with apache. have no idea
I have problems getting data from grails using extjs. My Grails controller code is:
I have problems getting Manipulate to work with code assigned to variables that should
I have this medium-sized query and I am having some problems getting certain fields.
I am having some problems getting this animation to execute. I have a feeling
I have problems getting some of my views aligned in a relative layout that
I have no problems getting the Json to work and parse the json return.
I'm trying to create a SVN Eclipese EFS plugin and have problems when getting

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.