geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Why naming service is not available when Servlet is initializing?(Tomcat 5.5.9)
Date Sat, 05 Nov 2005 07:34:23 GMT
Your analysis is completely correct.  I coded a solution for tomcat  
rather similar to that for jetty, and it does fix the init problems,  
but appears to introduce some others.  I hope to get it all working  
soon and checked in.

thanks
david jencks

On Nov 4, 2005, at 7:50 PM, Jian Liao wrote:

> Hi david,
>  It seems that jetty is much better integration with Geronimo. Naming  
> service is enabled when JetspeedServlet initializing.
>
>  I take a look at the code and found methods - enterContextScope() and  
> leaveContextScope() are always being called when JettyWebAppContext  
> try to doStart(), doStop() and registerServletHolder(), this is the  
> place which will call Servlet.init().
>
>  Since the interceptor chain had been activated, ComponentContext,  
> RequestWrapping, ThreadClassloader,  
> WebApplicationContext,TransactionContext and InstanceContext  
> initialize the whole context.I think that is what tomcat lost.
>
>  I did take a look at tomcat webappcontext startup. It seems that it  
> replace jetty interceptors with tomcat specific Valves. But, as you  
> mention in GERONIMO-1131, the Servlet init method is not wrapped by  
> the context valve.
>
>  I am a beginner for Geronimo, correct me if I'm wrong. Hope it is  
> helpful.
>
>  regards,
>
>  - Jian Liao
>
> On 11/4/05, Jian Liao <norwaywoods@gmail.com> wrote:Hi david,
>> I will test jetty tomorrow, although jetspeed 2 does not support it  
>> yet.
>>
>> regards,
>> - James Liao
>>
>>  
>> On 11/4/05, David Jencks <david_jencks@yahoo.com > wrote: You found a  
>> bug in the tomcat integration!  I opened GERONIMO-1131 to
>>> track this.
>>>
>>>  Would you be willing to try jetty, where this particular bug is not
>>> present?  Of course you are welcome to fix the problem :-)
>>>
>>> thanks
>>> david jencks
>>>
>>> On Nov 4, 2005, at 12:57 AM, Jian Liao wrote:
>>>
>>> > Hi,
>>> >  well, still the same problem - javax.naming.NameNotFoundException
>>> >  I debug it and found that, the NameNotFoundException is thrown by
>>> > org.apache.geronimo.naming.java.RootContext
>>> >  code:
>>> >  Context compCtx = (Context) compContext.get();
>>> >  if (compCtx == null) {
>>> >   // the component context was not set for this thread
>>> >   throw new NameNotFoundException(name);
>>> >  }
>>> >
>>> >  It seems that the compContext had not been set when Servlet  
>>> initliaze.
>>> >
>>>  >  In the end of this email, there is a long call stack.
>>> >
>>> >  I've change my application according to your advice. Now it look  
>>> like
>>> > this:
>>> >  Directory structual:
>>> >  file: jetspeed.ear
>>>  >  |
>>> >  |------META-INF
>>> >  | |-----------geronimo-application.xml
>>> >  | |-----------application.xml
>>> >  |
>>> >  |------jetspeed.war
>>> >
>>> >  
>>> > file: jetspeed.war
>>> >  |
>>> >  |
>>> >  |------WEB-INF
>>> >   |----------web.xml
>>> >
>>> >  ===================geronimo-application.xml=====================
>>> >  <application
>>> > xmlns=" http://geronimo.apache.org/xml/ns/j2ee/application"
>>> > configId="org/apache/jetspeed">
>>> >   <!-- these dependencies must be kept here so that their classes
>>> > are
>>> >  loaded in the "EARs" classloader. -->
>>> >   <dependency>
>>> >   <groupId>portlet-api</groupId>
>>> >   <artifactId>portlet-api</artifactId>
>>> >   <version>1.0</version>
>>> >   </dependency>
>>>  >   <dependency>
>>> >   <groupId>org.apache.pluto</groupId>
>>> >   <artifactId>pluto</artifactId>
>>> >   <version>1.0.1</version>
>>> >   </dependency>
>>> >   <dependency>
>>>  >   <groupId>jetspeed2</groupId>
>>> >   <artifactId>jetspeed-api</artifactId>
>>> >   <version>2.0-M4-SNAPSHOT</version>
>>> >   </dependency>
>>> >   <dependency>
>>> >   <groupId>jetspeed2</groupId>
>>> >   <artifactId>jetspeed-commons</artifactId>
>>> >   <version>2.0-M4-SNAPSHOT</version>
>>> >   </dependency>
>>> >   <dependency>
>>> >   <groupId>portals-bridges</groupId>
>>> >   <artifactId>portals-bridges-common</artifactId>
>>> >   <version>0.4-SNAPSHOT</version>
>>> >   </dependency>
>>> >   <module>
>>> >   <web>jetspeed.war</web>
>>> >   <web-app xmlns="http://geronimo.apache.org/xml/ns/web "
>>> > configId="org/apache/jetspeed/web">
>>> >   <!-- are you sure about this setting? -->
>>> >  
>>> > <context-priority-classloader>false</context-priority-classloader>
>>> >   <!-- by changing the name to jdbc/jetspeed you can let
>>> > geronimo find
>>> >   the datasource without a link
>>> >   <resource-ref>
>>> >   <ref-name>jdbc/jetspeed</ref-name>
>>> >   <resource-link>jdbc/jetspeed</resource-link>
>>>  >   </resource-ref>
>>> >   -->
>>> >   </web-app>
>>> >   </module>
>>> >   <!-- by using ext-module you can use the existing copy of the
>>> > tranql
>>> >   connector-->
>>> >   <ext-module>
>>> >   <connector>org/apache/jetspeed/datasource</connector>
>>> >  
>>> > <external-path>tranql/rars/tranql-connector-1.0.rar</external-path>
>>> >   <connector
>>> > xmlns=" http://geronimo.apache.org/xml/ns/j2ee/connector"
>>> > configId="OracleDatabase" parentId="org/apache/geronimo/Server">
>>> >   <dependency>
>>> >   <uri>oracle/jars/classes12- 10gr2.jar</uri>
>>> >   </dependency>
>>> >   <resourceadapter>
>>> >   <outbound-resourceadapter>
>>> >   <connection-definition>
>>> >  
>>> > <connectionfactory-interface>  
>>> javax.sql.DataSource</connectionfactory-
>>> > interface>
>>> >   <connectiondefinition-instance>
>>> >   <name>jdbc/jetspeed</name>
>>> >   <config-property-setting
>>> > name="UserName">JETSPEED2_PRODUCTION</config-property-setting>
>>> >   <config-property-setting
>>> > name="Password">PRODUCTION</config-property-setting>
>>> >   <config-property-setting
>>> > name="Driver">oracle.jdbc.driver.OracleDriver </config-property-
>>> > setting>
>>> >   <config-property-setting
>>> >  
>>> name="ConnectionURL">jdbc:oracle:thin:@pek-wkst116:1521:orcl</ 
>>> config-
>>> > property-setting>
>>> >   <config-property-setting
>>> > name="CommitBeforeAutocommit">false</config-property-setting>
>>> >   <config-property-setting
>>> >  
>>> name="ExceptionSorterClass">org.tranql.connector.NoExceptionsAreFatal 
>>> So
>>>  > rter</config-property-setting>
>>> >   <connectionmanager>
>>> >   <local-transaction/>
>>> >   <single-pool>
>>> >   <max-size>100</max-size>
>>> >   <min-size>0</min-size>
>>> >  
>>> >  
>>> <blocking-timeout-milliseconds>10000</blocking-timeout-milliseconds>
>>> >  
>>> > <idle-timeout-minutes>30</idle-timeout-minutes>
>>> >   <match-one/>
>>> >   </single-pool>
>>> >   </connectionmanager>
>>> >   </connectiondefinition-instance>
>>> >   </connection-definition>
>>> >   </outbound-resourceadapter>
>>> >   </resourceadapter>
>>> >  </connector>
>>> >   </ext-module>
>>> >  </application>
>>> >
>>> >  ========================application.xml========================
>>> >  <application
>>> >   xmlns=" http://java.sun.com/xml/ns/j2ee"
>>> >   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
>>> >   xsi:schemaLocation=" http://java.sun.com/xml/ns/j2ee
>>> >   http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
>>> >   version="1.4">
>>> >   <module>
>>> >   <web>
>>> >   <web-uri>jetspeed.war</web-uri>
>>> >   <context-root>/jetspeed</context-root>
>>> >   </web>
>>> >   </module>
>>> >  </application>
>>>  >
>>> >
>>> >
>>> >  
>>> ===================================================================== 
>>> ==
>>> > ===
>>> >  the call stack:
>>> >  org.apache.geronimo.naming.java.RootContext.lookup(java.lang.Strin 
>>> g)
>>> > line: 43
>>> >  org.apache.geronimo.naming.java.RootContext.lookup(java.lang.Strin 
>>> g)
>>> > line: 43
>>> >  javax.naming.InitialContext.lookup(java.lang.String) line: 347
>>> >
>>> >  
>>> org.apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry.af 
>>> te
>>> > rPropertiesSet() line: 252
>>> >
>>> >  
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory( 
>>> or
>>> >  
>>> g.springframework.beans.factory.support.AbstractAutowireCapableBeanFa 
>>> ct
>>> > ory).invokeInitMethods( java.lang.String, java.lang.Object,
>>> > org.springframework.beans.factory.support.RootBeanDefinition) line:
>>> > 1072
>>> >
>>> >  
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory( 
>>> or
>>> >  
>>> g.springframework.beans.factory.support.AbstractAutowireCapableBeanFa 
>>> ct
>>> > ory).createBean(java.lang.String,
>>> > org.springframework.beans.factory.support.RootBeanDefinition,
>>> > java.lang.Object[], boolean) line: 343
>>> >
>>> >  
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory( 
>>> or
>>> >  
>>> g.springframework.beans.factory.support.AbstractAutowireCapableBeanFa 
>>> ct
>>> > ory).createBean(java.lang.String,
>>> > org.springframework.beans.factory.support.RootBeanDefinition ,
>>> > java.lang.Object[]) line: 260
>>> >
>>> >  
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory( 
>>> or
>>> >  
>>> g.springframework.beans.factory.support.AbstractBeanFactory).getBean( 
>>> ja
>>> > va.lang.String , java.lang.Class, java.lang.Object[]) line: 221
>>> >
>>> >  
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory( 
>>> or
>>> >  
>>> g.springframework.beans.factory.support.AbstractBeanFactory).getBean( 
>>> ja
>>>  > va.lang.String) line: 145
>>> >
>>> >  
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory. 
>>> pr
>>> > eInstantiateSingletons() line: 291
>>> >
>>> >  
>>> org.springframework.web.context.support.XmlWebApplicationContext(org. 
>>> sp
>>> > ringframework.context.support.AbstractApplicationContext).refresh()
>>> > line: 317
>>> >
>>> > org.springframework.web.context.support.XmlWebApplicationContext  
>>> (org.sp
>>> >  
>>> ringframework.web.context.support.AbstractRefreshableWebApplicationCo 
>>> nt
>>> > ext).refresh() line: 131
>>> >  org.apache.jetspeed.components.SpringComponentManager.start()  
>>> line:
>>> > 206
>>> >  org.apache.jetspeed.engine.JetspeedEngine.start () line: 137
>>> >
>>> >  
>>> org.apache.jetspeed.engine.JetspeedServlet.init(javax.servlet.Servlet 
>>> Co
>>> > nfig) line: 135
>>> >  org.apache.catalina.core.StandardWrapper.loadServlet() line: 1091
>>> >  org.apache.catalina.core.StandardWrapper.load () line: 925
>>> >
>>> >  
>>> org.apache.geronimo.tomcat.GeronimoStandardContext(org.apache.catalin 
>>> a.
>>> >  
>>> core.StandardContext).loadOnStartup(org.apache.catalina.Container[])
>>> > line: 3857
>>> >
>>> > org.apache.geronimo.tomcat.GeronimoStandardContext  
>>> (org.apache.catalina.
>>> > core.StandardContext).start() line: 4118
>>> >  org.apache.geronimo.tomcat.GeronimoStandardContext.start() line:  
>>> 164
>>> >
>>> >  
>>> org.apache.catalina.core.StandardHost(org.apache.catalina.core.Contai 
>>> ne
>>> > rBase).addChildInternal(org.apache.catalina.Container) line: 759
>>> >
>>> >  
>>> org.apache.catalina.core.StandardHost(org.apache.catalina.core.Contai 
>>> ne
>>> > rBase).addChild(org.apache.catalina.Container) line: 739
>>> >
>>> >  
>>> org.apache.catalina.core.StandardHost.addChild(org.apache.catalina.Co 
>>> nt
>>> > ainer) line: 524
>>> >
>>> >  
>>> org.apache.geronimo.tomcat.TomcatContainer.addContext(org.apache.gero 
>>> ni
>>> > mo.tomcat.TomcatContext ) line: 287
>>> >
>>> >  
>>> org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b07 
>>> 3.
>>> > invoke(int, java.lang.Object, java.lang.Object[]) line: not  
>>> available
>>> >  net.sf.cglib.reflect.FastMethod.invoke (java.lang.Object,
>>> > java.lang.Object[]) line: 53
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang. 
>>> Ob
>>> > ject, java.lang.Object[]) line: 38
>>> >
>>> > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke  
>>> (java.lang.Objec
>>> > t, java.lang.Object[]) line: 118
>>> >  org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(int,
>>> > java.lang.Object[]) line: 779
>>> >  org.apache.geronimo.gbean.runtime.RawInvoker.invoke (int,
>>> > java.lang.Object[]) line: 57
>>> >
>>> >  
>>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(javax.man 
>>> ag
>>> > ement.ObjectName, java.lang.Object[]) line: 36
>>> >
>>> > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept  
>>> (java.
>>> > lang.Object, java.lang.reflect.Method, java.lang.Object[],
>>> > net.sf.cglib.proxy.MethodProxy) line: 96
>>> >
>>> >  
>>> org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$9b8a0a97 
>>> .a
>>> > ddContext( org.apache.geronimo.tomcat.TomcatContext) line: not
>>> > available
>>> >  org.apache.geronimo.tomcat.TomcatWebAppContext.doStart() line: 377
>>> >  org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance()
>>>  > line: 913
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart 
>>> ()
>>> >  line: 325
>>> >  org.apache.geronimo.gbean.runtime.GBeanInstanceState.start()  
>>> line: 110
>>> >  org.apache.geronimo.gbean.runtime.GBeanInstance.start () line: 499
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullSta 
>>> rt
>>> > () line: 154
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(ja 
>>> va
>>> > x.management.ObjectName ) line: 127
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanSingleReference(org.apache.ger 
>>> on
>>> >  
>>> imo.gbean.runtime.AbstractGBeanReference).addTarget(javax.management. 
>>> Ob
>>> > jectName) line: 242
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(java 
>>> x.
>>> > management.ObjectName) line: 163
>>> >
>>> >  
>>> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEve 
>>> nt
>>> > (javax.management.ObjectName ) line: 155
>>> >
>>> >  
>>> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(org 
>>> .a
>>> > pache.geronimo.kernel.basic.BasicLifecycleMonitor,
>>> > javax.management.ObjectName) line: 38
>>> >
>>> >  
>>> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBr 
>>> oa
>>> > dcaster.fireRunningEvent() line: 231
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart 
>>> ()
>>> >  line: 350
>>> >  org.apache.geronimo.gbean.runtime.GBeanInstanceState.start()  
>>> line: 110
>>> >  org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursiv 
>>> e()
>>> > line: 132
>>> >  org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive ()
>>> > line: 516
>>> >
>>> >  
>>> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(java 
>>> x.
>>> > management.ObjectName) line: 210
>>> >
>>> >  
>>> org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans  
>>> ()
>>> > line: 326
>>> >
>>> >  
>>> org.apache.geronimo.kernel.config.Configuration$$FastClassByCGLIB$$7f 
>>> 4b
>>> > 4a9b.invoke(int, java.lang.Object, java.lang.Object[]) line: not
>>> > available
>>> >  net.sf.cglib.reflect.FastMethod.invoke (java.lang.Object,
>>> > java.lang.Object[]) line: 53
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang. 
>>> Ob
>>> > ject, java.lang.Object[]) line: 38
>>> >
>>> > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke  
>>> (java.lang.Objec
>>> > t, java.lang.Object[]) line: 118
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.Stri 
>>> ng
>>> > , java.lang.Object[], java.lang.String[]) line: 814
>>> >
>>> >  
>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(javax.management. 
>>> Ob
>>> > jectName, java.lang.String, java.lang.Object[], java.lang.String[])
>>> > line: 180
>>> >
>>> > org.apache.geronimo.kernel.basic.BasicKernel.invoke  
>>> (javax.management.Ob
>>> > jectName, java.lang.String) line: 175
>>> >
>>> >  
>>> org.apache.geronimo.kernel.config.ConfigurationManagerImpl.start(java 
>>> .n
>>> > et.URI) line: 138
>>> >
>>> >  
>>> org.apache.geronimo.kernel.config.ConfigurationManagerImpl$$FastClass 
>>> By
>>> > CGLIB$$fbed85d2.invoke(int, java.lang.Object, java.lang.Object[])
>>> > line: not available
>>> >  net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
>>> > java.lang.Object[]) line: 53
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang. 
>>> Ob
>>> > ject, java.lang.Object[]) line: 38
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Obj 
>>> ec
>>> > t, java.lang.Object []) line: 118
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.Stri 
>>> ng
>>> > , java.lang.Object[], java.lang.String[]) line: 814
>>> >
>>> > org.apache.geronimo.kernel.basic.BasicKernel.invoke  
>>> (javax.management.Ob
>>> > jectName, java.lang.String, java.lang.Object[], java.lang.String[])
>>> > line: 180
>>> >
>>> >  
>>> org.apache.geronimo.kernel.KernelGBean.invoke(javax.management.Object 
>>> Na
>>> > me, java.lang.String , java.lang.Object[], java.lang.String[])  
>>> line:
>>> > 125
>>> >
>>> >  
>>> org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.in 
>>> vo
>>> > ke(int, java.lang.Object, java.lang.Object[]) line: not available
>>> >  net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
>>> > java.lang.Object[]) line: 53
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang. 
>>> Ob
>>> > ject, java.lang.Object []) line: 38
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Obj 
>>> ec
>>> > t, java.lang.Object[]) line: 118
>>> >
>>> >  
>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.Stri 
>>> ng
>>> > , java.lang.Object[], java.lang.String[]) line: 814
>>> >
>>> >  
>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(javax.management. 
>>> Ob
>>> > jectName, java.lang.String, java.lang.Object[], java.lang.String  
>>> [])
>>> > line: 180
>>> >
>>> >  
>>> org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(javax.manag 
>>> em
>>> > ent.ObjectName, java.lang.String, java.lang.Object[],
>>> > java.lang.String[]) line: 117
>>> >
>>>  >  
>>> mx4j.remote.rmi.RMIConnectionInvoker.invoke(javax.management.ObjectNa 
>>> me
>>> > , java.lang.String, java.rmi.MarshalledObject, java.lang.String[],
>>> > javax.security.auth.Subject) line: 219
>>> >  sun.reflect.GeneratedMethodAccessor151.invoke (java.lang.Object,
>>> > java.lang.Object[]) line: not available
>>> >  sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object,
>>> > java.lang.Object[]) line: 25
>>> >  java.lang.reflect.Method.invoke( java.lang.Object ,  
>>> java.lang.Object[])
>>> > line: 324
>>> >
>>> >  
>>> mx4j.remote.rmi.RMIConnectionSubjectInvoker(mx4j.remote.rmi.RMIConnec 
>>> ti
>>> > onProxy).invoke(java.lang.Object, java.lang.reflect.Method,
>>> > java.lang.Object []) line: 34
>>> >  mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(java.lang.Object 
>>> ,
>>> > java.lang.reflect.Method, java.lang.Object[]) line: 99
>>> >
>>> >  
>>> mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(mx4j.remote.rm 
>>> i .
>>> > RMIConnectionSubjectInvoker, java.lang.Object,
>>> > java.lang.reflect.Method, java.lang.Object[]) line: 31
>>> >  mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run() line: 90
>>> >
>>> > java.security.AccessController.doPrivileged  
>>> (java.security.PrivilegedExc
>>> > eptionAction, java.security.AccessControlContext) line: not  
>>> available
>>> > [native method]
>>> >
>>> >  
>>> javax.security.auth.Subject.doAsPrivileged(javax.security.auth.Subjec 
>>> t,
>>>  >  java.security.PrivilegedExceptionAction,
>>> > java.security.AccessControlContext) line: 500
>>> >
>>> >  
>>> mx4j.remote.MX4JRemoteUtils.subjectInvoke(javax.security.auth.Subject 
>>> ,
>>> > javax.security.auth.Subject , java.security.AccessControlContext,
>>> > java.util.Map, java.security.PrivilegedExceptionAction) line: 163
>>> >
>>> >  
>>> mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(java.lang.O 
>>> bj
>>> > ect, java.lang.reflect.Method , java.lang.Object[],
>>> > javax.security.auth.Subject) line: 86
>>> >  mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(java.lang.Objec 
>>> t,
>>> > java.lang.reflect.Method, java.lang.Object[]) line: 80
>>> >  $Proxy0.invoke( javax.management.ObjectName, java.lang.String,
>>> > java.rmi.MarshalledObject, java.lang.String[],
>>> > javax.security.auth.Subject) line: not available
>>> >
>>> > javax.management.remote.rmi.RMIConnectionImpl.invoke  
>>> (javax.management.O
>>> > bjectName, java.lang.String, java.rmi.MarshalledObject,
>>> > java.lang.String[], javax.security.auth.Subject) line: 221
>>> >  sun.reflect.GeneratedMethodAccessor168.invoke(java.lang.Object ,
>>> > java.lang.Object[]) line: not available
>>> >  sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object,
>>> > java.lang.Object[]) line: 25
>>> >  java.lang.reflect.Method.invoke(java.lang.Object,  
>>> java.lang.Object[])
>>> > line: 324
>>> >
>>> >  
>>> sun.rmi.server.UnicastServerRef2(sun.rmi.server.UnicastServerRef).dis 
>>> pa
>>> > tch(java.rmi.Remote, java.rmi.server.RemoteCall) line: 261
>>> >  sun.rmi.transport.Transport$1.run () line: 148
>>> >
>>> >  
>>> java.security.AccessController.doPrivileged(java.security.PrivilegedE 
>>> xc
>>> > eptionAction, java.security.AccessControlContext) line: not  
>>> available
>>> > [native method]
>>> >
>>> > sun.rmi.transport.tcp.TCPTransport  
>>> (sun.rmi.transport.Transport).service
>>> > Call(java.rmi.server.RemoteCall) line: 144
>>> >
>>> >  
>>> sun.rmi.transport.tcp.TCPTransport.handleMessages(sun.rmi.transport.C 
>>> on
>>> > nection, boolean) line: 460
>>> >   sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run() line:  
>>> 701
>>> >  java.lang.Thread.run() line: 534
>>> >
>>> >  - James Liao
>>> >
>>> >
>>> >
>>> > On 11/4/05, Jian Liao < norwaywoods@gmail.com> wrote:
>>> >>  Thank you so much for your respond.
>>> >>  I will look into it tonight.
>>> >>
>>> >>  regards,
>>> >>
>>> >>  - James Liao
>>> >>
>>> >>
>>> >> On 11/4/05, David Jencks < david_jencks@yahoo.com> wrote:
>>> >>> solve them, I'm going to recommend this one: it is most  
>>> appropriate
>>> >>> if
>>> >>> you are planning to eventually include more content in your ear  
>>> than
>>> >>> just jetspeed.war.If all additional content will be in other
>>> >>> applications, then there is no need for an ear at all; you can  
>>> have
>>> >>> both modules as ext-modules and just supply the plan.I've  
>>> included
>>> >>> updates from one of your other replies, which indicate that you  
>>> had a
>>> >>> lot fewer errors than I thought at first :-)
>>> >>>
>>> >>> A couple of comments first:
>>> >>>
>>> >>> 1. the tranql connector is already included in geronimo, so you  
>>> don't
>>> >>> really need to include it in your ear all over again.
>>> >>>  2. It is best to include information for all modules in the ear  
>>> in
>>> >>> the
>>> >>> application plan.This is not essential (I think) but a best
>>> >>> practice.
>>> >>> 3. The only plans included in an ear that are used are in the
>>> >>> META-INF
>>> >>>  or WEB-INF of the application or module.thus the oracle-plan.xml
>>> >>> would be ignored.
>>> >>> 4. if you name the datasource jdbc/jetspeed rather than
>>> >>> ORACLE_DATASOURCE then you can leave out the resource-link  
>>> mapping
>>> >>>  completely.
>>> >>>
>>> >>> I prefer the j2ee 1.4 style of supplying the plan as a separate  
>>> file
>>> >>> from the application.
>>> >>>
>>> >>> For you experiments I recommend setting up a project similar to
>>> >>> sandbox/daytrader/modules/derby.This will let you refresh your
>>> >>> geronimo copy, deploy jetspeed, run geronimo, etc etc with a  
>>> single
>>> >>> maven command line.
>>> >>>
>>> >>>
>>> >>> <application
>>> >>> xmlns=" http://geronimo.apache.org/xml/ns/j2ee/application "
>>> >>> configId="org/apache/jetspeed">
>>> >>> <!-- these dependencies must be kept here so that their classes
>>> >>> are
>>> >>> loaded in the "EARs" classloader. -->
>>> >>> <dependency>
>>> >>> <groupId>portlet-api</groupId>
>>> >>> <artifactId>portlet-api</artifactId>
>>> >>> <version>1.0</version>
>>> >>> </dependency>
>>> >>> <dependency>
>>> >>>   <groupId> org.apache.pluto</groupId>
>>> >>> <artifactId>pluto</artifactId>
>>> >>> <version>1.0.1</version>
>>> >>> </dependency>
>>> >>> <dependency>
>>> >>> <groupId>jetspeed2</groupId>
>>> >>> <artifactId>jetspeed-api</artifactId>
>>> >>> <version>2.0-M4-SNAPSHOT</version>
>>> >>> </dependency>
>>> >>> <dependency>
>>> >>> <groupId>jetspeed2</groupId>
>>> >>> <artifactId>jetspeed-commons</artifactId>
>>> >>> <version>2.0-M4-SNAPSHOT</version>
>>> >>> </dependency>
>>> >>> <dependency>
>>> >>> <groupId>portals-bridges</groupId>
>>> >>> <artifactId>portals-bridges-common</artifactId>
>>> >>> <version>0.4-SNAPSHOT</version>
>>> >>> </dependency>
>>> >>> <module>
>>> >>> <web> jetspeed.war</web>
>>> >>> <web-app xmlns="http://geronimo.apache.org/xml/ns/web "
>>> >>> configId="org/apache/jetspeed/web">
>>> >>> <!-- are you sure about this setting? -->
>>> >>>
>>> >>> <context-priority-classloader>true</context-priority-classloader>
>>> >>> <!--by changing the name to jdbc/jetspeed you can let geronimo  
>>> find
>>> >>> the datasource without a link
>>> >>> <resource-ref>
>>> >>> <ref-name>jdbc/jetspeed</ref-name>
>>> >>> <resource-link>jdbc/jetspeed</resource-link>
>>>  >>> </resource-ref>
>>> >>> -->
>>> >>> </web-app>
>>> >>> </module>
>>> >>> <!-- by using ext-module you can use the existing copy of the  
>>> tranql
>>> >>> connector-->
>>> >>> <ext-module>
>>> >>> <connector>org/apache/jetspeed/datasource</connector>
>>> >>>
>>> >>> <external-path>tranql/rars/tranql-connector-1.0-SNAPSHOT.rar</
>>> >>> external-
>>> >>> path>
>>> >>> <connector xmlns="  
>>> http://geronimo.apache.org/xml/ns/j2ee/connector"
>>> >>>  configId="OracleDatabase" parentId="org/apache/geronimo/Server">
>>> >>> <dependency>
>>> >>> <uri>oracle/jars/classes12-10gr2.jar</uri>
>>> >>> </dependency>
>>> >>> <resourceadapter>
>>> >>> <outbound-resourceadapter>
>>> >>> <connection-definition>
>>> >>>
>>> >>>  
>>> <connectionfactory-interface>javax.sql.DataSource</ 
>>> connectionfactory-
>>> >>> interface>
>>> >>> <connectiondefinition-instance>
>>> >>> <name>jdbc/jetspeed</name>
>>> >>> <config-property-setting
>>> >>> name="UserName">JETSPEED2_PRODUCTION</config-property-setting>
>>> >>> <config-property-setting
>>> >>> name="Password">PRODUCTION</config-property-setting>
>>> >>> <config-property-setting
>>> >>> name="Driver">oracle.jdbc.driver.OracleDriver</config-property-
>>> >>> setting>
>>> >>> <config-property-setting
>>> >>>  
>>> name="ConnectionURL">jdbc:oracle:thin:@pek-wkst116:1521:orcl</ 
>>> config-
>>> >>> property-setting>
>>> >>> <config-property-setting
>>> >>> name="CommitBeforeAutocommit">false</config-property-setting>
>>> >>> <config-property-setting
>>> >>>  
>>> name="ExceptionSorterClass">org.tranql.connector.NoExceptionsAreFatal
>>> >>> Sor
>>> >>> ter</config-property-setting>
>>> >>> <connectionmanager>
>>> >>> <local-transaction/>
>>> >>> <single-pool>
>>> >>> <max-size>100</max-size>
>>> >>> <min-size>0</min-size>
>>> >>>
>>> >>>  
>>> <blocking-timeout-milliseconds>10000</blocking-timeout-milliseconds>
>>> >>>
>>> >>> <idle-timeout-minutes>30</idle-timeout-minutes>
>>> >>> <match-one/>
>>> >>> </single-pool>
>>> >>> </connectionmanager>
>>> >>> </connectiondefinition-instance>
>>> >>> </connection-definition>
>>>  >>> </outbound-resourceadapter>
>>> >>> </resourceadapter>
>>> >>> </connector>
>>> >>> </ext-module>
>>> >>> </application>
>>> >>>
>>> >>> Hope this helps,
>>> >>> david jencks
>>> >>>
>>> >>>
>>> >>>
>>> >>> On Nov 3, 2005, at 11:14 PM, Jian Liao wrote:
>>> >>>
>>> >>> > Thanks for respond.
>>> >>> >The directory structural:
>>> >>> >
>>> >>> >jetspeed.ear
>>> >>> >|
>>> >>> >|------META-INF
>>> >>> >| |-----------geronimo-application.xml
>>> >>> >| |-----------application.xml
>>> >>> >|
>>> >>> >|------tranql-connector-1.0-SNAPSHOT.rar
>>> >>> >|------oracle-plan.xml
>>> >>> >|------jetspeed.war
>>> >>> >
>>> >>>  >jetspeed.war
>>> >>> >|
>>> >>> >|
>>> >>> >|------WEB-INF
>>> >>> > |----------web.xml
>>> >>> > |----------geronimo-web.xml
>>> >>> >(.......)
>>> >>> >
>>>  >>> >I've replaced config.xml with config.tomcat.xml.
>>> >>>  >
>>> >>> >The following are all of my plans:
>>> >>> >
>>> >>>  
>>> >=====================oracle-plan.xml=============================
>>> >>> ><?xml version="1.0"?>
>>> >>> ><connector xmlns="
>>> >>> http://geronimo.apache.org/xml/ns/j2ee/connector"
>>> >>> > configId="OracleDatabase"  
>>> parentId="org/apache/geronimo/Server">
>>> >>> > <dependency>
>>> >>> > <uri>oracle/jars/classes12- 10gr2.jar</uri>
>>> >>> > </dependency>
>>> >>> > <resourceadapter>
>>> >>> > <outbound-resourceadapter>
>>> >>> > <connection-definition>
>>> >>> >
>>> >>> > <connectionfactory-interface>
>>> >>> javax.sql.DataSource</connectionfactory-
>>> >>> > interface>
>>> >>> > <connectiondefinition-instance>
>>> >>> > <name>OracleDataSource</name>
>>>  >>> > <config-property-setting
>>> >>> > name="UserName">JETSPEED2_PRODUCTION</config-property-setting>
>>> >>> > <config-property-setting
>>> >>> > name="Password">PRODUCTION</config-property-setting>
>>> >>> > <config-property-setting
>>> >>> > name="Driver">oracle.jdbc.driver.OracleDriver  
>>> </config-property-
>>> >>> > setting>
>>> >>> > <config-property-setting
>>> >>> >
>>> >>> name="ConnectionURL">jdbc:oracle:thin:@pek-wkst116:1521:orcl</
>>> >>> config-
>>> >>> > property-setting>
>>> >>> > <config-property-setting
>>> >>> > name="CommitBeforeAutocommit">false</config-property-setting>
>>> >>> > <config-property-setting
>>> >>> >
>>> >>> name="ExceptionSorterClass">  
>>> org.tranql.connector.NoExceptionsAreFatal
>>> >>> So
>>> >>>  > rter</config-property-setting>
>>> >>> > <connectionmanager>
>>> >>> > <local-transaction/>
>>> >>> > <single-pool>
>>> >>> > <max-size>100</max-size>
>>> >>> > <min-size>0</min-size>
>>> >>> >
>>> >>> >
>>> >>>  
>>> <blocking-timeout-milliseconds>10000</blocking-timeout-milliseconds>
>>> >>> >
>>> >>> > <idle-timeout-minutes>30</idle-timeout-minutes>
>>> >>> > <match-one/>
>>> >>> > </single-pool>
>>> >>> > </connectionmanager>
>>> >>> > </connectiondefinition-instance>
>>> >>> > </connection-definition>
>>> >>> > </outbound-resourceadapter>
>>> >>> > </resourceadapter>
>>> >>> ></connector>
>>> >>> >
>>> >>>  
>>> >=================geronimo-application.xml========================
>>> >>> ><?xml version="1.0"?>
>>> >>> ><connector xmlns="
>>> >>> http://geronimo.apache.org/xml/ns/j2ee/connector"
>>> >>> > configId="OracleDatabase"  
>>> parentId="org/apache/geronimo/Server">
>>> >>> > <dependency>
>>> >>> > <uri>oracle/jars/classes12- 10gr2.jar</uri>
>>> >>> > </dependency>
>>> >>> > <resourceadapter>
>>> >>> > <outbound-resourceadapter>
>>> >>> > <connection-definition>
>>> >>> >
>>> >>> > <connectionfactory-interface>
>>> >>> javax.sql.DataSource</connectionfactory-
>>> >>> > interface>
>>> >>> > <connectiondefinition-instance>
>>> >>> > <name>OracleDataSource</name>
>>> >>> > <config-property-setting
>>> >>> > name="UserName">JETSPEED2_PRODUCTION</config-property-setting>
>>> >>> > <config-property-setting
>>> >>> > name="Password">PRODUCTION</config-property-setting>
>>> >>> > <config-property-setting
>>> >>> > name="Driver"> oracle.jdbc.driver.OracleDriver  
>>> </config-property-
>>> >>> > setting>
>>> >>> > <config-property-setting
>>> >>> >
>>> >>> name="ConnectionURL">jdbc:oracle:thin:@pek-wkst116 :1521:orcl</
>>> >>> config-
>>> >>> > property-setting>
>>> >>> > <config-property-setting
>>> >>> > name="CommitBeforeAutocommit">false</config-property-setting>
>>> >>> > <config-property-setting
>>> >>> >
>>> >>>  
>>> name="ExceptionSorterClass">org.tranql.connector.NoExceptionsAreFatal
>>> >>> So
>>> >>>  > rter</config-property-setting>
>>> >>> > <connectionmanager>
>>> >>> > <local-transaction/>
>>> >>> > <single-pool>
>>> >>> > <max-size>100</max-size>
>>> >>> > <min-size>0</min-size>
>>> >>> >
>>> >>> >
>>> >>>  
>>> <blocking-timeout-milliseconds>10000</blocking-timeout-milliseconds>
>>> >>> >
>>> >>> > <idle-timeout-minutes>30</idle-timeout-minutes>
>>> >>> > <match-one/>
>>> >>> > </single-pool>
>>> >>> > </connectionmanager>
>>> >>> > </connectiondefinition-instance>
>>> >>> > </connection-definition>
>>> >>> > </outbound-resourceadapter>
>>> >>> > </resourceadapter>
>>> >>> ></connector>
>>> >>> >
>>> >>> >==================geronimo-web.xml========================
>>> >>> ><?xml version="1.0"?>
>>> >>> ><web-app xmlns=" http://geronimo.apache.org/xml/ns/web "
>>> >>> > configId="org/apache/jetspeed" parentId="OracleDatabase">
>>> >>> >  
>>> <context-priority-classloader>true</context-priority-classloader>
>>> >>> > <resource-ref>
>>> >>>  > <ref-name>jdbc/jetspeed</ref-name>
>>> >>> > <resource-link>OracleDataSource</resource-link>
>>> >>> > </resource-ref>
>>> >>> ></web-app>
>>> >>> >
>>> >>> >====================application.xml========================
>>> >>> ><application
>>>  >>> > xmlns="http://java.sun.com/xml/ns/j2ee"
>>> >>> > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "
>>> >>> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>>> >>> > http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
>>> >>> > version="1.4">
>>> >>> > <module>
>>> >>> > <web>
>>> >>> > <web-uri>jetspeed.war </web-uri>
>>> >>> > <context-root>/jetspeed</context-root>
>>> >>> > </web>
>>> >>> > </module>
>>> >>> > <module>
>>> >>> > <connector> tranql-connector-1.0-SNAPSHOT.rar</connector>
>>> >>> > </module>
>>> >>> ></application>
>>> >>> >
>>> >>> >
>>> >>> >-James Liao
>>> >>> >
>>> >>> >
>>> >>> > On 11/4/05, David Jencks <david_jencks@yahoo.com> wrote:
>>> >>> >> up something like java:comp/env/jdbc/jetspeed and either  
>>> deploy a
>>> >>> >> datasource "named" jdbc/jetspeed or map it to whatever the
>>> >>> datasource
>>> >>> >> is named.
>>> >>> >>
>>> >>> >> If you are deploying the datasource in the same plan as j2 (I
>>> >>> >> recommend
>>> >>> >> doing this) you need to use geronimo head because the  
>>> appropriate
>>> >>> >> dependencies to force the correct start order were only added  
>>> last
>>>  >>> >> week.
>>> >>> >>
>>> >>> >> If you are still having problems please show us your geronimo
>>> >>> plan.
>>> >>> >>
>>> >>> >> thanks
>>>  >>> >> david jencks
>>> >>> >>
>>> >>> >> On Nov 3, 2005, at 10:35 PM, Jian Liao wrote:
>>> >>> >>
>>> >>> >> > Sorry, I forgot to tell Jetspeed 2 work perfectly with  
>>> tomcat
>>> >>> 5.5.9
>>> >>> >> > standalone. Because Tomcat5.5.9 use its own naming services  
>>> with
>>> >>> >> > useNaming = true by default. I saw that Geronimo disable it  
>>> in
>>> >>> >> > TomcatContainer.doStart() with embedded.setUseNaming(false).
>>> >>> >>>
>>> >>> >> >- James Liao
>>> >>> >> >
>>> >>> >> > On 11/4/05, Jian Liao < norwaywoods@gmail.com> wrote:
>>> >>> >> >>
>>> >>> >> >>- James Liao
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >> On 11/4/05, Bruce Snyder < bruce.snyder@gmail.com>
>>> >>> >> >> wrote:norwaywoods@gmail.com> wrote:
>>> >>> >> >>> > All,
>>> >>> >> >>> >I'm trying to integrate jetspeed 2 with geronimo(svn  
>>> head)
>>> >>> and
>>> >>> >> >>> tomcat-5.5.9
>>> >>> >> >>> > as web container.
>>> >>> >> >>> >The deployment is successful. But Jetspeed will  
>>> initialize
>>> >>> OJB in
>>> >>> >> >>> > JetspeedServlet.init () method which needs to obtain
>>>  >>> resource
>>> >>> >> >>> jdbc/jetspeed
>>> >>> >> >>> > through JNDI. It just can not get it cause the context  
>>> is
>>> >>> never
>>> >>> >> >>> bind to the
>>> >>> >> >>> > thread.
>>> >>> >> >>> >
>>> >>> >> >>> >I try it with Jetty and it works because
>>> >>> >> >>> ComponentContextBeforeAfter is
>>> >>> >> >>> > called.
>>> >>> >> >>> >
>>> >>> >> >>> >I am wondering if I am not allowed to do any JNDI  
>>> operation
>>> >>> in
>>> >>> >> >>> > Servlet.init ()?
>>> >>> >>>>>
>>> >>> >> >>> Have you tried this in Tomcat running standalone? When you
>>> >>> tried
>>> >>> >> it
>>> >>> >> >>> with Jetty, was Jetty running standalone or within  
>>> Geronimo?
>>> >>> >> >>>
>>> >>> >> >>> Bruce
>>> >>> >> >>> --
>>> >>> >> >>> perl -e 'print
>>> >>> >> >>>
>>> >>> >>
>>> >>>  
>>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>>> >>> >> >>> );'
>>> >>> >> >>>
>>> >>> >> >>> The Castor Project
>>> >>> >> >>> http://www.castor.org/
>>> >>> >> >>>
>>> >>> >> >>> Apache Geronimo
>>> >>> >> >>> http://geronimo.apache.org/
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> >>
>>>
>>


Mime
View raw message