Error when trying to build Clojure boot file in Ubuntu 12.04 - clojure

I am starting out with Clojure, and i am currently following the hoplon.io get started tutorial
My troubles start when i try to build boot from source: (http://github.com/tailrecursion/boot)
This is the error that i receive when running the make boot command:
1 required artifact is missing.
for artifact:
org.apache.maven:super-pom:pom:2.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
clojars (http://clojars.org/repo/)
I have installed maven but that did not change anything. Has anyone encountered this problem aswell?
Best Regards
Daniel

Related

ClassNotFoundException - when building the image & push it to GCR using jib-maven-plugin in BitBucket pipeline

I am getting the below error in my GCP Cloud Run service:
Error: Could not find or load main class com.sdas.demo.sd.Application
Caused by: java.lang.ClassNotFoundException: com.sdas.demo.sd.Application
What I was doing:
I have a spring boot application where I used jib-maven-plugin. In BitBucket pipeline, I was executing the below command:
mvn clean compile com.google.cloud.tools:jib-maven-plugin:3.1.4:build -Dimage=eu.gcr.io/sdas-demo-dev/temp-service
After that deploying this GCR image to Cloud Run using gcloud command from BitBucket pipeline. This deployment failed with the error that 'Could not load main class'.
But if I run the mvn clean compile com.google.cloud.tools:jib-maven-plugin:3.1.4:build -Dimage=eu.gcr.io/sdas-demo-dev/temp-service from my computer git bash for the same spring boot application code and then deploy it to Cloud Run (via gcloud command or via console or via pipeline); it's deployed successfully.
I used 'mainClass' tag under jib-maven-plugin in pom.xml. But still it is unable to find or load the main class.
Can anyone help how to identify the problem? Is this a classpath issue or environment issue?
Issue sorted now.
Root cause:
'No resources found to compile' - I found this message in the build log. This message remind me something wrong within the application package.
My system is running on Windows 10 and my application directory starting with 'Java.com.demo.sdas' (J in capital). Since Windows is case in sensitive; it is not causing an issue.
BitBucket pipeline running on Linux server and it is case sensitive. Thus it is unable to find the application directory starting with 'Java.com.demo.sdas'.
Solution: Renamed the directory as 'java' and then everything is working as expected.

'spinnaker-igor' was not found

For the first time, I am installing Spinnaker on AWS. I am following spinnaker documentations.
https://www.spinnaker.io/setup/install/providers/aws/
But when I am running "hal deploy apply" command it gives an error.
Reading package lists...
Building dependency tree...
Reading state information...
E: Version '0.7.0-20171002182452' for 'spinnaker-igor' was not found
! ERROR Error encountered running script. See above output for more
details.
I checked the install.sh in /home/ubuntu/.hal/default directory and I see it has configured with Spinnaker repository.
Repo is "https://dl.bintray.com/spinnaker-releases/debians". I check that repo and I could find a correct version of spinnaker-igor.
Could you please give an idea to fix this issue?
Thanks
it's possible that bintray was being flaky. The exact package you were trying to download exists here and has been published since Oct 2. You can retry hal deploy apply and if fails again let us know.

Hyperledger Composer "Error trying to instantiate composer runtime. Error: Error: Invalid results returned ::NOT_FOUND" on windows 10

I'm trying to run the following blockchain tutorial on Windows 10
https://hyperledger.github.io/composer/tutorials/developer-guide.html
Everything went fine (all npm installs, fabric tools, download fabric, start fabric, create the project archive, composer runtime install) untill I ran the following command:
composer network start --card PeerAdmin#hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw --archiveFile tutorial-network#0.0.1.bna --file networkadmin.card
And
had this error:
Starting business network from archive: tutorial-network#0.0.1.bna
Business network definition:
Identifier: tutorial-network#0.0.1
Description: Tuto DevWorks
× Starting business network definition. This may take a minute...
Error: Error trying to instantiate composer runtime. Error: Error: Invalid results returned ::NOT_FOUND
Command failed
Previous successful command was:
composer runtime install --card PeerAdmin#hlfv1 --businessNetworkName
tutorial-network √ Installing runtime for business network
tutorial-network. This may take a minute... Command succeeded
My configuration is:
WIN 10
Node v8.9.1
npm 5.5.1
Docker version 17.09.0-ce, build afdb6d4
git version 2.14.1.windows.1
I also tried with another bna archive and had the same issue.
Thanks for your help!
If this message occurs on the stage of instantiating the composer chaincode, one must check that there's a fabric channel defined and peers have joined it.
we don't, at present, support Windows 10. We support the platforms shown here:
https://hyperledger.github.io/composer/unstable/installing/development-tools.html
I was facing the issue in MacOS environment. I found that I haven't created the channel and joined the peers. Once I did that, I could start business network and ping.

Deploying library to Clojars, get 405

I am trying to deploy a lein project to Clojars:
$ lein deploy clojars
Copying 32 files to /home/chris/IdeaProjects/default-db-format/lib
No namespaces to :aot compile listed in project.clj.
Created /home/chris/IdeaProjects/default-db-format/default-db-format-0.1.0.jar
Wrote pom.xml
Deploying to http://clojars.org/repo/
Uploading: default-db-format/default-db-format/0.1.0/default-db-format-0.1.0.jar to repository clojars at http://clojars.org/repo/
Transferring 13K from clojars
An error has occurred while processing the Maven artifact tasks.
Diagnosis:
Error deploying artifact 'default-db-format:default-db-format:jar': Error deploying artifact: Failed to transfer file: http://clojars.org/repo/default-db-format/default-db-format/0.1.0/default-db-format-0.1.0.jar. Return code is: 405
This seems like an error coming from Maven. I'm guessing I need to go through the steps here, but am unsure.
Can someone who's done this before guide me on what to do next? There's documentation on the Internet but I've found nothing saying 'when you hit a 405, this is what you do next...'
Perhaps the jar has been deployed to Clojars, and thus the error can be ignored??
I didn't need to specify any PGP certificates, which I expected to be asked about. Perhaps there's no need.
I was using the Linux package manager's version of lein which was very old (lein -version gave 1.7.1). I needed to uninstall it (dpkg --remove leiningen) and install it manually. The instructions at the Leiningen site worked perfectly for this. I just cut and pasted into a file called lein, chmod etc...
The error messages I now get are about PGP issues, as expected...

when start application on cloudfoundry got error of 310, "web.xml not found"

Today when I tried to run the sample application hello-java which from git#github.com:SpringSource/cloudfoundry-samples.git, I got the following errors when start the application,
Starting hello-java-from-linux-1... FAILED
CFoundry::AppStagingError: 310: Staging failed: 'Staging task failed:
Staging plugin failed: /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:28:in block in stage_application': Web application staging failed: web.xml not found (RuntimeError)
from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:22:inchdir'
from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:22:in stage_application'
from /var/vcap/packages/stager/bin/run_plugin:19:in'
I've checked the target war "hello-java-1.0.war" built by maven, the web.xml has been already packaged under WEB-INF.
Here is the pom.xml of the sample application,
http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
org.cloudfoundry.samples
hello-java
1.0
war
javax.servlet
servlet-api
2.5
provided
And here are the vmc version and maven version info,
- vmc 0.4.7,
- Apache Maven 3.0.4
Can anyone help on how to solve the issue? Thanks a lot!
BTW, I've searched the cloudfoundry support site, and found some tips to check log files, however seems that I cannot get log files to check the real error, I ran into the following issues when tried to get the log files.
[niy#niy-fedora hello-java]$ vmc files hello-java-from-linux-1 logs
Getting file contents... FAILED
CFoundry::AppStopped: 305: Operation not permitted on a stopped app
For more information, see ~/.vmc/crash
When deploying a java or spring WAR with vmc it's important to be in the same directory as the WAR file at the time you execute vmc.