spring confiration error whie js_import.sh

1

1.Spring configuration files       2.All of the JasperServer jar files and JDB drivers                                                        in sping configuration we have to chane scripts/config/applicationContext-*.xml . but we dont hava any clear decription about what are the changes to be made.   i got the below exception while executing  .js-import.sh

 

error is:

./js-import.sh supermart_reports.zip
19:51:10,510 ERROR BaseExportImportCommand:45 - org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from class path resource [supermart_reports.zip] is invalid; nested exception is org.xml.sax.SAXParseException: Content is not allowed in prolog.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from class path resource [supermart_reports.zip] is invalid; nested exception is org.xml.sax.SAXParseException: Content is not allowed in prolog.
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:340)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317)
        at com.jaspersoft.jasperserver.export.BaseExportImportCommand.registerConfig(BaseExportImportCommand.java:143)
        at com.jaspersoft.jasperserver.export.BaseExportImportCommand.createSpringContext(BaseExportImportCommand.java:115)
        at com.jaspersoft.jasperserver.export.BaseExportImportCommand.process(BaseExportImportCommand.java:76)
        at com.jaspersoft.jasperserver.export.ImportCommand.main(ImportCommand.java:43)
.

 

 

i had a proble while  setting configuration for sample reports  for inforbright database.

i had proble with 2 configurations in jasperserverCommunity additon install guide chapter 10 .

 

2. inthis  i didnt find the below  sturcure in my  jasper server

<js-install>/scripts/lib

Drivers can be found here:

<js-install>/scripts/drivers

<js-install>/buildomatic/conf_source/db/<db-type>/jdbc

 

 

raja_2035's picture
Joined: Jun 24 2009 - 9:12am
Last seen: 12 years 7 months ago

3 Answers:

0

The import command should be like the following:

 

./js-import.sh --input-zip supermart_reports.zip

 

Regarding the second question:

<js-install>/scripts/lib

Drivers can be found here:

<js-install>/scripts/drivers

<js-install>/buildomatic/conf_source/db/<db-type>/jdbc

 

If you did your original installation from the installer, then there will be no "buildomatic" directory. Planning to add for the next release so that everything is consistent.

However, if you are using mysql or postgresql then there are already jdbc drivers in the scripts/lib dir.

 

tkavanagh's picture
4962
Joined: Jul 7 2006 - 8:54am
Last seen: 7 years 4 months ago
0
Thank you Tkavanagh for quick reply. but this problem is still existing even i am using ./js-import.sh --input-zip supermart_reports.zip can u please tell me what are the configuration changes need done for theese file. scripts/config/applicationContext-*.xml . In insatallation guide we have a note that we need to change these files. but we dont hava any clear decription about what are the changes to be made. regards Raja k
raja_2035's picture
Joined: Jun 24 2009 - 9:12am
Last seen: 12 years 7 months ago
0

Are you using the infobright database? You will need to track down the settings for the jdbc parameters, such as uri. This is found in the scripts/config/js.jdbc.properties file. Here is what it looks like for MySQL:

 

    metadata.jdbc.driverClassName=com.mysql.jdbc.Driver
    metadata.jdbc.url=jdbc:mysql://localhost:3306/jasperserver?useUnicode=true&characterEncoding=UTF-8
    metadata.jdbc.username=jasperdb
    metadata.jdbc.password=password
 

You will need to find the propert hibernate setting which is also in the same file:

 

    metadata.hibernate.dialect= <setting for infobright>

 

And you need to make sure your jdbc driver is in the scripts/lib dir.

 

The only file you need to change is js.jdbc.properties. You do not need to change any of the ApplicationContext-*.xml files.

Also, what App Server are you running?

tkavanagh's picture
4962
Joined: Jul 7 2006 - 8:54am
Last seen: 7 years 4 months ago
Feedback
randomness