Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tigerstripe-users] Velocity classloader error "java.lang.NoClassDefFoundError: org/apache/log/format/Formatter"

Hi Eric,

Yes. The generation is completely failing. I did ensure that I am
using only one velocity jar file.
And also I have posted this question in velocity users list also. But
at the moment i did not get any new answer. I am currently planning to
check the following two options.

1) Include the relevant jar
I checked for the class "org/apache/log/format/Formatter" and I found
it in avalon-logkit-current.jar from apache.
I downloaded this jar and copied to tigerstripe/lib directory to
verify it works. But no luck.

2) Check with velocity if another log instance can be used. for example log4j.
At the moment i am working on this. I can update you once I am
successful in this.

But I would like to understand the relevance of tigerstripe/lib
directory under eclipse? Can you please enlighten me under what
circumstances  I can use this directory?
Also if you have any other suggestions it would help me a lot.

Thanks & Best Regards
Kalyan

On Tue, May 6, 2008 at 5:30 PM, Eric Dillon <erdillon@xxxxxxxxx> wrote:
> Hi Kalyan,
>
>  I am afraid I don't know what is going on here. I am tempted however to
>  blame it on velocity :-).
>
>  I did google the exception and saw your post on some other forum. I saw a
>  note there about having multiple instances of the velocity-1.5.jar which is
>  not the case here.
>
>  Now, what are the symptoms of the error (beyond the log in the mail)? Does
>  your generation fail completely?
>
>  Eric
>
>
>
>
>  On 5/2/08 11:54 AM, "KV" <kalyan.abbaraju@xxxxxxxxx> wrote:
>
>  > Hi,
>  >
>  >  I am getting the following class loader error while doing the code
>  > generation with my plugin. I tried to include both log4j and
>  > commons-logging explicitly to project class path. But it did not help.
>  >
>  > Can you please suggest a solution?
>  > 2008-05-02 19:41:51,515 - Log4JLogChute initialized using file 'velocity.log'
>  > 2008-05-02 19:41:51,515 - Starting Apache Velocity v1.5 (compiled:
>  > 2007-02-22 08:52:29)
>  > 2008-05-02 19:41:51,515 - Default Properties File:
>  > org\apache\velocity\runtime\defaults\velocity.properties
>  > 2008-05-02 19:41:51,515 - Trying to use logger class
>  > org.apache.velocity.runtime.log.AvalonLogChute
>  > 2008-05-02 19:41:51,515 - 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.Templa
>  > teBasedRule.setClasspathLoaderForVelocity(TemplateBasedRule.java:329)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.project.pluggable.rules.Artifa
>  > ctBasedRule.trigger(ArtifactBasedRule.java:192)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.plugin.pluggable.PluginRuleExe
>  > cutor.trigger(PluginRuleExecutor.java:102)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.plugin.pluggable.PluggablePlug
>  > in.trigger(PluggablePlugin.java:123)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.plugin.PluginHousing.trigger(P
>  > luginHousing.java:40)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.plugin.PluginConfig.trigger(Pl
>  > uginConfig.java:250)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.generation.M1Generator.interna
>  > lPluginLoop(M1Generator.java:610)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.generation.M1Generator.interna
>  > lRun(M1Generator.java:553)
>  > at
>  > org.eclipse.tigerstripe.workbench.internal.core.generation.M1Generator.run(M1G
>  > enerator.java:350)
>  > at
>  > org.eclipse.tigerstripe.workbench.eclipse.wizards.generate.NewTigerstripeRunWi
>  > zard.finishPage(NewTigerstripeRunWizard.java:131)
>  > at
>  > org.eclipse.tigerstripe.workbench.eclipse.wizards.NewTSElementWizard$2.run(New
>  > TSElementWizard.java:193)
>  > at
>  > org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.j
>  > ava:39)
>  > at
>  > org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:7
>  > 20)
>  > 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(WorkbenchRunn
>  > ableAdapter.java:87)
>  > at
>  > org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.j
>  > ava:113)
>  > 2008-05-02 19:41:51,515 - Trying to use logger class
>  > org.apache.velocity.runtime.log.Log4JLogChute
>  > 2008-05-02 19:41:51,515 - Using logger class
>  > org.apache.velocity.runtime.log.Log4JLogChute
>  > 2008-05-02 19:41:51,515 - Default ResourceManager initializing. (class
>  > org.apache.velocity.runtime.resource.ResourceManagerImpl)
>  > 2008-05-02 19:41:51,515 - ResourceLoader instantiated:
>  > org.apache.velocity.runtime.resource.loader.FileResourceLoader
>  >
>  > Regards
>  > Kalyan
>  > _______________________________________________
>  > tigerstripe-users mailing list
>  > tigerstripe-users@xxxxxxxxxxx
>  > https://dev.eclipse.org/mailman/listinfo/tigerstripe-users
>
>  _______________________________________________
>  tigerstripe-users mailing list
>  tigerstripe-users@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/tigerstripe-users
>



-- 
Kalyan Abbaraju
Home +91 8066649703
Mobile +91 99005 16895


Back to the top