[GAP] error launching cmuConsumer.jar from the command line

Jeff McCullough jeffmc at berkeley.edu
Sun Nov 22 00:44:08 EST 2015


Just to let anyone know, in case they run into something similar, I discovered the issue. In specifying the -jar option I was also specifying the class path found in the jar manifest. That class path is not overruled by the command line class path options. This is the classpath that is found in the jar file:

Class-Path: ../../conf/ activemq-all-5.7.0.jar cmuConsumer.jar commons-cli.jar commons-logging.jar subject.jar ../../dist/lib/grouper.jar

The easiest work around is just specifying the main class which in this case is edu.cmu.grouper.changelog.consumer.ConsumerMain along with an appropriate class path. Obviously, there are other options as well. The main point is knowing how the jar command works in regard to the -jar option.

Cheers,
Jeff

> On Nov 16, 2015, at 1:03 PM, Jeffrey Eaton <jeaton at cmu.edu> wrote:
> 
> Try passing in the grouper.home setting:
> 
> java -Dgrouper.home="$GROUPER_HOME/"  -jar lib/grouper/cmuConsumer.jar -group edu:berkeley:org:calnet:test-group
> 
> That class comes from $GROUPER_HOME/lib/grouper/commons-jexl.jar  on my system.
> 
> -jeaton
> 
> 
>> On Nov 13, 2015, at 10:30 PM, identity-services-gap at lists.andrew.cmu.edu <mailto:identity-services-gap at lists.andrew.cmu.edu> wrote:
>> 
>> 
>> Has anyone seen this error while launching the cmuConsumer.jar at the command line? I went through all the usual diagnostics, but not seeing what is causing the exception.
>> 
>> sudo java -jar cmuConsumer.jar -group edu:berkeley:org:calnet:test-group
>> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/jexl2/JexlException
>>         at edu.internet2.middleware.grouper.SubjectFinder.<clinit>(SubjectFinder.java:291)
>>         at edu.cmu.grouper.changelog.consumer.ConsumerMain.main(ConsumerMain.java:686)
>> Caused by: java.lang.ClassNotFoundException: org.apache.commons.jexl2.JexlException
>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>         ... 2 more
>> 
>> 
>> Thanks,
>> Jeff
>> 
>> 
>> _______________________________________________
>> Identity-services-gap mailing list
>> Identity-services-gap at lists.andrew.cmu.edu <mailto:Identity-services-gap at lists.andrew.cmu.edu>
>> https://lists.andrew.cmu.edu/mailman/listinfo/identity-services-gap
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/identity-services-gap/attachments/20151121/cf22b34e/attachment.html>


More information about the Identity-services-gap mailing list