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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:35:55+00:00 2026-06-18T12:35:55+00:00

Inside my Mule ESB 3.3.0 app, running in standalone mode, I have a transformer

  • 0

Inside my Mule ESB 3.3.0 app, running in standalone mode, I have a transformer that calls Groovy code that is included as a maven dependent jar. In my groovy code, I am calling a Java object that has a newInstance() static method, like so:

TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", null)

This is causing errors in Groovy because I think its trying to call the Groovy enhanced Class.newInstance() method. This does not happen when running outside Mule standalone (see update below for description of test). How can I make it call the Java method and not the Groovy one?

Here is a snippet of my stack trace. You can see its calling DefaultGroovyMethods.newInstance(). But I want to call the javax.xml.transform.TransformerFactory.newInstance(String, ClassLoader) method instead. How?

groovy.lang.GroovyRuntimeException: Could not find matching constructor for: javax.xml.transform.TransformerFactory(java.lang.String, null)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1459)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1375)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:824)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.newInstance(DefaultGroovyMethods.java:18025)

UPDATE:
More info about the runtime environment. The Groovy code is packaged as a jar file and called from a Mule ESB app. Mule 3.3.0 ships with groovy-all-1.8.6.jar.

UPDATE2:
I did some further tests and compiled a Groovy class into a jar file and called it from a standalone Java program and did not experience this issue. This leads me to believe that it is an issue running from the Mule 3.3.0 standalone environment. I am adding a mule tag to this post. Hopefully a Mule expert can tell me what is going on.

  • 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-18T12:35:57+00:00Added an answer on June 18, 2026 at 12:35 pm

    With some help from the Groovy user mailing list, we determined that there must be another jar on the mule classpath that is providing the javax.xml.transformer.Transformer class. I added this sample code:

    Class klass = TransformerFactory.class; 
    URL location = klass.getResource('/'+klass.getName().replace('.', '/')+".class"); 
    

    And sure enough! Mule is adding their own XML API jar.

    TranformerFactory JAR: jar:file:/D:/java/mule/mule-standalone-3.3.0/lib/endorsed/xml-apis-1.3.04.jar!/javax/xml/transform/TransformerFactory.class
    

    Why are you overriding the JDK Mule?

    My work around was to instantiate the Saxon TransformerFactory directly. Its not very elegant, but my only option.

    tFactory = new net.sf.saxon.TransformerFactoryImpl()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Inside my .aspx I have some JSON code that looks like this: function someFunctionName()
Inside the Paint event for panel, I have a code, that should draw a
Inside my Controller i have function that runs after user clicks on item, which
Inside of my MVC application, I have a sub-folder named Admin that was Converted
I have problem in Mule when I was using custom tcp protocol and inside
Inside my Application class, I have a long-running function (e.g. downloading new data). Once
Inside my user object I have the following code to generate a new 'session'
Inside a maven project, I would like to use some classes that were already
Inside a container object, I have created a class Factory , that is responsible
Inside ActionController class (rails/actionpack/lib/action_controller.lib) I found several weird code. I don't really have a

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.