How to code AdminApp in the wsAdmin task - ant

I am trying to issue a wsadmin command to load the virtual host after I install the new application "MYAPP". But I could not find the right syntax. Here is how my ANT task looks like:
<target name="loadVirtualHost">
<wsAdmin
user="${was_user}"
password="${was_password}"
failonerror="${was_failonerror}"
washome="${was_home}"
profileName="${wsProfileName}"
command="$$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYADDWEB.war,WEB-INF/web.xml default_host_ctst ]]])"/>
</target>
Error I got:
[wsadmin] WASX7015E: Exception running command: "$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]]])"; exception information:
[wsadmin] com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
[wsadmin] invalid command name "myapp"
[wsadmin] while executing
[wsadmin] "myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst "
[wsadmin] invoked from within
[wsadmin] "[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst "
[wsadmin] invoked from within
[wsadmin] "-MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]"
[wsadmin] invoked from within
[wsadmin] "$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]]])"

Related

Grails- NoSuchMethodError plus(Ljava/util/List;Lja

I have updated my grails application from 3.1.9 to 3.2.6 and I am having below exception when running application.
| Error Gradle build terminated with error: org.codehaus.groovy.runtime.DefaultGroovyMethods.plus(Ljava/util/List;Ljava/util/Collection;)Ljava/util/List; (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.DefaultGroovyMethods.plus(Ljava/util/List;Ljava/util/Collection;)Ljava/util/List;
at org.grails.transaction.transform.TransactionalTransform.moveOriginalCodeToNewMethod(TransactionalTransform.groovy:309)
at org.grails.transaction.transform.TransactionalTransform.weaveTransactionalMethod(TransactionalTransform.groovy:194)
at org.grails.transaction.transform.TransactionalTransform.weaveTransactionalMethod(TransactionalTransform.groovy:188)
at org.grails.transaction.transform.TransactionalTransform.weaveTransactionalBehavior(TransactionalTransform.groovy:141)
at org.grails.transaction.transform.TransactionalTransform.visit(TransactionalTransform.groovy:104)
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:178)
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:60)
at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkerAdapter.execute(AbstractDaemonCompiler.java:73)
at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkerAdapter.execute(AbstractDaemonCompiler.java:64)
at org.gradle.process.internal.daemon.WorkerDaemonServer.execute(WorkerDaemonServer.java:28)
at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerDaemonServer.execute(AbstractDaemonCompiler.java:91)
at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:87)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
| Error Gradle build terminated with error: org.codehaus.groovy.runtime.DefaultGroovyMethods.plus(Ljava/util/List;Ljava/util/Collection;)Ljava/util/List;

Jenkins deployment into Weblogic 12c FAILING

I am trying to deploy the war file from Jenkins to Weblogic 12 server and it's failing with the below error message.
CAN ANY ONE PLEASE COMMENT ON THE BELOW Jenkins console ERROR, NOT SURE WHAT I AM MISSING
$ "C:\Program Files\Java\jdk1.8.0_51\bin/java" -Xms512M -Xmx512M -cp C:\SOFTWA~1\WLS121~1\wls12130\wlserver\server\lib\weblogic.jar weblogic.Deployer -debug -remote -verbose -noexit -name trucks -targets AdminServer -adminurl t3://wsxxxx:7001 -user Admin -password pa$$w0rd -undeploy
[WeblogicDeploymentPlugin] - ARTIFACT UNDEPLOYED SUCCESSFULLY.
[WeblogicDeploymentPlugin] - DEPLOYING ARTIFACT...
$ "C:\Program Files\Java\jdk1.8.0_51\bin/java" -Xms512M -Xmx512M -cp C:\SOFTWA~1\WLS121~1\wls12130\wlserver\server\lib\weblogic.jar weblogic.Deployer -debug -stage -remote -verbose -upload -name trucks -source C:\Users\aa\.jenkins\workspace\mytruck\target\trucks.war -targets AdminServer -adminurl t3://wsxxxx:7001 -user Admin -password pa$$w0rd -deploy
java.lang.RuntimeException: task completed abnormally (exit code = 1)
at org.jenkinsci.plugins.deploy.weblogic.task.DeploymentTaskServiceImpl.deploy(DeploymentTaskServiceImpl.java:244)
at org.jenkinsci.plugins.deploy.weblogic.task.DeploymentTaskServiceImpl.perform(DeploymentTaskServiceImpl.java:173)
at org.jenkinsci.plugins.deploy.weblogic.WeblogicDeploymentPlugin.perform(WeblogicDeploymentPlugin.java:236)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
ERROR: [WeblogicDeploymentPlugin] - Failed to deploy.
[INFO] ------------------------------------------------------------------------
[INFO] DEPLOYMENT FAILURE
[INFO] ------------------------------------------------------------------------
Build step 'Deploy the artifact to any Weblogic environments' changed build result to FAILURE
Finished: FAILURE
Be sure to use the authMode of BY_LOGIN and set the login and password in the tags of your WebLogic Deployer configuration file.
<login>weblogic</login>
<password>password</password>
<authMode>BY_LOGIN</authMode>

Maven build failing with 'is not a valid directory'

I am trying to use Jenkins to build a maven project (same failure at cmd line!) and I get the below error. I can't see any permissions issues and have tried several changes to permissions to see if it is a linux side error but no luck? Any ideas?
export:
[echo] midleware.home = /u01/Oracle/Middleware
Property "export.log.dir" has not been set
[echo] export log dir = ${export.log.dir}
[java] Executing '/usr/java/jdk1.6.0_30/jre/bin/java' with arguments:
[java] '-XX:MaxPermSize=256m'
[java] '-Xmx768m'
[java] '-Dsun.lang.ClassLoader.allowArraySyntax=true'
[java] '-Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3'
[java] '-Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester'
[java] '-Dosb.home=/u01/Oracle/Middleware/osb_11'
[java] '-Dosgi.bundlefile.limit=500'
[java] '-Dosgi.nl=en_US'
[java] '-Dmiddleware.home=/u01/Oracle/Middleware'
[java] '-Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log'
[java] '-jar'
[java] '/u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar'
[java] '-data'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas'
[java] '-application'
[java] 'com.bea.alsb.core.ConfigExport'
[java] '-configProject'
[java] 'ATAS_Configuration'
[java] '-configJar'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar'
[java] '-includeDependencies'
[java] 'true'
[java] '-debug'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[ant] Exiting /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.698s
[INFO] Finished at: Thu Mar 27 14:00:50 GMT 2014
[INFO] Final Memory: 9M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (export-osb-configuration) on project atas: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (export-osb-configuration) on project atas: An Ant BuildException has occured: The following error occurred while executing this line:
/var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
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: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:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
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: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.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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
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:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line:
/var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:283)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 31 more
Caused by: /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/antrun/build-main.xml:9: The following error occurred while executing this line:
/var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270)
... 33 more
Caused by: /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
at org.apache.tools.ant.taskdefs.Java.setupWorkingDir(Java.java:855)
at org.apache.tools.ant.taskdefs.Java.setupExecutable(Java.java:825)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:788)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
... 44 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
[JENKINS] Archiving /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/pom.xml to uk.org.tlms.tlmsim.flows/atas/10.0/atas-10.0.pom
channel stopped
Finished: FAILURE
xml file as requeted
<project name="osb-config-export" default="export">
<property file="${export.properties.file}"/>
<target name="delete-metadata">
<delete dir="${workspace.dir}/.metadata"/>
</target>
<target name="export" depends="delete-metadata">
<echo message="midleware.home = ${middleware.home}"/>
<echo message="export log dir = ${export.log.dir}"/>
<java dir="${middleware.home}/oepe" jar="${middleware.home}/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"
fork="true" failonerror="true" maxmemory="768m">
<jvmarg line="-XX:MaxPermSize=256m" />
<arg line="-data ${workspace.dir}"/>
<arg line="-application com.bea.alsb.core.ConfigExport"/>
<arg line="-configProject ${config.project}"/>
<!--<arg line="-configSubProjects ${config.subprojects}"/>-->
<arg line="-configJar ${config.jar}"/>
<arg line="-includeDependencies ${config.includeDependencies}"/>
<arg line="-debug"/>
<sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/>
<sysproperty key="weblogic.home" value="${middleware.home}/wlserver_10.3"/>
<sysproperty key="harvester.home" value="${middleware.home}/osb_11/harvester"/>
<sysproperty key="osb.home" value="${middleware.home}/osb_11"/>
<sysproperty key="osgi.bundlefile.limit" value="500"/>
<sysproperty key="osgi.nl" value="en_US"/>
<sysproperty key="middleware.home" value="${middleware.home}"/>
<!--sysproperty key="osgi.logfile" value="${export.log.dir}/export.log"/-->
<sysproperty key="osgi.logfile" value="${workspace.dir}/export.log"/>
</java>
</target>
</project>
Well, as you yourself pointed out, this is the error:
[ERROR] /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
You also say that the same error happens from command line, so this is not an issue with Jenkins's user permissions, Jenkins environment variables or workspace
You need to look at the code on line 12 of /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml. Please edit that file into the original question.
But it seems pretty obvious, it cannot access /u01/Oracle/Middleware/oepe. What happens when you just open command prompt and do cd /u01/Oracle/Middleware/oepe?
There is also this:
Property "export.log.dir" has not been set
I don't know if you are expecting that error or not. Looks like you need to provide an additional property value.
Edit 1:
So, if the cd /u01/Oracle/Middleware/oepe works from command line and the structure looks good, it could be filesystem permissions. Try executing your maven command with a sudo in front of it. If that works, then we will need to look closer at permissions.
Secondly, try executing the java command outside of the ant script, on command line, from within /u01/Oracle/Middleware/oepe:
/usr/java/jdk1.6.0_30/jre/bin/java -XX:MaxPermSize=256m -Xmx768m -Dsun.lang.ClassLoader.allowArraySyntax=true -Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3 -Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester -Dosb.home=/u01/Oracle/Middleware/osb_11 -Dosgi.bundlefile.limit=500 -Dosgi.nl=en_US -Dmiddleware.home=/u01/Oracle/Middleware -Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log -jar /u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -data /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas -application com.bea.alsb.core.ConfigExport -configProject ATAS_Configuration -configJar /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar -includeDependencies true -debug
I only have general advice in this situation--try to pinpoint where the error is coming from. We're seeing an error that's coming out of a combination of Maven, the Maven Ant plugin (I assume), Jenkins, and the actual Java command that's calling the OSB export. Break it down to the simplest one first (just call the java command yourself to see what works), then layer on top of it until you find where the breakage is occuring.
For instance, I don't know whether what is being logged to the console is actually the same java command it's calling, or if that's something you're logging yourself by guessing at the call:
[java] Executing '/usr/java/jdk1.6.0_30/jre/bin/java' with arguments:
[java] '-XX:MaxPermSize=256m'
[java] '-Xmx768m'
[java] '-Dsun.lang.ClassLoader.allowArraySyntax=true'
[java] '-Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3'
[java] '-Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester'
[java] '-Dosb.home=/u01/Oracle/Middleware/osb_11'
[java] '-Dosgi.bundlefile.limit=500'
[java] '-Dosgi.nl=en_US'
[java] '-Dmiddleware.home=/u01/Oracle/Middleware'
[java] '-Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log'
[java] '-jar'
[java] '/u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar'
[java] '-data'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas'
[java] '-application'
[java] 'com.bea.alsb.core.ConfigExport'
[java] '-configProject'
[java] 'ATAS_Configuration'
[java] '-configJar'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar'
[java] '-includeDependencies'
[java] 'true'
[java] '-debug'
First, take that and call it yourself as the same user that Jenkins is running as. That would let you know whether you're even able to call this:
/usr/java/jdk1.6.0_30/jre/bin/java -XX:MaxPermSize=256m -Xmx768m -Dsun.lang.ClassLoader.allowArraySyntax=true -Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3 -Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester -Dosb.home=/u01/Oracle/Middleware/osb_11 -Dosgi.bundlefile.limit=500 -Dosgi.nl=en_US -Dmiddleware.home=/u01/Oracle/Middleware -Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log -jar /u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -data /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas -application com.bea.alsb.core.ConfigExport -configProject ATAS_Configuration -configJar /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar -includeDependencies true -debug
Then, call the ant script that's doing that as the Jenkins user
Then, call the Maven plugin as the Jekins user,
then Jenkins itself
Don't walk down to the simplest solution, start there and walk up.

Java.lang.nullpointer when I call soapUi testcase by jenkins

I'm having a issue with the integration of a SoapUi testcase and Jenkins.
I'm calling the test directly by Ant and it's working. But When i'm calling my ant by jenkins , i'm getting a java.lang.nullpointerexception.
I've also try to directly call the ant by windows batch command instead of "invoke ant"
The jenkins console give me that
soapui-tests:
[exec] SoapUI Pro 4.6.4 TestCase Runner
[exec] 16:08:45,279 INFO [SoapUI] Adding [C:\ESP_Testware\ESP_Tools\SoapUI-Pro-4.6.4\bin\ext\sqljdbc.jar] to extensions classpath
[exec] 16:08:45,279 INFO [DefaultSoapUICore] Creating new settings at [C:\soapui-settings.xml]
[exec] 16:08:45,997 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\ESP_Testware\ESP_Tools\Jenkins\jobs\ESP_QA_WS_REGRESSION\scripts]
[exec] 16:08:45,997 INFO [DefaultSoapUICore] Adding listeners from [C:\ESP_Testware\ESP_Tools\SoapUI-Pro-4.6.4\bin\listeners\demo-listeners.xml]
[exec] 16:08:48,025 INFO [WsdlProject] Loaded project from [file:/C:/ESP_Testware/ESP_Projects/Test-Ws/Multi_1_1_7.xml]
[exec] 16:08:48,586 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\ESP_Testware\ESP_Tools\Jenkins\jobs\ESP_QA_WS_REGRESSION\scripts]
[exec] 16:08:52,018 INFO [SoapUIProTestCaseRunner] Running SoapUI tests in project [EnvDev 1_1_7]
[exec] 16:08:52,018 INFO [SoapUIProTestCaseRunner] Running TestSuite [MS_TEST], runType = SEQUENTIAL
[exec] 16:08:52,034 INFO [SoapUIProTestCaseRunner] Running SoapUI testcase [LogOn]
[exec] 16:08:52,034 INFO [SoapUIProTestCaseRunner] running step [LogOn - Request 1]
[exec] 16:08:52,143 ERROR [WsdlSubmit] Exception in request: java.lang.NullPointerException
[exec] java.lang.NullPointerException
[exec] 16:08:52,143 ERROR [SoapUI] An error occurred [java.lang.NullPointerException], see error log for details
[exec] at com.btr.proxy.search.browser.ie.IEProxySearchStrategy.createPacSelector(IEProxySearchStrategy.java:70)
[exec] at com.btr.proxy.search.browser.ie.IEProxySearchStrategy.getProxySelector(IEProxySearchStrategy.java:44)
[exec] 16:08:52,143 INFO [SoapUIProTestCaseRunner] Assertion [SOAP Response] has status UNKNOWN at com.btr.proxy.search.ProxySearch.getProxySelector(ProxySearch.java:193)
[exec]
[exec] 16:08:52,143 INFO [SoapUIProTestCaseRunner] Assertion [Check for existance of [a:Token]] has status UNKNOWN
[exec] at com.eviware.soapui.impl.wsdl.support.http.CompositeHttpRoutePlanner.getProxySelector(CompositeHttpRoutePlanner.java:72)
[exec] 16:08:52,143 ERROR [SoapUIProTestCaseRunner] LogOn - Request 1 failed, exporting to [C:\ESP_Testware\ESP_Log\MS_TEST-LogOn-LogOn__Request_1-0-FAILED.txt] at com.eviware.soapui.impl.wsdl.support.http.CompositeHttpRoutePlanner.determineRoute(CompositeHttpRoutePlanner.java:59)
[exec]
[exec] at org.apache.http.impl.client.DefaultRequestDirector.determineRoute(DefaultRequestDirector.java:709)
[exec] 16:08:52,143 INFO [SoapUIProTestCaseRunner] Finished running SoapUI testcase [LogOn], time taken: 96ms, status: FAILED at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:356)
[exec]
[exec] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
[exec] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
[exec] 16:08:52,159 INFO [SoapUIProTestCaseRunner] TestSuite [MS_TEST] finished with status [FAILED] in 109ms at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:238)
[exec]
[exec] at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:348)
[exec] at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:318)
[exec] at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:232)
[exec] at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
[exec] at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
[exec] at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:238)
[exec] at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:417)
[exec] at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:235)
[exec] at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
[exec] at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
[exec] at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43)
[exec] at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
[exec] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[exec] at java.util.concurrent.FutureTask.run(Unknown Source)
[exec] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[exec] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[exec] at java.lang.Thread.run(Unknown Source)
The SoapUi test case log give me that
Status: FAILED
Time Taken: 96
Size: 0
Timestamp: Fri Jan 17 16:08:52 EST 2014
TestStep: LogOn - Request 1
----------------- Messages ------------------------------
java.lang.NullPointerException
----------------- Properties ------------------------------
Encoding: UTF-8
Endpoint: http://dev.rxassyst.com/Blackboxqa/1_1_1/session/RxAssyst.svc
---------------- Request ---------------------------
<soapenv:Envelope
xmlns:rxas="http://schemas.datacontract.org/2004/07/RxAssystLib.Contracts.Data"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:User>
<rxas:Password>Blackbox</rxas:Password>
<rxas:UserName>jm</rxas:UserName>
</tem:User>
<tem:UserInfo field:nil="true" xmlns:field="http://www.w3.org/2001/XMLSchema-
instance"/>
</soapenv:Body>
</soapenv:Envelope>
---------------- Response --------------------------
- missing response / garbage collected -
As venergiac pointed out it seems to be a problem reading proxy settings. By default SoapUI automatically tries to determine proxy settings.
If you are not using a proxy you can circumvent the problem by turning off the proxy. You can do that by supplying a soapui-settings.xml file with -t parameter to the testrunner. Easiest way to generate the file is to copy the settings file from your home folder on you local machine with SoapUI installed. Make sure to have proxy disabled in SoapUI before copying the settings file.

Solr (Sunspot) runs, but won't start

When I run RAILS_ENV=production rake sunspot:solr:run, Solr starts as expected and the log looks something like this:
0 INFO (main) [ ] o.e.j.u.log Logging initialized #613ms
355 INFO (main) [ ] o.e.j.s.Server jetty-9.2.11.v20150529
380 WARN (main) [ ] o.e.j.s.h.RequestLogHandler !RequestLog
383 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr- 2.2.3/solr/server/contexts/] at interval 0
1392 INFO (main) [ ] o.e.j.w.StandardDescriptorProcessor NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
1437 WARN (main) [ ] o.e.j.s.SecurityHandler ServletContext#o.e.j.w.WebAppContext#1f3ff9d4{/solr,file:/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp/,STARTING}{/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp} has uncovered http methods for path: /
1456 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init(): WebAppClassLoader=879601585#346da7b1
1487 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx)
1488 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr
1491 INFO (main) [ ] o.a.s.c.SolrResourceLoader new SolrResourceLoader for directory: '/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/'
1738 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/solr.xml
1848 INFO (main) [ ] o.a.s.c.CoresLocator Config-defined core root directory: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr
1882 INFO (main) [ ] o.a.s.c.CoreContainer New CoreContainer 394200281
1882 INFO (main) [ ] o.a.s.c.CoreContainer Loading cores into CoreContainer [instanceDir=/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/]
1883 INFO (main) [ ] o.a.s.c.CoreContainer loading shared library: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/lib
1883 WARN (main) [ ] o.a.s.c.SolrResourceLoader Can't find (or read) directory to add to classloader: lib (resolved as: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/lib).
1905 INFO (main) [ ] o.a.s.h.c.HttpShardHandlerFactory created with socketTimeout : 600000,connTimeout : 60000,maxConnectionsPerHost : 20,maxConnections : 10000,corePoolSize : 0,maximumPoolSize : 2147483647,maxThreadIdleTime : 5,sizeOfQueue : -1,fairnessPolicy : false,useRetries : false,
2333 INFO (main) [ ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true
2338 INFO (main) [ ] o.a.s.l.LogWatcher SLF4J impl is org.slf4j.impl.Log4jLoggerFactory
2339 INFO (main) [ ] o.a.s.l.LogWatcher Registering Log Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)]
2341 INFO (main) [ ] o.a.s.c.CoreContainer Security conf doesn't exist. Skipping setup for authorization module.
2341 INFO (main) [ ] o.a.s.c.CoreContainer No authentication plugin used.
2379 INFO (main) [ ] o.a.s.c.CoresLocator Looking for core definitions underneath /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr
2385 INFO (main) [ ] o.a.s.c.CoresLocator Found 0 core definitions
2389 INFO (main) [ ] o.a.s.s.SolrDispatchFilter user.dir=/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server
2390 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init() done
2435 INFO (main) [ ] o.e.j.s.h.ContextHandler Started o.e.j.w.WebAppContext#1f3ff9d4{/solr,file:/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp/,AVAILABLE}{/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp}
2458 INFO (main) [ ] o.e.j.s.ServerConnector Started ServerConnector#649ad901{HTTP/1.1}{0.0.0.0:8080}
2458 INFO (main) [ ] o.e.j.s.Server Started #3074ms
6677 INFO (qtp207710485-20) [ ] o.a.s.s.SolrDispatchFilter [admin] webapp=null path=/admin/cores params={indexInfo=false&_=1453515549920&wt=json} status=0 QTime=58
6796 INFO (qtp207710485-19) [ ] o.a.s.s.SolrDispatchFilter [admin] webapp=null path=/admin/info/system params={_=1453515550069&wt=json} status=0 QTime=23
I can also access localhost:8080/solr.
However, when I run RAILS_ENV=production rake sunspot:solr:start --trace, I get a normal trace:
** Invoke sunspot:solr:start (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute sunspot:solr:start
Removing stale PID file at /home/rails/webapp/solr/pids/production/sunspot-solr-production.pid
Successfully started Solr ...
Yet I can't access localhost:8080 (it gives me an ERR_CONNECTION_REFUSED), and when I try to do anything else involving Solr, I get an Errno::ECONNREFUSED: Connection refused error.
For example, when I run RAILS_ENV=production rake sunspot:solr:reindex after starting Solr, I get:
Errno::ECONNREFUSED: Connection refused - {:data=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Piece</query></delete>", :headers=>{"Content-Type"=>"text/xml"}, :method=>:post, :params=>{:wt=>:ruby}, :query=>"wt=ruby", :path=>"update", :uri=>#<URI::HTTP http://localhost:8080/solr/update?wt=ruby>, :open_timeout=>nil, :read_timeout=>nil, :retry_503=>nil, :retry_after_limit=>nil}
....
Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 8080
My sunspot.yml file looks like this, after this:
production:
solr:
hostname: localhost
port: 8080 #tomcat defaults to port 8080
path: /solr
log_level: WARNING
solr_home: solr
The Solr server was working fine before. The connection errors started when I tried to seed the production db and received an EOFError: end of file reached. I can post the full trace for that error if needed.
Please help!
I had a similar situation happen. Sunspot would say that Solr had started successfully, but it never actually did start. Turns out I was using Java 1.6 and installing JDK 8 fixed it for me.

Resources