-
1. Re: Embedded instance: NullPointerException on load xml configuration
timfox Apr 20, 2010 10:59 AM (in response to dansouza)I answered a post almost identical to this just a few days ago.
-
2. Re: Embedded instance: NullPointerException on load xml configuration
dansouza Apr 20, 2010 11:03 AM (in response to timfox)Hi Tim!
Thanks for you quick answer... I will try to find your explanation.
Regards,
Daniel
-
3. Re: Embedded instance: NullPointerException on load xml configuration
dansouza Apr 20, 2010 11:14 AM (in response to timfox)Hi Tim, could please, post the reference here?
I could not find on the forum...
Thanks in advance!
Daniel
-
4. Re: Embedded instance: NullPointerException on load xml configuration
timfox Apr 20, 2010 3:09 PM (in response to dansouza) -
5. Re: Embedded instance: NullPointerException on load xml configuration
dansouza Apr 20, 2010 3:40 PM (in response to timfox)This JIRA topic in fact is not related with my problem.
Seems that the following code:
configuration.setConfigurationUrl("hornetq-configuration.xml");
configuration.start(); // error apear over here, on start methodIt´s not doing what is supposed to do... To instantiate the configuration from the XML file.
I already test if was something related to classpath and it´s not...
I'm asking this because I want to run a server embedded and I don't want to do the configuration all on java code. I want to use the xml files to do it. To be easy to deploy and change the configuration with out change any java code...
Any clue?
Thanks,
Daniel
-
6. Re: Embedded instance: NullPointerException on load xml configuration
clebert.suconic Apr 20, 2010 8:13 PM (in response to dansouza)You said:
"
configuration.setConfigurationUrl("hornetq-configuration.xml");
configuration.start(); // error apear over here, on start methodIt´s not doing what is supposed to do... To instantiate the configuration from the XML file.
I already test if was something related to classpath and it´s not...
"
You didn't state your error message anywhere. I don't mean to be sarcastic.. but we would need a crystal ball to guess that ;-)
You need your classpath in such way this follow operation succeeds without returning you Null:
URL url = getClass().getClassLoader().getResource(configurationUrl)
I agree we should throw a proper exception instead of a NPE though. Feel free to open a JIRA about that. (Or I will if you don't do it by tomorrow).
-
7. Re: Embedded instance: NullPointerException on load xml configuration
clebert.suconic Apr 20, 2010 9:05 PM (in response to clebert.suconic)What I meant on my previous post also was.. you should have posted your stack trace.
-
8. Re: Embedded instance: NullPointerException on load xml configuration
dansouza Apr 21, 2010 3:17 PM (in response to clebert.suconic)Hi all.
Seems that was something related to my classpath.
I rebuilt my project and its references.
Now it's working properly.
Thank you all for your time and support!
Regards,
Daniel
-
9. Re: Embedded instance: NullPointerException on load xml configuration
dansouza Apr 22, 2010 10:56 AM (in response to clebert.suconic)Hi Tim and Clebert,
I opened a JIRA ticket to have a better message when the path on the FileConfiguration is wrong/invalid.
Ticket: https://jira.jboss.org/jira/browse/HORNETQ-371
Once more, thank you for all your support!
Regards,
Daniel