Noclassfoundexception for 'com/google/common/base/Predicate'

82 views
Skip to first unread message

sangram desai

unread,
Oct 27, 2014, 1:13:48 PM10/27/14
to beanstal...@googlegroups.com
Hi,
I am trying to use the plugin version 1.3.2 but I am getting following error when I use command 'mvn beanstalk:update-environment'

[FATAL ERROR] br.com.ingenieux.mojo.beanstalk.env.UpdateEnvironmentMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms:

urls[0] = file:/home/CORPUSERS/xp013231/.m2/repository/br/com/ingenieux/beanstalk-maven-plugin/1.3.2/beanstalk-maven-plugin-1.3.2.jar
urls[1] = file:/home/CORPUSERS/xp013231/.m2/repository/br/com/ingenieux/beanstalker-common/1.3.2/beanstalker-common-1.3.2.jar
urls[2] = file:/home/CORPUSERS/xp013231/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar
urls[3] = file:/home/CORPUSERS/xp013231/.m2/repository/com/amazonaws/aws-java-sdk/1.6.12/aws-java-sdk-1.6.12.jar
urls[4] = file:/home/CORPUSERS/xp013231/.m2/repository/org/apache/httpcomponents/httpclient/4.2/httpclient-4.2.jar
urls[5] = file:/home/CORPUSERS/xp013231/.m2/repository/org/apache/httpcomponents/httpcore/4.2/httpcore-4.2.jar
urls[6] = file:/home/CORPUSERS/xp013231/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
urls[7] = file:/home/CORPUSERS/xp013231/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.1.1/jackson-core-2.1.1.jar
urls[8] = file:/home/CORPUSERS/xp013231/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.1.1/jackson-databind-2.1.1.jar
urls[9] = file:/home/CORPUSERS/xp013231/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.1.1/jackson-annotations-2.1.1.jar
urls[10] = file:/home/CORPUSERS/xp013231/.m2/repository/joda-time/joda-time/2.5/joda-time-2.5.jar
urls[11] = file:/home/CORPUSERS/xp013231/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
urls[12] = file:/home/CORPUSERS/xp013231/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar
urls[13] = file:/home/CORPUSERS/xp013231/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
urls[14] = file:/home/CORPUSERS/xp013231/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar
urls[15] = file:/home/CORPUSERS/xp013231/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4.jar
urls[16] = file:/home/CORPUSERS/xp013231/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar
urls[17] = file:/home/CORPUSERS/xp013231/.m2/repository/org/slf4j/slf4j-nop/1.6.4/slf4j-nop-1.6.4.jar
urls[18] = file:/home/CORPUSERS/xp013231/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
urls[19] = file:/home/CORPUSERS/xp013231/.m2/repository/org/eclipse/jgit/org.eclipse.jgit/2.1.0.201209190230-r/org.eclipse.jgit-2.1.0.201209190230-r.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/usr/share/maven2/lib/maven-debian-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] com/google/common/base/Predicate
com.google.common.base.Predicate
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: com/google/common/base/Predicate
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
    at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
    at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.getEnvironmentDescriptionPredicate(WaitForEnvironmentCommand.java:104)
    at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.lookupInternal(WaitForEnvironmentCommand.java:67)
    at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:52)
    at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:59)
    at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:350)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Predicate
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
    at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
    at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
    at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 38 more



I am not sure why it does not find com.google.common.base.Predicate class. I have guava.jar file installed in m2 repository. I have also added the same in CLASSPATH variable.
Is there anything that I need to do in order to resolve this error?

The other commands like mvn beanstalk:upload-source-bundle & create-application-version work fine.

I have also tried using the latest version(1.3.4) but then I was getting the same exception for check-avaialability goal.

Please help as I am not able to move forward because of this error.

Thanks,
Sangram

Aldrin Leal

unread,
Oct 27, 2014, 1:23:16 PM10/27/14
to beanstal...@googlegroups.com
Update to maven 3.2.x and avoid using any vendor-supplied versions of maven

Sent from my Windows Phone

From: sangram desai
Sent: ‎27/‎10/‎2014 14:13
To: beanstal...@googlegroups.com
Subject: Noclassfoundexception for 'com/google/common/base/Predicate'

--
You received this message because you are subscribed to the Google Groups "beanstalker-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beanstalker-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sangram desai

unread,
Oct 27, 2014, 1:50:44 PM10/27/14
to beanstal...@googlegroups.com
Hi Aldrin,
Thanks for the quick reply.
I am using Eclipse-Kepler having integrated m2e plugin.
I will try to use maven 3.2.x

Thanks,
Sangram

Aldrin Leal

unread,
Oct 27, 2014, 4:21:12 PM10/27/14
to beanstal...@googlegroups.com
Look into urls[0]


Sent from my Windows Phone

From: sangram desai
Sent: ‎27/‎10/‎2014 14:50
To: beanstal...@googlegroups.com
Subject: Re: Noclassfoundexception for 'com/google/common/base/Predicate'

wp_ss_20141027_0001.jpg

sangram desai

unread,
Oct 28, 2014, 10:08:03 AM10/28/14
to beanstal...@googlegroups.com
Thanks Aldrin. It worked. :)
 However I am still not able to update the environment. I am getting following exception now.

Here is the command I run
mvn -Pdeploy -Dbeanstalk.cnamePrefix=test

& here is the output:
[WARNING] You should encrypt your passwords. See http://beanstalker.ingenieux.com.br/security.html for more information
[INFO] Configuring Proxy. Proxy Host:proxy name Proxy Port: 8080
[INFO] ... with cname set to 'se-cloud-services.elasticbeanstalk.com'
[INFO] ... with status *NOT* set to 'Terminated'
[WARNING] FAILURE

java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: No environments found
    at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:61)
    at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:350)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: No environments found
    at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleNonSingle(AbstractBeanstalkMojo.java:71)
    at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleResults(AbstractBeanstalkMojo.java:63)
    at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:53)
    at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:59)


Following is the properties section that is set in pom.xml file

<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <beanstalk.applicationName>TestEnv</beanstalk.applicationName>
        <beanstalk.keyname>mykeyname</beanstalk.keyname>
        <beanstalk.instancetype>t2.small</beanstalk.instancetype>
        <beanstalk.s3Bucket>s3BucketName</beanstalk.s3Bucket>
        <beanstalker.serverId>ec2-12-34-567-890.eu-west-1.compute.amazonaws.com</beanstalker.serverId>
        <beanstalk.region>eu-west-1c</beanstalk.region>
        <beanstalk.solutionStack>64bit Amazon Linux running Tomcat 7</beanstalk.solutionStack>
        <beanstalk.environmentType>SingleInstance</beanstalk.environmentType>
        <beanstalk.availabilityZones>eu-west-1c</beanstalk.availabilityZones>
        <beanstalk.iamInstanceProfile>aws-elasticbeanstalk-ec2-role</beanstalk.iamInstanceProfile>
        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
        <maven.install.skip>true</maven.install.skip>
        <maven.deploy.skip>true</maven.deploy.skip>
     </properties>


I confirm that test.elasticbeanstalk.com environment exists on AWS.

i was wondering how does it take se.cloud.services environment prefix name even though I am giving test as cnamePrefix.

Thanks.


--
You received this message because you are subscribed to a topic in the Google Groups "beanstalker-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beanstalker-users/q0QrH8Id23w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beanstalker-us...@googlegroups.com.

Aldrin Leal

unread,
Oct 28, 2014, 10:12:31 AM10/28/14
to beanstal...@googlegroups.com
Have you set your region? :)


Sent from my Windows Phone

From: sangram desai
Sent: ‎28/‎10/‎2014 11:08
[The entire original message is not included.]

Aldrin Leal

unread,
Oct 28, 2014, 10:25:57 AM10/28/14
to beanstal...@googlegroups.com
Oh nvm. Set environmentRef to se-test.elasticbeanstalk.com


Sent from my Windows Phone

Sent: ‎28/‎10/‎2014 11:08
Please help as I am not able to mov

sangram desai

unread,
Oct 28, 2014, 2:00:49 PM10/28/14
to beanstal...@googlegroups.com
Hi Aldrin.
I hope I am not taking too much of your time.
I set the environmentref & it took the correct CName this time as test.elasticbeanstalk.com but still it did not work. I am getting the same exception log as I sent in the previous mail chain.(environment not found)
Then just to check if this environment is present or not I used 'describe-environments' goal but it returned me with an empty array as below

SUCCESS
[INFO]  * environments: [] [class: List]

But I can very well see that test.elasticbeanstalk.com environment is present through AWS console.
Am I missing something?

I had one more query, I used 'create-application-version' goal and it returned success but l can not see that version in application versions list on AWS console.

Thanks,
Sangram


--

Aldrin Leal

unread,
Oct 28, 2014, 2:30:30 PM10/28/14
to beanstal...@googlegroups.com
Also, change your region to eu-west-1 (letters are for azs)


Sent from my Windows Phone

From: sangram desai
Sent: ‎28/‎10/‎2014 15:00

sangram desai

unread,
Oct 29, 2014, 2:25:57 AM10/29/14
to beanstal...@googlegroups.com
But I have set my region property to eu-west-1c like below in properties section.
<beanstalk.region>eu-west-1c</beanstalk.region>

What do you mean by 'letters are for azs'?

Thanks,
Sangram


--

Aldrin Leal

unread,
Oct 29, 2014, 2:49:12 AM10/29/14
to beanstal...@googlegroups.com
Region: eu-west-1
Availability Zone: eu-west-1c


--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/

--
You received this message because you are subscribed to the Google Groups "beanstalker-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beanstalker-us...@googlegroups.com.

sangram desai

unread,
Oct 29, 2014, 5:34:47 AM10/29/14
to beanstal...@googlegroups.com
Hi Aldrin,
It worked. :)
I made a smaller mistake. I was using <beanstalk.region>eu-west-1c</beanstalk.region> instead of <beanstalker.region>eu-west-1c</beanstalker.region>.

Using beanstalker instead of beanstalk fixed the problem. Now the environment is getting updated properly.

It wouldn't have been possible without your help.  Thanks. :)


Aldrin Leal

unread,
Oct 29, 2014, 5:39:35 AM10/29/14
to beanstal...@googlegroups.com
Yes. beanstalker also handles simpledb and cloudfront, and beanstalk applies only to aws elastic beanstalk

--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/

Reply all
Reply to author
Forward
0 new messages