java - Why XMLBeanDeclaration returning null object after passing xml file? -


isreportmain(xmlconfiguration config) {     this.config = config; }  public static void main(string[] args) {     string configfile = args[0];     xmlconfiguration config = new xmlconfiguration();     try {         config.load(configfile);         isreportmain report = new isreportmain(config);         report.run();     } catch (exception ex) {         logger.error("report failed run", ex);     } }  private void run() throws exception {     connection connection = null;     resultset results = null;     xmlbeandeclaration decl = new xmlbeandeclaration(config, "datasource");     datasource datasource = (datasource) beanhelper.createbean(decl);     ....     .... } 

in above code pass physical path of xml file in run configuration. xml file contains database connection details.

but on 'xmlbeandeclaration decl' initialization returns null object, results in susequent intializations fail.

edit:

as argument i'm passing : c:\users\dev\workspace\reporting\conf\integration\subscribers.xml

stacktrace:

currently doesnt throw exception, instead sets 'decl' null object , further dataconnection throws exception because of decl null value.

value of decl after line - xmlbeandeclaration decl = new xmlbeandeclaration(config, "datasource");

any idea how can solve issue?


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -