Thanks for the help.  Your comment got me to look into the classpath
issue a little more.

I think I might know what the problem is.  For some reason, my
University's network filter refused to download the easy mock library,
and so I had to download the jar file manually.  I tried to install it
with this command:
mvn install:install-file -DgroupId=org.easymock -DartifactId=easymock -
Dpackaging=jar -Dversion=2.2 -Dfile=easymockclassextension-2.2.1.jar -
DgeneratePom=true -Dscope=test

but I don't think that is working.  I still get ClassNotFound
exceptions, though the class appears to be different.  Now it can't
find org/easymock/IArgumentMatcher.

Is it a problem that I have the easymock 2.2.1 jar and the version
specified in the pom is 2.2?  Maybe just need to go and learn some
more about maven

--dan


On Apr 27, 10:41 pm, Pherl Liu <liuj...@google.com> wrote:
> Looks like a classpath problem for the easy mock..  Could you please double
> check if net.sf.cglib.proxy.Enhancer is installed and set in the classpath
> of your environment?
>
>
>
>
>
>
>
> On Thu, Apr 28, 2011 at 3:40 AM, danbaatar <danwalke...@gmail.com> wrote:
> > I am trying to compile version 2.3.0 (for compatibility with protoc
> > installed by system packages under Ubuntu 10.10), and when I try to
> > run 'mvn package', it fails with 2 errors in the ServiceTest.  I will
> > paste the contents of the appropriate test log at the end of my
> > message.
>
> > Any help would be appreciated.
>
> > Thanks.
>
> > --------------------------------------------------------------------------- 
> > ----
> > Test set: com.google.protobuf.ServiceTest
>
> > --------------------------------------------------------------------------- 
> > ----
> > Tests run: 7, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.107
> > sec <<< FAILURE!
> > testCallMethod(com.google.protobuf.ServiceTest)  Time elapsed: 0.036
> > sec  <<< ERROR!
> > java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Enhancer
> >        at
>
> > org.easymock.classextension.internal.MocksClassControl.createProxyFactory(M 
> > ocksClassControl.java:
> > 35)
> >        at org.easymock.internal.MocksControl.createMock(MocksControl.java:
> > 36)
> >        at com.google.protobuf.ServiceTest.testCallMethod(ServiceTest.java:
> > 83)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 57)
> >        at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> > l.java:
> > 43)
> >        at java.lang.reflect.Method.invoke(Method.java:616)
> >        at junit.framework.TestCase.runTest(TestCase.java:168)
> >        at junit.framework.TestCase.runBare(TestCase.java:134)
> >        at junit.framework.TestResult$1.protect(TestResult.java:110)
> >        at junit.framework.TestResult.runProtected(TestResult.java:128)
> >        at junit.framework.TestResult.run(TestResult.java:113)
> >        at junit.framework.TestCase.run(TestCase.java:124)
> >        at junit.framework.TestSuite.runTest(TestSuite.java:232)
> >        at junit.framework.TestSuite.run(TestSuite.java:227)
> >        at
> > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:
> > 81)
> >        at
> > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
> > 62)
> >        at
>
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(A 
> > bstractDirectoryTestSuite.java:
> > 140)
> >        at
>
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Abstract 
> > DirectoryTestSuite.java:
> > 127)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 57)
> >        at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> > l.java:
> > 43)
> >        at java.lang.reflect.Method.invoke(Method.java:616)
> >        at
>
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Surefire 
> > Booter.java:
> > 345)
> >        at
> > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
> > 1009)
> > Caused by: java.lang.ClassNotFoundException:
> > net.sf.cglib.proxy.Enhancer
> >        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> >        at java.security.AccessController.doPrivileged(Native Method)
> >        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> >        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> >        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> >        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> >        ... 26 more
>
> > testGetPrototype(com.google.protobuf.ServiceTest)  Time elapsed: 0.001
> > sec  <<< ERROR!
> > java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Enhancer
> >        at
>
> > org.easymock.classextension.internal.MocksClassControl.createProxyFactory(M 
> > ocksClassControl.java:
> > 35)
> >        at org.easymock.internal.MocksControl.createMock(MocksControl.java:
> > 36)
> >        at
> > com.google.protobuf.ServiceTest.testGetPrototype(ServiceTest.java:
> > 100)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 57)
> >        at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> > l.java:
> > 43)
> >        at java.lang.reflect.Method.invoke(Method.java:616)
> >        at junit.framework.TestCase.runTest(TestCase.java:168)
> >        at junit.framework.TestCase.runBare(TestCase.java:134)
> >        at junit.framework.TestResult$1.protect(TestResult.java:110)
> >        at junit.framework.TestResult.runProtected(TestResult.java:128)
> >        at junit.framework.TestResult.run(TestResult.java:113)
> >        at junit.framework.TestCase.run(TestCase.java:124)
> >        at junit.framework.TestSuite.runTest(TestSuite.java:232)
> >        at junit.framework.TestSuite.run(TestSuite.java:227)
> >        at
> > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:
> > 81)
> >        at
> > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
> > 62)
> >        at
>
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(A 
> > bstractDirectoryTestSuite.java:
> > 140)
> >        at
>
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Abstract 
> > DirectoryTestSuite.java:
> > 127)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 57)
> >        at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> > l.java:
> > 43)
> >        at java.lang.reflect.Method.invoke(Method.java:616)
> >        at
>
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Surefire 
> > Booter.java:
> > 345)
> >        at
> > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
> > 1009)
> > Caused by: java.lang.ClassNotFoundException:
> > net.sf.cglib.proxy.Enhancer
> >        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> >        at java.security.AccessController.doPrivileged(Native Method)
> >        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> >        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> >        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> >        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> >        ... 26 more
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Protocol Buffers" group.
> > To post to this group, send email to protobuf@googlegroups.com.
> > To unsubscribe from this group, send email to
> > protobuf+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/protobuf?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to