struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: using annotations with struts 2 in jboss not finding actions
Date Fri, 28 Sep 2012 18:11:02 GMT

so you want the EAR ClassLoader to be searched before JBoss ClassLoader? ..here is how

<classloading xmlns="urn:jboss:classloading:1.0"
domain="your.ear"
export-all="NON_EMPTY"
import-all="true"
parent-first="false">
</classloading>
http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file/

HTH
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.


> Date: Fri, 28 Sep 2012 09:57:32 -0700
> From: jdtommy@gmail.com
> To: user@struts.apache.org
> Subject: using annotations with struts 2 in jboss not finding actions
> 
> The application is using Jboss and has an ear file which contains an war file
> and a jar file.  The war contians all our web pages.  The action classes
> which I have annotated are in the jar file that is in the ear.  From my
> googleing I have setup my struts.xml file with the following constants:
> 
>     <constant name="struts.convention.action.fileProtocols"
> value="ear,jar,vfsfile,vfszip" />
>     <constant name="struts.convention.action.disableJarScanning"
> value="false"/>
>     <constant name="struts.convention.action.includeJars"
> value=".*/lightspeed.*?jar(!/)?,.*/lightspeed*?jar(!/)?,.*lightspeed.*?jar(!/)?,.*lightspeed*?jar(!/)?"
> />
> 
> Jboss container starts up fine, but my action is not loaded.  I have
> downloaded the source for the convention plugin to see what it is using to
> find the action classes and it seems to only look at the war file for action
> classes when it scans.  Is there a way to get it to look in the jar file
> that contains the actions class when it scans foe the annotated action
> classes?
> 
> file structure:<br/>
> -application.ear<br/>
> &nbsp;&nbsp;|--application.war<br/>
> &nbsp;&nbsp;|--aplication_logic_actions.jar *<--- this contains the action
> classes which are annotated*
> 
> I have debugged the code for the convention plugin and here is where I see
> my problem.  In the *PackageBasedActionConfigBuilder* class and the
> *buildUrlSet()* method it has this line of code:
> 
>     UrlSet urlSet = new UrlSet(classLoaderInterface, this.fileProtocols);
> 
> after this code I get about 200 + urls.  It then goes through this code:
> 
>     if (excludeParentClassLoader) {
> 
> This condiftion block removes all my urls since they are all from jboss I
> guess and I have *excludeParentClassLoader* set to true.  It then hits this
> code:
> 
>     urlSet = urlSet.includeClassesUrl(classLoaderInterface);
> 
> after this I get one url in my urlset:
> 
> > file:/C:/evolution/trunk/powersports/jboss/server/dms/deploy/http-invoker.sar/invoker.war=file:/C:/evolution/trunk/powersports/jboss/server/dms/deploy/http-invoker.sar/invoker.war
> 
> Now it finally gets to the part that has the jar incllude regex
> 
>     List<URL> rawIncludedUrls = urlSet.getUrls();
>     Set<URL> includeUrls = new HashSet<URL>();
>     boolean[] patternUsed = new boolean[includeJars.length];
>     
>     for (URL url : rawIncludedUrls) {
> 
> since there is the 1 url in the urlset and my jars are not there then it
> does not find them.  There must be something else I am missing on how to get
> my url to show up in that url set before the regex comparison code is run, 
> I just don't know what that is
> 
> 
> 
> --
> View this message in context: http://struts.1045723.n5.nabble.com/using-annotations-with-struts-2-in-jboss-not-finding-actions-tp5710681.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message