users@glassfish.java.net

Re: Issue with GlasFish-v3 and Jython

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Mon, 07 Sep 2009 20:36:42 -0700

[Adding users_at_glassfish as it might be useful to other users]

Going thru server.log shows lots of exceptions, some related to derby
some related to felix-cache, some related to amx etc. There is one
exception I see that might be causing your django app to not respond and
its a known bug in django/jython.

[#|2009-09-06T22:41:48.787+0400|WARNING|glassfish|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=17;_ThreadName=Thread-1;|Exception
while scanning settings$py.class
java.lang.ArrayIndexOutOfBoundsException: 12840
    at org.objectweb.asm.ClassReader.readClass(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at
org.glassfish.deployment.common.AnnotationScanner.scanArchive(AnnotationScanner.java:78)
    at
com.sun.enterprise.v3.server.SnifferManagerImpl.getSniffers(SnifferManagerImpl.java:157)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:367)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:229)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:173)
    at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:250)


See the discussed related to this issue:
http://groups.google.com/group/django-users/browse_thread/thread/360a90459440c039?pli=1

The reported bug is: http://bugs.jython.org/issue1262 and
http://code.djangoproject.com/ticket/11621.

Workaround: delete all *.class files from your project directory and
redeploy or restart glassfish.

-vivek.


Stefan Filatov wrote:
> Hello,
>
> So what i have after i spent two days on trying to use Fuji-GlassFish
> with Django-Jython.
> As i wrote, i need the version with ESB v3, that's why i can use only
> Fuji version.
>
> So i installed Fuji application server. Dowloaded jython-container zip
> file and unpacked it in ../modules/ folder.
> I created jvm-options to show where Jython is.
>
> And you kinow ... i was able to deploy Jython application.
>
> Anyway, i used Django framework (django-admin.py startproject test1),
> i was not able to show django start page as was described in Vivek
> blog. Log file is attached.
>
> BTW, i'm starting missunderstand how GlassFish is working (actually,
> where web server). Will spend time today, to read documentation.
>
> Regards, Stephan
>
> 5 сентября 2009 г. 12:28 пользователь Alexis Moussine-Pouchkine
> <alexis.mp <http://alexis.mp>@sun.com <http://sun.com>> написал:
>
> Thanks all so far.
> Unfortunately I don't think this quite solves Stefan's problem -
> getting the bits from the Update Center would be ideal but
> manually downloading the 2 jar files and placing them in
> glassfish/modules didn't do the trick (that's what installing the
> IPS packages would do). Stefan, please confirm that this is indeed
> not working (and detail the exact files you downloaded and the
> error message you're seeing).
>
> Also, can the GlassFish team (Jane? Snjezana?) publish a Maven
> artifact with the IPS metadata included?
> I would expect promoted builds (same bits exactly) to be available
> from the Maven repo.
>
> cheers,
> -Alexis
>
>
> On Sep 5, 2009, at 2:28, Annies Abduljaffar wrote:
>
> Hi Stefan
>
> Looks like we need to do some more work to get update center
> available in the fujiglassfish distribution.
> Meanwhile, I would suggest you to try out the Fuji GlassFish
> container.
> Please see more information about the container here -
> http://wiki.open-esb.java.net/Wiki.jsp?page=FujiGlassFishV3Integration
>
> First download and install GlassFish installer promoted build
> from - http://download.java.net/glassfish/v3/promoted and get
> Jython container from update center.
> After that please follow the setup instructions in the second
> tab of the wiki
> http://wiki.open-esb.java.net/Wiki.jsp?page=FujiGlassFishV3Integration
> Please refer to section - Deploy a V3 Service Assembly bundle
>
> There are some known issues [1] in deploying a V2 applications
> with HttpBC SUs but it should work fine with V3 applications.
>
> Thanks
> Annies
>
> [1] - https://open-esb.dev.java.net/issues/show_bug.cgi?id=2235
>
>
>
>
> Alexis Moussine-Pouchkine wrote:
>
>
> On Sep 4, 2009, at 11:57, Stefan Filatov wrote:
>
> Yeah,
>
> That is the main question - how to install Jython
> container in GlassFish v3b52.
> Actually, i need ESB functionality for my project,
> that's why GlassFish Preview is not suitable for me.
>
>
> Fair enough.
>
> Maybe someone knows how to install Jython container?
>
>
> adding users_at_fuji.dev.java.net
> <mailto:users_at_fuji.dev.java.net>
> -Alexis
>
>
>
> Regards, Stefan
>
> 4 сентября 2009 г. 13:25 пользователь Alexis
> Moussine-Pouchkine <alexis.mp
> <http://alexis.mp>@sun.com <http://sun.com>> написал:
> This fuji build uses GlassFish v3b52 which should be
> enough to run Jython/Django apps (it postdates v3
> Preview which Vivek used to write his blog entry [1])
> *but* it has no IPS built in, so no update center.
> While you can still manually install Jython you would
> still need to install the Jython container (glue code
> for GlassFish to properly dispatch Jython requests to
> the Jython runtime). I don't know of an easy way to do
> this without the update center.
>
> If you don't need Fuji/ESB features, I would recommend
> using plain GlassFish v3 (Preview with the update for
> instance) [2].
> You can get both Jython and the Jython container
> straight from the container.
>
> Allso CC'ing Fuji's Andy for his take on this.
>
> С Уважением,
> -Alexis
>
> [1]:
> http://weblogs.java.net/blog/vivekp/archive/2009/06/run_django_appl_1.html
> [2]:
> http://blogs.sun.com/alexismp/entry/new_screencast_django_setup_for
>
>
>
> On Sep 4, 2009, at 7:50, Stefan Filatov wrote:
>
> Wow
>
> Very quick answer :) :) Didn't expect :)
>
> I got GlassFish from here:
> http://download.java.net/maven/esb/open-esb/fuji/fujiglassfish/1.0-M8-SNAPSHOT/fujiglassfish-1.0-M8-SNAPSHOT.jar
> It glassfish with openEsb project. i will need esb
> service in my future projects, that's why i got that one.
>
> The issue is that i don't see such row with GlassFish
> Jython container in the update tool list.
>
> i found package with Jython container here:
> https://glassfish-scripting.dev.java.net/files/documents/8474/141056/glassfish-jython-container.zip
>
> but i'm not sure that i install it correct: i just
> unpackaged it to the folder /glassfish/modules/
>
> Yes, i have installed Jython 2.5 and Django 1.1
>
> Then i do next:
> $ asadmin create-jvm-options
> -Djython.home=/my_dir/jython/2.5.0
>
> going to my application folder
>
> $ cd my_application
> $ asadmin deploy .
>
> and when i try deploy application a got error, that i
> described earlier:
> "remote failure: There is no installed container
> capable of handling this application
> com.sun.enterprise.deploy.shared.FileArchive_at_93f0c6
> Command deploy failed."
>
> BTW, how can i do stack trace?
>
> Regards, Stefan
>
> 2009/9/4 Vivek Pandey <Vivek.Pandey_at_sun.com
> <mailto:Vivek.Pandey_at_sun.com>>
> Hi Stefan,
>
> I guess I need more info so that I can see whats going
> on. Few questions,
>
> - What glassfish v3 build you are trying? Latest
> Jython container as well as Jython 2.5 runtime is
> available on updatecenter.
> - Can you provide the complete stack trace? Also do
> you have jython installed. Also Django on top of
> Jython. See [1] as a reference.
>
> vivek.
>
> [1]http://weblogs.java.net/blog/2009/06/05/run-django-applications-glassfish-v3-preview
>
>
> Stefan Filatov wrote:
> Hello, Trying to do use Jython container to run Python
> applications on GlassFishv3. But when i open update
> tool, there is no Jython container in the list. Then i
> found package with Jython container on this site.
> Unpackaged it at the glassfish/modules directory. when
> i try to deploy some python application i get next
> error: " emote failure: There is no installed
> container capable of handling this application
> com.sun.enterprise.deploy.shared.FileArchive_at_93f0c6
> Command deploy failed. " About my environment: Ubuntu
> 9.0.4; GlassFishv3; Python2.5; Django1.1 Can you
> advise? Regards, Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
>
>
>
>
> --
> С Уважением, Филатов Стефан
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
>
>
>
>
> --
> С Уважением, Филатов Стефан
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_fuji.dev.java.net
> <mailto:users-unsubscribe_at_fuji.dev.java.net>
> For additional commands, e-mail:
> users-help_at_fuji.dev.java.net
> <mailto:users-help_at_fuji.dev.java.net>
>
>
>
>
>
>
> --
> С Уважением, Филатов Стефан