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

Export jasper Report hits java.lang.IllegalArgumentException: Could not resolve placeholder


harleen.kaur

Recommended Posts


Hi,

 

I have encrypted the db password in default.master properties file.

 

and added standalone.xml with following:

 

<security-domain name="EncryptedPassword" cache-type="default">
<authentication>
<login-module code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required">
<module-option name="username" value="XXXXXX"/>
<module-option name="password" value="*******"/>
<module-option name="managedConnectionFactoryName" value="jboss.jca:name=java:/jdbc/jasperserver,service=LocalTxCM"/>
</login-module>
</authentication>
</security-domain>

And updated the *-ds.xml with <security-domain>EncryptedPassword</security-domain>

It works fine untill I try to export the jasper reports.

command used :

js-export --everything --output-dir myExport

Error:

C:Jasperjasperreports-server-6.1.0-binbuildomatic>js-export --everything --ou
tput-dir myExport
First resource path:C:Jasperjasperreports-server-6.1.0-binbuildomaticconf_so
urceieProapplicationContext-adhoc-dataStrategy.xml
Started to load resources
Resource name: applicationContext.xml
Resource name: applicationContext-adhoc.xml
Resource name: applicationContext-adhoc-dataStrategy.xml
Resource name: applicationContext-adhoc-repository.xml
Resource name: applicationContext-audit.xml
Resource name: applicationContext-cascade.xml
Resource name: applicationContext-cascading-pro.xml
Resource name: applicationContext-catFactory.xml
Resource name: applicationContext-data-snapshots.xml
Resource name: applicationContext-datarator.xml
Resource name: applicationContext-diagnosticCollectors-pro.xml
Resource name: applicationContext-el.xml
Resource name: applicationContext-events-logging.xml
Resource name: applicationContext-export-config.xml
Resource name: applicationContext-export-import.xml
Resource name: applicationContext-export-import-audit.xml
Resource name: applicationContext-export-import-multi-tenancy.xml
Resource name: applicationContext-export-import-pro.xml
Resource name: applicationContext-export-import-report-options.xml
Resource name: applicationContext-logging.xml
Resource name: applicationContext-messages-pro.xml
Resource name: applicationContext-multiTenancy.xml
Resource name: applicationContext-multiTenancy-security.xml
Resource name: applicationContext-olap-connection.xml
Resource name: applicationContext-profiling.xml
Resource name: applicationContext-propertyChangers.xml
Resource name: applicationContext-propertySettings.xml
Resource name: applicationContext-report-options.xml
Resource name: applicationContext-report-scheduling.xml
Resource name: applicationContext-search.xml
Resource name: applicationContext-search-pro.xml
Resource name: applicationContext-security.xml
Resource name: applicationContext-semanticLayer.xml
Resource name: applicationContext-themes.xml
Resource name: applicationContext-themes-pro.xml
Resource name: applicationContext-virtual-data-source.xml
Resource name: applicationContext-virtual-data-source-query-service.xml
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean def
inition with name 'dataSource' defined in file [C:Jasperjasperreports-server-6
.1.0-binbuildomaticconf_sourceieProapplicationContext-export-config.xml]: Co
uld not resolve placeholder 'dbUsername' in string value "${dbUsername}"; nested
 exception is java.lang.IllegalArgumentException: Could not resolve placeholder
'dbUsername' in string value "${dbUsername}"
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean def
inition with name 'dataSource' defined in file [C:Jasperjasperreports-server-6
.1.0-binbuildomaticconf_sourceieProapplicationContext-export-config.xml]: Co
uld not resolve placeholder 'dbUsername' in string value "${dbUsername}"; nested
 exception is java.lang.IllegalArgumentException: Could not resolve placeholder
'dbUsername' in string value "${dbUsername}"
        at org.springframework.beans.factory.config.PlaceholderConfigurerSupport
.doProcessProperties(PlaceholderConfigurerSupport.java:209)
        at org.springframework.beans.factory.config.PropertyPlaceholderConfigure
r.processProperties(PropertyPlaceholderConfigurer.java:223)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.p
ostProcessBeanFactory(PropertyResourceConfigurer.java:84)
        at org.springframework.context.support.AbstractApplicationContext.invoke
BeanFactoryPostProcessors(AbstractApplicationContext.java:694)
        at org.springframework.context.support.AbstractApplicationContext.invoke
BeanFactoryPostProcessors(AbstractApplicationContext.java:669)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:461)
        at com.jaspersoft.jasperserver.export.BaseExportImportCommand.createSpri
ngContext(BaseExportImportCommand.java:129)
        at com.jaspersoft.jasperserver.export.BaseExportImportCommand.process(Ba
seExportImportCommand.java:82)
        at com.jaspersoft.jasperserver.export.ExportCommand.main(ExportCommand.j
ava:43)
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'db
Username' in string value "${dbUsername}"
        at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(P
ropertyPlaceholderHelper.java:173)
        at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(P
ropertyPlaceholderHelper.java:161)
        at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholder
s(PropertyPlaceholderHelper.java:125)
        at org.springframework.beans.factory.config.PropertyPlaceholderConfigure
r$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholder
Configurer.java:258)
        at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolv
eStringValue(BeanDefinitionVisitor.java:282)
        at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolv
eValue(BeanDefinitionVisitor.java:204)
        at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitP
ropertyValues(BeanDefinitionVisitor.java:141)
        at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitB
eanDefinition(BeanDefinitionVisitor.java:82)
        at org.springframework.beans.factory.config.PlaceholderConfigurerSupport
.doProcessProperties(PlaceholderConfigurerSupport.java:206)
        ... 8 more

 

My Server  jasper server 6.1.0 is running on Jboss-eap-6.4 WAR file distribution. 

I have followed the following link to encrypt password.

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/5/html/Security_Guide/Encrypting_Data_Source_Passwords.html

http://docs.jboss.org/jbosssecurity/docs/6.0/security_guide/html/Encrypting_Data_Source_Passwords.html

Its quite urgent as I am close to prod deployment date and this is a showstopper for me.

Thanks so much for help.

 

Regards,

Harleen

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...