We are using Grails 2.4.5 and are trying to use the RestBuilder class to implement some functional tests for our REST API's.
I have included compile "org.grails.plugins:rest-client-builder:2.1.1" in the BuildConfig.groovy file.
I can see that the plugin is downloaded but do not see the RestBuilder class in any src directory. I also do not see any references to other dependencies that might include RestBuilder.
Could this be an issue when the plugin was upgraded/moved for Grails 3.x?
Thanks,
Kathy
Could this be an issue when the plugin was upgraded/moved for Grails
3.x?
No.
You are expressing a dependency on org.grails.plugins:rest-client-builder:2.1.1 which depends on org.grails:grails-datastore-rest-client:3.1.4.RELEASE and that is where grails.plugins.rest.client.RestBuilder is coming from. You should see the corresponding jar file under your home directory in /.grails/ivy-cache/org.grails/grails-datastore-rest-client/jars/grails-datastore-rest-client-3.1.4.RELEASE.jar.
Related
Ok, I want to manage Constants at Server level, so com.mattbertolini.hermes.Hermes is a solution.
Please see all my steps:
1- I downloaded hermes-1.2.0.jar & import into correct Library of eclipse (no problem)
2- Create MyConstantsWithLookup.java at client package
import com.google.gwt.i18n.client.ConstantsWithLookup;
public interface MyConstantsWithLookup extends ConstantsWithLookup {
String myMsg();
}
3- create MyConstantsWithLookup.properties file in the same client package. The file has this line:
myMsg=Deleted
4- In ServerData.java in Server package
MyConstantsWithLookup my = Hermes.get(MyConstantsWithLookup.class, "");
String extra=my.myMsg();
When tested in eclipse it works fine but I got Warnign message in eclipse:
[WARN] Server class 'com.ibm.icu.util.ULocale' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.0.v201212122042-rel-r42/gwt-2.5.0/gwt-dev.jar' to the web app classpath for this session
For additional info see: file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.0.v201212122042-rel-r42/gwt-2.5.0/doc/helpInfo/webAppClassPath.html
I am not sure what this warning's about? is it serious?
The code was running ok but why eclipse generated this warning?
This class (com.ibm.icu.util.ULocale) is a replacement for java.util.Locale, so it seems Hermes has a dependency on it.
Download the ICU4J jar from http://site.icu-project.org/download and add it to your project's build path.
Source: Matt Bertolini at https://github.com/mattbertolini/Hermes/issues/3
You need to add the ICU4j jar located at http://site.icu-project.org/
to your classpath. The reason you have the ICU classes inside the
gwt-dev.jar is because GWT includes them for its Java to JavaScript
compiler. This is regrettable since it often times falsely reports the
files on your classpath.
I have created an atmosphere framework application. When I use Xsbt container:start it does not scan the assembly and find the annotations on my classes.
However, when I package the project as a war and deploy to tomcat, it works perfectly.
It looks like there is a classpath issue but I am not sure how to start diagnosing this. I'm not finding much by googling or tinkering
If I manually copy the classes into webapp/WEB-INF/classes and the libs into webapp/lib/ then the application works, but the debugging for atmosphere does not.
I know that sbt is adding my dependencies in /home/me/.ivy2
I fixed my problem by telling sbt to output my class files to the web-inf directory where atmosphere requires them to be put:
classDirectory in Compile := file("src/main/webapp/WEB-INF/classes")
I am trying to upgrade an old project from Spring 2.5.6 to Spring 3.1.0. The project is not built with Maven so I had to add the jars manually to the build path.
The application uses Eclipse RAP as well as Spring.
I added all the Spring 3.1 jars in my build path:
lib/org.springframework.aop-3.1.0.RELEASE.jar
lib/org.springframework.asm-3.1.0.RELEASE.jar
lib/org.springframework.aspects-3.1.0.RELEASE.jar
lib/org.springframework.beans-3.1.0.RELEASE.jar
lib/org.springframework.context-3.1.0.RELEASE.jar
lib/org.springframework.context.support-3.1.0.RELEASE.jar
lib/org.springframework.core-3.1.0.RELEASE.jar
lib/org.springframework.expression-3.1.0.RELEASE.jar
lib/org.springframework.instrument-3.1.0.RELEASE.jar
lib/org.springframework.instrument.tomcat-3.1.0.RELEASE.jar
lib/org.springframework.jdbc-3.1.0.RELEASE.jar
lib/org.springframework.jms-3.1.0.RELEASE.jar
lib/org.springframework.orm-3.1.0.RELEASE.jar
lib/org.springframework.oxm-3.1.0.RELEASE.jar
lib/org.springframework.test-3.1.0.RELEASE.jar
lib/org.springframework.transaction-3.1.0.RELEASE.jar
lib/org.springframework.web-3.1.0.RELEASE.jar
lib/org.springframework.web.portlet-3.1.0.RELEASE.jar
lib/org.springframework.web.servlet-3.1.0.RELEASE.jar
lib/org.springframework.web.struts-3.1.0.RELEASE.jar
and I also listed them in the MANIFEST.MF.
The project builds fine, but at runtime when trying to login it gives me the following error:
java.lang.NoClassDefFoundError: org/springframework/beans/factory/ListableBeanFactory
I looked in the beans jar and the class is definitely there. I also searched through the project and the class is not used explicitly anywhere.
What could cause this? Thank you in advance.
This class does not exist in Spring 3.1.0. See http://www.jarfinder.com/index.php/java/info/org.springframework.beans.factory.ListableBeanFactory
testing Play framework and JPA.
I eclipsify my very simple test application. Import the project in eclipse and confirm that the play jar file is in my eclipse java build path: C:\play-2.0.2\repository\local\play\play_2.9.1\2.0.2\jars\play_2.9.1.jar
in my simple Item entity class, I import play.db.jpa.Model which my entity should extend
Here, eclipse is not be able to resolve the class!
Notice, the following jar file DOES NOT include the Model class - which I understand is essential in order to integrate with PLAY with JPA.
play_2.9.1.jar -> play\db\jpa\Model
the jpa only includes the following:
TransactionalAction$1.class
JPA.class
TransactionalAction.class
Transactional.class
JPAPlugin.class
JPA$1.class
what am I missing? do i include a wrong jar in my path?
where is Model.class??
Be sure to import play.db.ebean.*;, Play 2.0 uses Ebean for the Model extension.
Documentation can be found http://www.playframework.org/documentation/2.0.1/JavaEbean
I have a grails project and I use the gwt plugin 0.6.1. GWT version is configured using ivy.
I have a strange unresolved symbol error when I try to use a class in package com.google.web.*. When I use the complete class names inline idea reports that it cannot resolve the web package. If I import the same class no error ocurres.
I already tried to run grails clean and removed the idea system directory as well - nothing works.
Idea usally import the class when I use smart complete but in this case idea insert the complete classname instead of importing the class.
The web package is found in the gwt-users-2.4.0.jar and gwt-servlet-2.4.0.jar. Both jars are in the classpath but this how the grails gwt plugin organizes gwt dependency.
Error when using full inline claasnames:
No error when using same class in import statement:
Does anyone have an idea?
Fixed already http://youtrack.jetbrains.net/issue/IDEA-81056
Fix is included in the next IDEA 11.1 EAP
http://confluence.jetbrains.com/display/IDEADEV/IDEA+11.1+EAP
I also had similar issue with IntelliJ IDEA, I solved problem by invalidating the idea cache. After invalidating the cache it will reindex all your library and other files. check this answer as well. Grails and IntelliJ Cache Issues