Re: BeanShell and Class: x not in namespace
"Florin T.PATRASCU" <[email protected]> Sun, 18 Jun 2006 11:11:21 -0400
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0313029740== Content-Type: multipart/alternative; boundary=Apple-Mail-1-537590052 --Apple-Mail-1-537590052 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Rebel, I hear you! I also know many other examples of (un)fortun(at)e 100 companies doing weird stuff with Java and architecture, but of course in the name of "J2EE and/or enterprise best practices" :) The classloading story in this case is a JBoss one. Has nothing to do with the version of JPublish, I wish it was that easy. Just curious now, is your application (the EAR) the only web app deployed under JBoss? If yes, maybe is not hard to change your legacy code, I don't know, and maybe you could refactor that session bean as an MBean and then your session, presented as a JBoss service, would be much friendlier to any web application deployed. This way, you'll have your (any) application able to breath as an unpacked and accessible web ... normal application :) I am currently having something similar in production (www.masterfile.com) and JPublish is driving a massive web content. It would be impossible to administer a site like that if we'll have to pack the dynamic content in archives inaccessible to our designers. That will be an unacceptable architecture. Anthony and myself as well are big supporters of the separation of roles and concerns in the enterprise, as well as in any web (non-web) application, that's why JPublish was built the way it is and all the merits goes to Anthony in this respect. Anyway, try to grab the latest libraries from the JP3 trunk and see if there is a difference. You could also try to add the groovy- all-1.0-jsr-05.jar to your server/all/lib. Mind you the groovy version I have added last night to the CVS is compiled with Java 1.5! Also, have you tried to use the MANIFEST.MF/Class-Path? -florin PS I discovered recently (a month ago), that JBoss 4.0.4 is better (obvious) than the old versions, try it to see how (and if) is changing your perspective. On 17-Jun-06, at 11:54 PM, Rebel Geek wrote: > Florin, > > Getting JP2 may be a solution if the classloading problems are > resolved. Let me explain a little about our environment: > > I work for a fortune 100 (maybe a fortune 10) company run by a very > large mouse (I dare not give out the name of the company <smile>). We > have a portal and a SOA environment that provides content to the > portal. The portal communicates with the SOA environment via WSRP (Web > Services for Remote Portlet). The infrastructure guys provided us with > some Ant scripts that will automagically (because our company is built > on magic <more smiles>) builds a session bean that acts as a web > service interface to our application. So if I just have a JSP > accessing a database, the build scripts will "wrap" a web service > layer around it. This is the reason why I have my WAR file in an EAR. > > I have gotten JP3 to work in our version of JBoss 3.2 using the > following article > > http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration > > especially the section titled " The Web Container". Though JP3 loads > and finds bsh it cannot find Groovy for some reason and the action > only "see" that classes that JBoss loads from the deploy folder or > what's in the server/all/lib folder of JBoss. > > Hope this serves to give somebody in this group an epiphany. Thanks > all for your help and insight. > > Regards, > > > On 6/16/06, Florin T.PATRASCU <[email protected]> wrote: >> >> >> >> On 16-Jun-06, at 12:16 PM, Lateef Jackson wrote: >> >> >> What reasons are you using JPublish for? You may not be loosing >> >> anything but depends on what you like about JPublish. >> >> I subscribe to Lateef's question. If you're not using JP3 in a >> very specific >> way I may send you a new JP2 (I hope I'll commit it soon to the >> 2-0 branch >> in the CVS) which is cleaned a bit, some errors are fixed, the >> access to the >> page components are cached through a pluggable mechanism and all the >> libraries are updated to their latest versions; bsh, groovy, >> RHINO, etc. >> >> JPublish is a very reliable piece of software (I am biased, of >> course:) and >> the version I am using (based on 2.0 and I am still working on it) >> is very >> reliable and efficient, here are my old notes: >> http://weblog.flop.ca/2005/03/12/1110656258000.html, since >> then I added few more changes, such as: groovy support. Currently >> I am >> working to finalize the DWR support for AJAX and the support for page >> localization based on properties files, a very common i18n specific >> practice. >> >> You can use JP with Spring if you want and from there ... sky's >> the limit :) >> Here is a small jump-start if you want to try: >> http://www.flop.ca/links/sjp.html >> >> I'll be glad to hear more about your experience. >> >> -florin >> >> >> >> _______________________________________________ >> Jpublish-developer mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jpublish-developer >> >> >> > > > -- > Rebel Geek > [email protected] > 954-839-6234 > > > _______________________________________________ > Jpublish-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jpublish-developer --Apple-Mail-1-537590052 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 <HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; = -khtml-line-break: after-white-space; ">Hi Rebel,<DIV><BR = class=3D"khtml-block-placeholder"></DIV><DIV>I hear you! I also know = many other examples of (un)fortun(at)e 100 companies doing weird stuff = with Java and architecture, but of course in the name of "J2EE and/or = enterprise best practices" :)</DIV><DIV><BR = class=3D"khtml-block-placeholder"></DIV><DIV>The classloading story in = this case is a JBoss one. Has nothing to do with the version of = JPublish, I wish it was that easy.</DIV><DIV><BR = class=3D"khtml-block-placeholder"></DIV><DIV>Just curious now, is your = application (the EAR) the only web app deployed under JBoss? If yes, = maybe is not hard to change your legacy code, I don't know, and maybe = you could refactor that session bean as an MBean and then your session, = presented as a JBoss service, would be much friendlier to any web = application deployed. This way, you'll have your (any)=A0application=A0abl= e to breath as an unpacked and=A0accessible web ... normal=A0 = application :)</DIV><DIV><BR = class=3D"khtml-block-placeholder"></DIV><DIV>I am currently having = something similar in production (<A = href=3D"http://www.masterfile.com">www.masterfile.com</A>) and JPublish = is driving a massive web content. It would be impossible to administer a = site like that if we'll have to pack the dynamic content in = archives=A0inaccessible to our designers. That will be an unacceptable = architecture. Anthony and myself as well are big supporters of = the=A0separation of roles and=A0concerns in the enterprise, as well as = in any web (non-web) application, that's why JPublish was built the way = it is and all the merits goes to Anthony in this respect.</DIV><DIV><BR = class=3D"khtml-block-placeholder"></DIV><DIV>Anyway, try to grab the = latest libraries from the JP3 trunk and see if there is a difference. = You could also try to add the=A0groovy-all-1.0-jsr-05.jar to your = server/all/lib. Mind you the groovy version I have added last night to = the CVS is compiled with Java 1.5! Also, have you tried to use the=A0<FONT= class=3D"Apple-style-span" face=3D"Lucida = Grande">MANIFEST.MF/Class-Path?</FONT></DIV><DIV><BR><DIV> <SPAN = class=3D"Apple-style-span" style=3D"border-collapse: separate; = border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Monaco; = font-size: 13px; font-style: normal; font-variant: normal; font-weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; = -khtml-text-decorations-in-effect: none; text-indent: 0px; = -apple-text-size-adjust: auto; text-transform: none; orphans: 2; = white-space: normal; widows: 2; word-spacing: 0px; = "><DIV>-florin</DIV><BR class=3D"Apple-interchange-newline"></SPAN> = </DIV><DIV>PS</DIV><DIV>I discovered recently (a month ago), that JBoss = 4.0.4 is better (obvious) than the old versions, try it to see how (and = if) is changing your perspective.</DIV><DIV><BR = class=3D"khtml-block-placeholder"></DIV><BR><DIV><DIV>On 17-Jun-06, at = 11:54 PM, Rebel Geek wrote:</DIV><BR = class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">Florin,</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: = 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; ">Getting JP2 may be a solution if = the classloading problems are</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">resolved. Let = me explain a little about our environment:</DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I work for a = fortune 100 (maybe a fortune 10) company run by a very</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">large mouse (I dare not give out the name of the = company <smile>). We</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">have a portal = and a SOA environment that provides content to the</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">portal. The portal communicates with the SOA = environment via WSRP (Web</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Services for = Remote Portlet). The infrastructure guys provided us with</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">some Ant scripts that will automagically (because = our company is built</DIV><DIV style=3D"margin-top: 0px; margin-right: = 0px; margin-bottom: 0px; margin-left: 0px; ">on magic <more = smiles>) builds a session bean that acts as a web</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">service interface to our application. So if I just = have a JSP</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; ">accessing a database, the build = scripts will "wrap" a web service</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">layer around = it. This is the reason why I have my WAR file in an EAR.</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I have = gotten JP3 to work in our version of JBoss 3.2 using the</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">following article</DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN = class=3D"Apple-converted-space">=A0</SPAN><A = href=3D"http://wiki.jboss.org/wiki/Wiki.jsp?page=3DClassLoadingConfigurati= on">http://wiki.jboss.org/wiki/Wiki.jsp?page=3DClassLoadingConfiguration</= A></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: = 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">especially the section titled " The Web Container". = Though JP3 loads</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; ">and finds bsh it cannot find = Groovy for some reason and the action</DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">only = "see" that classes that JBoss loads from the deploy folder or</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">what's in the server/all/lib folder of = JBoss.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">Hope this serves to give somebody in this group an = epiphany. Thanks</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; ">all for your help and = insight.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">Regards,</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: = 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">On 6/16/06, Florin T.PATRASCU <<A = href=3D"mailto:[email protected]">[email protected]</A>> wrote:</DIV> = <BLOCKQUOTE type=3D"cite"><DIV style=3D"margin-top: 0px; margin-right: = 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; = "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On = 16-Jun-06, at 12:16 PM, Lateef Jackson wrote:</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">What reasons = are you using JPublish for? You may not be loosing</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">anything = but depends on what you like about JPublish.</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I = subscribe to Lateef's question. If you're not using JP3 in a very = specific</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; ">way I may send you a new JP2 (I = hope I'll commit it soon to the 2-0 branch</DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">in the = CVS) which is cleaned a bit, some errors are fixed, the access to = the</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; ">page components are cached = through a pluggable mechanism and all the</DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = ">libraries are updated to their latest versions; bsh, groovy, RHINO, = etc.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">JPublish is a very reliable piece of software (I am = biased, of course:) and</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">the version I = am using (based on 2.0 and I am still working on it) is very</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">reliable and efficient, here are my old = notes:</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; "><A = href=3D"http://weblog.flop.ca/2005/03/12/1110656258000.html">http://weblog= .flop.ca/2005/03/12/1110656258000.html</A>, since</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">then I added few more changes, such as: groovy = support. Currently I am</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">working to = finalize the DWR support for AJAX and the support for page</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">localization based on properties files, a very = common i18n specific</DIV><DIV style=3D"margin-top: 0px; margin-right: = 0px; margin-bottom: 0px; margin-left: 0px; ">practice.</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">You can = use JP with Spring if you want and from there ... sky's the limit = :)</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: = 0px; margin-left: 0px; ">Here is a small jump-start if you want to = try:</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; "><A = href=3D"http://www.flop.ca/links/sjp.html">http://www.flop.ca/links/sjp.ht= ml</A></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">I'll be glad to hear more about your = experience.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">-florin</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: = 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = ">_______________________________________________</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">Jpublish-developer mailing list</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; "><A = href=3D"mailto:[email protected]">Jpublish-develope= [email protected]</A></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A = href=3D"https://lists.sourceforge.net/lists/listinfo/jpublish-developer">h= ttps://lists.sourceforge.net/lists/listinfo/jpublish-developer</A></DIV><D= IV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: = 14px; "><BR></DIV> </BLOCKQUOTE><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: = 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">--<SPAN = class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Rebel = Geek</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; "><A = href=3D"mailto:[email protected]">[email protected]</A></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">954-839-6234</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: = 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; = ">_______________________________________________</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">Jpublish-developer mailing list</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; "><A = href=3D"mailto:[email protected]">Jpublish-develope= [email protected]</A></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A = href=3D"https://lists.sourceforge.net/lists/listinfo/jpublish-developer">h= ttps://lists.sourceforge.net/lists/listinfo/jpublish-developer</A></DIV> = </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>= --Apple-Mail-1-537590052-- --===============0313029740== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0313029740== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Jpublish-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jpublish-developer --===============0313029740==--