geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Jain <ashja...@gmail.com>
Subject Re: using wadi with tomcat & web app in an ear
Date Wed, 14 Oct 2009 21:22:54 GMT
Hello Gianny,

I have uploaded a patch to geronimo-4900 which will address this issue
in g 2.1.5. Please verify.

Thanks
Ashish

On 10/12/09, Ashish Jain <ashjain2@gmail.com> wrote:
> I think I understand now that the code snippet suggested  by you will help
> fix the GBean Not Found exception. Please suggest if this is correct.
>
> However the "Missing Dependency Exception
> "org.apache.geronimo.kernel.repository.MissingDependencyException: Missing
> dependency: default/ClusterTestEAR/1.0/ear" will be fixed once we are able
> to apply the changes as in
>  *GERONIMO-4556 <https://issues.apache.org/jira/browse/GERONIMO-4556>*
>
> On Mon, Oct 12, 2009 at 6:58 PM, Ashish Jain <ashjain2@gmail.com> wrote:
>
>> Hi Gianny,
>>
>> Did you mean that the Missing Dependency Exception will be fixed by the
>> code snippet suggested by you. I had build the new jar
>> "geronimo-tomcat6-clustering-builder-wadi-2.1.4.jar" and replaced the
>> existing one in g214 with this new one. Started two clean instances of
>> g214
>> with replaced jars. deployed the application.
>>
>> The server still throws the Missing Dependency Exception
>> "org.apache.geronimo.kernel.repository.MissingDependencyException:
>> Missing
>> dependency: default/ClusterTestEAR/1.0/ear".
>>
>> Please advice.
>>
>> Thanks
>> Ashish
>>
>>
>> On Mon, Oct 12, 2009 at 5:02 PM, Gianny Damour <
>> gianny.damour@optusnet.com.au> wrote:
>>
>>> Hi Ashish,
>>>
>>> I added a comment to GERONIMO-4900. This problem should have been fixed
>>> as
>>> part of 2.1.4; unfortunately, it seems that the fix was applied to trunk
>>> after the creation of the 2.1.4 branch. Could you please confirm that
>>> this
>>> works OK against trunk?
>>>
>>> Regarding the Tomcat bug reported by this email, the problem is caused
>>> by
>>> the AbstractNameQuery used to find the name of Tomcat Web app context
>>> GBean.
>>> When the clustered WAR is within an EAR, the query returned by
>>> WADITomcatClusteringBuilder.createTomcatWebAppContextNameQuery does not
>>> work.  I am not sure why as I cannot debug (I cannot build the server due
>>> to
>>> missing a dependency "org.apache.activemq:activemq-core:jar:5.3.0"...).
>>> Having said that, I would suggest to substitute
>>> WADITomcatClusteringBuilder.extractWebModule.with:
>>>
>>>    protected GBeanData extractWebModule(DeploymentContext moduleContext)
>>> throws DeploymentException {
>>>        Configuration configuration = moduleContext.getConfiguration();
>>>        try {
>>>            return
>>> configuration.getGBeans().get(moduleContext.getModuleName());
>>>        } catch (GBeanNotFoundException e) {
>>>            throw new DeploymentException("Could not locate web module
>>> gbean in web app configuration", e);
>>>        }
>>>    }
>>>
>>> I hope this helps.
>>>
>>> Thanks,
>>> Gianny
>>>
>>>
>>> On 12/10/2009, at 7:09 PM, Ashish Jain wrote:
>>>
>>>  Hello Gianny,
>>>>
>>>> I see you have suggested that you were able to figure out the problem.
>>>> Can you please suggest what is the problem? Is there any workaround for
>>>> this
>>>> issue?
>>>> Any associated JIRA's???
>>>>
>>>> There is another JIRA which has been opened for a similar issue. Please
>>>> have a look at the following url https://issues.apache.org/
>>>> jira/browse/GERONIMO-4900.
>>>>
>>>> I am still investigating will let you know if I find anything.
>>>>
>>>> Thanks
>>>> Ashish
>>>>
>>>> On Tue, Jul 8, 2008 at 6:21 PM, Jason Warner <jaw981@gmail.com> wrote:
>>>> Fantastic, Gianny.  Thanks for looking into this!
>>>>
>>>>
>>>> On Mon, Jul 7, 2008 at 9:19 PM, Gianny Damour <
>>>> gianny.damour@optusnet.com.au> wrote:
>>>> Hello Jason,
>>>>
>>>> I had a quick look and identified the problem. I will check-in a fix
>>>> during the day.
>>>>
>>>> Thanks,
>>>> Gianny
>>>>
>>>>
>>>> On 08/07/2008, at 4:10 AM, Jason Warner wrote:
>>>>
>>>> I've spent some time looking at this, but I haven't really gotten
>>>> anywhere with it.  While debugging I noticed that the error occurs
>>>> because
>>>> the configuration id that is provided by the module upon loading
>>>> doesn't
>>>> match what geronimo is expecting.  The problem I'm having is figuring
>>>> out
>>>> where on earth geronimo is getting the config id that it's expecting.
>>>> It
>>>> seems that it's pulling it from the plan itself, but I'm not sure how.
>>>> I've
>>>> been a little busy lately though and haven't been able to look into it
>>>> further.  Anyone else have any thoughts on what could be the cause of
>>>> this?
>>>>
>>>> Thanks
>>>>
>>>> On Tue, Jul 1, 2008 at 5:17 PM, jon.sabados@gmail.com <
>>>> jon.sabados@gmail.com> wrote:
>>>>
>>>> The end goal would be to deploy an ear containing a coupe ejb modules,
>>>> wars &
>>>> rars with wadi clustering enabled for the web apps - packaging the
>>>> wadi-webapp.war into an ear was the simplest test I could think of to
>>>> see
>>>> if
>>>> the war would deploy cleanly with tomcat-clustering-wadi in the
>>>> deployment
>>>> plan.
>>>>
>>>> In the ear that I used to test I actually left out application.xml &
>>>> geronimo-application.xml (just jarred up the war), but here is the
>>>> web.xml &
>>>> geronimo-web.xml I used:
>>>>
>>>> <?xml version="1.0"?>
>>>> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
>>>> Application
>>>> 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
>>>>
>>>> <web-app>
>>>>
>>>>  <distributable/>
>>>>
>>>>  <context-param>
>>>>  <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
>>>>  <param-value>/wadi</param-value>
>>>>  <!-- <description>create session cookies with given path</description>
>>>> --> <!-- upsets geronimo-1.0.0 -->
>>>>  </context-param>
>>>>
>>>>
>>>> <!--
>>>> Automatically created by Apache Jakarta Tomcat JspC.
>>>> Place this fragment in the web.xml before all icon, display-name,
>>>> description, distributable, and context-param elements.
>>>> -->
>>>>
>>>>  <servlet>
>>>>      <servlet-name>jsp.aopTest_jsp</servlet-name>
>>>>      <servlet-class>jsp.aopTest_jsp</servlet-class>
>>>>  </servlet>
>>>>
>>>>  <servlet>
>>>>      <servlet-name>jsp.destroy_jsp</servlet-name>
>>>>      <servlet-class>jsp.destroy_jsp</servlet-class>
>>>>  </servlet>
>>>>
>>>>  <servlet>
>>>>      <servlet-name>jsp.index_jsp</servlet-name>
>>>>      <servlet-class>jsp.index_jsp</servlet-class>
>>>>  </servlet>
>>>>
>>>>  <servlet>
>>>>      <servlet-name>jsp.session_jsp</servlet-name>
>>>>      <servlet-class>jsp.session_jsp</servlet-class>
>>>>  </servlet>
>>>>
>>>>  <servlet-mapping>
>>>>      <servlet-name>jsp.aopTest_jsp</servlet-name>
>>>>      <url-pattern>/aopTest.jsp</url-pattern>
>>>>  </servlet-mapping>
>>>>
>>>>  <servlet-mapping>
>>>>      <servlet-name>jsp.destroy_jsp</servlet-name>
>>>>      <url-pattern>/destroy.jsp</url-pattern>
>>>>  </servlet-mapping>
>>>>
>>>>  <servlet-mapping>
>>>>      <servlet-name>jsp.index_jsp</servlet-name>
>>>>      <url-pattern>/index.jsp</url-pattern>
>>>>  </servlet-mapping>
>>>>
>>>>  <servlet-mapping>
>>>>      <servlet-name>jsp.session_jsp</servlet-name>
>>>>      <url-pattern>/session.jsp</url-pattern>
>>>>  </servlet-mapping>
>>>>
>>>> <!--
>>>> All session-config, mime-mapping, welcome-file-list, error-page,
>>>> taglib,
>>>> resource-ref, security-constraint, login-config, security-role,
>>>> env-entry, and ejb-ref elements should follow this fragment.
>>>> -->
>>>>
>>>>
>>>> </web-app>
>>>> ------------------------------------------------------------------
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
>>>>  xmlns:wadi="http://geronimo.apache.org/xml/ns/clustering-wadi-1.2">
>>>>
>>>>  <environment>
>>>>      <moduleId>
>>>>          <groupId>org.codehaus.wadi</groupId>
>>>>          <artifactId>wadi-webapp</artifactId>
>>>>          <version>2.0-SNAPSHOT</version>
>>>>          <type>war</type>
>>>>      </moduleId>
>>>>  </environment>
>>>>
>>>>  <context-root>/wadi-webapp</context-root>
>>>>
>>>>  <wadi:tomcat-clustering-wadi>
>>>>     <wadi:deltaReplication>false</wadi:deltaReplication>
>>>>  </wadi:tomcat-clustering-wadi>
>>>>
>>>> </web-app>
>>>>
>>>> In the ear that I would actually like to cluster there is a
>>>> geronimo-application.xml as well as application.xml (no modifications
>>>> to
>>>> working configs with those, only change would be a <distributable />
>>>> element
>>>> in the war's web.xml & <tomcat-clustering-wadi /> in geronimo-web.xml),
>>>>  but
>>>> the exception thrown during deployment matches the test ears exception
>>>> with
>>>> the only exception being the gbean name being looked for.
>>>>
>>>>
>>>> Jason Warner wrote:
>>>> >
>>>> > I'm a little confused about what you're trying to do.  Are you saying
>>>> > you're
>>>> > trying to package the wadi-webapp.war into an ear file?  Do you have
>>>> > a
>>>> > specific goal by doing this?  I think this issue is caused by
>>>> > misconfiguration in the ear deployment plan.  Would you be able to
>>>> > post
>>>> > your
>>>> > ear?  If not, could you post your geronimo-application.xml?
>>>> >
>>>> > Thanks!
>>>> >
>>>> > On Fri, Jun 27, 2008 at 6:49 PM, jon.sabados@gmail.com <
>>>> > jon.sabados@gmail.com> wrote:
>>>> >
>>>> >>
>>>> >> I am having trouble enabling wadi for a web app contained in an
ear.
>>>>  I
>>>> >> am
>>>> >> able to deploy the sample wadi-webapp war by changing the
>>>> clustering-wadi
>>>> >> tag in geronimo-web.xml to tomcat-clustering-wadi but am unable
to
>>>> >> package
>>>> >> the war in an ear, when doing so geronimo complains about not being
>>>> able
>>>> >> to
>>>> >> locate the web module gbean.
>>>> >>
>>>> >> Here is the relevant portion of the logs:
>>>> >>
>>>> >> 16:40:50,618 INFO  [DirectoryHotDeployer] Deploying wadi.ear
>>>> >> 16:40:50,723 ERROR [DirectoryHotDeployer] Unable to deploy: Could
>>>> >> not
>>>> >> locate
>>>> >> web module gbean in web app configuration
>>>> >> org.apache.geronimo.common.DeploymentException: Could not locate
web
>>>> >> module
>>>> >> gbean in web app configuration
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.tomcat.cluster.wadi.builder.WADITomcatClusteringBuilder.extractWebModule(WADITomcatClusteringBuilder.java:134)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.tomcat.cluster.wadi.builder.WADITomcatClusteringBuilder.build(WADITomcatClusteringBuilder.java:115)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection.build(NamespaceDrivenBuilderCollection.java:48)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:410)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
>>>> >>        at
>>>> >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
>>>> >>        at
>>>> >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
>>>> >>        at sun.reflect.GeneratedMethodAccessor266.invoke(Unknown
>>>> Source)
>>>> >>        at
>>>> >>
>>>> >>
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> >>        at java.lang.reflect.Method.invoke(Method.java:618)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>>>> >>        at
>>>> >>
>>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
>>>> >>        at java.lang.Thread.run(Thread.java:810)
>>>> >> Caused by: org.apache.geronimo.kernel.GBeanNotFoundException: No
>>>> matches
>>>> >> for
>>>> >> referencePatterns:
>>>> >>
>>>> >>
>>>> [default/wadi_wadi.war/1214606450652/car?#org.apache.geronimo.tomcat.TomcatWebAppContext]
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.kernel.config.Configuration.findGBeanData(Configuration.java:669)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.kernel.config.Configuration.findGBeanData(Configuration.java:626)
>>>> >>        at
>>>> >>
>>>> >>
>>>> org.apache.geronimo.tomcat.cluster.wadi.builder.WADITomcatClusteringBuilder.extractWebModule(WADITomcatClusteringBuilder.java:132)
>>>> >>        ... 17 more
>>>> >>
>>>> >>
>>>> >> if anyone has a pointers or suggestions it would be greatly
>>>> appreciated
>>>> >>
>>>> >> --
>>>> >> View this message in context:
>>>> >> http://www.nabble.com/using-wadi-with-tomcat---web-app-in-an-ear-
>>>> tp18165228s134p18165228.html
>>>> >> Sent from the Apache Geronimo - Users mailing list archive at
>>>> Nabble.com.
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> > --
>>>> > ~Jason Warner
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context: http://www.nabble.com/using-wadi-with-
>>>> tomcat---web-app-in-an-ear-tp18165228s134p18225518.html
>>>> Sent from the Apache Geronimo - Users mailing list archive at
>>>> Nabble.com.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ~Jason Warner
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ~Jason Warner
>>>>
>>>>
>>>
>>
>

Mime
View raw message