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.NoExceptionsAreFatalSo 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.String) line: 43 org.apache.geronimo.naming.java.RootContext.lookup(java.lang.String) line: 43
 javax.naming.InitialContext.lookup(java.lang.String) line: 347
org.apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry.afte rPropertiesSet() line: 252 org.springframework.beans.factory.support.DefaultListableBeanFactory(or g.springframework.beans.factory.support.AbstractAutowireCapableBeanFact 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.AbstractAutowireCapableBeanFact 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.AbstractAutowireCapableBeanFact 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.AbstractRefreshableWebApplicationCont 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.ServletCo 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.catalina. 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.Containe rBase).addChildInternal(org.apache.catalina.Container) line: 759 org.apache.catalina.core.StandardHost(org.apache.catalina.core.Containe rBase).addChild(org.apache.catalina.Container) line: 739 org.apache.catalina.core.StandardHost.addChild(org.apache.catalina.Cont ainer) line: 524 org.apache.geronimo.tomcat.TomcatContainer.addContext(org.apache.geroni mo.tomcat.TomcatContext) line: 287 org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073. 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.manag 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.attemptFullStart () line: 154 org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(java x.management.ObjectName) line: 127 org.apache.geronimo.gbean.runtime.GBeanSingleReference(org.apache.geron imo.gbean.runtime.AbstractGBeanReference).addTarget(javax.management.Ob jectName) line: 242 org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(javax. management.ObjectName) line: 163 org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent (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$RawLifecycleBroa 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.startRecursive() line: 132 org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive() line: 516 org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(javax. management.ObjectName) line: 210 org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans() line: 326 org.apache.geronimo.kernel.config.Configuration$$FastClassByCGLIB$$7f4b 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.String , 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$$FastClassBy 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.Objec t, java.lang.Object[]) line: 118 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.String , 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.ObjectNa me, java.lang.String, java.lang.Object[], java.lang.String[]) line: 125 org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invo 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.Objec t, java.lang.Object[]) line: 118 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.String , 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.managem ent.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[]) line: 117 mx4j.remote.rmi.RMIConnectionInvoker.invoke(javax.management.ObjectName , 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.RMIConnecti 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.rmi. 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.Subject, 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.Obj ect, java.lang.reflect.Method, java.lang.Object[], javax.security.auth.Subject) line: 86 mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(java.lang.Object, 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).dispa tch(java.rmi.Remote, java.rmi.server.RemoteCall) line: 261
 sun.rmi.transport.Transport$1.run() line: 148
java.security.AccessController.doPrivileged(java.security.PrivilegedExc 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.Con 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 <[EMAIL PROTECTED]> wrote:
 Thank you so much for your respond.
 I will look into it tonight.

 regards,

 - James Liao


On 11/4/05, David Jencks < [EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 < [EMAIL PROTECTED]> wrote:
>> >>
>> >>- James Liao
>> >>
>> >>
>> >> On 11/4/05, Bruce Snyder < [EMAIL PROTECTED]>
>> >> wrote:[EMAIL PROTECTED]> 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)[EMAIL PROTECTED]&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/
>> >>
>>



Reply via email to