geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay D. McHugh" <...@jnwd.net>
Subject Re: Geronimo 2.0/openejb/postgresql
Date Thu, 10 Jan 2008 18:03:07 GMT
Hello,

Instead of using the reference name of your database pools - try using 
the actual names in the persistence.xml.

ie:
    <jta-data-source>valhalla</jta-data-source>
    <non-jta-data-source>valhalla2</non-jta-data-source>

Jay

the666pack wrote:
> hello,
> 
> so i set up the second datasource as recommended and the pool is also
> running according to startup info:
> 
>      [exec]     RAR: console.dbpool/DefaultDS/1.0/rar
>      [exec]     RAR: console.dbpool/DefaultNoTxDS/1.0/rar
> 
> unfortunately i get an error at deploy time now:
> 
>      [exec] 16:51:41,504 ERROR [DirectoryHotDeployer] Unable to deploy:
> Unable to resolve reference "NonJtaDataSourceWrapper" in gbean
> default/videothek/1199980300389/car?EJBModule=videothek.jar,J2EEApplication=default/videothek/1199980300389/car,PersistenceUnitModule=videothek.jar,j2eeType=PersistenceUnit,name=valhalla
> to a gbean matching the pattern
> [?name=DefaultNoTxDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]due
> to: No matches for referencePatterns:
> [?name=DefaultNoTxDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]
>      [exec] Unable to resolve reference "JtaDataSourceWrapper" in gbean
> default/videothek/1199980300389/car?EJBModule=videothek.jar,J2EEApplication=default/videothek/1199980300389/car,PersistenceUnitModule=videothek.jar,j2eeType=PersistenceUnit,name=valhalla
> to a gbean matching the pattern
> [?name=DefaultDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]due
> to: No matches for referencePatterns:
> [?name=DefaultDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]
>      [exec] org.apache.geronimo.common.DeploymentException: Unable to
> resolve reference "NonJtaDataSourceWrapper" in gbean
> default/videothek/1199980300389/car?EJBModule=videothek.jar,J2EEApplication=default/videothek/1199980300389/car,PersistenceUnitModule=videothek.jar,j2eeType=PersistenceUnit,name=valhalla
> to a gbean matching the pattern
> [?name=DefaultNoTxDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]due
> to: No matches for referencePatterns:
> [?name=DefaultNoTxDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]
>      [exec] Unable to resolve reference "JtaDataSourceWrapper" in gbean
> default/videothek/1199980300389/car?EJBModule=videothek.jar,J2EEApplication=default/videothek/1199980300389/car,PersistenceUnitModule=videothek.jar,j2eeType=PersistenceUnit,name=valhalla
> to a gbean matching the pattern
> [?name=DefaultDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]due
> to: No matches for referencePatterns:
> [?name=DefaultDS#org.apache.geronimo.connector.outbound.ConnectionFactorySource]
>      [exec]     at
> org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:516)
>      [exec]     at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:307)
>      [exec]     at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)
>      [exec]     at
> org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
>      [exec]     at
> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>      [exec]     at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>      [exec]     at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>      [exec]     at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
>      [exec]     at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>      [exec]     at
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
>      [exec]     at
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
>      [exec]     at java.lang.Thread.run(Thread.java:619)
>      [exec] 
>      [exec] 16:51:43,719 ERROR [DirectoryHotDeployer] Unable to undeploy
>      [exec] java.lang.NullPointerException
>      [exec]     at
> org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTargetModuleIDs(ConfigIDExtractor.java:174)
>      [exec]     at
> org.apache.geronimo.deployment.hot.DirectoryHotDeployer.fileRemoved(DirectoryHotDeployer.java:350)
>      [exec]     at
> org.apache.geronimo.deployment.hot.DirectoryMonitor.scanDirectory(DirectoryMonitor.java:325)
>      [exec]     at
> org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMonitor.java:216)
>      [exec]     at java.lang.Thread.run(Thread.java:619)
> 
> this error i already got before whenever i tried versions of persistence.xml
> using the "<jta-data-source>" element.
> 
> any help is much appreciated,
> 
> thanks a lot,
> 
> mario
> 
> 
> djencks wrote:
>> I recommend you set up a second postgres datasource with no tx  
>> support, say DefaultNoTxDS (pointing to the same postgres db as  
>> DefaultDS)
>>
>> Then in persistence.xml
>>
>>     <jta-data-source>DefaultDS</jta-data-source>
>>     <non-jta-data-source> DefaultNoTxDS </non-jta-data-source>
>>
>> and leave out
>>
>>       <property name="openjpa.ConnectionDriverName"  
>> value="org.postgresql.Driver" />
>>       <property name="openjpa.ConnectionUserName" value="postgres" />
>>       <property name="openjpa.ConnectionPassword" value="postgres" />
>>       <property name="openjpa.jdbc.ConnectionURL"  
>> value="jdbc:postgresql://localhost:5432/video" />
>>
>> and tell us what problems if any you get.
>>
>> thanks
>> david jencks
>>



Mime
View raw message