marc fleury wrote:
> |I'm just trying to tidy up my connector architecture implementation so
> |that I'm not embarrassed to show it to people, and I've run into a
> |problem that has me perplexed.
>
> don't be embarrassed to show anything, this is open source
One has one's pride. Without that one does not have very much, does one?
> |As part of my changes I'm introducing
> |org.jboss.deployment.DeploymentException, which is basically identical
> |to org.jboss.ejb.DeploymentException. When I gut ejb.DeploymentException
>
> then why introduce it in the first place?
Just a small refactoring. I want to throw some kind of
DeploymentException, but it's not anything to do with EJB.
> |and make it extend deployment.DeploymentException I get
> |NoClassDefFoundErrors complaining about
> |org.jboss.deployment.DeploymentException whenever loading a class that
> |uses ejb.DeploymentException (such as ContainerFactory).
>
> You have some sort of shadowing going on... 2 classes in parallel with the
> same name...
Well, I did think of that. The same thing happens when I make
ejb.DeploymentException extend ejb.DummyException, which in turn
trivially extends Exception. You can try this at home.
src/main/org/jboss/ejb/DeploymentException.java
18c18
< extends Exception
---
> extends DummyException
src/main/org/jboss/ejb/DummyException.java
> package org.jboss.ejb;
>
> public class DummyException extends Exception
> {
> public DummyException(String message) { super(message); }
> }
If someone could try this and see if it breaks everything like it does
for me I'd be much obliged. If someone could tell me why this breaks
everything I'd be even mucher obliged.
Toby.
> marc
>
> |
> |Other classes that use deployment.DeploymentException load and use it
> |without problems.
> |
> |The behaviour is the same even if I leave ejb.DeploymentException the
> |same apart from making it extend a class that just extends Exception (it
> |claims that it can't load the middle class).
> |
> |Here's the stack trace:
> |
> |[Configuration] java.lang.NoClassDefFoundError:
> |org/jboss/deployment/DeploymentException
> |[Configuration] at
> |java.lang.ClassLoader.defineClass0(Native Method)
> |[Configuration] at
> |java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> |[Configuration] at
> |java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
> |[Configuration] at
> |java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
> |[Configuration] at
> |java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> |[Configuration] at
> |java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> |[Configuration] at
> |java.security.AccessController.doPrivileged(Native Method)
> |[Configuration] at
> |java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> |[Configuration] at
> |java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> |[Configuration] at
> |sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> |[Configuration] at
> |java.lang.ClassLoader.loadClass(ClassLoader.java:290)
> |[Configuration] at
> |java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> |[Configuration] at
> |java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> |[Configuration] at java.lang.Class.getConstructors0(Native Method)
> |[Configuration] at java.lang.Class.getConstructors(Class.java:775)
> |[Configuration] at
> |com.sun.management.jmx.Introspector.testCompliance(Introspector.java:95)
> |[Configuration] at
> |com.sun.management.jmx.MetaData.testCompliance(MetaData.java:132)
> |[Configuration] at
> |com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.
> |java:507)
> |[Configuration] at
> |org.jboss.configuration.ConfigurationService.create(ConfigurationSe
> rvice.java:328)
> |[Configuration] at
> |org.jboss.configuration.ConfigurationService.loadConfiguration(Conf
> igurationService.java:256)
> |[Configuration] at java.lang.reflect.Method.invoke(Native Method)
> |[Configuration] at
> |com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> |[Configuration] at
> |com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> |[Configuration] at org.jboss.Main.<init>(Main.java:150)
> |[Configuration] at org.jboss.Main$1.run(Main.java:89)
> |[Configuration] at
> |java.security.AccessController.doPrivileged(Native Method)
> |[Configuration] at org.jboss.Main.main(Main.java:85)
> |
> |
> |