Cannot deploy jboss on AWS - amazon-web-services

folks.
I'm following this tutorial to deploy the c3-pro stack on AWS:
https://github.com/C3-PRO/c3-pro-server
I've followed all the steps, these are my configuration files:
standalone.xml
<datasource jndi-name="java:jboss/datasources/c3proDS" pool-name="c3proDS" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:thin:#localhost:1521:XE</connection-url>
<driver>ojdbc14.jar</driver>
<security>
<security-domain>secure-c3pro-credentials</security-domain>
</security>
</datasource>
<drivers>
And this is the security domain part (note the I removed the 'auth' part in c3proAuthDS as it appears in the tutorial)
<security-domain name="StaticUserPwd" cache-type="default">
<authentication>
<login-module code="org.bch.security.oauth.OAuth2LoginModule" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/c3proDS"/>
<module-option name="principalsQuery" value="select passwd from Users where username=?"/>
<module-option name="rolesQuery" value="select userRoles, 'Roles' from UserRoles where username=?"/>
<module-option name="hashAlgorithm" value="SHA1"/>
<module-option name="hashEncoding" value="BASE64"/>
<module-option name="hashCharset" value="UTF-8"/>
<module-option name="hashUserPassword" value="true"/>
<module-option name="hashStorePassword" value="false"/>
</login-module>
</authentication>
I also copied the ojdbc14.jar into the deployment folder in jboss:
cd /usr/share/jboss-as-7.1.1.Final/standalone/deployments/
ojdbc14.jar ojdbc14.jar.deployed README.txt
When I try to launch jboss I get the following error:
sh /usr/share/jboss-as-7.1.1.Final/bin/standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/share/jboss-as-7.1.1.Final
JAVA: /usr/lib/jvm/java/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
10:40:12,511 INFORMACIÓN [org.jboss.modules] JBoss Modules version 1.1.5.GA
10:40:12,797 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
10:40:12,852 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
10:40:13,971 INFO [org.xnio] XNIO Version 3.0.3.GA
10:40:13,995 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
10:40:14,006 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
10:40:14,018 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
10:40:14,069 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
10:40:14,082 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
10:40:14,117 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
10:40:14,165 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
10:40:14,169 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
10:40:14,209 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
10:40:14,238 INFO [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
10:40:14,277 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
10:40:14,311 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final
10:40:14,361 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
10:40:14,423 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
10:40:14,699 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
10:40:14,760 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA
10:40:15,218 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Arrancando Coyote HTTP/1.1 en puerto http--127.0.0.1-8080
10:40:15,573 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
10:40:15,580 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory /usr/share/jboss-as-7.1.1.Final/standalone/deployments
10:40:15,667 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:4447
10:40:15,672 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
10:40:15,892 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.ojdbc14_jar (missing) dependents: [service jboss.data-source.java:jboss/datasources/c3proDS]
10:40:15,928 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ojdbc14.jar"
10:40:16,305 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 10.2)
10:40:16,415 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/c3proDS]
10:40:16,417 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990
10:40:16,417 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 4233ms - Started 159 of 237 services (76 services are passive or on-demand)
10:40:16,476 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ojdbc14.jar"
10:40:16,476 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.jdbc-driver.ojdbc14_jar (no longer required)
And then I have to cancel it with CTRL +C because I cannot write anymore.
I have tried to run it in background with & and then try to run
mvn clean package
and
mvn jboss-as:deploy
This is what I get:
mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building c3pro server 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # c3pro-server ---
[INFO] Deleting /home/ec2-user/c3-pro/c3-pro-server/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # c3pro-server ---
[INFO] Compiling 26 source files to /home/ec2-user/c3-pro/c3-pro-server/target/classes
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (make-a-jar) # c3pro-server ---
[INFO] Building jar: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.jar
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # c3pro-server ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) # c3pro-server ---
[INFO] Surefire report directory: /home/ec2-user/c3-pro/c3-pro-server/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # c3pro-server ---
[INFO] Packaging webapp
[INFO] Assembling webapp [c3pro-server] in [/home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/ec2-user/c3-pro/c3-pro-server/src/main/webapp]
[INFO] Webapp assembled in [603 msecs]
[INFO] Building war: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.520 s
[INFO] Finished at: 2018-07-25T10:43:12Z
[INFO] Final Memory: 22M/54M
[INFO] ------------------------------------------------------------------------
mvn jboss-as:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building c3pro server 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> jboss-as-maven-plugin:7.3.Final:deploy (default-cli) > package # c3pro-server >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # c3pro-server ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (make-a-jar) # c3pro-server ---
[INFO] Building jar: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.jar
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # c3pro-server ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) # c3pro-server ---
[INFO] Surefire report directory: /home/ec2-user/c3-pro/c3-pro-server/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # c3pro-server ---
[INFO] Packaging webapp
[INFO] Assembling webapp [c3pro-server] in [/home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/ec2-user/c3-pro/c3-pro-server/src/main/webapp]
[INFO] Webapp assembled in [327 msecs]
[INFO] Building war: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] <<< jboss-as-maven-plugin:7.3.Final:deploy (default-cli) < package # c3pro-server <<<
[INFO]
[INFO]
[INFO] --- jboss-as-maven-plugin:7.3.Final:deploy (default-cli) # c3pro-server ---
jul 25, 2018 10:45:00 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA
jul 25, 2018 10:45:00 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA
jul 25, 2018 10:45:00 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.12.GA
10:45:04,178 INFO [org.jboss.as.repository] (management-handler-thread - 1) JBAS014900: Content added at location /usr/share/jboss-as-7.1.1.Final/standalone/data/content/ae/321f027724d11967669f345f2941400cb2e85a/content
10:45:04,195 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "c3pro-server.war"
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000df322000, 33685504, 0) failed; error='No se pudo asignar memoria' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 33685504 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/jvm-3373/hs_error.log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.796 s
[INFO] Finished at: 2018-07-25T10:45:06Z
[INFO] Final Memory: 18M/128M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default-cli) on project c3pro-server: Error executing FORCE_DEPLOY: Operation failed: Channel closed -> [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/MojoExecutionException
Is it a memory problem? In this case, how can I solve it?
Thanks.

Solved by changing instance to another with 4GB of RAM.

Related

Packaging custom aws-java-sdk-bundle jar with maven

I am trying to customize the aws-java-sdk-bundle and packaging it with those modifications I made on my repo (specifically I modified the AmazonS3Client) . So far I have tried modifying the dependency in pom.xml to use the local aws-sdk jar instead of pulling it from maven:
--- a/aws-java-sdk-bundle/pom.xml
+++ b/aws-java-sdk-bundle/pom.xml
## -24,6 +24,8 ##
<artifactId>aws-java-sdk</artifactId>
<groupId>com.amazonaws</groupId>
<optional>false</optional>
+ <scope>system</scope>
+ <systemPath>${project.basedir}/../aws-java-sdk/target/aws-java-sdk-1.11.271.jar</systemPath>
<version>1.11.271</version>
</dependency>
</dependencies>
However, the result is that the bundle jar is empty. This is because as I realized, the aws-sdk is also empty if I try to package it:
$ mvn package -Dmaven.test.skip
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.amazonaws:aws-java-sdk >---------------------
[INFO] Building AWS SDK For Java 1.11.271
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # aws-java-sdk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/user/ftx/aws-sdk-java/aws-java-sdk/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) # aws-java-sdk ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # aws-java-sdk ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) # aws-java-sdk ---
[INFO] Not compiling test sources
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # aws-java-sdk ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # aws-java-sdk ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.339 s
[INFO] Finished at: 2021-12-06T01:36:25-08:00
[INFO] ------------------------------------------------------------------------
My question is: what is a recommended way on how to build the aws-sdk-bundle jar from local sources. (I want the bundle to contain my custom classes.)

How to configure AWS SAM on Eclipse and Window 10

I am using STS 4 (https://spring.io/tools) and added Eclipse AWS toolkit (https://marketplace.eclipse.org/content/aws-toolkit-eclipse) .
After restart STS we can see everything is good.
Now i have installed AWS SAM CLI local
And configured path where we have sam.exe
I have Java 8 and Python 2.7 and 3.6 and docker installed in my local.
Now created AWS Java serverless project maven install and try to run sam local
https://aws.amazon.com/blogs/developer/aws-toolkit-for-eclipse-locally-debug-your-lambda-functions-and-api-gateway/
Update :
When i am try to run SAM-CLI its working and returning response.
Template.yaml
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: AWS Lambda Sample Project
Resources:
Products:
Type: AWS::Serverless::Function
Properties:
Handler: com.example.handler.LambdaHandler
CodeUri: ./target/lambda-project-1.0-SNAPSHOT.jar
Runtime: java8
Timeout: 300
Environment:
Variables:
ENVIRONMENT: "test"
Events:
ListProducts:
Type: Api
Properties:
Path: /lambda
Method: post
And run configuration
**Maven build :**
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.example:lambda-project >---------------------
[INFO] Building lambda-project 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # lambda-project ---
[INFO] Deleting C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # lambda-project ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) # lambda-project ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 6 source files to C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # lambda-project ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) # lambda-project ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # lambda-project ---
[INFO] Surefire report directory: C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.example.handler.LambdaHandlerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.291 sec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # lambda-project ---
[INFO] Building jar: C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\target\lambda-project-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-shade-plugin:3.1.0:shade (default) # lambda-project ---
[INFO] Including com.amazonaws:aws-lambda-java-events:jar:2.0.2 in the shaded jar.
[INFO] Including joda-time:joda-time:jar:2.6 in the shaded jar.
[INFO] Including com.amazonaws:aws-lambda-java-core:jar:1.2.0 in the shaded jar.
[INFO] Including com.typesafe:config:jar:1.3.1 in the shaded jar.
[INFO] Including org.apache.logging.log4j:log4j-api:jar:2.5 in the shaded jar.
[INFO] Including org.apache.logging.log4j:log4j-core:jar:2.5 in the shaded jar.
[INFO] Including com.google.code.gson:gson:jar:2.8.2 in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\target\lambda-project-1.0-SNAPSHOT.jar with C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\target\lambda-project-1.0-SNAPSHOT-shaded.jar
[INFO] Dependency-reduced POM written at: C:\Users\vaqua\Documents\code\AWS-Lambda-Example-master\AWS-Lambda-Example-master\dependency-reduced-pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.510 s
[INFO] Finished at: 2018-12-25T21:27:10-06:00
[INFO] ------------------------------------------------------------------------
Error logs:
Failed to launch SAM Local.
com.amazonaws.eclipse.core.exceptions.AwsActionException
Logs:
eclipse.buildId=4.0.2.201811300843-RELEASE
java.version=1.8.0_191
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.springframework.boot.ide.branding.sts4
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springframework.boot.ide.branding.sts4
com.amazonaws.eclipse.lambda
Error
Tue Dec 25 21:21:52 CST 2018
Failed to launch SAM Local.
com.amazonaws.eclipse.core.exceptions.AwsActionException
at com.amazonaws.eclipse.lambda.launching.SamLocalDelegate.launch(SamLocalDelegate.java:159)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:862)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:720)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1029)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1243)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NullPointerException
at com.amazonaws.eclipse.lambda.launching.SamLocalDelegate.launch(SamLocalDelegate.java:116)
... 5 more
eclipse.buildId=4.0.2.201811300843-RELEASE
java.version=1.8.0_191
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.springframework.boot.ide.branding.sts4
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springframework.boot.ide.branding.sts4
org.eclipse.m2e.logback.appender
Warning
Tue Dec 25 21:21:47 CST 2018
Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
I am wonder if anyone solved that issue ?
Had the same issue.
First you should open the command line and run
where sam
If you find that the path contains any spaces, for example, if it has 'Program Files' in its path then uninstall samcli and reinstall it. Make sure that its path does not contain any spaces, for example: C:\Amazon\SAMCLI. And when you're done installing samcli rerun the previous code in cmd and copy the path and paste in eclipse.
Secondly, you should follow Dimman's advice by creating a config file. You can do so by using awscli by running
aws configuration
This will create the file automatically. Save and restart and everything should be fine.
Good luck.
Had the same issue, made the following changes and was able to continue...
In your section "And run configuration", in the image.
Make sure that you have expanded the "Advanced" section and added the needed info,
AWS Configuration
SAM Local Configuration (this should be setup).
Also try adding doing the following.
In your folder
C:\Users\YOUR_USER.aws
You should see two files, credentials, and config.
I did not have the file config so I created it and added the following:
[default]
region=YOUR_REGION
I also added the following line under the [username] in the credentials file:
region=YOUR_REGION
I saved and restarted everything and got it to work.
Now I have some other issues. But they are specific to JSON parsing.

Kurento tutorial does not run

I am trying to run the Kurento "WebRTC Magic Mirror" tutorial from the Linux Mint terminal, but get these errors.
mvn compile exec:java -Dkms.url=ws://(MY aws ip):8888/kurento
Warning: JAVA_HOME environment variable is not set.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Kurento Java Tutorial - Magic Mirror 6.7.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java-version) # kurento-magic-mirror ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) # kurento-magic-mirror ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-bytecode-version) # kurento-magic-mirror ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-ban-duplicate-classes) # kurento-magic-mirror ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message:
Duplicate classes found:
Found in:
org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
commons-logging:commons-logging:jar:1.1.3:compile
Duplicate classes:
org/apache/commons/logging/impl/SimpleLog$1.class
org/apache/commons/logging/LogConfigurationException.class
org/apache/commons/logging/Log.class
org/apache/commons/logging/impl/NoOpLog.class
org/apache/commons/logging/impl/SimpleLog.class
org/apache/commons/logging/LogFactory.class
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-ban-circular-dependencies) # kurento-magic-mirror ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create-timestamp (get-build-timestamp) # kurento-magic-mirror ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create (get-scm-revision) # kurento-magic-mirror ---
[INFO] Executing: /bin/sh -c cd '/home/jonado/kurento-tutorial-java/kurento-magic-mirror' && 'git' 'rev-parse' '--verify' 'HEAD'
[INFO] Working directory: /home/jonado/kurento-tutorial-java/kurento-magic-mirror
[INFO] Storing buildNumber: a54263bde3275fc6e49db51be17268040df4e53d at timestamp: 1530780937453
[WARNING] Cannot get the branch information from the git repository:
Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref
[INFO] Executing: /bin/sh -c cd '/home/jonado/kurento-tutorial-java/kurento-magic-mirror' && 'git' 'rev-parse' '--verify' 'HEAD'
[INFO] Working directory: /home/jonado/kurento-tutorial-java/kurento-magic-mirror
[INFO] Storing buildScmBranch: UNKNOWN
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # kurento-magic-mirror ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # kurento-magic-mirror ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /home/jonado/kurento-tutorial-java/kurento-magic-mirror/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.688 s
[INFO] Finished at: 2018-07-05T11:55:37+03:00
[INFO] Final Memory: 29M/599M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project kurento-magic-mirror: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [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/MojoFailureException
I have installed Kurento Media server on AWS as written in the documentation (part 4.1): https://media.readthedocs.org/pdf/doc-kurento/stable/doc-kurento.pdf , and after that just followed the instructions to run the tutorial.
The first warning message says:
JAVA_HOME environment variable is not set.
As Media Server is located on AWS, isn't it suppose to be already installed? If not, how can I install it?
Also, I wanted to configure STUN server, however I don't know where to find WebRtcEndpoint.conf.ini file, as Kurento Media Server is located on AWS. So, where is it possible to find WebRtcEndpoint.conf.ini file?
And the main question: what should I change/install/update in order to successfully run the tutorial?
You need to install the Java JDK to run any of the Java demos on your computer. The Java demo is separate from the Kurento Media Server, it uses the Java Kurento Client libraries to send/receive messages from the Kurento Media Server.
And in regards to WebRtcEndpoint.conf.ini, that is located on the AWS server where you deployed Kurento Media Server. You will need to edit the file (/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini) and restart Kurento for the changes to take effect. Related Kurento Config docs

JHipster Cloudfoundary throwing "Error uploading application" error

I am attempting to push my Jhipster app to cloud foundry using jhipster cloudfoundary command. Right at the end of the process it is throwing an error
Error uploading application.
GetFileAttributesEx C:\IBP\03_Product\modelDR\03_Product\01_Jhipster\modeldr006\target\*.war: The filename, directory name or volume label syntax is incorrect.
Google is suggesting things like GetFileAttributesEx doesnt like special characters. I cant think what I could be doing to cause a file name syntax error. I tried deleting the target*.war files and re-compiling but no help. I am on Windows 8.1 64, with all updates applied.
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\IBP\03_Product\modelDR\03_Product\01_Jhipster\modeldr006>yo jhipster:cloudfoundry
CloudFoundry configuration is starting
? Name to deploy as: modeldr006
? Which profile would you like to use? dev
? What is the name of your database service? cleardb
? What is the name of your database plan? spark
Creating Cloud Foundry deployment files
identical deploy\cloudfoundry\manifest.yml
Checking for an existing Cloud Foundry hosting environment...
Creating your Cloud Foundry hosting environment, this may take a couple minutes...
Creating the database
Creating service modeldr006 in org ModelDrivers / space development as greg.soulsby#ibpartners.co.uk...
OK
Building the application with the development profile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for us.modeldrivers.us:modeldr006:war:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.hateoas:spring-hateoas:jar -> duplicate declaration of version (?) # line
318, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building modeldr006 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) # modeldr006 ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # modeldr006 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 22 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # modeldr006 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 115 source files to C:\IBP\03_Product\modelDR\03_Product\01_Jhipster\modeldr006\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # modeldr006 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # modeldr006 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.15:test (default-test) # modeldr006 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) # modeldr006 ---
[INFO] Packaging webapp
[INFO] Assembling webapp [modeldr006] in [C:\IBP\03_Product\modelDR\03_Product\01_Jhipster\modeldr006\target\modeldr006-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\IBP\03_Product\modelDR\03_Product\01_Jhipster\modeldr006\src\main\webapp]
[INFO] Webapp assembled in [8576 msecs]
[INFO] Building war: C:\IBP\03_Product\modelDR\03_Product\01_Jhipster\modeldr006\target\modeldr006-0.0.1-SNAPSHOT.war
[INFO]
[INFO] --- spring-boot-maven-plugin:1.1.9.RELEASE:repackage (default) # modeldr006 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.544 s
[INFO] Finished at: 2014-11-26T18:16:04+00:00
[INFO] Final Memory: 44M/391M
[INFO] ------------------------------------------------------------------------
Pushing the application to Cloud Foundry
Using manifest file ./deploy/cloudfoundry/manifest.yml
Creating app modeldr006 in org ModelDrivers / space development as greg.soulsby#ibpartners.co.uk...
OK
Using route modeldr006.cfapps.io
Binding modeldr006.cfapps.io to modeldr006...
OK
Uploading modeldr006...
FAILED
Error uploading application.
GetFileAttributesEx C:\IBP\03_Product\modelDR\03_Product\01_Jhipster\modeldr006\target\*.war: The filename, directory name or volume label syntax is incorrect.
× { [Error: Command failed: ] killed: false, code: 1, signal: null }

mule-Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.5.9:wsdl2java (default) on project : javax/xml/ws/Action

I'm following http://www.mulesoft.org/documentation... to create a connector to a SOAP Service via CXF Client Example. When I add the required maven dependency code in ,pom file and clean and run it(on mule studio)...I'm getting the following error :
Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.5.9:wsdl2java (default) on project sunsetriseconnector: javax/xml/ws/Action
The full stack trace looks like this :
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Sunset Sunrise Service 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> studio-maven-plugin:3.4.2:studio (default-cli) # sunsetriseconnector >>>
[INFO]
[INFO] --- mule-devkit-maven-plugin:3.4.0:attach-test-resources (default-attach-test-resources) # sunsetriseconnector ---
[INFO] Attaching test resource D:\MuleExamples\sunsetrise\src\main\app
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-alpha-4:enforce (enforce-maven-version) # sunsetriseconnector ---
[INFO]
[INFO] --- mule-devkit-maven-plugin:3.4.0:generate-sources (default-generate-sources) # sunsetriseconnector ---
[INFO] Source directory: D:\MuleExamples\sunsetrise\target\generated-sources\mule added
[INFO] Resource directory: D:\MuleExamples\sunsetrise\target\generated-sources\mule added
[INFO] Sorting generator executing based on their dependencies...
[INFO] Searching for classes annotated with #Connector
[INFO] Validating sunsetriseConnector class
[INFO] Validating Multi-module consistency
[INFO] Adding registry bootstrap entry for org.tutorial.sunsetrise.agents.DefaultSplashScreenAgent as DefaultSplashScreenAgent
[INFO] Generating message processor as org.tutorial.sunsetrise.processors.MyProcessorMessageProcessor for method myProcessor in sunsetriseConnector
[INFO] Generating config element definition parser as org.tutorial.sunsetrise.config.sunsetriseConnectorConfigDefinitionParser for class sunsetriseConnector
[INFO] Generating bean definition parser as org.tutorial.sunsetrise.config.MyProcessorDefinitionParser for message processor org.tutorial.sunsetrise.processors.MyProcessorMessageProcessor
[INFO] Validating example for method: myProcessor
log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.xml.PluggableSchemaResolver).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO]
[INFO] --- cxf-codegen-plugin:2.5.9:wsdl2java (default) # sunsetriseconnector ---
May 2, 2014 12:18:13 PM org.apache.cxf.xjc.bg.BooleanGetterPlugin run
INFO: Running boolean getter plugin.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.464s
[INFO] Finished at: Fri May 02 12:18:13 IST 2014
[INFO] Final Memory: 33M/62M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.5.9:wsdl2java (default) on project sunsetriseconnector: javax/xml/ws/Action -> [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/MojoExecutionException
I'm pretty new in mule and also in Apache cxf. Please help me.
Thanks.
I got the fix by adding jaxws-api-2.2.1.jar inside C:\Program Files (x86)\Java\jdk1.6.0_02\jre\lib\endorsed folder.
If you're using MuleStudio, which is built on Eclipse, you should import the JAR into your build path. See This SO answer
If you're using Mule ESB Standalone, you should drop the JAR into the MULE_HOME/apps/yourapp/lib directory if you need it on a per-app basis, or in the /MULE_HOME/lib/user
See the class loader documentation