your best bet is just to run mvn eclipse:eclipse in the activemq-core folder that was extracted from the zip file.
Then in eclipse import that folder as a java project. On Wed, Apr 1, 2009 at 10:39 PM, pclovec <[email protected]> wrote: > > 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 > these > 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 > src---org---apache--activemq-- > advisory. > borker. > ...... > resources---META-INF > activemq.xsd > ... > > 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( > > "tcp://localhost:61616"); > Connection con = cf.createConnection(); > con.start(); > } > > 5 i copy the the test folder's resources folder into TestActiveMQCore > project. and copy the log4j.properties 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 > ActiveMQPrefetchPolicy.java > 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 > log4j.properties 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 = > FactoryFinder.class.getClassLoader().loadClass(className); > } > > return clazz; > } > > > > **------------------------------------------------------- > loader get null . > **------------------------------------------------------- > > > if i switch using ActiveMQ-Core jar file than it running OK.so i want to > know how to deploy the config i.any idea? > > > > > thanks > xinfnag > > -- > View this message in context: > http://www.nabble.com/debug-the-activeMQ-core-code-appear-config-error-tp22839675p22839675.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > > -- Regards, Hiram Blog: http://hiramchirino.com Open Source SOA http://fusesource.com/
