How to resolve error "groovy.json,version=[2.4,3) -- Cannot be resolved" on Apache Sling 8 - Groovy Support? - sling

I would like to use Groovy scripting in Apache Sling. I have installed Sling 8 and Bundle: Scripting Groovy V 1.0.2 on top. However, I am getting the following error on installed bundle.
groovy.json,version=[2.4,3) -- Cannot be resolved
groovy.lang,version=[2.4,3) -- Cannot be resolved
groovy.text,version=[2.4,3) -- Cannot be resolved
javax.script from org.apache.felix.framework (0)
org.apache.sling.commons.classloader,version=[1.0,2) from org.apache.sling.commons.classloader (84)
org.apache.sling.scripting.api,version=[2.1,3) from org.apache.sling.scripting.api (107)
org.codehaus.groovy.util,version=[2.4,3) -- Cannot be resolved
Am I missing some other dependency bundle? How to resolve this?

The Groovy scripting bundle only provides the glue between Groovy and Sling. You also need to install the Groovy bundles.
The ones that we use right now for testing (see launchpad/testing: model.txt ) are
org.codehaus.groovy/groovy-all/2.4.5
org.codehaus.groovy/groovy-json/2.4.5
org.codehaus.groovy/groovy-templates/2.4.5

Related

OfBiz Installation Failure

Apache OfBiz is not installing correctly, and fails to compile in the command prompt.
After creating the system variable JAVA_HOME to C:\Program Files\Java\jdk1.8.0_40, and editing "Path" to be C:\Program Files (x86)\Java\jre7\bin;C:\apache-ant-1.9.4\bin, I downloaded OfBiz 13.07.01 to my C:\ folder and unzipped it there. In the command prompt, I typed the following:
C:\Users\CalS>cd C:\apache-ofbiz-13.07.01
C:\apache-ofbiz-13.07.01>ant load-seed
Then, after about 50 seconds, I get this:
BUILD FAILED
C:\apache-ofbiz-13.07.01\build.xml:229: the following error occurred while executing this line:
C:\apache-ofbiz-13.07.01\build.xml:248: the following error occurred while executing this line:
C:\apache-ofbiz-13.07.01\build.xml:39: the following error occurred while executing this line:
C:\apache-ofbiz-13.07.01\build.xml:91: compile failed; see the compiler error output for details.
Please note it has been years since I dealt with DOS, so I do not know how to access the error output.
This is after I get a few dozen errors like:
[javac16] class file for org.ofbiz.widget.ContentWorkerInterfaice not found
and
[javac16] warning: [options] bootstrap class path not set in conjunctions with -source 1.6
Under 'classes'.
Misc. I have tried 'ant run-install' and 'load-demo' commands without avail. I've followed step-by-step tutorials, but very likely missed something. Please let me know what I can do to fix this and run this program successfully. Thanks!
Please have a look at the following Apache Jira Tickets for OFBiz where your problem is addressed and was fixed, so that OFBiz could be build with java 1.8.
The build errors occur due to missing fileset entries in the build.xml for some applications (party, workeffort, product, order, ebay, and pos), see: OFBIZ-5835
A fix is available in related ticket: OFBIZ-6079
There was another bug in the current release branches (checked 14.12.01, 12.04.06, 13.07.02) that I fixed last week. The fix is already committed to the branches.
See: OFBIZ-6252
You have to compile/run with the same Java version.
Seems you have some inconsistencies: JAVA_HOME ist 1.8, Path is set to jre 7 and the warning states it is using an 1.6 compiler.
With the 13.07. Release, using Java 1.7 or 1.8 is recommended and supported.
Alright, so it looks like Apache OFBiz and Java JDK 1.8.XX don't get along. I found help on another forum that confirmed the discrepancy in compatibility between OFBiz 13.07.01/Apache ant 1.9.4 and JDK 1.8.XX. This will cause the compiling of the Apache Ant to fail (which seems to run off of JDK 1.6).
I remedied the problem by downloading the archived JDK 1.7.0_67 from Oracle, re-mapping the System Variables accordingly, and re-initializing the Command Prompt.
It works now! Thank you all for your contributions.
Though solved, let me add something important. JDK version is not always an issue in such errors. Ofbiz v13.X.X works well on JDK 1.7 and above. The error shown is a peculiar issue with Ofbiz v13.07.01 dist.
As Martin pointed out, one need to add widget jars in the classpath of order, party, product & workeffort. Add the below line
<fileset dir="../../framework/widget/build/lib" includes="*.jar"/>
in build.xml of order, party, product & workeffort under applications directory.

Cant access Spring Security UI?

I am currently trying to access the GUI for Spring Security UI. I have all the necessary plugins installed as shown below:
cache 1.1.1 -- Cache Plugin
cloud-foundry 1.2.3 -- Cloud Foundry Integration
cloud-support 1.0.11 -- Cloud Support Plugin
codenarc 0.20 -- CodeNarc plugin
constraints 0.6.0 -- Custom domain constraints plugin
csv 0.3.1 -- Grails CSV Plugin
database-migration 1.1 -- Grails Database Migration Plugin
dynamic-config 0.3 -- Dynamic-Config-Plugin
export 1.5 -- Export Plugin
famfamfam 1.0.1 -- Silk icons from famfamfam.com
hibernate 2.1.0 -- Hibernate for Grails
jquery 1.10.2 -- JQuery for Grails
jquery-ui 1.10.3 -- jQuery UI Plugin
jquery-validation 1.9 -- JQuery Validation Plugin
jquery-validation-ui1.4.4 -- JQuery Validation UI Plugin - Client Side Validation without writing JavaScript
kickstart-with-bootstrap0.6.1b -- Kickstart with Bootstrap - Good looking websites!
mail 1.0.1 -- Provides Mail support to a running Grails application
mandrill 0.1 -- Grails Mandrill Plugin
navigation 1.3.2 -- Site Menu Navigation
resources 1.2.7 -- Resources
rest 0.7 -- REST client facilities
settings 1.4 -- Application settings (global constants) plugin
spock 0.7 -- Spock Plugin - spockframework.org
spring-security-core2.0-RC2 -- Spring Security Core Plugin
spring-security-oauth2-provider1.0.5.2 -- OAuth2 Provider support for the Spring Security plugin.
spring-security-ui 1.0-RC1 -- Spring Security UI
tomcat 2.1.0 -- Apache Tomcat plugin for Grails
webxml 1.4.1 -- WebXmlConfig
wslite 0.7.1.0 -- Wslite plugin
Whenever I try to access any of the following URL's I get 404 not found errors:
/user/create
/user
/role/search
etc...
Can someone please help me resolve this issue as I am not receiving any errors and looks to be installed, just cant access it :)
Thanks in advance
****EDIT********
I have also tried to override the domain, so the following command did work which would suggest to me the plugin is installed:
grails s2ui-override user com.mypackage
But when running the application I get this error:
UserController.groovy: 3: unable to resolve class grails.plugin.springsecurity.ui.UserController
Can someone please help me with this as its very confusing and need to recify this issue?
Thanks in advance
I have managed to track down the issue and wanted to share encase anyone else encounters this.
The issue was that I had an old install of Spring Security UI that I used in this project as a local plugin by doing the following in the build config:
grails.plugin.location.'spring-security-ui'='plugins/s2ui'
inherits("global"){
excludes 'spring-security-ui'
}
So the line above that excludes the "spring-security-ui" from being a dependency was the issue, once I removed that, uninstalled and re-installed the plugin it was all good.
Thanks

Cannot create grails projects in STS but from command line

I have recently started to work with grails. I was able to create applications and generate stuff. Yesterday I wanted to resume my work, after a little break and ran into the following error, when trying to create a new project:
Command terminated with an exception:
org.grails.ide.eclipse.longrunning.client.GrailsProcessDiedException: Grails process died
(see details for partial output)
Grails process died
------System.out:-----------
------System.err:-----------
This error only occurs when I use the SpringSourceTool, if I try using the command line it works fine. My first reaction was to change the java version from 1.8 to 1.7, but that didn't help. My environment variables look like this (I am running Fedora Linux 19)
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.0.x86_64
GRAILS_HOME=/home/peer/grails/grails-2.3.0
They are also included in the PATH variable.
Can anybody help? Thanks, Peer
This is a known issue in STS:
https://issuetracker.springsource.com/browse/STS-3277
A work-around is provided in the link.
For anyone pulling their hair out trying to create a grails project using the STS extension for Grails, here is my setup and following is what I did to get it working:
-- OSX 10.8.4 Build 12E3067 --
-- STS Version 3.4.0 --
-- Grails 2.3.3 (installed separately to STS) --
Fresh installed STS 3.4.0
I *de*selected the Preferences/Groovy/Compiler/Enable checking for mismatches between
project and workspace Groovy compiler levels
I ONLY selected the Grails Support option when installing the extensions (nothing else)
Restart STS 3.4.0 (i.e. restart eclipse)
I then pointed my Grails project to my existing Grails 2.3.3 installation
Make sure that the environment variable GRAILS_HOME is set and exported in the same
shell from which you invoke STS otherwise you will get a process termination error in
Eclipse (STS)
This worked.

Ant version wrongly picked with weblogic 10.3.6.0

I have installed Weblogic 10.3.6.0 and using apache-ant-1.8.1 for build. ANT_HOME, JAVA_HOME are set
When I ran diagnostics I get this part
-------------------------------------------
ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.1 compiled on June 27 2008
ant.java.version: 1.6
ant.core.lib: C:\BEA11\modules\org.apache.ant_1.7.1\lib\ant.jar
ant.home: C:\apps\apache-ant-1.8.1
Ant home is 1.8 but the core lib is referring older version. Is there any way to override this issue?
Thanks!
EDIT
after adding ant\bin location to PATH, I get different problem.
taskdef class weblogic.ant.taskdefs.management.WLDeploy cannot be found using the classloader AntClassLoader[]
Solution : mentioned the weblogic server path properly.
I'll bet the older version is bundled with WebLogic.
See if you can find it to confirm.
I'd argue that the WebLogic version ought to be sufficient. What functionality is it missing that you can't do without?
http://docs.oracle.com/cd/E14571_01/web.1111/e13750/anttasks.htm

list plugins not working

I am trying to list the grails plugins but i get the following output:
C:\Users\User\Documents\NetBeansProjects\Test>grails list-plugins |
Environment set to development..... [Fatal Error]
plugins-list-grailsCentral.xml:564:7: XML document structures must
start and end within the same entity. | Error No plugins found in
repository: grailsCentral. This may be because the r epository is
behind an HTTP proxy.
Plugins available in the grailsCore repository are listed below:
------------------------------------------------------------- dummy <> -- hibernate <1.3.7> -- Hibernate
for Grails tomcat <1.3.7.2> -- Apache Tomcat
plugin for Grails webflow <1.3.7> -- Spring Web
Flow Plugin
Plug-ins you currently have installed are listed below:
------------------------------------------------------------- hibernate 2.0.1 -- Hibernate for Grails jquery
1.7.1 -- JQuery for Grails resources 1.1.6 -- Resources tomcat 2.0.1 -- Apache Tomcat plugin for Grails webxml 1.4.1 --
WebXmlConfig
To find more info about plugin type 'grails plugin-info [NAME]'
Any suggestions how i can fix this?
And i am not behind a HTTP Proxy i am connected to a normal network with a single router.
Someone faced a similar issue and posted on the mailing list. You can look at file ~/.grails/<grailsVersion>/plugins-list-grailsCentral.xml to see what's wrong with your plugin list. Try again in a couple of minutes, the problem should solve from itself.
It seems you're mixing grails 1.3.7 and grails 2.0.1
Make sure you have the same grails version in both the path, the grails_home variable and/or your IDE.

Resources