My best bet is that you have multiple Velocity jars in the Eclipse distrib, possibly of conflicting versions.
WILL On Fri, May 2, 2008 at 11:59 AM, KV <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to use both apache commons-logging and log4j. > > I am initializing VelocityEngine from my java code. How can I add the > classpath? does engine take from $CLASS_PATH? > > VelocityEngine engine = new VelocityEngine(); > .... > > engine.init(properties); > > Thanks & Regards > Kalyan > > > On Fri, May 2, 2008 at 6:46 PM, csanders <[EMAIL PROTECTED]> wrote: > > > Have you tried http://jakarta.apache.org/commons/logging/ ? > > > > > > KV wrote: > > > > > Hi, > > > > > > I recently started using velocity with eclipse and found the > following > > > error. I tried to search mailing list archive but was not helping me. > > > Can you please suggest how to fix the following error. > > > > > > 2008-05-02 18:07:06,843 - Log4JLogChute initialized using file > > > 'velocity.log' > > > 2008-05-02 18:07:06,843 - Starting Apache Velocity v1.5 (compiled: > > > 2007-02-22 08:52:29) > > > 2008-05-02 18:07:06,843 - Default Properties File: > > > org\apache\velocity\runtime\defaults\velocity.properties > > > 2008-05-02 18:07:06,843 - Trying to use logger class > > > org.apache.velocity.runtime.log.AvalonLogChute > > > 2008-05-02 18:07:06,843 - Couldn't find class > > > org.apache.velocity.runtime.log.AvalonLogChute or necessary supporting > > > classes in classpath. > > > java.lang.NoClassDefFoundError: org/apache/log/format/Formatter > > > at java.lang.Class.forName0(Native Method) > > > at java.lang.Class.forName(Unknown Source) > > > at org.apache.velocity.util.ClassUtils.getClass(ClassUtils.java:63) > > > at > > > org.apache.velocity.util.ClassUtils.getNewInstance(ClassUtils.java:95) > > > at > > > > > > > org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:147) > > > at > > > > > > > org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:208) > > > at > > > > > > > org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:728) > > > at > > > > > > > org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:240) > > > at > > > > > > > org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:534) > > > at > > > org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:144) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.project.pluggable.rules.TemplateBasedRule.setClasspathLoaderForVelocity(TemplateBasedRule.java:329) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.project.pluggable.rules.ArtifactBasedRule.trigger(ArtifactBasedRule.java:192) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.plugin.pluggable.PluginRuleExecutor.trigger(PluginRuleExecutor.java:102) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.plugin.pluggable.PluggablePlugin.trigger(PluggablePlugin.java:123) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.plugin.PluginHousing.trigger(PluginHousing.java:40) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.plugin.PluginConfig.trigger(PluginConfig.java:250) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.generation.M1Generator.internalPluginLoop(M1Generator.java:610) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.generation.M1Generator.internalRun(M1Generator.java:553) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.internal.core.generation.M1Generator.run(M1Generator.java:299) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.eclipse.wizards.generate.NewTigerstripeRunWizard.finishPage(NewTigerstripeRunWizard.java:131) > > > at > > > > > > > org.eclipse.tigerstripe.workbench.eclipse.wizards.NewTSElementWizard$2.run(NewTSElementWizard.java:193) > > > at > > > > > > > org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) > > > at > > > > > > > org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720) > > > at > > > org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797) > > > at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4466) > > > at > > > > > > > org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) > > > at > > > > > > > org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) > > > 2008-05-02 18:07:06,843 - Trying to use logger class > > > org.apache.velocity.runtime.log.Log4JLogChute > > > 2008-05-02 18:07:06,843 - Using logger class > > > org.apache.velocity.runtime.log.Log4JLogChute > > > > > > Regards > > > Kalyan > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Kalyan Abbaraju > Home +91 8066649703 > Mobile +91 99005 16895 > -- Forio Business Simulations Will Glass-Husain [EMAIL PROTECTED] www.forio.com
