On Apr 3, 2008, at 5:36 AM, Mohammad Shamsi wrote:
Hi All

im fresh new g-mo user.
i write a sample application to compare speed and performance between java ee application servers.

i have just java ee standard deployment descriptors in my application.

You need a little bit of a geronimo plan.  Stuff (including your app) in geronimo is organized in "modules" which form a directed acyclic graph which determines the classloader structure and to a large extent component visibility.  In particular in order for geronimo to be able to resolve the reference to jdbc/mysqlDS the deployed datasource named jdbc/mysqlDS needs to be in an ancestor of your app in this DAG.  Furthermore the name here is not any jndi name but the name specified in the geronimo plan for the datasource.

You set up the DAG using the environment element of a geronimo plan.  Include the module containing the datasource as a dependency of your application.

This is a frequently asked question and ought to be documented at http://cwiki.apache.org/GMOxDOC21/ in an easy to find location.  If you cant find it there could you file a documentation jira at https://issues.apache.org/jira/browse/GERONIMO?

many thanks
david jencks



i test my app in glassfish and weblogic 10 succesfully.

deployment in both application server was simple and without any problem.

but i can't deploy my ear file on g-mo 2.1 and i got this error :

Unable to resolve reference "JtaDataSourceWrapper"
in gbean default/ear-1.0/1207229749956/car?J2EEApplication=default/ear-1.0/1207229749956/car,PersistenceUnitModule=WEB-INF/lib/ejb-1.0.jar,WebModule=war-1.0.war,j2eeType=PersistenceUnit,name=MyPersistenceUnit
to a gbean matching the pattern [?name=jdbc/mysqlDS#org.apache.geronimo.naming.ResourceSource]
due to: No matches for referencePatterns: [?name=jdbc/mysqlDS#org.apache.geronimo.naming.ResourceSource]
org.apache.geronimo.common.DeploymentException: Unable to resolve reference "JtaDataSourceWrapper"
in gbean default/ear-1.0/1207229749956/car?J2EEApplication=default/ear-1.0/1207229749956/car,PersistenceUnitModule=WEB-INF/lib/ejb-1.0.jar,WebModule=war-1.0.war,j2eeType=PersistenceUnit,name=MyPersistenceUnit
to a gbean matching the pattern [?name=jdbc/mysqlDS#org.apache.geronimo.naming.ResourceSource]
due to: No matches for referencePatterns: [?name=jdbc/mysqlDS#org.apache.geronimo.naming.ResourceSource]
at org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:516)
at org.apache.geronimo.jetty6.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:529)
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.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:619)



this is my persistence xml :

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="MyPersistenceUnit" transaction-type="JTA">
        <description>a simple test</description>
        <jta-data-source>jdbc/mysqlDS</jta-data-source>
        <class>org.shams.sample.domain.Account</class>
        <class>org.shams.sample.domain.Customer</class>
        <class>org.shams.sample.domain.ExchangeRate</class>
    </persistence-unit>
</persistence>


i was create jdbc/mysqlDS Connnection pool  in all three application servers. 

anyone have idea ?

--
sincerely yours
M. H. Shamsi