Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Cannot install Grails support in STS-2.3.3-M2

  1. #11

    Default

    Looks like what's not working is importing existing code and marking it as a grails project. When I create a new grails project, everything works fine; when I try to check out a project from SVN, the files are transferred, and I can execute the Configure > Convert to Grails project menu, but the grails-specific tools do not appear, and the system exhibits the same behavior as the 2.3.3 -> 2.5.0 upgrade.

    Gene

  2. #12
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    OK. I know that we had that problem in the past, but thought it was fixed. This is something I can try out here.

    Is that the only issue you are seeing? Or is there something additional?
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  3. #13

    Default

    Can't get past this problem because I can't run my code!

  4. #14
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    I was able to create a grails project on the command line and then import into STS. The project appears fine.

    I was also able to create a grails project on the command line and then run the New Grails Project wizard, pointing at that directory. Again, everything runs fine.

    It seems like you are extracting a project from svn, and then trying to convert it to a grails project. The project appears converted, but you cannot get the command prompt or any other grails-specific functionality to appear. Is this correct?

    If so, make sure that the following natures (in the following order) are in your .project file:
    Code:
    <nature>com.springsource.sts.grails.core.nature</nature>
    <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    Also, make sure that Grails Dependency management is enabled for the project.

    I'm having a deeper look at it right now...
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  5. #15
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    Also, please check your error log to see if there are any relevant errors in it.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  6. #16

    Default

    I was able to do something like what you described, and was able get STS 2.5 to recognize the grails project. Unfortunately, it seems to be unable to compile it -- it complains about not being able to resolve org.hibernate.SessionFactory.

    Code:
    BUG! exception in phase 'semantic analysis' in source unit '/ReBoard-1.2/grails-app/services/ReBoardService.groovy' Pb(324) The type org.hibernate.SessionFactory cannot be resolved. It is indirectly referenced from required .class files
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:944)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:574)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:550)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:527)
    at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:163)
    at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.resolve(GroovyCompilationUnitDeclaration.java:1778)
    at org.eclipse.jdt.internal.core.hierarchy.HierarchyResolver.resolve(HierarchyResolver.java:821)
    at org.eclipse.jdt.internal.core.hierarchy.HierarchyResolver.resolve(HierarchyResolver.java:613)
    at org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder.buildSupertypes(HierarchyBuilder.java:125)
    at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.build(IndexBasedHierarchyBuilder.java:135)
    at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute(TypeHierarchy.java:300)
    at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh(TypeHierarchy.java:1263)
    at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation(CreateTypeHierarchyOperation.java:90)
    at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788)
    at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy(SourceType.java:726)
    at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy(SourceType.java:678)
    at org.eclipse.jdt.internal.launching.JavaLaunchableTester.hasSuperclass(JavaLaunchableTester.java:470)
    at org.eclipse.jdt.internal.launching.JavaLaunchableTester.test(JavaLaunchableTester.java:613)
    at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
    at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)
    at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:150)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:72)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.EnablementExpression.evaluate(EnablementExpression.java:53)
    at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.evalEnablementExpression(LaunchShortcutExtension.java:287)
    at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getShortcutsForSelection(LaunchingResourceManager.java:452)
    at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.computeLabels(LaunchingResourceManager.java:237)
    at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager$2.run(LaunchingResourceManager.java:138)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type org.hibernate.SessionFactory cannot be resolved. It is indirectly referenced from required .class files
    at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:121)
    at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:179)
    at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:1991)
    at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:3910)
    at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:54)
    at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:126)
    at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:168)
    at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2413)
    at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitScope.lookupClassNodeForSource(GroovyCompilationUnitScope.java:172)
    at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.resolveFromCompileUnit(JDTResolver.java:144)
    at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:278)
    at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.resolve(JDTResolver.java:259)
    at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1267)
    at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:150)
    at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.startResolving(JDTResolver.java:577)
    at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:680)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:935)
    ... 35 more
    If I run this project from the command line, it works.

    Gene

  7. #17
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    It is a possibility that the grails version being used by your project in Eclipse is not the version being used on the command line. In your project properties, can you check what version is being referenced?
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  8. #18

    Default

    I am running 1.3.4 for both.

  9. #19
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    By the looks of things, your dependencies aren't being computed properly. org.hibernate.SessionFactory should be coming from the hibernate-core-3.3.1.GA.jar, which should be on your Grails Dependencies path. Do you see that jar or that class file?
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  10. #20

    Default

    Looks like that's a problem -- I am not seeing any of the hibernate jars in the build path/libraries dialog. Is there a principled way of getting them referenced? Or should I just manually add the jars to the Grails Dependencies library?

    Thanks,

    Gene

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •