Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 912801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:26:52+00:00 2026-05-15T17:26:52+00:00

I have developed this small app and run it on Jetty with no problems…

  • 0

I have developed this small app and run it on Jetty with no problems…

Bug.groovy:

package itsafeature

class Bug {

    String name
    String description
    Priority priority

    Project project

    static belongsTo = Project

    static constraints = {
        name(size:10..150)
        description(size:25..1500)
        project(nullable:false)
        priority(nullable:false)
    }

    String toString() {
        return "${priority}:${name}"
    }
}
enum Priority {HIGH(5), MEDIUM(3),LOW(1)
    private Priority(int val){
        value = val
    }
    private final int value
    int value() {
        value
    }
}

When I use Netbeans to deploy directly to it’s Grails Jetty Server, this works exactly as you’d expect. The Priority is written to my database as a string, and it does what I want.

However, If I take the project and do a “build”, it creates a “production” build of the application (my datasource file is the same for all builds), and I put it in my “webapps” folder of a local tomcat server, and I see the following stacktrace:

SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        ... SNIP! ...
Caused by: java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: Priority(java.lang.String, java.lang.Integer)
        at Priority.<clinit>(Priority.groovy:10)
        ... 2 more

What should I be looking at to narrow down this issue? I only have one groovy installed on windows, with the GROOVY_HOME pointed to that, same with GRAILS. Does Jetty have it’s own version of these runtimes? Or is this really an application server problem?

There is a grails command that says “tomcat”, not sure if that has anything to do with this, but I’m not using it

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:26:52+00:00Added an answer on May 15, 2026 at 5:26 pm

    Move the enum to its own file in src/groovy (in the same package or another, but it can’t be in the default package and be accessed by a domain class in a package).

    btw – you don’t need Groovy or GROOVY_HOME with Grails – it comes with the version of the Groovy jar that it works with and that gets deployed in your war.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a small web app. This app allows users to upload images.
I have developed a Powershell script that needs to be run automatically daily. This
I have a small Android app developed in Eclipse on Windows and versioned on
I have a developed two small Java applications - a vanilla Java app and
I have a developed a small web-app in Symfony 2 and Doctrine 2. Can
I have developed a Phone Gap application using this link . Application is running
I have developed and android Application and export as APK file to publish this
I have developed a simple library in Ruby and need to use this in
I have developed sample api as jar file. This jar file contains the code
My Situation I have developed a web service for document analysis This web service

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.