One thing that you must take into account is the fact that Forge uses a modular ClassLoading environment called JBoss Modules. This means that classes are isolated from each other.<br><br>The classpath of a typical java application if flat, where every class is visible to every other class because there is only a single classloader. That is not the case in Forge. In fact, classes have limited or no visibility to many classloaders. This allows us to support multiple version of the same class for use in many different plugins.<br>
<br>I need more information about your project. Is the class you are loading in the same JAR as the class which is doing the loading? (Your plugin.) Also, may I recommend instead using <br><br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
`this.getClass().forName(...)`<br></blockquote><br>Which says, "Start looking from the classloader of `this`," and anything else that is in that classloader's hierarchy of visibility.<br><br>~Lincoln<br><br>
<div class="gmail_quote">On Fri, Jan 20, 2012 at 11:49 AM, Max Schwaab <span dir="ltr"><<a href="mailto:max.schwaab@akquinet.de">max.schwaab@akquinet.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hey there,<br>
<br>
I try to get my plugin working and now I have the problem that my
plugin can't find one of its classes when I try to invoke the
default command.<br>
The plugin does some stuff an finally a Class.forName("org.hibersap.forge.plugin.FunctionModuleSearch")<br>
<br>
Do you have any hints why Class.forName() can't find the class?<br>
<br>
The message is<br>
<br>
***ERROR*** [generate-sap-entities] Cannot find class
org.hibersap.forge.plugin.FunctionModuleSearch in classpath<br>
<br>
The funny thing about this is, with Forge Beta 5 everything is
working fine, with the latest Forge snapshot I miss my class :\<br>
<br>
This is all within the same Maven JAR plugin project. I'm using a
framework which is using the Class.forName() method. So there's no
way out of this :)<br>
<br>
Must be something to do with the latest changes since Beta 5 is
published.<br>
<br>
Thanks for your help,<br>
<br>
best regards<span><font color="#888888">,<br>
<br>
Max<br>
</font></span>
</div>
<br>_______________________________________________<br>
forge-users mailing list<br>
<a href="mailto:forge-users@lists.jboss.org">forge-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>"Keep it Simple"<br>