activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pclovec <>
Subject debug the activeMQ-core code appear config error
Date Thu, 02 Apr 2009 02:39:36 GMT

hi, guys

i'm a new developer for java . and i want to debug the activemq-core code
when i running my test code. but i have met some resource file problem.i do
1. download the source code from web site. unzip it 

2. uses the eclipse create a project name "Activemq-core" and copy the
source folder's org folder in src folder. copy the resource folder to
Activemq_core folder
the my activemq-core project folder list is

3. i refer to another jar file and another library for this project. and i
can build it. 

4 i create a new test project TestActiveMQCore project and write a test
class .and refer to ActiveMQ-core  source code . other project i refer to
jar file (ActivemQ binrary folder /lib folder files)
      public void Main()
            ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
            Connection con = cf.createConnection();

5 i copy the  the test folder's resources folder into TestActiveMQCore
project.  and copy the file under  eclipse-resources 
folder into resources folder.

6 running my test class . i can debug into ActiveMQ_core source . but it
can't get the config file in
   public class ActiveMQPrefetchPolicy implements Serializable {
       private static final Log LOG =
LogFactory.getLog(ActiveMQPrefetchPolicy.class); //here i can get log4
config file

   there is a problem why it can't load the log4 config . i copy the into resources folder
7. continue running the test code. and create a connection  debug here
appear excetipn
  org\apache\activemq\util\FactoryFinder .java

private Class newInstance(Properties properties, String propertyPrefix)
throws ClassNotFoundException, IOException {

        String className = properties.getProperty(propertyPrefix + "class");
        if (className == null) {
            throw new IOException("Expected property is missing: " +
propertyPrefix + "class");
        Class clazz = null;
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        if (loader != null) {
            try {
                clazz = loader.loadClass(className);
            } catch (ClassNotFoundException e) {
                // ignore
        if (clazz == null) {
            clazz =

        return clazz;

  loader get null . 

if i switch using ActiveMQ-Core jar file than it running i want to
know how to deploy the config i.any idea?


View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message