Deploy wlapp files in MFP Liberty using ant - ant

I'm trying to deploy wlapp file in MFP Liberty Server using ant task.
I created the build.xml then run "ant" in cmd.
C:\IBM\MobileFirst_Platform_Server\shortcuts>ant
Unable to locate tools.jar. Expected to find it in C:\IBM\Installation Manager\e
clipse\jre_7.0.9030.20160210_1426\lib\tools.jar
Buildfile: C:\IBM\MobileFirst_Platform_Server\shortcuts\build.xml
install:
[wladm] The REST service URL http://IP:9080/worklightconsol
e cannot be accessed in a secure way. You may want to use a https URL instead, o
r retry with the 'secure' option set to 'false'.
BUILD FAILED
C:\IBM\MobileFirst_Platform_Server\shortcuts\build.xml:9: com.ibm.worklight.admi
n.restclient.RESTException: The REST service URL http://IP:9080
/worklightconsole cannot be accessed in a secure way. You may want to use a http
s URL instead, or retry with the 'secure' option set to 'false'.
at com.ibm.worklight.admin.restclient.RESTClient.checkURI(RESTClient.jav
a:1001)
at com.ibm.worklight.admin.restclient.RESTClient.getPOSTResponse(RESTCli
ent.java:1433)
at com.ibm.worklight.admin.restclient.RESTClient.getPOSTFileResponse(RES
TClient.java:1464)
at com.ibm.worklight.admin.commands.DeployApp.getResponse(DeployApp.java
:41)
at com.ibm.worklight.admin.restclient.ActionClient.execute(ActionClient.
java:84)
at com.ibm.worklight.admin.ant.types.AbstractActionElement.executeComman
d(AbstractActionElement.java:76)
at com.ibm.worklight.admin.ant.types.ActionElement.executeCommands(Actio
nElement.java:43)
at com.ibm.worklight.admin.ant.WladmTask.executeCommands(WladmTask.java:
705)
at com.ibm.worklight.admin.ant.WladmTask.execute(WladmTask.java:459)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a: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.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 1 second
I don't know where to set the "secure to false" but I tried this one:
wladm --url= --user= ... [--passwordfile=...] [--secure=false]
It says:
Secure mode is enabled, but an option '--passwordfile' is missing.
Anyone know where to change the secure to false since the url is just http and not https?

I don't think you're supposed to keep the square brackets in the command.
Try without. Simply --secure=false.

For more details, please refer to the wladm usage documentation at http://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.appadmin.doc/admin/r_invoking_the_wladm_program.html.

Related

Jenkins Out of Memory error while running multiple jmeter script

I have a Jmeter/Jenkins/maven/perforce framework for API testing purpose.Where each JMX contain around 200 test cases .each test cases are written inside a thread group with one user only. Each test case has some precondition for data fetching from multiple dbs then heating request then use multiple assertions using bean shell one also.Also we have used a lot of customize jar so that we can access server and read the logs or to edit the properties file over there.
If we ran the script from jmeter it ran smoothly but if we run the script from Jenkins say 20 jmx at a time sequentially,then after some time it may be 1 2 or 17 hr it fails showing out of memory error.
My current Jenkins server config is like this:
free -h
total used free shared buff/cache available
Mem:
31G 3.1G 12.9G 16M 15G 24G
i have already tweaked with heap space like 6/8 ,12/12.
Log at the time of failure:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:811)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.apache.xerces.xni.XMLString.toString(Unknown Source)
at org.apache.xerces.parsers.AbstractDOMParser.characters(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleCharacter(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
at <unknown class>.<unknown method>(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at utils.APIReportProcessing.fetchAPIReportDetail(APIReportProcessing.java:84)
at jmeterRun.RunProcess.prepareFinalResults(RunProcess.java:179)
at jmeterRun.RunProcess.executeJMeterAndWriteResults(RunProcess.java:158)
at jmeterRun.ControllerJMeter.main(ControllerJMeter.java:115)
... 6 more
Here is code from APIReportProcessing part where it fails.
Below is the code where i am getting error.
public static void fetchAPIReportDetail(String rawXMLReportFile) {
File rawXMLReport = null;
try {
rawXMLReport = new File(rawXMLReportFile);
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(rawXMLReport);
doc.getDocumentElement().normalize();
individualModuleCount.add(passCount + "," + totalTestCount);
} catch (Exception var13) {
var13.printStackTrace();
Logging.log("info", "Error in fetching up data from XML file. Exception:" + var13.getMessage());
} finally {
try {
rawXMLReport.delete();
} catch (Exception var12) {
var12.printStackTrace();
Logging.log("error", "Error in deleting XML data file. Exception:" + var12.getMessage());
}
}
Thanks,
Bibek
You need to increase heap not for JMeter but for Jenkins, check out How to add Java arguments to Jenkins? article for instructions.
You might want to switch to XMLSlurper or XMLParser, both are SAX based therefore the memory footprint should be less.
According to JMeter Best Practices you should rather be using CSV output format for JMeter result files, if you need to have the count of passed requests you could go for JMeterPluginsCMD Command Line Tool
Sorry for delayed response.
In my case the issue resolved with updating correct java version.Previous java version was IBM version where the issue occured.I changed it to the openjdk version "1.8.0_191" version.
Thanks,
BIbek

grails unable to work on windows with NTLM proxy

am trying to setup grails 3.3.0.RC1. When i execute grails from command line its shows the following error
Resolving dependencies...
Error |
Error occurred running Grails CLI: connect timed out (Use --stacktrace to see the full trace)
after some search , i realized that the problem might be proxies . for that i have NTLM http proxy.
How do i configure that ? I want to set the properties for proxy like for always i dont want to run grails like this
grails -Dhttp.proxyHost=www.somehost.org -Dhttp.proxyPort=8080 -Dhttp.proxyUser=userid -Dhttp.proxyPassword=password -Dhttp.nonProxyHosts=*.nonproxyrepos.com|localhost
even with the above configuration it is still error.
STACKTRACE:
grails --stacktrace
Resolving dependencies...
| Error Error occurred running Grails CLI: connect timed out (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.net.SocketTimeoutException: connect timed out
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:414)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:287)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:243)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:320)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:319)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:301)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:293)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:53)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:49)
at org.grails.cli.profile.repository.MavenProfileRepository.<init>(MavenProfileRepository.groovy:53)
at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groovy:334)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:235)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Error occurred running Grails CLI: connect timed out
i have added GRAILS_OPTS in environemt -Dhttp.proxyHost=www.somehost.org -Dhttp.proxyPort=8080 -Dhttp.proxyUser=userid -Dhttp.proxyPassword=password -Dhttp.nonProxyHosts=*.nonproxyrepos.com|localhost but no luck . what the heck is this ?
There are a couple of places you may need to set properties. I think what you really need is to prefix your properties with "grails." wherever you're setting them now. Grails forks a process now and only passes system properties that are prefixed (you can change this if you want, but it's not recommended).
-Dgrails.http.proxyHost=whatever
However, you may also want to set properties in your gradle.properties file. Don't leave any blank; just don't put the line if they should be blank. You can add username and password here too. For these, they don't need a prefix.
systemProp.https.proxyHost=your proxy
systemProp.https.proxyPort=80
systemProp.http.proxyHost=your proxy
systemProp.http.proxyPort=80
systemProp.http.nonProxyHosts:whatever

Jenkins fails when starting in WebSphere: NullPointerException in WebApp.getInitParameter()

I have WebSphere 8.5.5.9 and want to run Jenkins on it, because of that, I have installed jenkins.war (the last version 2.19.2), but when I try to start it, I get the error bellow and the application(Jenkins) doesn't start.
OS: Red Hat Enterprise Linux Server release 6.7 (Santiago) - 64 bits
[11/14/16 14:34:55:824 EST] 0000007c BootFailure E Failed to initialize Jenkins
hudson.util.HudsonFailedToLoad: java.lang.NullPointerException
at hudson.WebAppMain$3.run(WebAppMain.java:248)
Caused by: java.lang.NullPointerException
at com.ibm.ws.webcontainer.webapp.WebApp.getInitParameter(WebApp.java:2791)
at com.ibm.wsspi.webcontainer.facade.ServletContextFacade.getInitParameter(ServletContextFacade.java:264)
at jenkins.util.SystemProperties.tryGetValueFromContext(SystemProperties.java:322)
at jenkins.util.SystemProperties.getString(SystemProperties.java:121)
at jenkins.util.SystemProperties.getInteger(SystemProperties.java:258)
at jenkins.model.Jenkins.<init>(Jenkins.java:599)
at hudson.model.Hudson.<init>(Hudson.java:85)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.WebAppMain$3.run(WebAppMain.java:231)
Does somebody have any idea what could be the rouse cause?
Thanks
Looking into other log from WebSphere I found an erro like this:
restricted programmatic session cookie
looking new solutions to this new error, I found a solution:
Just remove on item from programmatic session cookie configuration
Cookie Domain:*
Cookie Name: "JSESSIONID"
Cookie Path: /
from:
Security > Global security > Programmatic session cookie configuration.
After that, I could start Jenkins with success.

Cannot create project when using cloud dataflow plugin for Eclipse

I want to try setup the development environment on Windows with Eclipse. But failed at the final step after successfully setting project id and gs bucket. The errors seems related to network (I have set proxy in Eclipse), I guess Maven need to set proxy, but how? Can someone confirm it? Thanks.
"Error encountered when trying to create project"
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:423)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
at com.google.cloud.dataflow.eclipse.ui.wizard.NewDataflowProjectWizard.performFinish(NewDataflowProjectWizard.java:50)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:117)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.IllegalStateException: org.eclipse.core.runtime.CoreException: Could not resolve artifact com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples:pom:LATEST
at com.google.cloud.dataflow.eclipse.core.project.DataflowProjectCreator.run(DataflowProjectCreator.java:207)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.eclipse.core.runtime.CoreException: Could not resolve artifact com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples:pom:LATEST
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:776)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:743)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:720)
at com.google.cloud.dataflow.eclipse.core.project.DataflowArtifactRetriever.archetypePom(DataflowArtifactRetriever.java:54)
at com.google.cloud.dataflow.eclipse.core.project.DataflowProjectCreator.defaultArchetypeVersions(DataflowProjectCreator.java:250)
at com.google.cloud.dataflow.eclipse.core.project.DataflowProjectCreator.run(DataflowProjectCreator.java:204)
... 1 more
"Couldn't get archetype versions to use as default"
org.eclipse.core.runtime.CoreException: Could not resolve artifact com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples:pom:LATEST
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:776)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:743)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:720)
at com.google.cloud.dataflow.eclipse.core.project.DataflowArtifactRetriever.archetypePom(DataflowArtifactRetriever.java:54)
at com.google.cloud.dataflow.eclipse.core.project.DataflowProjectCreator.defaultArchetypeVersions(DataflowProjectCreator.java:250)
at com.google.cloud.dataflow.eclipse.core.project.DataflowProjectCreator.run(DataflowProjectCreator.java:204)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Contains: Failed to resolve version for com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples:pom:LATEST: Could not find metadata com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples/maven-metadata.xml in local (C:\Users\ztang16\.m2\repository)
org.eclipse.aether.resolution.VersionResolutionException: Failed to resolve version for com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples:pom:LATEST: Could not find metadata com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples/maven-metadata.xml in local (C:\Users\ztang16\.m2\repository)
at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:313)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:302)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:753)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:743)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:720)
at com.google.cloud.dataflow.eclipse.core.project.DataflowArtifactRetriever.archetypePom(DataflowArtifactRetriever.java:54)
at com.google.cloud.dataflow.eclipse.core.project.DataflowProjectCreator.defaultArchetypeVersions(DataflowProjectCreator.java:250)
at com.google.cloud.dataflow.eclipse.core.project.DataflowProjectCreator.run(DataflowProjectCreator.java:204)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples/maven-metadata.xml in local (C:\Users\ztang16\.m2\repository)
at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:247)
at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:205)
at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:250)
... 15 more
You seem to be hitting an issue when resolving the latest version of our Maven archetype for the examples project. The most inner exception seems to be:
org.eclipse.aether.transfer.MetadataNotFoundException:
Could not find metadata com.google.cloud.dataflow:google-cloud-dataflow-java-archetypes-examples/maven-metadata.xml
in local (C:\Users\YOUR-USERNAME\.m2\repository)
This indicates a problem in your local repository.
We have not seen this specific error before, but tangentially related problems have been resolved by manually deleting the following directory on your local machine and retrying.
C:\Users\YOUR-USERNAME\.m2\repository\com\google\cloud\dataflow\dataflow:google-cloud-dataflow-java-archetypes-examples
This would force Maven to reinitialize that part of the local repository, and perhaps recreate the missing metadata file.
That said, we have slightly changed how our Eclipse plugin interacts with the m2e plugin. The new code doesn't take this path through m2e at all. It is quite likely that this would be a non-issue with an updated code. We tentatively plan to release a new version next week, which would contain this change.
Now, there also could be an issue with a HTTP proxy configuration in your environment. I found this StackOverflow question, which explains how to configure advanced options of the M2Eclipse plugin, including the proxy settings. Dataflow Eclipse plugin is built on top of M2Eclipse and I would expect those setting to apply automatically.

Galago 3.5 Indexing

Downloaded Galago 3.5 bin version and tried to index wiki-small.corpus following this guide. Strangely I get a File Not Found Exception for the .index file when trying to run the build index command. This error goes away when I explicitly use the inputPath and indexPath but instead now I get this exception -
Created executor: org.lemurproject.galago.tupleflow.execution.LocalCheckpointedStageExecutor#69107c05
Running without server!
Use --server=true to enable web-based status page.
Stage inputSplit completed with 0 errors.
Mar 14, 2014 3:26:01 PM org.lemurproject.galago.core.parse.UniversalParser process
INFO: Processing split: /Users/nanz/Downloads/wiki-small.corpus
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.lemurproject.galago.core.parse.UniversalParser.process(UniversalParser.java:137)
at org.lemurproject.galago.core.parse.UniversalParser.process(UniversalParser.java:52)
at org.lemurproject.galago.core.types.DocumentSplit$FileIdOrder$TupleUnshredder.processTuple(DocumentSplit.java:2033)
at org.lemurproject.galago.core.types.DocumentSplit$FileIdOrder$DuplicateEliminator.processTuple(DocumentSplit.java:1989)
at org.lemurproject.galago.core.types.DocumentSplit$FileIdOrder$ShreddedBuffer.copyTuples(DocumentSplit.java:1705)
at org.lemurproject.galago.core.types.DocumentSplit$FileIdOrder$ShreddedBuffer.copyUntilFileId(DocumentSplit.java:1732)
at org.lemurproject.galago.core.types.DocumentSplit$FileIdOrder$ShreddedBuffer.copyUntil(DocumentSplit.java:1740)
at org.lemurproject.galago.core.types.DocumentSplit$FileIdOrder$ShreddedReader.run(DocumentSplit.java:1940)
at org.lemurproject.galago.tupleflow.FileOrderedReader.run(FileOrderedReader.java:76)
at org.lemurproject.galago.tupleflow.execution.LocalCheckpointedStageExecutor$LocalExecutionStatus.run(LocalCheckpointedStageExecutor.java:96)
at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.lemurproject.galago.core.parse.UniversalParser.constructParserWithSplit(UniversalParser.java:213)
at org.lemurproject.galago.core.parse.UniversalParser.process(UniversalParser.java:132)
... 10 more
Caused by: java.lang.NullPointerException
at org.lemurproject.galago.core.index.KeyValueReader.getManifest(KeyValueReader.java:35)
at org.lemurproject.galago.core.index.corpus.CorpusReader.init(CorpusReader.java:41)
at org.lemurproject.galago.core.index.corpus.CorpusReader.(CorpusReader.java:32)
at org.lemurproject.galago.core.parse.CorpusSplitParser.(CorpusSplitParser.java:33)
... 16 more
Stage parsePostings completed with 1 errors.
java.lang.Exception: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Exception in thread "main" java.util.concurrent.ExecutionException: Stage threw an exception:
at org.lemurproject.galago.tupleflow.execution.JobExecutor$JobExecutionStatus.waitForStages(JobExecutor.java:1062)
at org.lemurproject.galago.tupleflow.execution.JobExecutor$JobExecutionStatus.run(JobExecutor.java:971)
at org.lemurproject.galago.tupleflow.execution.JobExecutor.runWithoutServer(JobExecutor.java:1122)
at org.lemurproject.galago.tupleflow.execution.JobExecutor.runLocally(JobExecutor.java:1177)
at org.lemurproject.galago.core.tools.AppFunction.runTupleFlowJob(AppFunction.java:101)
at org.lemurproject.galago.core.tools.apps.BuildIndex.run(BuildIndex.java:789)
at org.lemurproject.galago.core.tools.AppFunction.run(AppFunction.java:55)
at org.lemurproject.galago.core.tools.App.run(App.java:82)
at org.lemurproject.galago.core.tools.App.run(App.java:73)
at org.lemurproject.galago.core.tools.App.main(App.java:69)
Caused by: java.lang.Exception: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.lemurproject.galago.tupleflow.execution.LocalCheckpointedStageExecutor$LocalExecutionStatus.run(LocalCheckpointedStageExecutor.java:99)
at java.lang.Thread.run(Thread.java:695)
I tried building the source code and I got the same results in that case as well. Can somebody point out where I am going wrong ? Hardly anybody seems to have faced this issue so there's not much I get via a simple Google search.
Solved. Just in case someone else faces this issue, one of my friends figured it out that Galago would not work directly on the wiki-small.corpus file as it tries to look for corpus.keys which do not exist for this. Just replace this .corpus file instead with the directory of documents and everything will work just fine. Do specify the indexPath and inputPath parameters explicitly. Use "galago build help" to view the exact syntax. Cheers.
I know this is late, but the wiki-small.corpus file from the textbook's website was built with an old version of galago, namely the 1.0 series, which is preserved in this google code repository: https://code.google.com/p/galagosearch/
The newer releases of Galago (2.0 ... 3.5 ...3.7) are part of newer development under the Lemur Project on sourceforge, and the corpus format has since changed. If you had a corpus file built with Galago 3.5, your commands should have worked.

Resources