[SNMP4J] cannot find symbol Re: agenpro-mvn-task log4j error

agenpro log4j agenprolog4j at gmail.com
Sat Mar 3 03:58:08 CET 2012


In case anyone can easily see what i am doing wrong, i am getting
"cannot find symbol" using the agenpro-mvn-task\pom.xml :

...oosnmp\agenpro\Agent.java:[186,20] cannot find symbol
symbol : constructor
DefaultMOQuery(org.snmp4j.agent.DefaultMOContextScope,bool
ean,com.oosnmp.agenpro.Agent)

usually i thought the <dependencies> in pom.xml automate into class paths
when compiling the generated files with Agent.java, to resolve symbols from
jar files.

Are others getting the example pom.xml (with version fixes) working?  Or is
it easier to try a different way to build an Agent from files generated
from agenpro3?

On Wed, Feb 29, 2012 at 9:00 AM, agenpro log4j <agenprolog4j at gmail.com>wrote:

> I guess I am just too new to maven...but it turns out that the
> -DgeneratePom=true
> for the manual install step of agenpro-plugin does not figure out its
> dependencies.
> So I jar -xf agenpro-plugin.jar and found some maven dependencies in
> plugin.xml that i copied and pasted into the agenpro-plugin-3.0.5.pom.
> After fixing the agenpro  dependency to version 3.1.2, I am now
> getting father down the build.
>
> So, does the instructions in AgenProManual.pdf need updating, or was i
> reading it wrong?  In general, is there a better way to fix
> agenpro-plugin dependency issues?
>
> On 2/28/12, agenpro log4j <agenprolog4j at gmail.com> wrote:
> > Hi, I am trying out the agenpro 3.1.2 installation's example with maven
> > agenpro-plugin 3.0.5 as described in AgenProManual.pdf procedure to build
> > an snmp4j agent.  After fixing the agenpro-mvn-task\pom.xml for the
> current
> > jar versions, I ran:
> > e:mvn.bat clean install
> > But i am getting the following error:
> > [INFO] --- agenpro-plugin:3.0.5:agenpro (default) @ snmp4j-agenpro-agent
> > ---
> > Feb 28, 2012 7:20:03 PM org.sonatype.guice.bean.reflect.LoadedClass
> > WARNING: Error injecting: com.oosnmp.agenpro.maven.plugins.AgenMojo
> > java.lang.NoClassDefFoundError: org/apache/log4j/Appender
> > at java.lang.Class.getDeclaredConstructors0(Native Method)
> > at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
> > at java.lang.Class.getDeclaredConstructors(Class.java:1836)
> > at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.
> > java:243)
> > ...
> > Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Appender
> > at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
> > SelfFirstStrategy.java:50)
> >
> > Is the current  agenpro-mvn-task\pom.xml example supposed to work?
> >
>



More information about the SNMP4J mailing list