|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
BeanShell and Class: x not in namespaceWhere I work, I have to deploy my application as an EAR file in a
modified JBoss installation (the company that I work for is quite large and therefore capable of modifying a perfectly working app and making it worse <smile>). Anyway, everything works fine except when I call one of my classes in a bsh script, BeanShell tells me that the class is not in the namespace. How do I set the classpath for BeanShell via JPublish? Thanks. -- Rebel Geek rebel.geek@... 954-839-6234 _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespacegood old JBoss and the classpath saga:)
Where exactly do you have the bsh-....jar? Is in your EAR repository (EAR is expanded or archived?) or is it in the JBoss server/[default|all]/lib? JBoss 4.x or 3.x? And which version of JPublish are you running there? I know, is not exactly an answer ;) -florin On 15-Jun-06, at 9:48 AM, Rebel Geek wrote: Where I work, I have to deploy my application as an EAR file in a _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespaceThe bsh-2.0.jar is in WEB-INF/lib of my JPublish project which is in a WAR which is in an EAR which is archived. <smile> The version of JBoss is 3.2 and the version if JPublish is 3.0. I did notice that BeanShell *will* find classes if they have been deployed independantly in their own jar file in the deploy directory as well as the all/lib of JBoss, but this is not the desired effect. All the dependancies are in the WEB-INF/lib of the individual project so if we need to deploy all the relevant jars separately, then it becomes a management nightmare. I tried using the addClassPath in the startup bsh action (which, btw, doesn't seem to be running at startup, so I had to use global-action, but that's another topic) but beanshell complained that addClassPath is not a known action. Do you have a solution to this? Thanks again. On 6/15/06, Florin T.PATRASCU <flop@...> wrote:
-- Rebel Geek rebel.geek@... 954-839-6234 _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespace1) The jython issue (you are using bsh but the problem might be simular) : You hopefully have a $HOME/.jython file which should have the class path to all your jar you want jython to have access to (including the ones in your EAR directory). Whatever the user that starts up jboss on your production server also needs to have that .jython file. 2) JPublish 3.0 is probably not going to work: Spent a good week or two trying to get 3.0 to work and just gave up. It could have been that we had some other complexities with our classpath but I have a feeling that round peg and square hole. I believe I got upgraded to 2.0 (had 1 originally) but you may have better luck because you are starting from scratch. 3) JBoss hotdeploy in all this: hotdeploy might be more of not cold deploy. I think we had to do some hacking to something to get this to work in 3.2 (Don't upgrade). Linux JVM seemed to be the most stable with this however minor version releases make a difference. So make sure you don't try to hot deploy when you are trying to get this to work. Go with a cold deploy. 4) Finally every WAR you have you have to have all the jar copied into the WEB-INF/lib separately. If you have other issues let me know I might be able to help. Good Luck, Lateef On Jun 16, 2006, at 9:51 AM, Rebel Geek wrote: Thanks Florin, Lateef Jackson _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespaceThanks Lateef,
What do you mean by "...in your EAR directory..."? Do you mean the path to the exploded directory? Also, are you suggesting to use 2.0? What will I be "losing" by downgrading? Thanks. On 6/16/06, Lateef Jackson <lj@...> wrote: > > There are a couple of issues (actually a lot of issues with JBoss/J2EE but > that would take an encyclopedia): > 1) The jython issue (you are using bsh but the problem might be simular) : > You hopefully have a $HOME/.jython file which should have the class path to > all your jar you want jython to have access to (including the ones in your > EAR directory). Whatever the user that starts up jboss on your production > server also needs to have that .jython file. > 2) JPublish 3.0 is probably not going to work: > Spent a good week or two trying to get 3.0 to work and just gave up. It > could have been that we had some other complexities with our classpath but I > have a feeling that round peg and square hole. I believe I got upgraded to > 2.0 (had 1 originally) but you may have better luck because you are starting > from scratch. > 3) JBoss hotdeploy in all this: > hotdeploy might be more of not cold deploy. I think we had to do some > hacking to something to get this to work in 3.2 (Don't upgrade). Linux JVM > seemed to be the most stable with this however minor version releases make a > difference. So make sure you don't try to hot deploy when you are trying to > get this to work. Go with a cold deploy. > 4) Finally every WAR you have you have to have all the jar copied into the > WEB-INF/lib separately. > > If you have other issues let me know I might be able to help. > Good Luck, > Lateef > > On Jun 16, 2006, at 9:51 AM, Rebel Geek wrote: > Thanks Florin, > > The bsh-2.0.jar is in WEB-INF/lib of my JPublish project which is in a WAR > which is in an EAR which is archived. <smile> The version of JBoss is 3.2 > and the version if JPublish is 3.0. > > I did notice that BeanShell *will* find classes if they have been deployed > independantly in their own jar file in the deploy directory as well as the > all/lib of JBoss, but this is not the desired effect. All the dependancies > are in the WEB-INF/lib of the individual project so if we need to deploy all > the relevant jars separately, then it becomes a management nightmare. > > I tried using the addClassPath in the startup bsh action (which, btw, > doesn't seem to be running at startup, so I had to use global-action, but > that's another topic) but beanshell complained that addClassPath is not a > known action. > > Do you have a solution to this? Thanks again. > > > > On 6/15/06, Florin T.PATRASCU <flop@...> wrote: > > > > > > good old JBoss and the classpath saga:) > > > > > > Where exactly do you have the bsh-....jar? Is in your EAR repository (EAR > is expanded or archived?) or is it in the JBoss server/[default|all]/lib? > JBoss 4.x or 3.x? And which version of JPublish are you running there? > > > > > > I know, is not exactly an answer ;) > > > > > > -florin > > > > > > > > > > On 15-Jun-06, at 9:48 AM, Rebel Geek wrote: > > > > > > > > Where I work, I have to deploy my application as an EAR file in a > > modified JBoss installation (the company that I work for is quite > > large and therefore capable of modifying a perfectly working app and > > making it worse <smile>). Anyway, everything works fine except when I > > call one of my classes in a bsh script, BeanShell tells me that the > > class is not in the namespace. How do I set the classpath for > > BeanShell via JPublish? > > > > Thanks. > > > > > > -- > > Rebel Geek > > rebel.geek@... > > 954-839-6234 > > > > _______________________________________________ > > Jpublish-developer mailing list > > Jpublish-developer@... > > > https://lists.sourceforge.net/lists/listinfo/jpublish-developer > > > > > > > > _______________________________________________ > > Jpublish-developer mailing list > > Jpublish-developer@... > > > https://lists.sourceforge.net/lists/listinfo/jpublish-developer > > > > > > > > > > -- > Rebel Geek > rebel.geek@... > 954-839-6234 > _______________________________________________ > Jpublish-developer mailing list > Jpublish-developer@... > https://lists.sourceforge.net/lists/listinfo/jpublish-developer > > > Lateef Jackson > lj@... > > > > > > _______________________________________________ > Jpublish-developer mailing list > Jpublish-developer@... > https://lists.sourceforge.net/lists/listinfo/jpublish-developer > > > -- Rebel Geek rebel.geek@... 954-839-6234 _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespace> What do you mean by "...in your EAR directory..."? Do you mean the
> path to the exploded directory? Your $HOME/.jython has a variable .python.path=. This variable needs to be set so that it has access to anything that you want to be able to us in jython (which include any beans you packaged up in your EAR). Usually you want to have access to Session Beans in the Java code. We had to specify in this the path to all the jar files we wanted JPublish jython to have access. > lso, are you suggesting to use 2.0? > What will I be "losing" by downgrading? It has been some time when I was trying to get JPublish 3.0 working, I think it was still in Beta. I am guessing that it might be easier to get it working now that it is out of Beta. However I know 2.0 works with JBoss 3.2 because that is what we are using. So if you can't seem to get 3.0 to work you might want to try and drop down. http://jpublish.org/whatsnew/3.0.html What reasons are you using JPublish for? You may not be loosing anything but depends on what you like about JPublish. On Jun 16, 2006, at 10:24 AM, Rebel Geek wrote: > Thanks Lateef, > > What do you mean by "...in your EAR directory..."? Do you mean the > path to the exploded directory? Also, are you suggesting to use 2.0? > What will I be "losing" by downgrading? Thanks. > > > > On 6/16/06, Lateef Jackson <lj@...> wrote: >> >> There are a couple of issues (actually a lot of issues with JBoss/ >> J2EE but >> that would take an encyclopedia): >> 1) The jython issue (you are using bsh but the problem might be >> simular) : >> You hopefully have a $HOME/.jython file which should have the >> class path to >> all your jar you want jython to have access to (including the ones >> in your >> EAR directory). Whatever the user that starts up jboss on your >> production >> server also needs to have that .jython file. >> 2) JPublish 3.0 is probably not going to work: >> Spent a good week or two trying to get 3.0 to work and just gave >> up. It >> could have been that we had some other complexities with our >> classpath but I >> have a feeling that round peg and square hole. I believe I got >> upgraded to >> 2.0 (had 1 originally) but you may have better luck because you >> are starting >> from scratch. >> 3) JBoss hotdeploy in all this: >> hotdeploy might be more of not cold deploy. I think we had to do some >> hacking to something to get this to work in 3.2 (Don't upgrade). >> Linux JVM >> seemed to be the most stable with this however minor version >> releases make a >> difference. So make sure you don't try to hot deploy when you are >> trying to >> get this to work. Go with a cold deploy. >> 4) Finally every WAR you have you have to have all the jar copied >> into the >> WEB-INF/lib separately. >> >> If you have other issues let me know I might be able to help. >> Good Luck, >> Lateef >> >> On Jun 16, 2006, at 9:51 AM, Rebel Geek wrote: >> Thanks Florin, >> >> The bsh-2.0.jar is in WEB-INF/lib of my JPublish project which is >> in a WAR >> which is in an EAR which is archived. <smile> The version of JBoss >> is 3.2 >> and the version if JPublish is 3.0. >> >> I did notice that BeanShell *will* find classes if they have been >> deployed >> independantly in their own jar file in the deploy directory as >> well as the >> all/lib of JBoss, but this is not the desired effect. All the >> dependancies >> are in the WEB-INF/lib of the individual project so if we need to >> deploy all >> the relevant jars separately, then it becomes a management nightmare. >> >> I tried using the addClassPath in the startup bsh action (which, btw, >> doesn't seem to be running at startup, so I had to use global- >> action, but >> that's another topic) but beanshell complained that addClassPath >> is not a >> known action. >> >> Do you have a solution to this? Thanks again. >> >> >> >> On 6/15/06, Florin T.PATRASCU <flop@...> wrote: >>> >>> >>> good old JBoss and the classpath saga:) >>> >>> >>> Where exactly do you have the bsh-....jar? Is in your EAR >>> repository (EAR >> is expanded or archived?) or is it in the JBoss server/[default| >> all]/lib? >> JBoss 4.x or 3.x? And which version of JPublish are you running >> there? >>> >>> >>> I know, is not exactly an answer ;) >>> >>> >>> -florin >>> >>> >>> >>> >>> On 15-Jun-06, at 9:48 AM, Rebel Geek wrote: >>> >>> >>> >>> Where I work, I have to deploy my application as an EAR file in a >>> modified JBoss installation (the company that I work for is quite >>> large and therefore capable of modifying a perfectly working app and >>> making it worse <smile>). Anyway, everything works fine except >>> when I >>> call one of my classes in a bsh script, BeanShell tells me that the >>> class is not in the namespace. How do I set the classpath for >>> BeanShell via JPublish? >>> >>> Thanks. >>> >>> >>> -- >>> Rebel Geek >>> rebel.geek@... >>> 954-839-6234 >>> >>> _______________________________________________ >>> Jpublish-developer mailing list >>> Jpublish-developer@... >>> >> https://lists.sourceforge.net/lists/listinfo/jpublish-developer >>> >>> >>> >>> _______________________________________________ >>> Jpublish-developer mailing list >>> Jpublish-developer@... >>> >> https://lists.sourceforge.net/lists/listinfo/jpublish-developer >>> >>> >>> >> >> >> >> -- >> Rebel Geek >> rebel.geek@... >> 954-839-6234 >> _______________________________________________ >> Jpublish-developer mailing list >> Jpublish-developer@... >> https://lists.sourceforge.net/lists/listinfo/jpublish-developer >> >> >> Lateef Jackson >> lj@... >> >> >> >> >> >> _______________________________________________ >> Jpublish-developer mailing list >> Jpublish-developer@... >> https://lists.sourceforge.net/lists/listinfo/jpublish-developer >> >> >> > > > -- > Rebel Geek > rebel.geek@... > 954-839-6234 > > > _______________________________________________ > Jpublish-developer mailing list > Jpublish-developer@... > https://lists.sourceforge.net/lists/listinfo/jpublish-developer Lateef Jackson lj@... _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespaceHi guys,
On 16-Jun-06, at 10:16 AM, Lateef Jackson wrote: 4) Finally every WAR you have you have to have all the jar copied into the WEB-INF/lib separately. Yes this is the way it always works. The shared classloader architecture used by JBoss is not so friendly. Except the method 4) suggested by Lateef, there is also one which always works, a not so well known method: using the MANIFEST.MF/Class-Path. The MANIFEST.MF referred to is the one inside the ejb or war archive and NOT the one directly in the ear archive. You may want to read more by following this link: http://java.sun.com/docs/books/tutorial/deployment/jar/ From a different perspective, using EARs where the entire web app is archived, doesn't offer the kind of flexibility JPublish was designed for. While the binary code can be easily "protected" by deploying it as .jar(s) in the WEB-INF/lib folder, the access to the dynamic content should be granted to the Designers, so they can really manage the dynamic/static component of the web app served by JPublish. However, if your app is one composed by a relatively static content, then yes .. you can jail ;) its contents in EARs and so on. I am going to look at the Groovy story now and I'll return with some feedback. Thanks for using JPublish! -florin _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespaceOn 16-Jun-06, at 12:16 PM, Lateef Jackson wrote:
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 Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespace
-florin _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespace>
> 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. > Do you have plans to upgrade these libraries in JP3 (HEAD) too? > > 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. > and it was something amazingly simple to do after getting some directions from Anthony, I just had to add this line to my jpublish.xml: <mime-mapping ext="x" mimetype="text/xml" /> I make all my AJAX calls to pages ending in .x (i.e. list.x) and that's it, I can produce whatever XML is required as a response, with the full scripting support courtesy of JPublish (I can understand that you may require a more deep hack to support DWR, though). BTW, I'm using JPublish and Hibernate and have some standard actions (written in Java) to Open an Hibernate connection, Close it, then standard modules for user administracion with 'remember-me' features, permission validation and redirection to the login page, so you can write page configurations like: <property name="perms">login admin</property> <page-action name="org.jpos.ee.action.CheckAccess" /> and that check access would verify that a given user has the proper permissions. We are having this under our project's umbrella, but I wonder if there's enough quorum here to run it under JPublish's umbrella. I believe these basic general purpose components are good to jump-start new applications. You can see what I'm talking about in action here: http://jpos.org/jposee (user 'admin' password 'test'). (BTW, login page and password change uses MD5 to send the new password, and change password uses MD5 xored with the old password which make it impossible for the server's operator to get the cleartext password after it has been changed). If there's interest I'm ready to contribute that code to a sister project under JP's umbrella and to actively help in further development. If you've seen Echo and EchoPoint, this could be some kind of JPublish-Point (but we need a better name as this has no sense :) --Alejandro http://jpos.org/blog _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespaceOn 17-Jun-06, at 10:38 AM, Alejandro Revilla wrote:
> Do you have plans to upgrade these libraries in JP3 (HEAD) too? Alejandro - most of them are already in the CVS. I believe there is some time required for the CVS to sync with the main repository. Python and few others: oscore and xworks are not yet there, I still need to run some tests but: freemarker, velocity, groovy, JS-RHINO, bsh and bsf are there. Let me know if you have any troubles. > BTW, I'm using JPublish and Hibernate and have some standard actions > (written in Java) to Open an Hibernate connection, Close it, then > standard > modules for user administracion with 'remember-me' features, > permission > validation and redirection to the login page, so you can write page > configurations like: > > <property name="perms">login admin</property> > <page-action name="org.jpos.ee.action.CheckAccess" /> :) Good ideas are always welcomed. I implemented something similar some time ago, except that the permissions were given as action attributes instead of page properties. have you thought in writing a module to encapsulate all the functionality? > If there's interest I'm ready to contribute that code to a sister > project > under JP's umbrella and to actively help in further development. If there is interest we may transform it into a user authentication and permission management module or such. Having it packed as a module will make its usage optional for the users who doesn't need security ;) Anthony? > If you've seen Echo and EchoPoint, this could be some kind of > JPublish-Point (but we need a better name as this has no sense :) I am going to have a look at Echo. I don't know much about it, sorry. Are you guys working with JP3 or JP2? I wonder if is not better for me to start moving my code to JP3 code? I personally know a lot of fellows using JP2 and this is why most of my development was done in the 2.0 branch but I have no problems switching to the trunk. Cheers, -florin _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespaceFlorin,
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 <flop@...> 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 > Jpublish-developer@... > https://lists.sourceforge.net/lists/listinfo/jpublish-developer > > > -- Rebel Geek rebel.geek@... 954-839-6234 _______________________________________________ Jpublish-developer mailing list Jpublish-developer@... https://lists.sourceforge.net/lists/listinfo/jpublish-developer |
|
|
Re: BeanShell and Class: x not in namespace |