Grails Plugins Import failing after using new mavenCentral() secure HTTPS Libraries - import

After Sonatype, the hosts of the Maven Central stopped permitting insecure connections to their repository via http I started getting issues resolving the dependencies. I was able to overcome that by adding the following to my BuildConfig.groovy file:
mavenRepo "https://repo.grails.org/grails/plugins/"
mavenRepo "https://repo1.maven.org/maven2/"
mavenRepo "https://repo.grails.org/grails/core"
mavenRepo "https://oss.sonatype.org/content/repositories/releases/"
--
My issue now is every import inside the plugin below is failing and not sure why. Getting this error:
--- this is just a snippet of the errors but is the same for every import ---
| Dependencies refreshed.
| Compiling 143 source files
| Compiling 143 source files.
| Error Compilation error: startup failed:
C:\Users\my-id.grails\2.0.4\plugins\export-1.6\src\groovy\de\andreasschmitt\export\builder\ExcelBuilder.groovy: 5: unable to resolve class jxl.format.Border
# line 5, column 1.
import jxl.format.Border
^
C:\Users\my-id.grails\2.0.4\plugins\export-1.6\src\groovy\de\andreasschmitt\export\builder\ExcelBuilder.groovy: 26: unable to resolve class jxl.write.WritableFont
# line 26, column 1.
import jxl.write.WritableFont
^
I don't know if this is particular to this export plugin or all of my plugins.
Any idea what would be the issue? Thanks in advance for your help.
Grillo9

Related

Setting up IntelliJ with Scala and SBT

I am trying to setup intellij with scala and sbt for development. I have already installed scala and SBT plugins on the IDE. However, when I try to create a new scala and sbt project, the build.sbt file shows the following errors:
Cannot resolve symbol :=
Cannot resolve symbol name
Cannot resolve symbol version
Cannot resolve symbol scalaVersion
Here is my build.sbt file which was created by the IDE itself:
name := "setup"
version := "1.0"
scalaVersion := "2.12.2"
The following are the steps I followed for creating the project:
Step One: File -> New Project
Step Two: Choose Scala from the left hand side panel and choose SBT on the right hand side panel (i.e SBT-based Scala project) and click Next.
Step Three: Fill in the project details and click Finish. ( Scala version -> 2.12.2, SBT version -> 0.13.13)
IntelliJ version - IntelliJ IDEA 2017.1.3
Edit:
Whenever I am trying to create a new project, I get the following error :
Error:Error while importing SBT project:<br/>...<br/><pre> https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.fusesource.jansi#jansi;1.11: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.fusesource.jansi#jansi;1.11: not found
Error during sbt execution: Error retrieving required libraries
(see C:\Users\xxxxxx\.sbt\boot\update.log for complete log)
Error: Could not retrieve jansi 1.11
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0</pre><br/>See complete log in C:\Users\xxxxx\.IntelliJIdea2016.2\system\log\sbt.last.log
the Log file has the following content:
Getting org.fusesource.jansi jansi 1.11 ...
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
:: problems summary ::
:::: WARNINGS
Host jcenter.bintray.com not found. url=https://jcenter.bintray.com/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
Host jcenter.bintray.com not found. url=https://jcenter.bintray.com/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
Host repo.typesafe.com not found. url=https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/
**
So I think this is an issue with my proxy settings and I definitely need to use the proxy. Is there a way to solve this??
Any help would be appreciated. Thank you.

Building Apache Spark 2.1.0 from source fails

Am trying to build Apache Spark 2.1.0 source, but get these errors below that baffle me...
Hadoop 2.8.0 was installed and is working
Scala 2.12.1 was installed in advance of executing the Spark install (Which seems to auto install Scala 2.11.8 ?!?)
My build line is:
build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.0 -DskipTests clean package
Does anybody know why I get:
user#server:/usr/local/share/spark/spark-2.1.0$ sudo /usr/local/share/spark/spark-2.1.0/build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.0 -DskipTests clean package
[sudo] password for user:
exec: curl --progress-bar -L https://downloads.typesafe.com/zinc/0.3.9/zinc-0.3.9.tgz
######################################################################## 100.0%
exec: curl --progress-bar -L https://downloads.typesafe.com/scala/2.11.8/scala-2.11.8.tgz
######################################################################## 100.0%
exec: curl --progress-bar -L https://www.apache.org/dyn/closer.lua?action=download&filename=/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
######################################################################## 100.0%
Using `mvn` from path: /usr/local/share/spark/spark-2.1.0/build/apache-maven-3.3.9/bin/mvn
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
[INFO] Scanning for projects...
Downloading: https://repo1.maven.org/maven2/org/apache/apache/14/apache-14.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.1.0: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): repo1.maven.org: Name or service not known and 'parent.relativePath' points at wrong local POM # line 22, column 11
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.spark:spark-parent_2.11:2.1.0 (/usr/local/share/spark/spark-2.1.0/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.1.0: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): repo1.maven.org: Name or service not known and 'parent.relativePath' points at wrong local POM # line 22, column 11: Unknown host repo1.maven.org: Name or service not known -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
I tested downloading manually (To see if that was causing the errors), which downloads without issues:
https://repo1.maven.org/maven2/org/apache/apache/14/apache-14.pom
I also tested accessing the URL below, which also shows content:
https://repo1.maven.org/maven2
Hope somebody smart knows how to solve this...
I found out what the issue was:
I had to configure our proxy settings in the SETTINGS.XML in the directory:
/usr/local/share/spark/spark-2.1.0/build/apache-maven-3.3.9/conf
After editing the file, the build went without any issues :)
Hope this helps someone else running into the same issue...
EDIT: Just to be extra clear, having a working proxy configuration in bash only is NOT SUFFICIENT for the Maven Build to succeed. I was able to download all files from bash manually, but Maven needed the proxy configuration in the SETTINGS.XML file present as well...

scalac: missing or invalid dependency detected while loading class file 'CassandraSession.class'

I've been developing in Javadsl with Maven, but I haven't been able to compile the project in my intellij 2016 since I added Scaladsl libraries.
This is the error I am getting:
Error:scalac: missing or invalid dependency detected while loading
class file 'CassandraSession.class'. Could not access term session in
package akka.persistence.cassandra, because it (or its dependencies)
are missing. Check your build definition for missing or conflicting
dependencies. (Re-run with -Ylog-classpath to see the problematic
classpath.) A full rebuild may help if 'CassandraSession.class' was
compiled against an incompatible version of
akka.persistence.cassandra.
I tried the followings:
Invalidate Cache and Restart the Intellij
Maven Clean Install (failed)
Restart the PC
None of them worked.
Does anyone know how to fix this problem?
This is my POM.xml for the module which I am using both Scaladsl and Javadsl.
Thanks!

Cannot install Grails MongoDB plugin

I am using GRails 2.4.3
Whenever I try to install the Grails MongoDB plugin
http://grails.org/plugin/mongodb
I get this error:
|Configuring classpath
|Downloading: org/grails/grails-datastore-gorm-plugin-support/3.1.0.RELEASE/grails-datastore-gorm-plugin-support-3.1.0.RELEASE.pom
|Downloading: org/grails/grails-spring/2.3.8/grails-spring-2.3.8.pom
|Downloading: org/grails/grails-datastore-web/3.1.0.RELEASE/grails-datastore-web-3.1.0.RELEASE.pom
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT
|Run 'grails dependency-report' for further information.
IDEA hook: Grails not found!
Error |
java.lang.NullPointerException
Error |
at org.jetbrains.groovy.grails.rt.Agent$2.run(Agent.java:135)
Error |
at java.lang.Thread.run(Thread.java:744)
These are my buildconfig settings:
dependencies{
...
compile 'org.grails:grails-datastore-gorm-plugin-support:3.1.0.RELEASE'
}
plugins{
..
compile ':mongodb:3.0.2'
}
Even if I add
compile 'org.grails:grails-datastore-gorm:latest.release'
compile 'org.grails:grails-datastore-core:latest.release'
test 'org.grails:grails-datastore-simple:latest.release'
To the dependencies as mentioned in the plugin page (which I shouldn't have to since I am on Grails 2.4), I get the same error.
Also to add, this plugin has never worked for me for months, yet I have not seen anyone else with this issue online. Am I the only one experiencing this?
How do I go about installing this plugin?
Thanks.
I don't know exactly why 3.0.2 has those dependencies and if 3.0.2 is ok to use but if you want to get it working then you need to exclude the SNAPSHOT dependencies and use the RELEASE versions.
plugins {
compile (":mongodb:3.0.2") {
excludes 'grails-datastore-gorm-plugin-support'
excludes 'grails-datastore-gorm'
excludes 'grails-datastore-core'
}
}
and then in dependencies, pull the correct ones in:
dependencies {
compile 'org.grails:grails-datastore-gorm-plugin-support:3.1.3.RELEASE'
compile 'org.grails:grails-datastore-gorm:3.1.3.RELEASE'
compile 'org.grails:grails-datastore-core:3.1.3.RELEASE'
}
Edit: actually on closer inspection of the 3.0.2 pom, the dependency should be 3.1.2.RELEASE so the fact that 3.1.3 is being used means something screwy is going on. I cleaned out my ~/.m2 directory and 'grails dependency-report' now shows the correct 3.1.2.RELEASE dependency.
I was facing the same issue. Found out that there is no 3.1.3 Release till now in http://search.maven.org/#browse|1458455185 as mentioned in the plugin. So the download always failed.
Now I downgraded the plugin version to compile ":mongodb:3.0.1". Then it worked fine.
Thanks :)

How to get GWT Plugin running with Grails?

When using the grails GWT plugin I have trouble to get my dependencies refreshed.
I inserted
compile ":gwt:0.8"
into my BuildConfig.groovy and run: grails refresh-dependencies. My Grails version is 2.3M1.
The process stopps with the following error. How do I have to fix that?
| Loading Grails 2.3.0.M1
| Configuring classpath.
| Environment set to development.....
Gwt version 2.5.0 requested, downloading required dependencies
| Error Error loading event script from file [/Users/mg/Documents/Grails/GGTS-3.3M1- JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/scripts/_Events.groovy] No such property: resolveEngine for class: org.codehaus.groovy.grails.resolve.maven.aether.AetherDependencyManager (Use --stacktrace to see the full trace)
| Compiling 17 source files.
| Error Compilation error: startup failed:
Compile error during compilation with javac.
/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/grails/plugins/gwt/client/GwtActionService.java:3: error: package com.google.gwt.user.client.rpc does not exist
import com.google.gwt.user.client.rpc.RemoteService;
/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/grails/plugins/gwt/client/GwtActionService.java:12: error: cannot find symbol
public interface GwtActionService extends RemoteService {
symbol: class RemoteService
/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/grails/plugins/gwt/client/GwtActionServiceAsync.java:3: error: package com.google.gwt.user.client.rpc does not exist
import com.google.gwt.user.client.rpc.AsyncCallback;
/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt- 0.8/src/java/grails/plugins/gwt/client/GwtActionServiceAsync.java:11: error: cannot find symbol
void execute(Action action, AsyncCallback callback);
symbol: class AsyncCallback
location: interface GwtActionServiceAsync
Note: /Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/org/codehaus/groovy/grails/plugins/gwt/XMLJUnitResultFormatter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
1 error
I installed the gwt plugin with success. Steps:
Installed Grails 2.3.0.M1, created GRAILS_HOME.
Installed GWT SDK
Created env var GWT_HOME pointing to the gwt folder.
Created a new project
Changed BuildConfig.groovy, adding the dependency compile ":gwt:0.8"
Runned the command grails compile --refresh-dependencies
The default dependency resolution engine is changed to Aether in Grails 2.3.M1 (hence forth).
Since this is a milestone version there might be some hickups initially. If you want to fall back to maven or ivy as the dependency resolver, use
grails.project.dependency.resolver = "maven" // or ivy
Have a look at What's New in Grails 2.3.