flink cluster version: flink-1.7.2-bin-scala_2.11
And it is a docker cluster.
My project structure:
--lib
+- src/main/scala
+- pom.xml
--job
+- src/main/scala
+- pom.xml
pom.xml
There are two submodules to this project.
Then I made a fat jar , and upload from web UI.Then I got this Exception:
ERROR org.apache.flink.runtime.webmonitor.handlers.JarRunHandler - Exception occurred in REST handler: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error.
without the stack trace.
But Running in IDE is OK.
Related
I'm trying to deploy and run Google-pubsub sample code in Google app engine by this read me file. While running the deploy command I encounter below build error.
E:\java\cloud-pubsub-samples-java-master>mvn gcloud:deploy -Dgcloud.version=1 -DskipTests=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] pubsub-pull-sample
[INFO] Example for the Google Cloud Pub/Sub on Google App Engine.
[INFO] Cloud Dataflow Examples
[INFO] cloud-pubsub-samples-java
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.pom
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.jar
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Could not find artifact org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in central (https://repo.maven.apache.org/maven2)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 9.8 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 8.9 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] pubsub-pull-sample ................................. SKIPPED
[INFO] Example for the Google Cloud Pub/Sub on Google App Engine. SKIPPED
[INFO] Cloud Dataflow Examples ............................ SKIPPED
[INFO] cloud-pubsub-samples-java .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.167 s
[INFO] Finished at: 2016-08-21T22:20:45+05:30
[INFO] Final Memory: 13M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'gcloud' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\JAISON.G\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
This means that you haven't included the gcloud maven plugin in pom.xml. But you should no longer use gcloud, rather using appengine. See the documentation here.
Hi on my last project I used the lucene-analyzer for generating keywords on appengine. Now i want to use it again with my new project but it seems that it is restricted by GAE. I tried to set the version back to the version I used at my last Project but it doesn´t work anymore. I get the following error:
java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details.
[INFO] at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
[INFO] at org.apache.lucene.util.RamUsageEstimator.<clinit>(RamUsageEstimator.java:223)
[INFO] at org.apache.lucene.util.ArrayUtil.<clinit>(ArrayUtil.java:32)
[INFO] at java.lang.Class.forName0(Native Method)
[INFO] at java.lang.Class.forName(Class.java:190)
[INFO] at com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70)
[INFO] at com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:64)
[INFO] at org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.<init>(CharTermAttributeImpl.java:33)
[INFO] at org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl.<init>(PackedTokenAttributeImpl.java:40)
[INFO] at org.apache.lucene.util.AttributeFactory$1.createInstance(AttributeFactory.java:140)
[INFO] at org.apache.lucene.util.AttributeFactory$StaticImplementationAttributeFactory.createAttributeInstance(AttributeFactory.java:103)
[INFO] at org.apache.lucene.util.AttributeSource.addAttribute(AttributeSource.java:222)
[INFO] at org.apache.lucene.analysis.standard.StandardTokenizer.<init>(StandardTokenizer.java:182)
[INFO] at org.apache.lucene.analysis.de.GermanAnalyzer.createComponents(GermanAnalyzer.java:194)
[INFO] at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:144)
does anybody know why i get this error?
You get this error because Lucene's RamUsageEstimator tries to access the ManagementFactory class to determine the VM's object alignment. java.lang.management.ManagementFactory is restricted on GAE (probably for security reasons), and a NoClassDefFoundError is thrown.
If you look at LuceneAppEngine and LuGAEne (projects providing a directory implementation that lets you use Lucene on Google App Engine), you can see that they provide an alternative RamUsageEstimator, where they catch that exception:
https://github.com/UltimaPhoenix/luceneappengine/blob/416f86f1ab303d37d183af9e7e220b22437d71b9/src/main/java/org/apache/lucene/util/RamUsageEstimator.java#L179
https://github.com/svenjacobs/lugaene/blob/a3ced4f2a112d3810c4c5a0d84d4efcf4bf1e709/src/main/java/org/apache/lucene/util/RamUsageEstimator.java#L250
I think you should consider using one of these "lucene-GAE" projects if you want to use the lucene-analyzer on GAE.
I don't know why it worked for you in your previous project. Maybe you used one of these lucene-GAE projects and forgot to include it in the new project?
If I start my local google app engine dev server by using the App Engine maven plugin :
mvn appengine:devserver
and I try to launch a mapreduce job (using the appengine-mapreduce library), I get a java.security.AccessControlException: access denied ("javax.security.auth.AuthPermission" "getSubject") because the code try to invoke javax.security.auth.Subject.getSubject() method (see below for the full stack trace)
It's very weird because :
1) the javax.security.auth.Subject.getSubject() is in the white list of gae and can be invoked
2) If I start the server from intellij, I don't get this exception and the map reduce job is launched successfully
I tried with GAE 1.8.1, 1.8.2 and the latest 1.8.3 and respectively the same version for the maven google appengine plugin.
What is going wrong ?
The full stack trace :
[INFO] java.security.AccessControlException: access denied ("javax.security.auth.AuthPermission" "getSubject")
[INFO] at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
[INFO] at java.security.AccessController.checkPermission(AccessController.java:560)
[INFO] at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
[INFO] at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:383)
[INFO] at javax.security.auth.Subject.getSubject(Subject.java:287)
[INFO] at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:467)
[INFO] at org.apache.hadoop.mapreduce.JobContext.(JobContext.java:80)
[INFO] at com.google.appengine.tools.mapreduce.AppEngineJobContext.(AppEngineJobContext.java:123)
[INFO] at com.google.appengine.tools.mapreduce.AppEngineJobContext.createContextForNewJob(AppEngineJobContext.java:132)
[INFO] at com.google.appengine.tools.mapreduce.v2.impl.handlers.Controller.handleStart(Controller.java:85)
[INFO] at com.google.appengine.tools.mapreduce.v2.impl.handlers.Status.handleStartJob(Status.java:81)
[INFO] at com.google.appengine.tools.mapreduce.v2.impl.handlers.Status.handleCommand(Status.java:182)
[INFO] at com.google.appengine.tools.mapreduce.MapReduceServlet.doPost(MapReduceServlet.java:203)
[INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
[INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[INFO] at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
When i try to build (mvn) the slide-show plugin, i get error:
(see detaied stdout below)
mvn -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] POM for 'org.kohsuke.stapler:maven-stapler-plugin:pom:1.15:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.kohsuke.stapler:maven-stapler-plugin
POM Location: /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
Reason: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1599)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findArtifactTypeHandlersInPlugins(DefaultLifecycleExecutor.java:1468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:222)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:178)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)
at org.apache.maven.plugin.DefaultPluginManager.loadPluginFully(DefaultPluginManager.java:1626)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1582)
... 15 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1599)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1571)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:562)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)
... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Apr 16 00:32:26 EDT 2012
[INFO] Final Memory: 15M/182M
[INFO] ------------------------------------------------------------------------
I am getting this too (although its for the akuma artifact) and can explain why, but have not yet found a good solution. Both define a parent POM and a new repo:
<parent>
<groupId>org.kohsuke</groupId>
<artifactId>pom</artifactId>
<version>2</version>
</parent>
<repositories>
<repository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</repository>
</repositories>
The URL for this glassfish maven repo gives a 301 to https://maven.glass... and for some reason, maven decides to download the body of that response as the POM. If you look in your ~/.m2/repository/org/kohsuke/pom/2/pom-2.pom, you should see something like:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.6.39</center>
</body>
</html>
Manually looking at the glassfish repo, I do not even see the desired parent POM (at this time).
I hope this helps. If you are able to figure it out, please post back as this is as far as I have gotten so far!
I had this problem also, with a different POM from another project, and I was attempting to build with Maven 3.X. The simple solution was to install the most recent 2.X version of Maven. After that, it built fine. Being a Maven novice, It appears the URI format for REPOS differs between the 2 versions.
Simply install Maven 2.X (I used 2.2.1), and put it's "bin" directory first in your PATH env variable, and you should be good to go.
I am using Grails with the App Engine plugin and JPA persistence. When running
grails test-app
my unit tests run perfectly, but I receive the error below when the integration tests start.
Is this a known issue with the app-engine plugin?
Starting integration tests ...
[copy] Copying 1 file to /home/matthew/.grails/1.1.1/projects/test-gae-jpa
[copy] Copying 1 file to /home/matthew/.grails/1.1.1/projects/test-gae-jpa
Error executing script TestApp: null
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at AppEngineGrailsPlugin$_closure1.class$(AppEngineGrailsPlugin.groovy)
at AppEngineGrailsPlugin$_closure1.$get$$class$org$grails$appengine$AppEngineEntityManagerFactory(AppEngineGrailsPlugin.groovy)
at AppEngineGrailsPlugin$_closure1.doCall(AppEngineGrailsPlugin.groovy:70)
at AppEngineGrailsPlugin$_closure1.doCall(AppEngineGrailsPlugin.groovy)
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:651)
at grails.spring.BeanBuilder.beans(BeanBuilder.java:501)
at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:447)
at _GrailsBootstrap_groovy$_run_closure2_closure13.doCall(_GrailsBootstrap_groovy:86)
at _GrailsBootstrap_groovy$_run_closure2_closure13.doCall(_GrailsBootstrap_groovy)
at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:274)
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at _GrailsBootstrap_groovy$_run_closure2.doCall(_GrailsBootstrap_groovy:84)
at _GrailsBootstrap_groovy$_run_closure7.doCall(_GrailsBootstrap_groovy:142)
at _GrailsTest_groovy$_run_closure7.doCall(_GrailsTest_groovy:249)
at _GrailsTest_groovy$_run_closure7.doCall(_GrailsTest_groovy)
at _GrailsTest_groovy$_run_closure1_closure19.doCall(_GrailsTest_groovy:110)
at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:96)
at TestApp$_run_closure1.doCall(TestApp.groovy:66)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.lang.NullPointerException
at org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:452)
at org.datanucleus.jpa.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:355)
at org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.<init>(DatastoreEntityManagerFactory.java:63)
at org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createEntityManagerFactory(DatastorePersistenceProvider.java:35)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at javax.persistence.Persistence$createEntityManagerFactory.call(Unknown Source)
at org.grails.appengine.AppEngineEntityManagerFactory.<clinit>(AppEngineEntityManagerFactory.groovy:13)
... 32 more
Process finished with exit code 1