AWS Greengrass Stream Manager on Windows fails - windows
We are having an issue with running the stream manager component on an AWS Greengrass Windows (latest version 2.8) installation. We followed all instructions for installation but still with each deployment try we get the following exception:
aws.greengrass.StreamManager: stdout. java.lang.RuntimeException: java.nio.file.attribute.UserPrincipalNotFoundException.
Any idea? We tried installing an older version of greengrass (2.7) but same issue.
It would be great if you could help us. Thx
022-10-26T18:22:10.639Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule.mapDb(DataStoreModule.java:103) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.639Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MapDbFactory.get(DataStoreModule_MapDbFactory.java:29) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.639Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MapDbFactory.get(DataStoreModule_MapDbFactory.java:10) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.639Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.639Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MessageStreamDefDaoFactory.get(DataStoreModule_MessageStreamDefDaoFactory.java:32) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.640Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MessageStreamDefDaoFactory.get(DataStoreModule_MessageStreamDefDaoFactory.java:11) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.640Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.640Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_LogStoreFactory.get(DataStoreModule_LogStoreFactory.java:59) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.640Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_LogStoreFactory.get(DataStoreModule_LogStoreFactory.java:15) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.642Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.642Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.StreamServerModule_StreamServerFactory.get(StreamServerModule_StreamServerFactory.java:69) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.642Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.StreamServerModule_StreamServerFactory.get(StreamServerModule_StreamServerFactory.java:16) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.642Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.642Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DaggerStreamManagerServiceComponent.streamServer(DaggerStreamManagerServiceComponent.java:284) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.643Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.StreamManagerService.main(StreamManagerService.java:44) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.643Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. Caused by: java.nio.file.attribute.UserPrincipalNotFoundException. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.643Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at sun.nio.fs.WindowsUserPrincipals.lookup(WindowsUserPrincipals.java:147) ~[?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.643Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at sun.nio.fs.WindowsFileSystem$LookupService$1.lookupPrincipalByGroupName(WindowsFileSystem.java:250) ~[?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.644Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.common.windows.WindowsPlatform.conditionalSetPermissions(WindowsPlatform.java:68) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.644Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule.mapDb(DataStoreModule.java:96) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.644Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. ... 14 more. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.758Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2022 Okt. 26 20:22:10,757 [INFO] (main) com.amazonaws.iot.greengrass.streammanager.server.GreengrassCoreV2SDKWrapper: Socket file path: \\.\pipe\NucleusNamedPipe-Cgreengrassv2. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.798Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. Okt. 26, 2022 8:22:10 NACHM. software.amazon.awssdk.eventstreamrpc.EventStreamRPCConnection$1 onConnectionSetup. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.798Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. INFORMATION: Socket connection \\.\pipe\NucleusNamedPipe-Cgreengrassv2:8033 to server result [AWS_ERROR_SUCCESS]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.846Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. Okt. 26, 2022 8:22:10 NACHM. software.amazon.awssdk.eventstreamrpc.EventStreamRPCConnection$1 onProtocolMessage. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.846Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. INFORMATION: Connection established with event stream RPC server. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2022-10-26T18:22:10.929Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2022 Okt. 26 20:22:10,929 [INFO] (main) com.amazonaws.iot.greengrass.streammanager.server.GreengrassCoreV2SDKHandler: Stream Manager reporting the state: ERRORED. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:10.932Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2022 Okt. 26 20:22:10,929 [INFO] (Thread-0) com.amazonaws.iot.greengrass.streammanager.StreamManagerService: Shutting down StreamManager services. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.127Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. Exception in thread "Thread-0" java.lang.RuntimeException: java.nio.file.attribute.UserPrincipalNotFoundException. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.128Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule.mapDb(DataStoreModule.java:103). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.128Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MapDbFactory.get(DataStoreModule_MapDbFactory.java:29). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.128Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MapDbFactory.get(DataStoreModule_MapDbFactory.java:10). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.128Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.128Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MessageStreamDefDaoFactory.get(DataStoreModule_MessageStreamDefDaoFactory.java:32). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.128Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_MessageStreamDefDaoFactory.get(DataStoreModule_MessageStreamDefDaoFactory.java:11). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.128Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.129Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_LogStoreFactory.get(DataStoreModule_LogStoreFactory.java:59). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.129Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule_LogStoreFactory.get(DataStoreModule_LogStoreFactory.java:15). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.129Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.129Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.StreamServerModule_StreamServerFactory.get(StreamServerModule_StreamServerFactory.java:69). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.129Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.StreamServerModule_StreamServerFactory.get(StreamServerModule_StreamServerFactory.java:16). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.129Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at dagger.internal.DoubleCheck.get(DoubleCheck.java:47). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.129Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DaggerStreamManagerServiceComponent.streamServer(DaggerStreamManagerServiceComponent.java:284). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.130Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.StreamManagerService.lambda$registerShutdownHook$0(StreamManagerService.java:64). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.130Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at java.base/java.lang.Thread.run(Thread.java:829). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.131Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. Caused by: java.nio.file.attribute.UserPrincipalNotFoundException. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.131Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at java.base/sun.nio.fs.WindowsUserPrincipals.lookup(WindowsUserPrincipals.java:147). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.131Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at java.base/sun.nio.fs.WindowsFileSystem$LookupService$1.lookupPrincipalByGroupName(WindowsFileSystem.java:250). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.131Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.common.windows.WindowsPlatform.conditionalSetPermissions(WindowsPlatform.java:68). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.132Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. at com.amazonaws.iot.greengrass.streammanager.dagger.DataStoreModule.mapDb(DataStoreModule.java:96). {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2022-10-26T18:22:11.132Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. ... 15 more. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
Related
mvn appengine:run - error 403 (spring boot web with jsp)
I got 403, 404 error when running with gg AppEngine [INFO] GCLOUD: WARNING: Your working directory, (E:\Eclipse Projects\ysuria) is not equal to your [INFO] GCLOUD: web application root (E:\Eclipse Projects\ysuria\target\ysuria-0.0.1-SNAPSHOT) [INFO] GCLOUD: You will not be able to access files from your working directory on the production server. [INFO] GCLOUD: [INFO] GCLOUD: 2018-03-20 11:18:50.595:INFO:oejs.Server:main: jetty-9.3.18.v20170406 [INFO] GCLOUD: 2018-03-20 11:18:57.362:WARN:oeja.ClassInheritanceHandler:qtp328638398-16: [INFO] GCLOUD: java.lang.NullPointerException [INFO] GCLOUD: at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) [INFO] GCLOUD: at org.eclipse.jetty.annotations.ClassInheritanceHandler.addToInheritanceMap(ClassInheritanceHandler.java:72) [INFO] GCLOUD: at org.eclipse.jetty.annotations.ClassInheritanceHandler.handle(ClassInheritanceHandler.java:58) [INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser$MyClassVisitor.visit(AnnotationParser.java:476) [INFO] GCLOUD: at org.objectweb.asm.ClassReader.accept(ClassReader.java:650) [INFO] GCLOUD: at org.objectweb.asm.ClassReader.accept(ClassReader.java:525) [INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:978) [INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:958) [INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:902) [INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851) [INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163) [INFO] GCLOUD: at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546) [INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [INFO] GCLOUD: at java.lang.Thread.run(Thread.java:748) here is my code https://github.com/NhuY97/ysuria thanks
How can I configure maven project so that tests are not broken when main code changes?
I noticed I can run into binary-compatibility problems between main source and test source in maven project configuration. When I change main code, and run maven test target the main code is recompiled, but dependent tests aren't. This may lead to java.lang.NoSuchMethodError. Here is simple example: project structure: mavenbug |- src/main/java/App.java |- src/test/java/AppClassTest.java |- pom.xml App.java: package mavenbug; public class App { public static class BaseData {} public static class DerivedData extends BaseData {} public void method(BaseData data) { System.out.println("hello2 " + data.getClass().toString()); } } AppClassTest.java: package mavenbug; import mavenbug.App.DerivedData; import org.junit.Test; public class AppClassTest { #Test public void test() { new App().method(new DerivedData()); } } pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>mavenbug</artifactId> <version>0.0.1-SNAPSHOT</version> <name>mavenbug</name> <description>simplest example of bug</description> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> </dependency> </dependencies> <build> <resources /> <testResources /> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <executions> <execution> <id>default-compile</id> <phase>compile</phase> <goals> <goal>compile</goal> </goals> </execution> <execution> <id>default-testCompile</id> <phase>test-compile</phase> <goals> <goal>testCompile</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <executions> <execution> <id>default-test</id> <phase>test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <reporting /> </project> Ok let's run maven test: [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mavenbug 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) # mavenbug --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # mavenbug --- [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to E:\workax4\mavenbug\target\classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # mavenbug --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # mavenbug --- [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to E:\workax4\mavenbug\target\test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # mavenbug --- [INFO] Surefire report directory: E:\workax4\mavenbug\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running mavenbug.AppClassTest hello2 class mavenbug.App$DerivedData Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.063 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] Nice, everything fine. Now change method signature in App.java to: public void method(DerivedData data) { This doesn't need any source change in AppClassTest.java, as call matches the new argument type. Let's re-run maven target test: [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mavenbug 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) # mavenbug --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # mavenbug --- [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to E:\workax4\mavenbug\target\classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # mavenbug --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # mavenbug --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # mavenbug --- [INFO] Surefire report directory: E:\workax4\mavenbug\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running mavenbug.AppClassTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.063 sec <<< FAILURE! test(mavenbug.AppClassTest) Time elapsed: 0.007 sec <<< ERROR! java.lang.NoSuchMethodError: mavenbug/App.method(Lmavenbug/App$BaseData;)V at mavenbug.AppClassTest.test(AppClassTest.java:11) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Results : Tests in error: test(mavenbug.AppClassTest): mavenbug/App.method(Lmavenbug/App$BaseData;)V Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.071 s [INFO] Finished at: 2015-02-12T12:50:17+01:00 [INFO] Final Memory: 38M/64M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project mavenbug: There are test failures. [ERROR] [ERROR] Please refer to E:\workax4\mavenbug\target\surefire-reports for the individual test results. [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 Opps. Test was looking for method with old param BaseData and it didn't found the same binary version. Can I change pom.xml somehow to avoid this? Or should I always use clean test as my target?
Getting error while running mvn server
I convered a regular java project t maven using eclipse configure->Convert to MVN and also added all dependecies in POM related to google api. I am getting the below error constantly when iam using mvn jetty:run. please let me know how to resolve this. [INFO] Building glass-qrlens 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-jetty-plugin:6.1.26:run (default-cli) > test-compile # glass-qrlens >>> [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) # glass-qrlens --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\sridharg\git\glass-qrlens\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # glass-qrlens --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # glass-qrlens --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\sridharg\git\glass-qrlens\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # glass-qrlens --- [INFO] No sources to compile [INFO] [INFO] <<< maven-jetty-plugin:6.1.26:run (default-cli) < test-compile # glass-qrlens <<< [INFO] [INFO] --- maven-jetty-plugin:6.1.26:run (default-cli) # glass-qrlens --- [INFO] Configuring Jetty for project: glass-qrlens [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.843 s [INFO] Finished at: 2014-10-25T15:49:55-05:00 [INFO] Final Memory: 7M/18M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.26:run (default-cli) on project glass-qrlens: Webapp source directory C:\Users\sridharg\git\glass- qrlens\src\main\webapp does not exist -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.26:run (default-cli) on project glass-qrlens: Weba pp source directory C:\Users\sridharg\git\glass-qrlens\src\main\webapp does not exist at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Webapp source directory C:\Users\sridharg\git\glass-qrlens\src\main\webapp does not exist at org.mortbay.jetty.plugin.AbstractJettyRunMojo.checkPomConfiguration(AbstractJettyRunMojo.java:228) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:395) at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210) at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more [ERROR] [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 Thanks, Sridhar G
Maven web projects will by default use the directory src/main/webapp for webresources. The jetty-maven-plugin doesn't know that you are using a different directory and hence you are getting this error. You can use something like <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.2.3.v20140905</version> <configuration> <webAppSourceDirectory>${project.basedir}/WebContent/</webAppSourceDirectory> <configuration> </plugin> to make the jetty-maven-plugin use a different webapp directory. Jetty is now an Eclipse project and I have used the same in the answer, but the old one which you are currently using does support the webAppSourceDirectory configuration. Read more about at the Eclipse Documentation
"Error reading archetype catalog" for maven 3.0.5
I have a problem with maven 3.0.5 in windows 7: when I make mvn archetype:generate -DgroupId=p1 -DartifactId=pn -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false in a command line, which is a basic command in maven. I have this error: [INFO] ------------------------------------------------------------------------ [INFO] Building carbon Maven Webapp 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) # carbon >>> [INFO] [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) # carbon <<< [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) # carbon --- [INFO] Generating project in Batch mode [WARNING] Error reading archetype catalog http://repo1.maven.org/maven2 org.apache.maven.wagon.TransferFailedException: repo1.maven.org at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInput Data(AbstractHttpClientWagon.java:892) at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:11 6) at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61) at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.do wnloadCatalog(RemoteCatalogArchetypeDataSource.java:119) at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:87) at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D efaultArchetypeManager.java:216) at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D efaultArchetypeManager.java:205) at org.apache.maven.archetype.ui.generation.DefaultArchetypeSelector.get ArchetypesByCatalog(DefaultArchetypeSelector.java:200) at org.apache.maven.archetype.ui.generation.DefaultArchetypeSelector.sel ectArchetype(DefaultArchetypeSelector.java:71) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu te(CreateProjectFromArchetypeMojo.java:197) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default BuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu ild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl eStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun cher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La uncher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 352) Caused by: java.net.UnknownHostException: repo1.maven.org at java.net.InetAddress.getAllByName0(InetAddress.java:1243) at java.net.InetAddress.getAllByName(InetAddress.java:1155) at java.net.InetAddress.getAllByName(InetAddress.java:1091) at org.apache.maven.wagon.providers.http.httpclient.impl.conn.SystemDefa ultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultCli entConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:278) at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultCli entConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162) at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedCli entConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultR equestDirector.tryConnect(DefaultRequestDirector.java:645) at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultR equestDirector.execute(DefaultRequestDirector.java:480) at org.apache.maven.wagon.providers.http.httpclient.impl.client.Abstract HttpClient.execute(AbstractHttpClient.java:906) at org.apache.maven.wagon.providers.http.httpclient.impl.client.Abstract HttpClient.execute(AbstractHttpClient.java:805) at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(A bstractHttpClientWagon.java:746) at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInput Data(AbstractHttpClientWagon.java:886) ... 31 more [WARNING] No archetype found in remote catalog. Defaulting to internal catalog [INFO] ------------------------------------------------------------------------- --- [INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-webapp:1.0 [INFO] ------------------------------------------------------------------------- --- [INFO] Parameter: groupId, Value: p1 [INFO] Parameter: packageName, Value: p1 [INFO] Parameter: package, Value: p1 [INFO] Parameter: artifactId, Value: pn [INFO] Parameter: basedir, Value: C:\Java\workspaces\carbon [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.929s [INFO] Finished at: Wed Oct 02 13:07:05 WAT 2013 [INFO] Final Memory: 10M/24M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2 .2:generate (default-cli) on project carbon: Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc eption
Looks like the hostname "repo1.maven.org" cannot be located from the computer you're running the command on. Check if you can ping the host "repo1.maven.org" and visit http://repo1.maven.org from your browser.
Maven with Cargo and Installed Glassfish
I have been having trouble getting this my maven project to work. I will show below my pom file and my error log. I am trying to run integration tests of my code on glassfish after it is deployed. Any help will be much appreciated. If there is a better solution to do that, that would also be appreciated. pom.xml cargo portion: <!-- cargo plugin --> <dependency> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-core-uberjar</artifactId> <version>1.4.3</version> </dependency> </dependencies> <build> <pluginManagement> <plugins> <!-- cargo plugin --> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.4.3</version> <configuration> <container> <containerId>glassfish4x</containerId> <type>installed</type> </container> <configuration> <type>existing</type> <home>C:\glassFishV4\glassfish4\glassfish\domains</home> <properties> <cargo.hostname>localhost</cargo.hostname> <cargo.servlet.port>4848</cargo.servlet.port> <!-- if no username/password don't use these, it will fail --> <cargo.remote.username>admin</cargo.remote.username> <cargo.remote.passwordFile>C:\glassfish\glassfish4\glassfish\domains\domain1\config\admin-keyfile</cargo.remote.passwordFile> <cargo.glassfish.domain.name>domain1</cargo.glassfish.domain.name> </properties> </configuration> <deployables> <deployable> <groupId>com.project</groupId> <artifactId>projectID</artifactId> <location>${project.build.directory}/${project.build.finalName}.war</location> <type>war</type> </deployable> </deployables> </configuration> </plugin> Error Log: C:\Users\kev\projectID\com.project.projectID-1.0>mvn -e cargo:start [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building projectID 1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- cargo-maven2-plugin:1.4.3:start (default-cli) # projectID --- [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:car go-core-container-glassfish:jar:1.4.3 for container glassfish4x [INFO] [talledLocalContainer] GlassFish 4.x starting... [INFO] [talledLocalContainer] Attempting to start domain1.... Please look at the server log for more details..... [INFO] [talledLocalContainer] Authentication failed for user: admin [INFO] [talledLocalContainer] with password from password file: C:/glassFishV4/g lassfish4/glassfish/domains/password.properties [INFO] [talledLocalContainer] (Usually, this means invalid user name and/or pass word) [INFO] [talledLocalContainer] Command deploy failed. [INFO] [talledLocalContainer] GlassFish 4.x is stopping... [INFO] [talledLocalContainer] Waiting for the domain to stop . [INFO] [talledLocalContainer] Command stop-domain executed successfully. [INFO] [talledLocalContainer] GlassFish 4.x is stopped [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.139s [INFO] Finished at: Fri Aug 16 16:19:33 EDT 2013 [INFO] Final Memory: 12M/304M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.3:star t (default-cli) on project projectID: Execution default-cli of goal org.codehaus.c argo:cargo-maven2-plugin:1.4.3:start failed: Failed to start the GlassFish 4.x c ontainer. At least one GlassFish deployment has failed: org.codehaus.cargo.util. CargoException: GlassFish admin command failed: asadmin exited 1 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o rg.codehaus.cargo:cargo-maven2-plugin:1.4.3:start (default-cli) on project projectID : Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.3:s tart failed: Failed to start the GlassFish 4.x container. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:224) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu ild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl eStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun cher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La uncher.java:414) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 357) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-c li of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.3:start failed: Failed to start the GlassFish 4.x container. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default BuildPluginManager.java:115) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:208) ... 19 more Caused by: org.codehaus.cargo.container.ContainerException: Failed to start the GlassFish 4.x container. at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(Abstrac tLocalContainer.java:230) at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAct ion(ContainerStartMojo.java:96) at org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStart Mojo.java:63) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo .java:432) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default BuildPluginManager.java:106) ... 20 more Caused by: org.codehaus.cargo.util.CargoException: At least one GlassFish deploy ment has failed: org.codehaus.cargo.util.CargoException: GlassFish admin command failed: asadmin exited 1 at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst alledLocalContainer.doStart(AbstractGlassFishInstalledLocalContainer.java:193) at org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer.star tInternal(AbstractInstalledLocalContainer.java:313) at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(Abstrac tLocalContainer.java:211) ... 24 more Caused by: org.codehaus.cargo.util.CargoException: GlassFish admin command faile d: asadmin exited 1 at org.codehaus.cargo.container.glassfish.internal.GlassFish3xAsAdmin.in vokeAsAdmin(GlassFish3xAsAdmin.java:88) at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst alledLocalContainer.invokeAsAdmin(AbstractGlassFishInstalledLocalContainer.java: 96) at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst alledLocalContainer.invokeAsAdmin(AbstractGlassFishInstalledLocalContainer.java: 69) at org.codehaus.cargo.container.glassfish.GlassFish3xInstalledLocalDeplo yer.doDeploy(GlassFish3xInstalledLocalDeployer.java:89) at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst alledLocalDeployer.redeploy(AbstractGlassFishInstalledLocalDeployer.java:97) at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInst alledLocalContainer.doStart(AbstractGlassFishInstalledLocalContainer.java:174) ... 26 more [ERROR] [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio nException The weird thing is, is that I can see it start the glassfish server through eclipse and then stop it. I also tried with no password and user name for defaults because that's what they are, and as you see in this configuration I use a username and password file as described on the cargo site. I receive the same error both times.
Just grab your editor, open C:/glassFishV4/g lassfish4/glassfish/domains/password.properties Change: AS_ADMIN_PASSWORD=adminadmin To: AS_ADMIN_PASSWORD=