Build Error
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with pom.xml and the command mvn clean compile exec:java, then inspect the S3 call at S3Sample.java:86 alongside both reported failures. Reproduce the build and execution errors in the documented environment; done means the sample compiles and runs without the reported Java compatibility or missing-class failures.
Written by the indexing model from the issue text.
Description
Very new to programming and AWS SDK Java... Just getting started..
After following all the instructions am getting still the Build Failure still.
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.amazonaws.samples:aws-java-sample >----------------
[INFO] Building aws-java-sample 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ aws-java-sample ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ aws-java-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master${env.HOME}.aws
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ aws-java-sample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.761 s
[INFO] Finished at: 2019-11-24T17:04:57-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project aws-java-sample: Compilation failure: Compilation failure:
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[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
C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master>pom.xml
C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master>pom.xml
C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master>mvn clean compile exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.amazonaws.samples:aws-java-sample >----------------
[INFO] Building aws-java-sample 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ aws-java-sample ---
[INFO] Deleting C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ aws-java-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master${env.HOME}.aws
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ aws-java-sample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\userm\Documents\AWS_IOT\aws-java-sample-master\target\classes
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) > validate @ aws-java-sample >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) < validate @ aws-java-sample <<<
[INFO]
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ aws-java-sample ---
Getting Started with Amazon S3
Creating bucket my-first-s3-bucket-e53f604f-8bb8-43c2-941d-cec1e20fc1c9
[WARNING]
java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:297)
at java.lang.Thread.run (Thread.java:830)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at com.amazonaws.util.Base64.encodeAsString (Base64.java:36)
at com.amazonaws.auth.AbstractAWSSigner.signAndBase64Encode (AbstractAWSSigner.java:70)
at com.amazonaws.auth.AbstractAWSSigner.signAndBase64Encode (AbstractAWSSigner.java:58)
at com.amazonaws.services.s3.internal.S3Signer.sign (S3Signer.java:127)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest (AmazonHttpClient.java:652)
at com.amazonaws.http.AmazonHttpClient.executeHelper (AmazonHttpClient.java:460)
at com.amazonaws.http.AmazonHttpClient.execute (AmazonHttpClient.java:295)
at com.amazonaws.services.s3.AmazonS3Client.invoke (AmazonS3Client.java:3697)
at com.amazonaws.services.s3.AmazonS3Client.createBucket (AmazonS3Client.java:788)
at com.amazonaws.services.s3.AmazonS3Client.createBucket (AmazonS3Client.java:713)
at com.amazonaws.samples.S3Sample.main (S3Sample.java:86)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:297)
at java.lang.Thread.run (Thread.java:830)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
at java.net.URLClassLoader.findClass (URLClassLoader.java:436)
at java.lang.ClassLoader.loadClass (ClassLoader.java:588)
at java.lang.ClassLoader.loadClass (ClassLoader.java:521)
at com.amazonaws.util.Base64.encodeAsString (Base64.java:36)
at com.amazonaws.auth.AbstractAWSSigner.signAndBase64Encode (AbstractAWSSigner.java:70)
at com.amazonaws.auth.AbstractAWSSigner.signAndBase64Encode (AbstractAWSSigner.java:58)
at com.amazonaws.services.s3.internal.S3Signer.sign (S3Signer.java:127)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest (AmazonHttpClient.java:652)
at com.amazonaws.http.AmazonHttpClient.executeHelper (AmazonHttpClient.java:460)
at com.amazonaws.http.AmazonHttpClient.execute (AmazonHttpClient.java:295)
at com.amazonaws.services.s3.AmazonS3Client.invoke (AmazonS3Client.java:3697)
at com.amazonaws.services.s3.AmazonS3Client.createBucket (AmazonS3Client.java:788)
at com.amazonaws.services.s3.AmazonS3Client.createBucket (AmazonS3Client.java:713)
at com.amazonaws.samples.S3Sample.main (S3Sample.java:86)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:297)
at java.lang.Thread.run (Thread.java:830)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.522 s
[INFO] Finished at: 2019-11-24T17:07:57-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project aws-java-sample: An exception occured while executing the Java class. null: InvocationTargetException: javax/xml/bind/DatatypeConverter: javax.xml.bind.DatatypeConverter -> [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
Please help !!! Thanks in advance
- Dominant language
- Java
- Stars
- 241
- Forks
- 345
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/aws-java-sample
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Build Failure Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
aws-samples/aws-java-sample#25 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws-samples/aws-java-sample#24 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
aws-samples/aws-java-sample#19 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in aws-samples/aws-java-sample
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
checkstyle/test-configs#263 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·