Building Concourse in Intellij

144 views
Skip to first unread message

Shrikant Dange

unread,
Jun 12, 2016, 2:23:04 PM6/12/16
to Concourse Developers
Hi All,
     I want to start contributing to ConcourseDB. I am trying to build the project by following Concourse Developer Setup. I have followed all the steps given there ti import project in Intellij. Build was successful but I see few errors in it. 
     Concourse.java class is unable to import the ConcourseService.java class from thrift package (import com.cinchapi.concourse.thrift.ConcourseService;). Could anyone please let me know what is the issue here? 
    Any help is appreciated.

Regards,
Shrikant Dange

Jeff Nelson

unread,
Jun 12, 2016, 2:24:15 PM6/12/16
to concour...@googlegroups.com
can you send screenshots of your intellij setup?


JEFF NELSON
Founder & CEO

Follow Cinchapi on Twitter | Github | AngelList


--
You received this message because you are subscribed to the Google Groups "Concourse Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concourse-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shrikant Dange

unread,
Jun 12, 2016, 2:37:10 PM6/12/16
to Concourse Developers


Hi Jeff,
     I have attached the screenshot of my workspace.

Regards,
Shrikant Dange
Screenshot from 2016-06-12 11-32-29.png

Jeff Nelson

unread,
Jun 12, 2016, 2:40:52 PM6/12/16
to Concourse Developers
Can you send me a screenshot of the concourse-driver-java project expanded so I can see the structure 

Sent from my iPhone

Shrikant Dange

unread,
Jun 12, 2016, 2:50:11 PM6/12/16
to Concourse Developers


Also, there are files, .classpath, .project, .build.gradle, gradlew and README.md

Jeff Nelson

unread,
Jun 12, 2016, 2:56:46 PM6/12/16
to concour...@googlegroups.com
it looks like you didn't import the projects from the external Eclipse model. When imported, you shouldn't have that many projects. Instead, your project structure should look something like:

Inline image 1

I'd recommend deleting those projects from intellij and reimporting following all the relevant steps at http://wiki.cinchapi.com/display/OSS/Concourse+Developer+Setup. If you're still having trouble, I'd be happy to hop on a screenshare with you to walk you through and debug.


JEFF NELSON
Founder & CEO

Follow Cinchapi on Twitter | Github | AngelList


Shrikant Dange

unread,
Jun 12, 2016, 3:01:04 PM6/12/16
to Concourse Developers
Okay. I will try that and will post a message if I get any issues.

Thank you.

Shrikant Dange

unread,
Jun 12, 2016, 4:08:30 PM6/12/16
to Concourse Developers
Hi Jeff,
     I have re-imported the project, still I am facing same issue. I have attached the screenshot of the project structure. Please let me know if I am missing anything in that.

Regards,

Shrikant Dange

Jeff Nelson

unread,
Jun 12, 2016, 4:10:53 PM6/12/16
to concour...@googlegroups.com
have you tried running "Start Concourse" to see if it actually starts. Sometimes intellij lies about errors :)


JEFF NELSON
Founder & CEO

Follow Cinchapi on Twitter | Github | AngelList


--

Shrikant Dange

unread,
Jun 12, 2016, 4:37:05 PM6/12/16
to Concourse Developers
I tried to run Start Concourse. I got the following errors.

             /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Declipse=true -Xms512m -Xmx1024m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=19010 -Dcom.sun.management.jmxremote.local.only=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -XX:CompileThreshold=500 -Didea.launcher.port=7533 -Didea.launcher.bin.path=/home/shrikant/Softwares/idea-IC-145.1617.8/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/rt.jar:/home/shrikant/concourseRepoNew/concourse/out/test/concourse-server:/home/shrikant/concourseRepoNew/concourse/out/production/concourse-server:/home/shrikant/Softwares/idea-IC-145.1617.8/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain com.cinchapi.concourse.server.ConcourseServer

Exception in thread "main" java.lang.ClassNotFoundException: com.cinchapi.concourse.server.ConcourseServer
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)

Process finished with exit code 1

       Should I try importing in eclipse?

Regards,
Shrikant Dange

Jeff Nelson

unread,
Jun 12, 2016, 4:57:23 PM6/12/16
to concour...@googlegroups.com
Yes please try importing into Eclipse. I'll investigate this intellij issue.


JEFF NELSON
Founder & CEO

Follow Cinchapi on Twitter | Github | AngelList


chandresh pancholi

unread,
Jun 12, 2016, 11:34:56 PM6/12/16
to concour...@googlegroups.com

Does all the modules using java1.7?
I was facing same issue with eclipse when I moved it to java 1.7 .

Amit Barve

unread,
Jun 22, 2016, 9:54:11 AM6/22/16
to Concourse Developers
Hi,

I am also facing the same issue on Intellij, However when I 'Start Concourse' from run configurations it starts server without any errros. I think this is the issue Intellij. Also when I build and run project with './gradlew clean installer' it builds successfully.

sudhanshu gupta

unread,
Jun 24, 2016, 10:17:57 PM6/24/16
to Concourse Developers

Reason: Issue is mainly happening because of the way intellij creates module structure. When idea creates a module (maven/gradle) it structure it with src > main > java. While importing concourse project in intellij, it marks module >src > main as module as shown below.


Screen Shot 2016-06-25 at 7.38.26 am.png



To fix the problem, follow the steps:

  1. Check the Run icon, it has a red cross mark.Screen Shot 2016-06-25 at 7.28.48 am.png

  2. Open the edit configuration dialog box. It has “concourse-server” as module. Change the module to “concourse-server_main” and save it.

Screen Shot 2016-06-25 at 7.29.20 am.png

3. Red cross mark should go away from run icon on toolbar. Run the server.

4. Do the same process with “Stop Concourse” and “Launch CaSH” run configuration.



I am new here. I am based out of bangalore and working at Flipkart. Looking to have learning and contribution.



PS: Reasoning is my hypothesis and could be wrong also.
Reply all
Reply to author
Forward
0 new messages