<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    This is a modularization issue. Adding the MVEL JAR to the plugin
    will cause the LinkageError, as the forge-core classes will depend
    on the MVEL classes loaded from the forge-core module(s), and the
    plugin module will use the MVEL JAR classes packaged with it (so if
    there's a hierarchy that crosses the plugin/core boundary, this will
    crash). The only good solution I can see is to add a module
    dependency on the MVEL module (or the module in which MVEL lives in
    forge-core).<br>
    <br>
    AFAICT, depending on seam-render and adjusting seam-render module
    definition to export the MVEL classes should take care of this (if
    it's ever acceptable from a visibility perspective to depend on MVEL
    directly).<br>
    <br>
    <br>
    On 12-02-14 10:09 AM, Ryan Bradley wrote:
    <blockquote cite="mid:4F3A7920.9030601@redhat.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Lincoln, frankly, I'm stumped by this one.&nbsp; I never received a
      LoaderConstraintViolation or anything similar.&nbsp; My issue was with
      the seam-render not being added as a module to the plugin, since
      it was already included with the Forge core.&nbsp; However, that issue
      has since been resolved.<br>
      <br>
      Thomas, I'm not sure of the cause of your exception, as including
      seam-render and MVEL as dependencies solved the problem for me.&nbsp;
      If I understand your most recent e-mail correctly, your problem is
      solved if MVEL is manually added to module.xml?&nbsp; MVEL is not
      required for my ScaffoldProvider implementation, so maybe you are
      experiencing a similar problem?<br>
      <br>
      Sorry,<br>
      Ryan<br>
      <br>
      On 02/13/2012 07:15 PM, Lincoln Baxter, III wrote:
      <blockquote
cite="mid:CAEp_U4F+SL0g-WtVKxzLeaNEKXBxQP_o_cY3nbbYzEcRBctnZw@mail.gmail.com"
        type="cite">Ryan, how did you get around this?<br>
        <br>
        Thomas, perhaps you could try including seam-render instead of
        MVEL? Make sure you use the same version that Forge Shell uses
        as a temporary workaround.<br>
        <br>
        ~Lincoln<br>
        <br>
        <div class="gmail_quote"> On Mon, Feb 13, 2012 at 5:33 PM,
          Thomas Fr&uuml;hbeck <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:fruehbeck@aon.at">fruehbeck@aon.at</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi Ryan,
            Lincoln<br>
            <div class="im"><br>
              &gt; I ran into similar problems with my own plugin
              development. &nbsp;Including<br>
              &gt; MVEL as a Maven dependency in your pom.xml should
              resolve this issue.<br>
              <br>
            </div>
            this is exactly what I have tried to do. This will really
            look ugly :/<br>
            I will write it as clear as possible:<br>
            <br>
            in pom.xml &nbsp;I added:<br>
            &lt;dependency&gt;<br>
            &lt;groupId&gt;org.mvel&lt;/groupId&gt;<br>
            &lt;artifactId&gt;mvel2&lt;/artifactId&gt;<br>
            &lt;scope&gt;compile&lt;/scope&gt;<br>
            &lt;/dependency&gt;<br>
            <br>
            On forge install-plugin ~/blabla/ &nbsp;I get:<br>
            ***SUCCESS*** Installed from [plugin-faces-idaware]
            successfully.<br>
            Wrote
            /home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/1.0.0-SNAPSHOT-6c38c8fd-45f4-4736-ad0a-467dc9154a11<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/1.0.0-SNAPSHOT-6c38c8fd-45f4-4736-ad0a-467dc9154a11/plugin-faces-id-aware.jar<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/1.0.0-SNAPSHOT-6c38c8fd-45f4-4736-ad0a-467dc9154a11/module.xml<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/dependencies<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/dependencies/1.0.0-SNAPSHOT-6c38c8fd-45f4-4736-ad0a-467dc9154a11<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/dependencies/1.0.0-SNAPSHOT-6c38c8fd-45f4-4736-ad0a-467dc9154a11/metawidget-all-2.0.jar<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/dependencies/1.0.0-SNAPSHOT-6c38c8fd-45f4-4736-ad0a-467dc9154a11/mvel2-2.1.Beta7.jar<br>
            Wrote
/home/thomas/.forge/plugins/at/tfr/forge/plugin-faces-id-aware/dependencies/1.0.0-SNAPSHOT-6c38c8fd-45f4-4736-ad0a-467dc9154a11/module.xml<br>
            <br>
            So to me it is clear, that I was successful, integration of
            Mvel libraries is done.<br>
            But when I invoke my plugin, I get _a
            LoaderConstraintViolation_!!<br>
            <br>
            [myidaware] myidaware $ set VERBOSE true<br>
            [myidaware] myidaware $ scaffold from-entity
            at.tfr.test.model.* --scaffoldType idaware<br>
            Use which scaffold provider?<br>
            <br>
            &nbsp; 1 - [idaware]<br>
            &nbsp; 2 - [faces]*<br>
            <br>
            &nbsp;? Choose an option by typing the number of the selection
            [*-default] &nbsp;[0] 1<br>
            <div class="im">***ERROR*** [scaffold from-entity] loader
              constraint violation: loader (instance of
              org/jboss/modules/ModuleClassLoader) previously initiated
              loading for a different type with name
              "org/mvel2/templates/CompiledTemplate"<br>
            </div>
            org.jboss.forge.shell.exceptions.CommandExecutionException:
            loader constraint violation: loader (instance of
            org/jboss/modules/ModuleClassLoader) previously initiated
            loading for a different type with name
            "org/mvel2/templates/CompiledTemplate"<br>
            <br>
            Caused by: java.lang.LinkageError: loader constraint
            violation: loader (instance of
            org/jboss/modules/ModuleClassLoader) previously initiated
            loading for a different type with name
            "org/mvel2/templates/CompiledTemplate"<br>
            <br>
            <br>
            So for me it is evident, that I brought my own Mvel jar, but
            the module loader will not let me use it!<br>
            <div class="HOEnZb">
              <div class="h5"><br>
                Regards,<br>
                Thomas<br>
                _______________________________________________<br>
                forge-dev mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
                <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/forge-dev"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        Lincoln Baxter, III<br>
        <a moz-do-not-send="true" href="http://ocpsoft.com">http://ocpsoft.com</a><br>
        <a moz-do-not-send="true" href="http://scrumshark.com">http://scrumshark.com</a><br>
        "Keep it Simple"<br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
forge-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
forge-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>