Hi Calvin,
You can try load-balancer plugin available for Glassfish v2.x. It needs
to be installed on web-server, thus does not depend on specific
application server version.
However load-balancer plugin is not tested with v3 till now. Please try
it and let us know if it works for you. If it doesn't, we will help you out.
Thanks,
Kshitiz
glassfish_at_javadesktop.org wrote:
> Hi folks,
>
> I have a JRuby on Rails deployed natively on GF V3 Prelude and looking for a loadbalancing solution. I have read several blogs but none of them is referring to V3 Prelude...
>
> http://weblogs.java.net/blog/jfarcand/archive/2006/03/running_glassfi_1.html
> http://blogs.sun.com/kshitiz/entry/load_balancer_plugin_in_glassfish
>
> I have also tried using mod_jk but it gives me the following error during server start after enabling -Dcom.sun.enterprise.web.connector.enableJK=xxx option. (I do have those 3 jar files copied to $GF_HOME/lib)
>
> Can somebody here advise what the loadbalancing solution should be for V3 Prelude, especially with a JRuby on Rails ? Thanks a lot!
>
> Calvin
>
>
> SEVERE: Exception in command execution : java.lang.ExceptionInInitializerError
> java.lang.ExceptionInInitializerError
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:186)
> at org.apache.catalina.connector.Connector.initialize(Connector.java:1587)
> at com.sun.enterprise.web.connector.coyote.PECoyoteConnector.initialize(PECoyoteConnector.java:781)
> at com.sun.enterprise.web.WebConnector.initialize(WebConnector.java:62)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:937)
> at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:602)
> at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:160)
> at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
> at java.security.AccessController.doPrivileged(Native Method)
> at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
> at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
> at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
> at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
> at org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:78)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.startContainers(ApplicationLifecycle.java:557)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:365)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:198)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:162)
> at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:327)
> at com.sun.enterprise.v3.admin.CommandRunner$2.execute(CommandRunner.java:302)
> at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:312)
> at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:135)
> at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:122)
> at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:525)
> at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:411)
> at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:343)
> at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:331)
> at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:200)
> at java.util.TimerThread.mainLoop(Timer.java:534)
> at java.util.TimerThread.run(Timer.java:484)
> Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl cannot be cast to org.apache.commons.logging.LogFactory
> at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:506)
> at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
> at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
> at org.apache.jk.server.JkCoyoteHandler.<clinit>(JkCoyoteHandler.java:81)
> ... 32 more
> Caused by: java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl cannot be cast to org.apache.commons.logging.LogFactory
> at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:504)
> ... 35 more
> --------------------------------------------------------------------------------------------------------------------------
> SEVERE: Exception in command execution : java.lang.NoClassDefFoundError: Could not initialize class org.apache.jk.server.JkCoyoteHandler
> java.lang.NoClassDefFoundError: Could not initialize class org.apache.jk.server.JkCoyoteHandler
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:186)
> at org.apache.catalina.connector.Connector.initialize(Connector.java:1587)
> at com.sun.enterprise.web.connector.coyote.PECoyoteConnector.initialize(PECoyoteConnector.java:781)
> at com.sun.enterprise.web.WebConnector.initialize(WebConnector.java:62)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:937)
> at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:602)
> at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:160)
> at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
> at java.security.AccessController.doPrivileged(Native Method)
> at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
> at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
> at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
> at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
> at org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:78)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:379)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:198)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:162)
> at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:327)
> at com.sun.enterprise.v3.admin.CommandRunner$2.execute(CommandRunner.java:302)
> at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:312)
> at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:135)
> at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:122)
> at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:525)
> at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:411)
> at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:343)
> at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:331)
> at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:200)
> at java.util.TimerThread.mainLoop(Timer.java:534)
> at java.util.TimerThread.run(Timer.java:484)
> [Message sent by forum member 'socalvin' (socalvin)]
>
> http://forums.java.net/jive/thread.jspa?messageID=341068
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>