Hello I'm trying to implement this library in AWS lambda.
But I got stuck in
wordMLPackage = WordprocessingMLPackage.createPackage();
And the lambda would timeout.
I can execute the function in my local environment.
Anyone can help me here?
I'm Using Java JDK 8 for my local environment.
The lambda function has execution basic role and s3 full permission with 1024MB of memory and 10 seconds of execution limit. The function is not in any VPC.
EDIT:
Here's my full log after adding log4j
`START RequestId: ab3cc460-ddfd-11e7-bb93-43bcee7d169c Version: $LATEST
Dec 10, 2017 10:58:42 PM pp.generator.docx.RequestFunctionHandler
handleRequest
INFO: Handling request
Dec 10, 2017 10:58:43 PM pp.generator.docx.RequestFunctionHandler
handleRequest
INFO: Creating Word processingMLPackage
DEBUG org.docx4j.utils.ResourceUtils .getResource line 70 - Attempting to load: docx4j.properties
0 [main] DEBUG org.docx4j.utils.ResourceUtils - Attempting to load: docx4j.properties
DEBUG org.docx4j.utils.ResourceUtils .getResource line 87 - Trying Thread.currentThread().getContextClassLoader()
10 [main] DEBUG org.docx4j.utils.ResourceUtils - Trying Thread.currentThread().getContextClassLoader()
WARN org.docx4j.utils.ResourceUtils .getResource line 96 - Couldn't get resource: docx4j.properties
11 [main] WARN org.docx4j.utils.ResourceUtils - Couldn't get resource: docx4j.properties
WARN org.docx4j.Docx4jProperties .init line 22 - Couldn't find/read docx4j.properties; docx4j.properties not found via classloader.
12 [main] WARN org.docx4j.Docx4jProperties - Couldn't find/read docx4j.properties; docx4j.properties not found via classloader.
INFO org.docx4j.jaxb.Context .<clinit> line 86 - java.vendor=Oracle Corporation
76 [main] INFO org.docx4j.jaxb.Context - java.vendor=Oracle Corporation
INFO org.docx4j.jaxb.Context .<clinit> line 87 - java.version=1.8.0_141
76 [main] INFO org.docx4j.jaxb.Context - java.version=1.8.0_141
DEBUG org.docx4j.utils.ResourceUtils .getResource line 70 - Attempting to load: org/docx4j/wml/jaxb.properties
172 [main] DEBUG org.docx4j.utils.ResourceUtils - Attempting to load: org/docx4j/wml/jaxb.properties
DEBUG org.docx4j.utils.ResourceUtils .getResource line 87 - Trying Thread.currentThread().getContextClassLoader()
172 [main] DEBUG org.docx4j.utils.ResourceUtils - Trying Thread.currentThread().getContextClassLoader()
DEBUG org.docx4j.utils.ResourceUtils .getResource line 94 - Not using MOXy, since no resource: org/docx4j/wml/jaxb.properties
189 [main] DEBUG org.docx4j.utils.ResourceUtils - Not using MOXy, since no resource: org/docx4j/wml/jaxb.properties
INFO org.docx4j.jaxb.NamespacePrefixMapperUtils .getPrefixMapper line 75 -
Using NamespacePrefixMapperSunInternal, which is suitable for Java 6
432 [main] INFO org.docx4j.jaxb.NamespacePrefixMapperUtils - Using NamespacePrefixMapperSunInternal, which is suitable for Java 6
END RequestId: ab3cc460-ddfd-11e7-bb93-43bcee7d169c
REPORT RequestId: ab3cc460-ddfd-11e7-bb93-43bcee7d169c Duration: 10003.62 ms Billed Duration: 10000 ms Memory Size: 1024 MB Max Memory Used: 127 MB
2017-12-10T22:58:52.783Z ab3cc460-ddfd-11e7-bb93-43bcee7d169c Task timed out after 10.00 seconds`
Related
I have made a Java web application and trying to host it on Heroku with a Dockerfile, CMD as :
CMD ["java", "-Dserver.port=$PORT", "-jar", "/usr/local/lib/backend.jar", "--server.port=$PORT"]
And getting the logs as follows:
2022-05-06T06:53:33.599532+00:00 heroku[web.1]: Starting process with command `java -Dserver.port\=\27061 -jar /usr/local/lib/backend.jar --server.port\=\27061`
2022-05-06T06:53:35.445811+00:00 app[web.1]: 199 [main] INFO org.reflections.Reflections - Reflections took 179 ms to scan 1 urls, producing 4 keys and 22 values
2022-05-06T06:53:41.324114+00:00 app[web.1]: 6078 [main] INFO org.reflections.Reflections - Reflections took 58 ms to scan 1 urls, producing 3 keys and 16 values
2022-05-06T06:53:41.544513+00:00 app[web.1]: May 06, 2022 6:53:41 AM org.javawebstack.httpserver.HTTPServer start
2022-05-06T06:53:41.544514+00:00 app[web.1]: INFO: HTTP-Server started on port 1337
I am not getting able to understand that my argument is providing --server.port=27061 but still the HTTP server is starting on port 1337.
I have already seen all the related available answers on Stack Overflow but none works for me.
I am using javawebstack httpserver
Could one please help me figure out the reason why my application written in Kotlinfails to run after it was built with Intellij Idea and deployed to Ubuntu 19.10 virtual machine ?
I use the following components:
Ktor 1.3.0
Netty for Ktor
Launch logs:
15:22:08.488 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
15:22:08.530 [main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
15:22:08.530 [main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 11
15:22:08.568 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
15:22:08.569 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
15:22:08.569 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
15:22:08.577 [main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: unavailable
java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
at io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31)
at io.netty.util.internal.PlatformDependent0$4.run(PlatformDependent0.java:225)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:219)
at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:273)
at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:225)
at io.netty.channel.epoll.Native.<clinit>(Native.java:57)
at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:39)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create(NettyApplicationEngine.kt:189)
at io.ktor.server.netty.NettyApplicationEngine.<init>(NettyApplicationEngine.kt:74)
at io.ktor.server.netty.Netty.create(Embedded.kt:14)
at io.ktor.server.netty.Netty.create(Embedded.kt:12)
at io.ktor.server.engine.EmbeddedServerKt.embeddedServer(EmbeddedServer.kt:79)
at io.ktor.server.engine.EmbeddedServerKt.embeddedServer$default(EmbeddedServer.kt:77)
at app.common.ApplicationKt.main(Application.kt:96)
15:22:08.581 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
15:22:08.582 [main] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable
java.lang.IllegalAccessException: class io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module #6d3af739
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
at java.base/java.lang.reflect.Method.invoke(Method.java:558)
at io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:335)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:326)
at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:273)
at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:225)
at io.netty.channel.epoll.Native.<clinit>(Native.java:57)
at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:39)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create(NettyApplicationEngine.kt:189)
at io.ktor.server.netty.NettyApplicationEngine.<init>(NettyApplicationEngine.kt:74)
at io.ktor.server.netty.Netty.create(Embedded.kt:14)
at io.ktor.server.netty.Netty.create(Embedded.kt:12)
at io.ktor.server.engine.EmbeddedServerKt.embeddedServer(EmbeddedServer.kt:79)
at io.ktor.server.engine.EmbeddedServerKt.embeddedServer$default(EmbeddedServer.kt:77)
at app.common.ApplicationKt.main(Application.kt:96)
15:22:08.586 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): unavailable
15:22:08.587 [main] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
15:22:08.710 [main] DEBUG io.netty.util.internal.PlatformDependent - maxDirectMemory: 249364480 bytes (maybe)
15:22:08.711 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
15:22:08.711 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
15:22:08.713 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: -1 bytes
15:22:08.713 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
15:22:08.714 [main] DEBUG io.netty.util.internal.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
15:22:08.714 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
15:22:08.716 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - -Dio.netty.native.workdir: /tmp (io.netty.tmpdir)
15:22:08.717 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - -Dio.netty.native.deleteLibAfterLoading: true
15:22:08.717 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - -Dio.netty.native.tryPatchShadedId: true
15:22:08.718 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - Unable to load the library 'netty_transport_native_epoll_x86_64', trying other loading mechanism.
I am following the example from here.
I also have the Eureka server running on localhost:8080.
As a next step I attempt to run the sample service, like this:
./gradlew :eureka-examples:runExampleService
Here is the output that I get:
$ ./gradlew :eureka-examples:runExampleService --stacktrace
Inferred project: eureka, version: 1.4.6-SNAPSHOT
Publication mavenNebula not found in project :.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
Publication named 'mavenNebula' does not exist for project ':' in task ':artifactoryPublish'.
None of the specified publications matched for project ':' - nothing to publish.
:eureka-client:compileJava UP-TO-DATE
:eureka-client:processResources UP-TO-DATE
:eureka-client:classes UP-TO-DATE
:eureka-client:writeManifestProperties UP-TO-DATE
:eureka-client:jar
:eureka-examples:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
:eureka-examples:processResources UP-TO-DATE
:eureka-examples:classes
:eureka-examples:runExampleService
[main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
[main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
[main] INFO com.netflix.config.DynamicPropertyFactory - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration#46ee7fe8
[main] INFO com.netflix.config.util.ConfigurationUtils - Loaded properties file file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-service.properties
[main] WARN com.netflix.config.util.ConfigurationUtils - file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-service.properties is already loaded
[main] INFO com.netflix.appinfo.providers.EurekaConfigBasedInstanceInfoProvider - Setting initial instance status as: STARTING
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON encoding codec LegacyJacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON decoding codec LegacyJacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML encoding codec XStreamXml
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML decoding codec XStreamXml
[main] INFO com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver - Resolving eureka endpoints via configuration
[main] INFO com.netflix.discovery.DiscoveryClient - Disable delta property : false
[main] INFO com.netflix.discovery.DiscoveryClient - Single vip registry refresh property : null
[main] INFO com.netflix.discovery.DiscoveryClient - Force full registry fetch : false
[main] INFO com.netflix.discovery.DiscoveryClient - Application is null : false
[main] INFO com.netflix.discovery.DiscoveryClient - Registered Applications size is zero : true
[main] INFO com.netflix.discovery.DiscoveryClient - Application version is -1: true
[main] INFO com.netflix.discovery.DiscoveryClient - Getting all instance registry info from the eureka server
[main] INFO com.netflix.discovery.DiscoveryClient - The response status is 200
[main] INFO com.netflix.discovery.DiscoveryClient - Starting heartbeat executor: renew interval is: 30
[main] INFO com.netflix.discovery.InstanceInfoReplicator - InstanceInfoReplicator onDemand update allowed rate per min is 4
Registering service to eureka with STARTING status
Simulating service initialization by sleeping for 2 seconds...
Done sleeping, now changing status to UP
[main] INFO com.netflix.discovery.DiscoveryClient - Saw local status change event StatusChangeEvent [timestamp=1458260744041, current=UP, previous=STARTING]
Waiting ... verifying service registration with eureka ...
[DiscoveryClient-InstanceInfoReplicator-0] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_SAMPLEREGISTERINGSERVICE/Alenas-MacBook-Pro.local: registering service...
[DiscoveryClient-InstanceInfoReplicator-0] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_SAMPLEREGISTERINGSERVICE/Alenas-MacBook-Pro.local - registration status: 204
Waiting ... verifying service registration with eureka ...
Waiting ... verifying service registration with eureka ...
Service started and ready to process requests..
> Building 88% > :eureka-examples:runExampleService
After I start the client, like this:
$ ./gradlew :eureka-examples:runExampleClient
Inferred project: eureka, version: 1.4.6-SNAPSHOT
Publication mavenNebula not found in project :.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
Publication named 'mavenNebula' does not exist for project ':' in task ':artifactoryPublish'.
None of the specified publications matched for project ':' - nothing to publish.
:eureka-client:compileJava UP-TO-DATE
:eureka-client:processResources UP-TO-DATE
:eureka-client:classes UP-TO-DATE
:eureka-client:writeManifestProperties UP-TO-DATE
:eureka-client:jar
:eureka-examples:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
:eureka-examples:processResources UP-TO-DATE
:eureka-examples:classes
:eureka-examples:runExampleClient
[main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
[main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
[main] INFO com.netflix.config.DynamicPropertyFactory - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration#46ee7fe8
[main] INFO com.netflix.config.util.ConfigurationUtils - Loaded properties file file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-client.properties
[main] WARN com.netflix.config.util.ConfigurationUtils - file:/Users/lenok/Documents/Programming/Github/eureka/eureka-examples/conf/sample-eureka-client.properties is already loaded
[main] INFO com.netflix.appinfo.providers.EurekaConfigBasedInstanceInfoProvider - Setting initial instance status as: STARTING
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON encoding codec LegacyJacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using JSON decoding codec JacksonJson
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML encoding codec XStreamXml
[main] INFO com.netflix.discovery.provider.DiscoveryJerseyProvider - Using XML decoding codec XStreamXml
[main] INFO com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver - Resolving eureka endpoints via configuration
[main] INFO com.netflix.discovery.DiscoveryClient - Disable delta property : false
[main] INFO com.netflix.discovery.DiscoveryClient - Single vip registry refresh property : null
[main] INFO com.netflix.discovery.DiscoveryClient - Force full registry fetch : false
[main] INFO com.netflix.discovery.DiscoveryClient - Application is null : false
[main] INFO com.netflix.discovery.DiscoveryClient - Registered Applications size is zero : true
[main] INFO com.netflix.discovery.DiscoveryClient - Application version is -1: true
[main] INFO com.netflix.discovery.DiscoveryClient - Getting all instance registry info from the eureka server
[main] INFO com.netflix.discovery.DiscoveryClient - The response status is 200
[main] INFO com.netflix.discovery.DiscoveryClient - Not registering with Eureka server per configuration
Found an instance of example service to talk to from eureka: sampleservice.mydomain.net:8001
healthCheckUrl: http://Alenas-MacBook-Pro.local:8001/healthcheck
override: UNKNOWN
Connected to server. Sending a sample request: FOO Thu Mar 17 17:11:33 PDT 2016
Waiting for server response..
Received response from server: BAR Thu Mar 17 17:11:33 PDT 2016
Exiting the client. Demo over..
BUILD SUCCESSFUL
Total time: 9.497 secs
It basically connects to the server and waits for response, etc.
At the same time on the service terminal I see the following happening. Sometimes when I do these actions I see the successful response on the eureka service:
Client got connected... processing request from the client
Received a request from the example client: FOO Thu Mar 17 17:30:16 PDT 2016
Sending the response to the client: BAR Thu Mar 17 17:30:16 PDT 2016
Simulating service doing work by sleeping for 10 seconds...
Removing registration from eureka
[main] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_SAMPLEREGISTERINGSERVICE/Alenas-MacBook-Pro.local - deregister status: 200
Shutting down server. Demo over.
BUILD SUCCESSFUL
Total time: 4 mins 53.331 secs
And sometimes it gives errors, like here:
Client got connected... processing request from the client
Received a request from the example client: FOO Thu Mar 17 17:33:30 PDT 2016
Sending the response to the client: BAR Thu Mar 17 17:33:30 PDT 2016
Simulating service doing work by sleeping for 10 seconds...
Removing registration from eureka
Exception in thread "main" java.lang.NoClassDefFoundError: com/netflix/discovery/shared/transport/decorator/EurekaHttpClientDecorator$2
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.cancel(EurekaHttpClientDecorator.java:71)
at com.netflix.discovery.DiscoveryClient.unregister(DiscoveryClient.java:886)
at com.netflix.discovery.DiscoveryClient.shutdown(DiscoveryClient.java:869)
at com.netflix.eureka.ExampleServiceBase.stop(ExampleServiceBase.java:89)
at com.netflix.eureka.ExampleServiceBase.start(ExampleServiceBase.java:80)
at com.netflix.eureka.ExampleEurekaService.main(ExampleEurekaService.java:45)
Caused by: java.lang.ClassNotFoundException: com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$2
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)
... 6 more
:eureka-examples:runExampleService FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':eureka-examples:runExampleService'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':eureka-examples:runExampleService'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365)
at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31)
at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:60)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 47 more
BUILD FAILED
Total time: 1 mins 1.267 secs
Please, help me get the example properly running. What might be the problem?
I am analysing a large project in Sonar and getting following error,
00:41:48.325 INFO - Base dir: C:\Users\Administrator\Desktop\sonar-runner-dist-2.4\sonar-runner-2.4\bin\.
00:41:48.325 INFO - Working dir: C:\Users\Administrator\Desktop\sonar-runner-dist-2.4\sonar-runner-2.4\bin\.\.sonar
00:41:48.325 INFO - Source encoding: UTF-8, default locale: en_US
00:41:48.325 INFO - Quality profile for java: PMD
00:41:48.332 INFO - Sensor QProfileSensor...
00:41:48.336 INFO - Sensor QProfileSensor done: 4 ms
00:41:48.336 INFO - Sensor CpdSensor...
00:41:48.336 INFO - SonarEngine is used for java
00:41:48.336 INFO - Sensor CpdSensor done: 0 ms
00:41:48.336 INFO - Sensor InitialOpenIssuesSensor...
00:41:48.486 INFO - Sensor InitialOpenIssuesSensor done: 150 ms
00:41:48.486 INFO - Sensor ProfileEventsSensor...
00:41:48.602 INFO - Sensor ProfileEventsSensor done: 116 ms
00:41:48.603 INFO - Sensor ProjectLinksSensor...
00:41:48.605 INFO - Sensor ProjectLinksSensor done: 2 ms
00:41:48.606 INFO - Sensor VersionEventsSensor...
00:41:48.631 INFO - Sensor VersionEventsSensor done: 26 ms
00:41:48.631 INFO - Sensor FileHashSensor...
00:41:48.631 INFO - Sensor FileHashSensor done: 0 ms
00:41:48.794 INFO - Execute decorators...
00:41:49.256 INFO - Store results in database
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1:19:23.133s
Final Memory: 11M/494M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.lang.StringBuilder.toString(StringBuilder.java:405)
at com.persistit.Value.get(Value.java:2143)
at com.persistit.DefaultValueCoder$ObjectFieldAccessor.fromValue(DefaultValueCoder.java:560)
at com.persistit.DefaultValueCoder.renderDefaultFields(DefaultValueCoder.java:1154)
at com.persistit.DefaultValueCoder.render(DefaultValueCoder.java:1132)
at com.persistit.DefaultValueCoder.get(DefaultValueCoder.java:1065)
at com.persistit.Value.get(Value.java:2413)
at com.persistit.encoding.CollectionValueCoder.render(CollectionValueCoder.java:220)
at com.persistit.encoding.CollectionValueCoder.get(CollectionValueCoder.java:167)
at com.persistit.Value.get(Value.java:2413)
at com.persistit.DefaultValueCoder$ObjectFieldAccessor.fromValue(DefaultValueCoder.java:560)
at com.persistit.DefaultValueCoder.renderDefaultFields(DefaultValueCoder.java:1154)
at com.persistit.DefaultValueCoder.render(DefaultValueCoder.java:1132)
at com.persistit.DefaultValueCoder.get(DefaultValueCoder.java:1065)
at com.persistit.Value.get(Value.java:2413)
at com.persistit.encoding.CollectionValueCoder.render(CollectionValueCoder.java:232)
at com.persistit.encoding.CollectionValueCoder.get(CollectionValueCoder.java:167)
at com.persistit.Value.get(Value.java:2413)
at com.persistit.DefaultValueCoder$ObjectFieldAccessor.fromValue(DefaultValueCoder.java:560)
at com.persistit.DefaultValueCoder.renderDefaultFields(DefaultValueCoder.java:1154)
at com.persistit.DefaultValueCoder.render(DefaultValueCoder.java:1132)
at com.persistit.DefaultValueCoder.get(DefaultValueCoder.java:1065)
at com.persistit.Value.get(Value.java:2413)
at com.persistit.Value.get(Value.java:2015)
at org.sonar.batch.index.Cache$ValueIterator.next(Cache.java:400)
at org.sonar.batch.index.Cache$ValueIterator.next(Cache.java:373)
at org.sonar.core.issue.db.IssueStorage.batchInsert(IssueStorage.java:77)
at org.sonar.core.issue.db.IssueStorage.save(IssueStorage.java:66)
at org.sonar.batch.issue.IssuePersister.persist(IssuePersister.java:52)
at org.sonar.batch.phases.PhaseExecutor.executePersisters(PhaseExecutor.java:163)
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Can any one help me in finding out error,i am analysing project by setting java heap to 2048m in wrapper.conf i got out of memory heap size,so i tired to set java heap size to 5120 and sonar-runner-opts to 8192 but still its failing at same point,
These are the plugins which i have used abacus,checkstyles,pmd,java,useless code tracker
Database:mysql
Thanks in advance
Check the answer of this question .. it will help you wither to set the memory or fixing the issue of wrong selection with file extension
Sonar - OutOfMemoryError: Java heap space
If your code is to big then you have to break it into modules .. check this
http://docs.codehaus.org/display/ENUNCIATE/Multi-Module+Projects
I hope this could help!
I have downloaded the DataStax build of cassandra (dsc...-bin.tar.gz) and unzipped appropriately onto a Solaris Server machine. After editing configuration directories in accordance to http://wiki.apache.org/cassandra/GettingStarted/, I tried starting cassandra for the first time using "./cassandra -f" from ~/cassandra/bin, but encounter an exception on startup that results in a stack trace.
The log file is below.
I have installed the same build of cassandra on a windows machine (for testing) but have never encountered this type of error. I'd appreciate it if Cassandra vets could help me out.
System.log:
> INFO [main] 2012-07-31 15:02:02,608 AbstractCassandraDaemon.java (line 100) Logging initialized
INFO [main] 2012-07-31 15:02:02,636 AbstractCassandraDaemon.java (line 121) JVM vendor/version: Java HotSpot(TM) Server VM/1.6.0_04
INFO [main] 2012-07-31 15:02:02,638 AbstractCassandraDaemon.java (line 122) Heap size: 2091843584/2093940736
INFO [main] 2012-07-31 15:02:02,640 AbstractCassandraDaemon.java (line 123) Classpath: ./../conf:./../build/classes/main:./../build/classes/thrift:./../lib/antlr-3.2.jar:./../lib/apache-cassandra-1.1.2.jar:./../lib/apache-cassandra-clientutil-1.1.2.jar:./../lib/apache-cassandra-thrift-1.1.2.jar:./../lib/avro-1.4.0-fixes.jar:./../lib/avro-1.4.0-sources-fixes.jar:./../lib/commons-cli-1.1.jar:./../lib/commons-codec-1.2.jar:./../lib/commons-lang-2.4.jar:./../lib/compress-lzf-0.8.4.jar:./../lib/concurrentlinkedhashmap-lru-1.3.jar:./../lib/guava-r08.jar:./../lib/high-scale-lib-1.1.2.jar:./../lib/jackson-core-asl-1.9.2.jar:./../lib/jackson-mapper-asl-1.9.2.jar:./../lib/jamm-0.2.5.jar:./../lib/jline-0.9.94.jar:./../lib/json-simple-1.1.jar:./../lib/libthrift-0.7.0.jar:./../lib/log4j-1.2.16.jar:./../lib/metrics-core-2.0.3.jar:./../lib/servlet-api-2.5-20081211.jar:./../lib/slf4j-api-1.6.1.jar:./../lib/slf4j-log4j12-1.6.1.jar:./../lib/snakeyaml-1.6.jar:./../lib/snappy-java-1.0.4.1.jar:./../lib/snaptree-0.1.jar:./../lib/jamm-0.2.5.jar
INFO [main] 2012-07-31 15:02:02,649 CLibrary.java (line 62) JNA not found. Native methods will be disabled.
INFO [main] 2012-07-31 15:02:02,708 DatabaseDescriptor.java (line 127) Loading settings from file:/opt/james/cassandra/conf/cassandra.yaml
INFO [main] 2012-07-31 15:02:03,502 DatabaseDescriptor.java (line 180) DiskAccessMode 'auto' determined to be standard, indexAccessMode is standard
INFO [main] 2012-07-31 15:02:04,734 DatabaseDescriptor.java (line 247) Global memtable threshold is enabled at 665MB
ERROR [main] 2012-07-31 15:02:05,385 AbstractCassandraDaemon.java (line 370) Exception encountered during startup
org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] null
at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:229)
at org.xerial.snappy.Snappy.<clinit>(Snappy.java:44)
at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:45)
at org.apache.cassandra.io.compress.SnappyCompressor.isAvailable(SnappyCompressor.java:55)
at org.apache.cassandra.io.compress.SnappyCompressor.<clinit>(SnappyCompressor.java:37)
at org.apache.cassandra.config.CFMetaData.<clinit>(CFMetaData.java:76)
at org.apache.cassandra.config.KSMetaData.systemKeyspace(KSMetaData.java:79)
at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java:439)
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:118)
at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:126)
at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:353)
at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:106)
The problem is in the cassandra dependencies libraries. Apparently, Cassandra 1.1.2 (which I am using) relies on native methods for Snappy Compression. Cassandra 1.1.0 does not depend on native methods so it works without a problem!