Set up Orbeon with IntelliJ 14.0.1

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Set up Orbeon with IntelliJ 14.0.1

ali112
Hi all!

Some time ago I was discovering Orbeon Forms and I could get it working using the 4.6-ce branch with IntelliJ 13.1. Now I tried to set it up using IntelliJ 14.0.1 and the master branch (4.7.0.pre) which I cloned with Git last Friday.

But after I Build > Make Project inside IntelliJ I got the compilation completed with 1 error and 0 warnings:
Error:scalac: Scala compiler JARs not found (module 'Orbeon Forms'): D:\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.10.3.jar, D:\.ivy2\cache\org.scala-lang\scala-compiler\jars\scala-compiler-2.10.3.jar, D:\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.3.jar

I tried to find a .ivy2 folder but could not find it anywhere. I just could find a .IntelliJIdea14 under my user folder.

I saw you did changes to support IntelliJ 14 and maybe there is something related to it. The commit I am talking about is  Upgrade to IntelliJ 14.

Using command line (ant orbeon-war) worked fine. But I can't compile the code properly to execute Ant against orbeon-war inside IntelliJ without getting more 5 errors.

Do you know what could be the problem? Sorry but I'm very inexperienced with the Java ecosystem to figure it out at this point by myself. Maybe it's simple.

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Set up Orbeon with IntelliJ 14.0.1

Aaron Spike
I stumbled on this same problem two weeks ago. I've since forgotten the solution, but I'll attempt to help. I recall spending a long time messing with SBT and Scala versions because that appeared to be a problem. But I think the issue ended up being much simpler than that. One thing I'm certain I forgot at first was that the first time your run Build >Make Project, you need to set skip.compilation to false in the ant build properties dialog. 

I'll keep trying to remember the issue. In the mean time can you send the 5 errors your receive. They might remind me.

Aaron Spike



On Tuesday, November 25, 2014 12:31:31 AM UTC-6, ali 112 wrote:
Hi all!

Some time ago I was discovering Orbeon Forms and I could get it working
using the 4.6-ce branch with IntelliJ 13.1. Now I tried to set it up using
IntelliJ 14.0.1 and the master branch (4.7.0.pre) which I cloned with Git
last Friday.

But after I *Build > Make Project* inside IntelliJ I got the compilation
completed with 1 error and 0 warnings:
/Error:scalac: Scala compiler JARs not found (module 'Orbeon Forms'):
D:\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.10.3.jar,
D:\.ivy2\cache\org.scala-lang\scala-compiler\jars\scala-compiler-2.10.3.jar,
D:\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.3.jar/

I tried to find a .ivy2 folder but could not find it anywhere. I just could
find a .IntelliJIdea14 under my user folder.

I saw you did changes to support IntelliJ 14 and maybe there is something
related to it. The commit I am talking about is   Upgrade to IntelliJ 14
<<a href="https://github.com/orbeon/orbeon-forms/commit/69935af71f283927df42cf5911f752389f5e8086" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fcommit%2F69935af71f283927df42cf5911f752389f5e8086\46sa\75D\46sntz\0751\46usg\75AFQjCNElFiiuboLb9ZvJglafkA1YkDRslQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fcommit%2F69935af71f283927df42cf5911f752389f5e8086\46sa\75D\46sntz\0751\46usg\75AFQjCNElFiiuboLb9ZvJglafkA1YkDRslQ';return true;">https://github.com/orbeon/orbeon-forms/commit/69935af71f283927df42cf5911f752389f5e8086>
.

Using command line (ant orbeon-war) worked fine. But I can't compile the
code properly to execute Ant against orbeon-war inside IntelliJ without
getting more 5 errors.

Do you know what could be the problem? Sorry but I'm very inexperienced with
the Java ecosystem to figure it out at this point by myself. Maybe it's
simple.

Thanks in advance!

--
View this message in context: <a href="http://discuss.orbeon.com/Set-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FSet-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFPFjanpQOqYW7wmXPYzuG-Dj_UuQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FSet-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFPFjanpQOqYW7wmXPYzuG-Dj_UuQ';return true;">http://discuss.orbeon.com/Set-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Set up Orbeon with IntelliJ 14.0.1

ali112
Hi Aaron,

I tried with skip.compilation=false but got the same results as before. Even when I tried again with a clean copy of orbeon-forms.

Regarding the 5 errors I get after Ant orbeon-war inside IntelliJ all of them looks like the same and are about a missing org.orbeon.oxf.util.CoffeeScriptTask:

C:\orbeon\master2\orbeon-forms\build.xml:711: The following error occurred while executing this line:

C:\orbeon\master2\orbeon-forms\build.xml:789: taskdef class org.orbeon.oxf.util.CoffeeScriptTask cannot be found

 using the classloader AntClassLoader[C:\orbeon\master2\orbeon-forms\build\classes;C:\orbeon\master2\orbeon-forms\build\orbeon-war\WEB-INF\classes;C:\orbeon\master2\orbeon-forms\src\main\resources;C:\orbeon\master2\orbeon-forms\lib\rhino-1.7R2.jar;C:\orbeon\master2\orbeon-forms\lib\commons-fileupload-1.2.2.jar;C:\orbeon\master2\orbeon-forms\lib\log4j-1.2.17.jar;C:\orbeon\master2\orbeon-forms\lib\scala-library-2.10.3.jar;C:\orbeon\master2\orbeon-forms\lib\orbeon-errorified-20130923.jar]

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.taskdefs.CallTarget.execute(CallTarget.java:105)


And more...

It looks like the error is because the CoffeeScriptTask is not being compiled by the IntelliJ's Make Project.

Please, if you can remember it I would be really thankful and probably it will also help others. Do you need any more information?
Reply | Threaded
Open this post in threaded view
|

Re: Set up Orbeon with IntelliJ 14.0.1

ali112
This post was updated on .
In reply to this post by Aaron Spike
First time I cloned orbeon-forms master (4.7.0-pre) and I Open Project > orbeon-forms I got the following error message:

Load error: undefined path variables MESSAGE is undefined. Fix it
Path variables are used to substitute absolute paths in IDEA project files and allow project file sharing in version control systems.
Some of the files describing the current project settings contain unknown path variables and IDEA cannot restore those paths.


I am not sure, but I think it was before I installed the patch which changed the IntelliJ version from 14.0.0 to 14.0.1. So I think it was an IntelliJ bug, but I decided to add this information because I don't know if it can give some insight. After that I haven't seen that message even opening new folders with orbeon-forms original to the source.

OBS: I am using JDK 1.7 to compile as it was required by IntelliJ but I am using JDK 1.6 with Tomcat as it is suggested by the Orbeon documentation.
Reply | Threaded
Open this post in threaded view
|

Re: Set up Orbeon with IntelliJ 14.0.1

ali112
This post was updated on .
In reply to this post by Aaron Spike
I forgot there are questions about Orbeon also on Stack Overflow. I followed the steps 7 and 8: http://stackoverflow.com/questions/27029514/orbeon-forms-compile-error-in-intellij-idea-util-try

In other words, (1) I removed the scala-sdk-2.10.3 from the libraries, (2) installed Scala 2.10.3 SDK, (3) and added it back to the library.

But before that, (0) I updated the Orbeon source which has two commits with additional corrections related to imports as described on the same link.

When I did the same as the other user I got 4 errors and 100 warnings after the Build > Make Project:

C:\orbeon\orbeon-forms\src\main\scala\org\orbeon\oxf\xforms\XFormsError.scala
    Error:Error:line (80)type mismatch;
 found   : org.orbeon.oxf.xforms.XFormsError.ServerError
 required: <notype>
            containingDocument.addServerError(ServerError(t))
                                                         ^
    Error:Error:line (92)type mismatch;
 found   : org.orbeon.oxf.xforms.XFormsError.ServerError
 required: <notype>
            containingDocument.addServerError(ServerError(reason.message, Option(locationData)))
                                                         ^
    Error:Error:line (115)value asScala is not a member of java.util.List[<notype>]
        val errors = containingDocument.getServerErrors.asScala
                                                        ^
C:\orbeon\orbeon-forms\src\main\scala\org\orbeon\oxf\xforms\submission\TextReplacer.scala
    Error:Error:line (72)type mismatch;
 found   : <notype>
 required: org.orbeon.oxf.util.XPathCache.XPathContext
                XPathCache.evaluateSingle(p.xpathContext, p.refNodeInfo, submission.getTargetref, containingDocument.getRequestStats.addXPathStat) match {
                                            ^


So I closed IntelliJ and opened it again. Tried to do the same thing, this time with no errors and 100 warnings. Later, when I could be back to it, I did all the same again for the third time and I got compilation completed successfully with no errors and no warnings. That's weird!

Anyway, now it looks like working fine at a first test executing the Ant "orbeon-war" task. Think just need to do the other settings we discussed here to get it 100% working.

Thank you for taking the time to try to help me! :)
Reply | Threaded
Open this post in threaded view
|

Re: Set up Orbeon with IntelliJ 14.0.1

ajw625
In reply to this post by ali112
I ran into this as well. I downloaded and installed the scala sdk 2.10.3 and configured it as a library.

  1. File -> Project Structure -> Global Libraries
  2. File -> Project Structure -> Libraries
  3. Also see File -> Project Structure -> Problems
There were some other issues as well see my stackoverflow question:

http://stackoverflow.com/questions/27029514/orbeon-forms-compile-error-in-intellij-idea-util-try


On Monday, 24 November 2014 22:31:31 UTC-8, ali 112 wrote:
Hi all!

Some time ago I was discovering Orbeon Forms and I could get it working
using the 4.6-ce branch with IntelliJ 13.1. Now I tried to set it up using
IntelliJ 14.0.1 and the master branch (4.7.0.pre) which I cloned with Git
last Friday.

But after I *Build > Make Project* inside IntelliJ I got the compilation
completed with 1 error and 0 warnings:
/Error:scalac: Scala compiler JARs not found (module 'Orbeon Forms'):
D:\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.10.3.jar,
D:\.ivy2\cache\org.scala-lang\scala-compiler\jars\scala-compiler-2.10.3.jar,
D:\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.3.jar/

I tried to find a .ivy2 folder but could not find it anywhere. I just could
find a .IntelliJIdea14 under my user folder.

I saw you did changes to support IntelliJ 14 and maybe there is something
related to it. The commit I am talking about is   Upgrade to IntelliJ 14
<<a href="https://github.com/orbeon/orbeon-forms/commit/69935af71f283927df42cf5911f752389f5e8086" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fcommit%2F69935af71f283927df42cf5911f752389f5e8086\46sa\75D\46sntz\0751\46usg\75AFQjCNElFiiuboLb9ZvJglafkA1YkDRslQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fcommit%2F69935af71f283927df42cf5911f752389f5e8086\46sa\75D\46sntz\0751\46usg\75AFQjCNElFiiuboLb9ZvJglafkA1YkDRslQ';return true;">https://github.com/orbeon/orbeon-forms/commit/69935af71f283927df42cf5911f752389f5e8086>
.

Using command line (ant orbeon-war) worked fine. But I can't compile the
code properly to execute Ant against orbeon-war inside IntelliJ without
getting more 5 errors.

Do you know what could be the problem? Sorry but I'm very inexperienced with
the Java ecosystem to figure it out at this point by myself. Maybe it's
simple.

Thanks in advance!

--
View this message in context: <a href="http://discuss.orbeon.com/Set-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FSet-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFPFjanpQOqYW7wmXPYzuG-Dj_UuQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FSet-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFPFjanpQOqYW7wmXPYzuG-Dj_UuQ';return true;">http://discuss.orbeon.com/Set-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Set up Orbeon with IntelliJ 14.0.1

ajw625
I guess you can ignore my last post. I was looking at your question on googlegroups.com, which isn't showing the whole conversation.
Reply | Threaded
Open this post in threaded view
|

Re: Set up Orbeon with IntelliJ 14.0.1

ali112
In reply to this post by ajw625
Thank you so much for your answer here and your findings at your question there. That was really helpful! :)

ajw625 wrote
I ran into this as well. I downloaded and installed the scala sdk 2.10.3
and configured it as a library.


   1. File -> Project Structure -> Global Libraries
   2. File -> Project Structure -> Libraries
   3. Also see File -> Project Structure -> Problems

There were some other issues as well see my stackoverflow question:

http://stackoverflow.com/questions/27029514/orbeon-forms-compile-error-in-intellij-idea-util-try


On Monday, 24 November 2014 22:31:31 UTC-8, ali 112 wrote:
>
> Hi all!
>
> Some time ago I was discovering Orbeon Forms and I could get it working
> using the 4.6-ce branch with IntelliJ 13.1. Now I tried to set it up using
> IntelliJ 14.0.1 and the master branch (4.7.0.pre) which I cloned with Git
> last Friday.
>
> But after I *Build > Make Project* inside IntelliJ I got the compilation
> completed with 1 error and 0 warnings:
> /Error:scalac: Scala compiler JARs not found (module 'Orbeon Forms'):
> D:\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.10.3.jar,
> D:\.ivy2\cache\org.scala-lang\scala-compiler\jars\scala-compiler-2.10.3.jar,
>
> D:\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.3.jar/
>
> I tried to find a .ivy2 folder but could not find it anywhere. I just
> could
> find a .IntelliJIdea14 under my user folder.
>
> I saw you did changes to support IntelliJ 14 and maybe there is something
> related to it. The commit I am talking about is   Upgrade to IntelliJ 14
> <
> https://github.com/orbeon/orbeon-forms/commit/69935af71f283927df42cf5911f752389f5e8086>
>
> .
>
> Using command line (ant orbeon-war) worked fine. But I can't compile the
> code properly to execute Ant against orbeon-war inside IntelliJ without
> getting more 5 errors.
>
> Do you know what could be the problem? Sorry but I'm very inexperienced
> with
> the Java ecosystem to figure it out at this point by myself. Maybe it's
> simple.
>
> Thanks in advance!
>
> --
> View this message in context:
> http://discuss.orbeon.com/Set-up-Orbeon-with-IntelliJ-14-0-1-tp4659262.html 
> Sent from the Orbeon Forms community mailing list mailing list archive at
> Nabble.com.
>

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].