Newbie problems running example cordapp - gradle

I'm new to Corda, so am following the "Getting started developing CorDapps".
On my MacBook Pro, I have:
- installed the JDK, IntelliJ Community edition and Git,
- have downloaded the sample project (using git clone) by following Step One)
- created an IntelliJ project (by following Step Two)
but, when following instructions for Deploy the CorDapp locally (using ./gradlew clean deployNodes), I get the following errors:
Task :contracts-java:compileJava FAILED
/Users/samples/cordapp-example/contracts-java/src/main/java/com/example/state/IOUState.java:5: error: package com.google.common.collect does not exist
import com.google.common.collect.ImmutableList;
^
... and another 3 similar.
I've searched google, gradle and IntelliJ forums, but cannot find anyhting that helps resolve my issue.
Can someone point me in the right direction please?
Thanks a lot!

As recommended here, Open IOUState.java and:
Remove this import: import com.google.common.collect.ImmutableList;
Modify ImmutableList.of(new IOUSchemaV1()) to Arrays.asList(new IOUSchemaV1())

The recent 4.4 upgrades have removed the ImmutableList from the dependencies. You could change the ImmutableList.of to Arrays.asList or Collections.singletonList as a workaround.
Thanks for raising this, we will fix it ASAP.

Related

Cannot find snapshot for id: gradle

I'm getting error of cannot find snapshot for id while building the project.
on running the command ./gradlew build --info I received the information saying that PROJECT_FOLDER/build/libs/projectName.jar has been removed.
I tried to look for the same, but its generating the jar at said location.
It was running fine till yesterday all of a sudden started facing this issue.
Now, I have no clue how should I go ahead finding the root cause.
Any suggestion would be really appreciated.
I'm using gradle 4.2.1 for building the project
Could you please try to remove .gradle directory from your project and build your gradle again

no executable code found at line intellij 14

I am unable to debug remote applications due to: No executable code at line
I am running ultimate edition of Intellij, version 14.0.3. My application is running inside tomcat 8 and i'm building it from the command line using Maven. This problem appeared after i switched from the community edition to the ultimate edition.
Project sources are the same and I am able to connect to tomcat for remote debugging. The only issue is that all my breakpoints are invalidated.
Please advice on how to fix this issue.
Cheers.
Remove all IDEA related project files and open the project by the .pom file.
I've had the same problem. Simply compile the directory that the class resides, and the debugger will pick up the break point.
I had the same problem and I implemented a similar solution.
Remove all IDEA related project files and open the project by the .pom file.
I use Gradle for my projecto, so i removed the project from intellij and then reimported it.
I hope others could read it and helps them
if you are developing an Atlassian plug-in and connected to the server via remote debug, run atlas-package to sync deployed plug-in and your source code.
If you are running a maven project execute the following commands in cmd prompt.
mvn clean install
mvn compile
This will resolve the problem.
The solution that worked for me is much more embarrassing. I put the breakpoint on the wrong line.
You see two breakpoints, first one is working and the second one is complaining about "no executable code ...".
It turns out there really is no executable code, just a string.

Storm Incubator and Eclipse Kepler

Is it possible to import the Apache Storm Incubator (0.9.3) Into Eclipse (Kepler), or should i just stop wasting my time?
I have tried the following, with the following results:
Attempt 1:
Clone (git clone ...).
Import as maven project into eclipse
A few hundred "LocalCluster could not be resolved to a type" and "LocalDRPC cannot be resolved to a type" errors follow. I assume that this is something to do with the clojure plugin not found/supported within eclipse, and the fact that Localcluster etc are written in clojure, but I have no idea where to even start to resolve that one.
Attempt 2:
Clone.
mvn eclipse:eclipse
Import project into eclipse
This provides the confusing:
"Project 'storm-core' is missing required source folder: '/home/dev/gitprojects/incubator-storm'"
This is confusing because it is the directory of the project I just imported, so I'm having a hard time seeing how it could be missing. I can remove it from the build path, but then I get to a few hundred "LocalCluster could not be resolved to a type" errors.
This is just a soul-destroying and/or demoralizing waste of my time right now. Is there any way of actually importing the incubator project so that it actually works? Any update I can make to Eclipse to make it work? Any help would be welcomed.
Thanks.
Dave

IntelliJ Community 12 CE + JFlex

I'm following this tutorial to create a custom language plugin for IntelliJ 12, but I'm running into several issues in regards to the jFlex plugin.
When the plugin was installed (via IntelliJ plugin browser) it was configured with the following paths:
Flex: /Applications/IntelliJ IDEA 12 CE.app/tools/jflex
Flex Skeleton: /Applications/IntelliJ IDEA 12 CE.app/tools/jflex/idea-flex.skeleton
IntelliJ warned me it could not find the jFlex application, so I downloaded the latest zip package from jflex.de and extracted it. I updated the jFlex plugin configurations in IntelliJ and get a new error when I try to build: ./lib/jflex.jar is not configured on the path.
Flex: /Users/skyler/jflex-1.4.3/jflex-1.4.3/bin
Flex Skeleton: /Users/skyler/jflex-1.4.3/jflex-1.4.3/src/default.skeleton
I did confirm the jar exists in /Users/skyler/jflex-1.4.3/jflex-1.4.3/lib. Of course the path referenced in the error would not find the jar.
So here are my questions:
Where is the idea-flex.skeleton file located? I cannot find it.
Do I need to update the jflex executable so the paths are correct, or move the file, and will there be any problems using jflex for language plugin development with this change?
As it turns out IntelliJ was missing the tools directory when you use the Mac installer. To solve the problem I had to clone the git repository for IntelliJ community and copy the jflex folder and skeleton into the expected locations. This issue is tracked by JetBrains.
http://youtrack.jetbrains.com/issue/IDEA-110168

How do I set where my grails plugins should be installed?

I saw the light and install the joda-time plugin for grails.
However, when I tried to commit my changes to source control I realised that grails had located the files in:
C:\Users\Steve\.grails\1.1.1\plugins
instead of somewhere under the project directory of:
f:\grails\projects\myproject
Yeah I'm using windows :-\
So now when someone pulls down my changes from source control they are missing all the joda-time plugin lovelyness and they are wanting to spank me :)
What should I be setting so that grails doesn't put anything under my user directory?
(It isn't installed as a global plugin - just as a project one - at least I think so, I ran "grails install-plugin joda-time" )
Many thanks in advance.
P.S. Currently listening to Plug In Baby by Muse....how coincidental :D
The plugin is listed in application.properties, so when someone gets your code Grails will install missing plugins the first time they run 'grails run-app' or other commands.
If you want to revert to 1.0.x behavior just create grails-app/conf/BuildConfig.groovy with the line
grails.project.plugins.dir='plugins'
and your plugins will be in with the rest of the project files.

Resources