• Bug
  • Status: Open
  • 2 Major
  • Resolution:
  • Byte Code Transform
  • prodmgmt
  • Reporter: puneetb
  • October 05, 2009
  • 0
  • Watchers: 1
  • March 19, 2010

Attachments

Description

While integrating mule with terracotta, the following exception comes, on startup -

Exception in thread “Thread-10” java.lang.ClassCircularityError: org/mule/util/ClassUtils at org.mule.util.MuleUrlStreamHandlerFactory.defaultHandlerCreateStrategy(MuleUrlStreamHandlerFactory.java:107) at org.mule.util.MuleUrlStreamHandlerFactory.createURLStreamHandler(MuleUrlStreamHandlerFactory.java:84) at java.net.URL.getURLStreamHandler(URL.java:1107) at java.net.URL.(URL.java:572) at java.net.URL.(URL.java:464) at java.net.URL.(URL.java:413) at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:161) at java.net.JarURLConnection.(JarURLConnection.java:144) at sun.net.www.protocol.jar.JarURLConnection.(JarURLConnection.java:63) at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24) at java.net.URL.openConnection(URL.java:945) at java.net.URL.openStream(URL.java:1010) at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1252) at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.createClassInfoFromStream(AsmClassInfo.java:700) at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getClassInfo(AsmClassInfo.java:256) at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getSuperclass(AsmClassInfo.java:571) at com.tc.aspectwerkz.expression.regexp.TypePattern.matchSuperClasses(TypePattern.java:129) at com.tc.aspectwerkz.expression.regexp.TypePattern.matchType(TypePattern.java:98) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:437) at com.tc.aspectwerkz.expression.ast.ASTClassPattern.jjtAccept(ASTClassPattern.java:24) at com.tc.aspectwerkz.expression.ExpressionVisitor.visitAnnotatedNode(ExpressionVisitor.java:1016) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:237) at com.tc.aspectwerkz.expression.ast.ASTWithin.jjtAccept(ASTWithin.java:22) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:100) at com.tc.aspectwerkz.expression.ast.ASTExpression.jjtAccept(ASTExpression.java:22) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:88) at com.tc.aspectwerkz.expression.ExpressionVisitor.match(ExpressionVisitor.java:74) at com.tc.object.config.ClassExpressionMatcherImpl.match(ClassExpressionMatcherImpl.java:24) at com.tc.object.config.CompoundExpressionMatcher.match(CompoundExpressionMatcher.java:18) at com.tc.object.config.StandardDSOClientConfigHelperImpl.shouldBeAdapted(StandardDSOClientConfigHelperImpl.java:1200) at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transformInternal(DefaultWeavingStrategy.java:181) at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transform(DefaultWeavingStrategy.java:131) at com.tc.object.bytecode.hook.impl.DSOContextImpl.preProcess(DSOContextImpl.java:224) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.defineClass0Pre(ClassProcessorHelper.java:571) at java.lang.ClassLoader.defineClass(ClassLoader.java:703) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at sun.misc.Launcher$AppClassLoader.findClass(Launcher.java) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402) at org.mule.MuleShutdownHook.shutdown(MuleShutdownHook.java:104) at org.mule.MuleShutdownHook.run(MuleShutdownHook.java:58)

This is the same issue as reported in - http://forums.terracotta.org/forums/posts/list/983.page http://forums.terracotta.org/forums/posts/list/2172.page

Steps to reproduce are -

  1. Download and install the Mule 2.2.1 community edition and set
    MULE_HOME environment variable.
  2. Place the tim-quartz-1.6.1 version 1.2.0 jar in the Mule/lib/user
    directory.
  3. Remove the existing quartz-all-1.6.0 osgi jar that is in the
    mule/lib/opt directory.
  4. Place the attached quartz-all jar in the mule/lib/opt directory.
  5. Place the attached terracotta-mule-integration-config.xml file in
    the mule/lib/user directory.
  6. Use the attached tc-config.xml file.
  7. Configure the mule server to attach to terracotta by placing the
    additional jvm arguments in mule/conf/wrapper.conf. (sample attached)

To start mule use the following command: $MULE_HOME/bin/mule -config terracotta-mule-integration-config.xml

Comments

Puneet Bhardwaj 2009-10-05

TC config xml

Ari Zilka 2009-10-05

Worth fixing sooner rather than later. ZCorum have to hack Mule to get it to work with DSO which makes them a tad uncomfortable.

–Ari

Alex Miller 2009-10-05

Two forum issues where this comes up:

http://forums.terracotta.org/forums/posts/list/983.page http://forums.terracotta.org/forums/posts/list/2172.page

And a workaround is to do something like this to force this class to get loaded in a different context:

Class.forName(“org.mule.util.ClassUtils”);

Steve Harris 2009-10-09

Do you care about this usecase?