I have a angularjs website. So, i thought of using protractor with jasmine framework for its automation rather than using selenium.
My protractor project which works completely fine on my local machine when i use:
mvn install
My 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company</groupId>
<artifactId>web-testproject</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>com.github.greengerong</groupId>
<artifactId>maven-ng-protractor</artifactId>
<version>0.0.2</version>
<configuration>
<protractor>protractor</protractor>
<configFile>conf.js</configFile>
</configuration>
<executions>
<execution>
<id>ng-protractor</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
My conf.js
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
exports.config = {
framework: 'jasmine2',
specs: ['./specs/bus_cases.js','./specs/recharge_cases.js'],
baseUrl: 'https://www.mywebsite.com',
capabilities: {
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 2},
},
onPrepare: function() {
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: 'target/report',
consolidate: true,
consolidateAll: false
})
);
}
};
But when i have deployed the project on github and accessing it thru jenkins, i am getting error:
[INFO] protractor:protractor
[INFO] configFile:/var/lib/jenkins/workspace/Web_automation/conf.js
[INFO] Executing protractor test Suite ...
[INFO] Command:/var/lib/jenkins/workspace/Web_automation/conf.js
[ERROR] Run protractor test error:
java.io.IOException: Cannot run program "protractor": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at com.github.greengerong.ProtractorService.exec(ProtractorService.java:34)
at com.github.greengerong.NgProtractor.execute(NgProtractor.java:89)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 35 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.055 s
[INFO] Finished at: 2017-08-25T22:33:00+05:30
[INFO] Final Memory: 14M/310M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal com.github.greengerong:maven-ng-protractor:0.0.2:run (ng-protractor) on project web-testproject: There were exceptions when run protractor test. java.io.IOException: Cannot run program "protractor": error=2, No such file or directory ->
Note: Locally, i run on windows. But jenkins use Linux. Is this because of environments. What changes should i do?
Related
I am using Java, Maven and TestNG.
I would like to add Allure for reporting in Jenkins.
I have added following configuration in pom.xml:
Dependency:
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-testng -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.12.1</version>
</dependency>
Profile:
<profile>
<id>UI</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>ui.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>LATEST_VERSION</version>
<configuration>
<reportVersion>2.4.1</reportVersion>
<reportDirectory>target/allure-results</reportDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
When I run tests locally using command:
clean test -PUI -f pom.xml
Most of the tests are passed.
[INFO] Results:
[INFO]
[INFO]
[ERROR] Tests run: 25, Failures: 6, Errors: 0, Skipped: 9
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:39 min
[INFO] Finished at: 2019-06-21T11:30:09+03:00
[INFO] Final Memory: 23M/259M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project company: There are test failures.
However, "allure-results" is created in the root of project, but I have a config for "target/allure-results". While running tests locally using not Maven, but TestNG directly all tests are passed.
I installed Allure plugin in Jenkins, added configuration to Jenkins job:
However, after Jenkins job is finished I see that in Console Output some tests are passed, but it's shown that number of tests that were passed/running/failed is 0. And in Allure almost all tests are failed in a strange way - BeforeTest was failed, but Test was passed.
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:57 min
[INFO] Finished at: 2019-06-21T07:43:30+00:00
[INFO] Final Memory: 30M/313M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/workspace/tests.env.test/ui-test/pom.xml to com.company/company/1.0-SNAPSHOT/company-1.0-SNAPSHOT.pom
channel stopped
[ui-test] $ /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure/bin/allure generate -c -o /var/lib/jenkins/workspace/tests.env.test/ui-test/allure-report
Report successfully generated to /var/lib/jenkins/workspace/tests.env.test/ui-test/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Build step 'Allure Report' changed build result to UNSTABLE
Finished: UNSTABLE
By default Allure results files are stored in project root. In order to change location create an allure.properties file in your test resources directory (src/test/resources) with the following content:
allure.results.directory=target/allure-results
For more details please see the docs https://docs.qameta.io/allure/#_configuration
I'm trying to deploy an App Engine Flexible Environment Project in JAVA with just a simple Servlet that create a Pipeline to execute in Google Dataflow each time the service is called, BUT I always got the same error deploying from Eclipse or Console. Anyone who knows why this error is occurring ? Please Help!
Servlet Code:
import java.io.IOException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
#WebServlet("/execute")
public class ServletPipeline extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, OutOfMemoryError {
BacktestingPipeline.execute();
}
}
Pipeline Code:
import org.apache.beam.runners.dataflow.DataflowRunner;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.transforms.Create;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.MapElements;
import org.apache.beam.sdk.transforms.ParDo;
import org.apache.beam.sdk.transforms.SimpleFunction;
public class BacktestingPipeline
{
public static void execute ()
{
//Create Pipeline Options for Google Cloud Dataflow
DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class);
options.setProject("[PROJECT_ID]");
options.setTempLocation("gs://[MY_BUCKET]/temp");
options.setStagingLocation("gs://[MY_BUCKET]/staging");
options.setRunner(DataflowRunner.class);
Pipeline p = Pipeline.create(options);
p.apply(Create.of("Hello", "World"))
.apply(MapElements.via(new SimpleFunction<String, String>() {
#Override
public String apply(String input) {
return input.toUpperCase();
}
}))
.apply(ParDo.of(new DoFn<String, Void>() {
#ProcessElement
public void processElement(ProcessContext c) {
c.element();
}
}));
p.run();
}
}
Error deploying to GAE:
...
[INFO] GCLOUD: I0713 19:39:08.452653 46 jvmti_globals.cc:352] Build time: Jun 22 2017 16:09:00
[INFO] GCLOUD: I0713 19:39:08.453889 46 jvmti_agent.cc:158] Java debuglet initialization started
[INFO] GCLOUD: I0713 19:39:08.454350 46 jvmti_agent.cc:192] Java debuglet initialization completed
[INFO] GCLOUD: I0713 19:39:08.509760 46 jvmti_agent.cc:203] Java VM started
[INFO] GCLOUD: I0713 19:39:08.515812 46 jvmti_agent.cc:213] JvmtiAgent::JvmtiOnVMInit initialization time: 6068 microseconds
[INFO] GCLOUD: I0713 19:39:08.516059 57 jvmti_agent_thread.cc:99] Agent thread started: CloudDebugger_main_worker_thread
[INFO] GCLOUD: I0713 19:39:08.516363 57 jvm_internals.cc:376] Loading internals from /opt/cdbg/cdbg_java_agent_internals.jar
[INFO] GCLOUD: openjdk version "1.8.0_131"
[INFO] GCLOUD: OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-1~bpo8+1-b11)
[INFO] GCLOUD: OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
[INFO] GCLOUD:
[INFO] GCLOUD: I0713 19:39:08.712635 57 jni_logger.cc:31] Initializing ClassPathLookup, default classpath: true, extra classpath: [/var/lib/jetty/webapps/root/WEB-INF/classes, /var/lib/jetty/webapps/root/WEB-INF/lib], config: null
[INFO] GCLOUD: org.eclipse.jetty.util.log: Logging initialized #277ms to org.eclipse.jetty.util.log.Slf4jLog
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Setting umask=02
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Opened ServerConnector#4e04a765{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Setting GID=999
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Setting UID=999
[INFO] GCLOUD: org.eclipse.jetty.server.Server: jetty-9.4.5.v20170502
[INFO] GCLOUD: org.eclipse.jetty.deploy.providers.ScanningAppProvider: Deployment monitor [file:///var/lib/jetty/webapps/] at interval 0
[INFO] GCLOUD: I0713 19:39:10.374073 57 jni_logger.cc:31] Total size of indexed resources database: 431735 bytes
[INFO] GCLOUD: I0713 19:39:10.665549 57 jvm_internals.cc:132] ClassPathLookup constructor time: 1957471 microseconds
[INFO] GCLOUD: I0713 19:39:10.672448 57 yaml_data_visibility_config_reader.cc:33] debugger-config.yaml was not found. Using default settings.
[INFO] GCLOUD: I0713 19:39:12.667318 57 jni_logger.cc:31] Debuggee gcp:271259282847:4fb4ffcfa9706933 registered: {"debuggee":{"id":"gcp:271259282847:4fb4ffcfa9706933","project":"271259282847","uniquifier":"1523BCAEC984DB9222692DCF325FC70185D7E805","description":"multibacktesting-2017-distributor-20170713t142425-402646356863159386","agentVersion":"google.com/java-gcp/#2","labels":{"module":"distributor","minorversion":"402646356863159386","version":"20170713t142425"}}}, agent version: 2.15
[INFO] GCLOUD: I0713 19:39:12.667506 57 jvmti_agent.cc:415] Attaching Java debuglet
[INFO] GCLOUD: I0713 19:39:12.667809 57 rate_limit.cc:143] CPU count: 1
[INFO] GCLOUD: I0713 19:39:12.667858 57 debugger.cc:100] Initializing Java debuglet
[INFO] GCLOUD: I0713 19:39:12.678215 57 debugger.cc:109] Debugger::Initialize initialization time: 10 ms
[INFO] GCLOUD:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:20 min
[INFO] Finished at: 2017-07-13T14:39:30-05:00
[INFO] Final Memory: 21M/262M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy (default-cli) on project testing-dataflow-servlet: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy (default-cli) on project testing-dataflow-servlet: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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.PluginExecutionException: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: com.google.cloud.tools.appengine.api.AppEngineException: Non zero exit: 1
at com.google.cloud.tools.appengine.cloudsdk.process.NonZeroExceptionExitListener.onExit(NonZeroExceptionExitListener.java:30)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.syncRun(DefaultProcessRunner.java:211)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.run(DefaultProcessRunner.java:137)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdk.runGcloudCommand(CloudSdk.java:193)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdk.runAppCommandInWorkingDirectory(CloudSdk.java:136)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineDeployment.deploy(CloudSdkAppEngineDeployment.java:90)
at com.google.cloud.tools.maven.DeployMojo.execute(DeployMojo.java:107)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 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/PluginExecutionException
PS D:\Andres Ortiz\Eclipse Workspace\testing-dataflow-servlet>
My pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>
<packaging>war</packaging>
<version>0.1.0-SNAPSHOT</version>
<groupId>com.testing</groupId>
<artifactId>testing-dataflow-servlet</artifactId>
<properties>
<appengine.maven.plugin.version>1.3.1</appengine.maven.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<prerequisites>
<maven>3.5</maven>
</prerequisites>
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.54</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0-b07</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>com.google.cloud.dataflow</groupId>
<artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<build>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-plugin-updates</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.maven.plugin.version}</version>
</plugin>
</plugins>
</build>
</project>
My app.yaml
service: [MY_SERVICE]
runtime: java
env: flex
I have tried this in the app.yaml, but it does not works.
resources:
memory_gb: 2.0
health_check:
enable_health_check: False
It could be related with the exceptions you're throwing in doGet method. Try removing it. If the servlet is still not working it could be related with your Dataflow logic. Maybe it could also be related with the fact that you're not returning anything inside the doGet method.
I'll do a sequential testing from the beggining.
Test the servlet with just a Hello World. If it's not working is probably a configuration issue.
Test the servlet with your Dataflow logic. If it's not working I'll test it with commenting everything except the first line, then the first one with the second one and so on.
I have a Google App Engine application which I'm trying to test locally. Whenever I run the following command:
mvn gcloud:run
The application never fully starts up. I have the following output written to my console:
mvn gcloud:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Wildstar Service Desk 88
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gcloud-maven-plugin:2.0.9.95.v20160203:run (default-cli) > package # servicedesk >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # servicedesk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # servicedesk ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # servicedesk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # servicedesk ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # servicedesk ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) # servicedesk ---
[INFO] Packaging webapp
[INFO] Assembling webapp [servicedesk] in [/Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/target/servicedesk-88]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/src/main/webapp]
[INFO] Webapp assembled in [26 msecs]
[INFO] Building war: /Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/target/servicedesk-88.war
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.95.v20160203:run (default-cli) < package # servicedesk <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.95.v20160203:run (default-cli) # servicedesk ---
The following is the content of the log file generated by the gcloud process.
derekberube$ cat 22.54.23.587718.log
2016-03-07 22:54:23,593 DEBUG root Loaded Command Group: ['gcloud', 'info']
2016-03-07 22:54:23,594 DEBUG root Running gcloud.info with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.info', usage=None, description='This command displays information about the current gcloud environment.', version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), account=None, authority_selector=None, authorization_token_file=None, cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x10cd2a590>>, command_path=['gcloud', 'info'], configuration=None, credential_file_override=None, document=None, format=None, h=None, help=None, http_timeout=None, log_http=None, project=None, quiet=None, show_log=False, trace_email=None, trace_log=False, trace_token=None, user_output_enabled=None, verbosity=None, version=None).
2016-03-07 22:54:23,687 INFO root Explict Display.
2016-03-07 22:54:23,687 INFO ___FILE_ONLY___ Google Cloud SDK [99.0.0]
Platform: [Mac OS X, x86_64]
Python Version: [2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]]
Python Location: [/usr/bin/python]
Site Packages: [Disabled]
Installation Root: [/Users/derekberube/google-cloud-sdk]
Installed Components:
core: [2016.02.26]
app-engine-python: [1.9.33]
core-nix: [2016.02.05]
pubsub-emulator: [2016.02.22]
kubectl: []
app-engine-java: [1.9.32]
gcloud: []
gsutil-nix: [4.15]
app-engine-python-extras: [1.9.21]
beta: [2016.01.12]
gsutil: [4.17]
bq: [2.0.18]
alpha: [2016.01.12]
gcd-emulator: [v1beta3-1.0.0]
bq-nix: [2.0.18]
kubectl-darwin-x86_64: [1.1.7]
System PATH: [/Library/Java/JavaVirtualMachines/jdk1.7.0.jdk/Contents/Home/bin:/Applications/appengine-java-sdk-1.9.32/bin:/Applications/Java Libraries/Metro/2.3.1//bin:/Users/derekberube/google-cloud-sdk/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin:/usr/local/apache-maven/apache-maven-3.3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin]
Cloud SDK on PATH: [True]
Installation Properties: [/Users/derekberube/google-cloud-sdk/properties]
User Config Directory: [/Users/derekberube/.config/gcloud]
User Properties: [/Users/derekberube/.config/gcloud/properties]
Account: [wildstarservicedesk-hrd#appspot.gserviceaccount.com]
Project: [wildstarservicedesk-hrd]
Current Properties:
[core]
project: [wildstarservicedesk-hrd]
account: [wildstarservicedesk-hrd#appspot.gserviceaccount.com]
disable_usage_reporting: [False]
[app]
suppress_change_warning: [true]
Logs Directory: [/Users/derekberube/.config/gcloud/logs]
Last Log File: [/Users/derekberube/.config/gcloud/logs/2016.03.07/21.02.55.937592.log]
2016-03-07 22:54:23,695 DEBUG root Metrics reporting process started.
The following is a copy of my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>
<packaging>war</packaging>
<version>88</version>
<groupId>com.wildstartech</groupId>
<artifactId>servicedesk</artifactId>
<name>Wildstar Service Desk</name>
<url>http://servicedesk.wildstartech.com/</url>
<properties>
<appengine.app.version>${project.version}</appengine.app.version>
<appengine.target.version>1.9.32</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<prerequisites>
<maven>3.1.0</maven>
</prerequisites>
<build>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.7.v20160115</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.3</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.95.v20160203</version>
<configuration>
<log_level>debug</log_level>
<quiet>false</quiet>
</configuration>
</plugin>
</plugins>
</build>
</project>
The following is a tree structure of my project.
|____pom.xml
|____src
| |____main
| | |____java
| | |____resources
| | |____webapp
| | | |____index.html
| | | |____WEB-INF
| | | | |____appengine-web.xml
| | | | |____web.xml
The following is my appengine-web.xml configuration file.
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>wildstarservicedesk-hrd</application>
<beta-settings>
<setting name="java_quickstart" value="true"/>
</beta-settings>
<inbound-services>
<service>mail</service>
</inbound-services>
<sessions-enabled>true</sessions-enabled>
<!-- Configure java.util.logging -->
<system-properties>
<property name="java.util.logging.config.file"
value="WEB-INF/logging.properties" />
</system-properties>
<threadsafe>true</threadsafe>
<version>88</version>
<vm>true</vm>
</appengine-web-app>
The following is my web.xml file.
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.xhtml</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
And last, but not least, the following is the content of the index.html
<DOCTYPE html>
<html>
<head>
<title>Test JSP</title>
</head>
<body>
<p>This is a test.</p>
</body>
</html>
The following is the stack output.
jstack 5155
2016-03-07 23:58:29
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode):
"Attach Listener" daemon prio=5 tid=0x00007ff4a500b000 nid=0x3d0b waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Service Thread" daemon prio=5 tid=0x00007ff4a281d800 nid=0x4e03 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=5 tid=0x00007ff4a1819000 nid=0x4c03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=5 tid=0x00007ff4a406a000 nid=0x4a03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=5 tid=0x00007ff4a4064800 nid=0x3e0f runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=5 tid=0x00007ff4a4041800 nid=0x3803 in Object.wait() [0x0000700000d3a000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007aeb20070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x00000007aeb20070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
"Reference Handler" daemon prio=5 tid=0x00007ff4a1813800 nid=0x3603 in Object.wait() [0x0000700000c37000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007aeb10278> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
- locked <0x00000007aeb10278> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=0x00007ff4a4001000 nid=0x1703 runnable [0x0000700000218000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
- locked <0x00000007abefec10> (a java.io.BufferedInputStream)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:690)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1324)
- locked <0x00000007abee63d0> (a sun.net.www.protocol.http.HttpURLConnection)
at com.google.appengine.gcloudapp.GCloudAppRun.stopDevAppServer(GCloudAppRun.java:486)
at com.google.appengine.gcloudapp.GCloudAppRun.execute(GCloudAppRun.java:287)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
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)
"VM Thread" prio=5 tid=0x00007ff4a4039800 nid=0x3403 runnable
"GC task thread#0 (ParallelGC)" prio=5 tid=0x00007ff4a400d000 nid=0x2403 runnable
"GC task thread#1 (ParallelGC)" prio=5 tid=0x00007ff4a400d800 nid=0x2603 runnable
"GC task thread#2 (ParallelGC)" prio=5 tid=0x00007ff4a180a800 nid=0x2803 runnable
"GC task thread#3 (ParallelGC)" prio=5 tid=0x00007ff4a400e800 nid=0x2a03 runnable
"GC task thread#4 (ParallelGC)" prio=5 tid=0x00007ff4a180f800 nid=0x2c03 runnable
"GC task thread#5 (ParallelGC)" prio=5 tid=0x00007ff4a1810800 nid=0x2e03 runnable
"GC task thread#6 (ParallelGC)" prio=5 tid=0x00007ff4a1811000 nid=0x3003 runnable
"GC task thread#7 (ParallelGC)" prio=5 tid=0x00007ff4a400f000 nid=0x3203 runnable
"VM Periodic Task Thread" prio=5 tid=0x00007ff4a281e800 nid=0x5003 waiting on condition
JNI global references: 236
From a terminal window, I ran the command ps -eaf |grep java and one of the processes listed in the output contained the word (java). This happens whenever the ps command is NOT able to read a value from the CMD column.
I used the kill -eaf command to terminate the thread running the (java) process.
After doing that, the mvn gcloud:run process continued execution.
I am trying to set up liquibase with maven for sql server 2012. I am using the sqljdbc4.jar and trying to connect to sql server using windows authentication. With windows authentication, I have also included the line below as a VM argument to read the file sqljdbc_auth.dll
-Djava.library.path="D:\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x86"
I can't figure out why when I run liquibase in maven (liquibase:update -PlocalDB -e -X) it is hanging and getting this error:
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.1.1:update (default-cli) on project Database: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:47817196-07c1-4fc8-92e2-7e03ca044fcb -> [Help 1]
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.test.liquibase</groupId>
<artifactId>Database</artifactId>
<version>1.0</version>
<properties>
<skipTests>true</skipTests>
<jdk-version>1.6</jdk-version>
<sqlserver-version>4.0</sqlserver-version>
<liquibase-version>3.1.1</liquibase-version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${jdk-version}</source>
<target>${jdk-version}</target>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase-version}</version>
<configuration>
<changeLogFile>src/main/resources/changelogs/changelog-master.xml</changeLogFile>
<driver>${database.driver}</driver>
<url>${database.url}</url>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>localDB</id>
<properties>
<database.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</database.driver>
<database.url>jdbc:sqlserver://computername:1433;databaseName=Test_Liquibase;integratedSecurity=true</database.url>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>${sqlserver-version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase-version}</version>
</dependency>
</dependencies>
EDIT full stack trace from maven
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.1.1:update (default-cli) on project Database: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.1.1:update (default-cli) on project Database: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:381)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:61)
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:330)
... 21 more
Caused by: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:231)
at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:141)
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:52)
... 22 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:38797943-7fe8-49e7-8565-5f72dfd6ed1e
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1654)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1789)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:4838)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6154)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6106)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2907)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2234)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:223)
... 24 more
Liquibase appears to be trying to open a connection and failing with a "Connection reset ClientConnectionId" error from the JDBC driver.
The connection call is just driverObject.Connect(url, properties) where properties is the username and password if specified in maven. Since you are not specifying them they should be null.
Are you able to connect to the database normally with the URL you are giving it? It may be a firewall/network issue. Otherwise I would be suspicious of the windows authentication attempt causing problems.
changed maven to use java 7, instead of java 6, windows authentication and SQL server authentication works and I was able to connect. :)
I am trying to get QueryDSL to work on a Spring Roo project.
Here is my plugin config:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
When I run the following command: mvn apt:process, I get the following error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building suivitrc 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-apt-plugin:1.0.2:process (default-cli) # suivitrc ---
[ERROR] Either processor or processors need to be given
[ERROR] execute error
java.lang.IllegalArgumentException: Either processor or processors need to be given
at com.mysema.maven.apt.AbstractProcessorMojo.buildProcessor(AbstractProcessorMojo.java:140)
at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.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.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.375s
[INFO] Finished at: Wed Sep 05 12:22:16 CEST 2012
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.2:process (default-cli) on project suivitrc: Either processor
to be given -> [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
Of course I have already tried mvn install which doesn't generate any source.
Any advice welcome.
EDIT:
The only output from maven-apt-plugin is this:
[INFO] --- maven-apt-plugin:1.0.2:process (default) # suivitrc ---
You are calling the goal directly. The execution configuration is not used in this case. Do you get the same exception when running clean install?