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 7864071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:40:40+00:00 2026-06-02T23:40:40+00:00

I have a Java application that is running embedded groovy scripts using a GroovyClassLoader

  • 0

I have a Java application that is running embedded groovy scripts using a GroovyClassLoader. Everything is working great until I hit an odd error while passing Java types to a Groovy script.

My issue is thus: I am passing a java.util.Date as a parameter into a groovy script. I found that Groovy’s java.util.Date has a fantastic clearTime() function. However when I try to call this function i get this exception:

groovy.lang.MissingMethodException: No signature of method: java.util.Date.clearTime() is applicable for argument types: () values: []

I assume this because I have a Java Date and not a Groovy Date. Is there a way to convert between the two.

I do admit I don’t fully understand how Groovy seems to be overriding jdk types. (So much so I don’t even know if this is the correct terminology to use here.) Please correct me if I am completely wrong about what happens when you create a java.util.Date inside of Groovy vs. when you pass one in to a function from Java.

  • 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-06-02T23:40:43+00:00Added an answer on June 2, 2026 at 11:40 pm

    Ok I found out my malfunction here. My test app was bound to groovy 1.8.6 as desired, but my main program was using 1.6.5 (the function I happened to be trying to call was introduced in 1.6.7). Eclipse decided not to run with the new version when I updated my pom.xml.

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

Sidebar

Related Questions

I have a java application that has Web Services published using Axis. With the
I have a Java application that is managed using Maven. The project involves the
I have a Java application that authenticates against Active Directory. When running the program
I have a Java application using a SSH connection, remotely running CLI commands. For
I have a Java application that is running perfectly under windows, i go to
I have a Java application that is running on Windows 7. When I look
I have a java application that needs to display currency symbols. I'm running on
I have a java web application that I'm running with tomcat. This application has
We have a java application that's essentially a long running process. It's deployed on
I have a Java application that is working as a service. After several days

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.