geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <djen...@gluecode.com>
Subject Re: Deployment fail at persistent EJB
Date Thu, 14 Apr 2005 17:54:39 GMT
those are all the xml files you should need.  I think the resource-ref  
info needs to be with the BMP bean: if I understand your xml it is  
currently with the CMP bean where it is not used.

thanks
david jencks

On Apr 14, 2005, at 10:38 AM, Katia Aresti Gonzalez wrote:

> David,
>
>   Ive changed to systemDataSource, but i still have problems. Ok, Im  
> using the openejb-jar.xml, and the ejb-jar.xml. Do I need another  
> deployment descriptor, or change anythig (un deply and redeploy), as  
> well as I do in JMS to add the tophic in the system-jms-plan.xml?
>
> Thanks a lot! Katia
>
>  
>
> C:\gero>java -jar bin/deployer.jar --user system --password manager  
> deploy d:/cm
> p/build/dist/prueba-ejbs.jar
> Deployment failed
>   Server reports: org.apache.geronimo.common.DeploymentException:  
> Unknown or amb
> iguous resource name query:  
> geronimo.server:J2EEServer=geronimo,J2EEApplication=
> null,j2eeType=JCAManagedConnectionFactory,name=jdbc/titanDB,* match  
> count: 0
>         Unknown or ambiguous resource name query:  
> geronimo.server:J2EEServer=ger
> onimo,J2EEApplication=null,j2eeType=JCAManagedConnectionFactory,name=jd 
> bc/titanD
> B,* match count: 0
>
>
>
>  
> >From: David Jencks <david_jencks@yahoo.com>
>  >Reply-To: user@geronimo.apache.org
>  >To: user@geronimo.apache.org
>  >Subject: Re: Deployment fail at persistent EJB
>  >Date: Thu, 14 Apr 2005 10:31:01 -0700
>  >
>  >Sorry, it looks like the set of plans in the default assembly has  
>  >turned into a nearly useless collection of vaguely plausible but
>  >mostly  incorrect junk.
>  >
>  >Please pardon my frustration.
>  >
>  >Try SystemDatasource instead of DefaultDatasource.
>  >
>  >david jencks
>  >
>  >On Apr 14, 2005, at 10:21 AM, Katia Aresti Gonzalez wrote:
>  >
>  >>Hello David!!!!
>  >>
>  >>Ive done what you say and this is what i get now:
>  >>
>  >>C:\gero>java -jar bin/deployer.jar --user system --password manager
>  >>  deploy d:/cm
>  >>p/build/dist/prueba-ejbs.jar
>  >>Deployment failed
>  >>  Server reports: org.apache.geronimo.common.DeploymentException:  
>  >>Unable to init
>  >>ialize EJBModule GBean
>  >>        Unable to initialize EJBModule GBean
>  >>        Unknown or ambiguous resource name query:  
>  >>geronimo.server:J2EEServer=ger
>   
> >>onimo,J2EEApplication=null,j2eeType=JCAManagedConnectionFactory,name= 
> De
>  >>faultData
>  >>source,* match count: 0
>  >>
>  >>This the openejb-jar.xml:
>  >>
>  >><?xml version="1.0"?>
>  >>
>  >><openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
>  >>configId="GeronimoTestEJB"
>  >>  parentId="org/apache/geronimo/Server">
>  >>
>  >><cmp-connection-factory>
>  >>    <resource-link>DefaultDatasource</resource-link>
>  >></cmp-connection-factory>
>  >>
>  >>
>  >>  <enterprise-beans>
>  >><entity>
>  >>  
>  >>   <ejb-name>CabinEJB</ejb-name>
>  >>   <table-name>CabinTable</table-name>
>  >>  
>  >>    <cmp-field-mapping>
>  >>         <cmp-field-name>id</cmp-field-name>
>  >>         <table-column>col_id</table-column>
>  >> </cmp-field-mapping>
>  >> 
>  >> <cmp-field-mapping>
>  >>         <cmp-field-name>name</cmp-field-name>
>  >>  <table-column>col_name</table-column>
>  >> </cmp-field-mapping>
>  >> 
>  >> <cmp-field-mapping>
>  >>         <cmp-field-name>deckLevel</cmp-field-name>
>  >>  <table-column>col_deckLevel</table-column>
>  >> </cmp-field-mapping>
>  >> 
>  >> <cmp-field-mapping>
>  >>         <cmp-field-name>shipId</cmp-field-name>
>  >>  <table-column>col_shipId</table-column>
>  >> </cmp-field-mapping>
>  >> 
>  >> <cmp-field-mapping>
>  >>  <cmp-field-name>bedCount</cmp-field-name>
>  >>  <table-column>col_bedCount</table-column>
>  >>     </cmp-field-mapping>
>  >> 
>  >> 
>  >>    <resource-ref>
>  >>      <ref-name>jdbc/titanDB</ref-name>
>  >>    <resource-link>DefaultDatasource</resource-link>   
>  >>          </resource-ref>
>  >>  
>  >></entity> 
>  >>
>  >>
>  >>  <entity>
>  >>   <ejb-name>ShipEJB</ejb-name>
>  >></entity>
>  >>
>  >>  <session>
>  >>   <ejb-name>TravelAgentEJB</ejb-name>
>  >></session>
>  >>
>  >>  </enterprise-beans>
>  >>   
>  >></openejb-jar>
>  >>
>  >>  Any guess?? Thank you very much!!!!
>  >>
>  >>  Katia
>  >> >From: David Jencks <david_jencks@yahoo.com>
>  >>  >Reply-To: user@geronimo.apache.org
>  >>  >To: user@geronimo.apache.org
>  >>  >Subject: Re: Deployment fail at persistent EJB
>  >>  >Date: Thu, 14 Apr 2005 08:59:40 -0700
>  >>  >
>  >>  >I can't figure out how you got that error from the xml you
>  >>show.  
>  >>  >Can  you send the stack trace?
>  >>  >
>  >>  >Also, I think you can use simpler resource-refs:
>  >>  >
>  >>  ><resource-ref>
>  >>  >    <ref-name>jdbc/titanDB</ref-name>
>  >>  >    <resource-link>DefaultDatasource</resource-link>   
>  >>  > </resource-ref>
>  >>  >
>  >>  >and
>  >>  ><cmp-connection-factory>
>  >>  >     <resource-link>DefaultDatasource</resource-link>
>  >>  ><cmp-connection-factory>
>  >>  >
>  >>  >thanks
>  >>  >david jencks
>  >>  >
>  >>  > 
>  >>  >On Apr 14, 2005, at 2:45 AM, Katia Aresti Gonzalez wrote:
>  >>  >
>  >>  >>Hello Gianny!!!!
>  >>  >>
>  >>  >>I did what you said. This is my new openejb-jar.xml. I said
>  >>  >>somethig  wrong, ShipEJB is a BMP, is this supported? Anyway,
>  >>my
>  >>  >>problem is to  fix cmp, because its what i realy need now :-).
>  >>I
>  >>  >>paste the error  deploying just after the descriptor.
>  >>  >>
>  >>  >><?xml version="1.0"?>
>  >>  >>
>  >>  >><openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
>  >>  >>configId="GeronimoTestEJB"
>  >>  >>  parentId="org/apache/geronimo/Server">
>  >>  >>
>  >>  >><cmp-connection-factory>
>  >>  >>        <application>null</application>
>  >>  >>        <module>org/apache/geronimo/DefaultDatabase</module>
>  >>  >>        <name>DefaultDatasource</name>
>  >>  >></cmp-connection-factory>
>  >>  >>
>  >>  >><enterprise-beans>
>  >>  >><entity>
>  >>  >>  
>  >>  >>   <ejb-name>CabinEJB</ejb-name>
>  >>  >>   <table-name>CabinTable</table-name>
>  >>  >>  
>  >>  >>    <cmp-field-mapping>
>  >>  >>         <cmp-field-name>id</cmp-field-name>
>  >>  >>         <table-column>col_id</table-column>
>  >>  >> </cmp-field-mapping>
>  >>  >> 
>  >>  >> <cmp-field-mapping>
>  >>  >>         <cmp-field-name>name</cmp-field-name>
>  >>  >>  <table-column>col_name</table-column>
>  >>  >> </cmp-field-mapping>
>  >>  >> 
>  >>  >> <cmp-field-mapping>
>  >>  >>         <cmp-field-name>deckLevel</cmp-field-name>
>  >>  >>  <table-column>col_deckLevel</table-column>
>  >>  >> </cmp-field-mapping>
>  >>  >> 
>  >>  >> <cmp-field-mapping>
>  >>  >>         <cmp-field-name>shipId</cmp-field-name>
>  >>  >>  <table-column>col_shipId</table-column>
>  >>  >> </cmp-field-mapping>
>  >>  >> 
>  >>  >> <cmp-field-mapping>
>  >>  >>  <cmp-field-name>bedCount</cmp-field-name>
>  >>  >>  <table-column>col_bedCount</table-column>
>  >>  >>     </cmp-field-mapping>
>  >>  >> 
>  >>  >> <resource-ref>
>  >>  >>    <ref-name>jdbc/titanDB</ref-name>
>  >>  >>  <application>null</application>
>  >>  >>           <module>org/apache/geronimo/DefaultDatabase</module>
>  >>  >>           <name>DefaultDatasource</name>   
>  >>  >>        </resource-ref>
>  >>  >>  
>  >>  >></entity> 
>  >>  >>
>  >>  >>  <entity>
>  >>  >>   <ejb-name>ShipEJB</ejb-name>
>  >>  >></entity>
>  >>  >>
>  >>  >>  <session>
>  >>  >>   <ejb-name>TravelAgentEJB</ejb-name>
>  >>  >></session>
>  >>  >>
>  >>  >>  </enterprise-beans>
>  >>  >>   
>  >>  >></openejb-jar>
>  >>  >>
>  >>  >>Error---->
>  >>  >>
>  >>  >>C:\gero>java -jar bin/deployer.jar --user system --password
>  >>manager
>  >>  >>  deploy d:/cm
>  >>  >>p/build/dist/prueba-ejbs.jar
>  >>  >>Deployment failed
>  >>  >>  Server reports:
>  >>org.apache.geronimo.common.DeploymentException:  
>  >>  >>Unknown or amb
>  >>  >>iguous resource name query:  
>  >>  >>geronimo.server:J2EEServer=geronimo,J2EEApplication=
>  >>  >>null,j2eeType=JCAManagedConnectionFactory,name=jdbc/titanDB,*
>  >>match
>  >>  >>  count: 0
>  >>  >>        Unknown or ambiguous resource name query:  
>  >>  >>geronimo.server:J2EEServer=ger
>  >>  
>  >>  
> >>onimo,J2EEApplication=null,j2eeType=JCAManagedConnectionFactory,name=
>  >>jd
>  >>  >>bc/titanD
>  >>  >>B,* match count: 0
>  >>  >>
>  >>  >> 
>  >>  >>
>  >>  >>Thanks a los for four help!!!!!!!!!!!!!!!!!!!!!!!!!!!
>  >>  >>
>  >>  >>Katia
>  >>  >>
>  >>  >>
>  >>  >> 
>  >>  >> >From: Gianny Damour <gianny.damour@optusnet.com.au>
>  >>  >>  >Reply-To: user@geronimo.apache.org
>  >>  >>  >To: user@geronimo.apache.org
>  >>  >>  >Subject: Re: Deployment fail at persistent EJB
>  >>  >>  >Date: Wed, 13 Apr 2005 09:27:08 +1000
>  >>  >>  >
>  >>  >>  >Katia,
>  >>  >>  >
>  >>  >>  >The last version of Geronimo, built from source, supports
>  >>CMP.
>  >>  >>  >
>  >>  >>  >Also, could you please provide the error message that you
>  >>get
>  >>  >>during
>  >>  >>  >the deployment process?
>  >>  >>  >
>  >>  >>  >I comment your openejb-jar.xml deployment descriptor further
>  >>  >>down.
>  >>  >>  >
>  >>  >>  >Thanks,
>  >>  >>  >Gianny
>  >>  >>  >
>  >>  >>  >On 12/04/2005 8:20 PM, Katia Aresti Gonzalez wrote:
>  >>  >>  >
>  >>  >>  >>Hello again David!!!!
>  >>  >>  >>
>  >>  >>  >>The problems still go on xD. The openejb-jar.xml is
wrong,
>  >>and
>  >>  >>I
>  >>  >>  >>cant find any reference of an xml file to look at and
>  >>compare.
>  >>  >>I
>  >>  >>  >>know im doing somethig really bad :-).
>  >>  >>  >>
>  >>  >>  >>Here is the openejb-jar.xml of the ejb-jar.xml. Can
you
>  >>help me
>  >>  >>  >>again please? thank you!!!!!
>  >>  >>  >>
>  >>  >>  >>Katia
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >><?xml version="1.0"?>
>  >>  >>  >>
>  >>  >>  >><openejb-jar
>  >>xmlns="http://www.openejb.org/xml/ns/openejb-jar"
>  >>  >>  >>configId="GeronimoTestEJB"
>  >>  >>  >>parentId="org/apache/geronimo/Server">
>  >>  >>  >>
>  >>  >>  >><cmp-connection-factory>
>  >>  >>  >>         <application>null</application>
>  >>  >>  >>        
>  >><module>org/apache/geronimo/DefaultDatabase</module>
>  >>  >>  >>         <name>DefaultDatasource</name>
>  >>  >>  >></cmp-connection-factory>
>  >>  >>  >>
>  >>  >>  >OK.
>  >>  >>  >
>  >>  >>  >><enterprise-beans>
>  >>  >>  >><entity>
>  >>  >>  >>    <ejb-name>CabinEJB</ejb-name>
>  >>  >>  >>    <jndi-name>CabinEJB</jndi-name>
>  >>  >>  >>
>  >>  >>  >You do not need to specify a jndi-name. This construct is
>  >>only
>  >>  >>used
>  >>  >>  >to specify a global JNDI name, which you do not need in
your
>  >>  >>case.
>  >>  >>  >
>  >>  >>  >You need to specifiy a mapping table for this CMP. This
is
>  >>  >>something
>  >>  >>  >like:
>  >>  >>  >             <table-name>MyTableName</table-name>
>  >>  >>  >
>  >>  >>  >Furthermore, you also need to specify a mapping for each
of
>  >>the
>  >>  >>  >persistent fields identified in your ejb-jar.xml DD. This
is
>  >>  >>  >something like:
>  >>  >>  >            <cmp-field-mapping>
>  >>  >>  >                <cmp-field-name>id</cmp-field-name>
>  >>  >>  >                <table-column>col_id</table-column>
>  >>  >>  >            </cmp-field-mapping>
>  >>  >>  >
>  >>  >>  >>    <resource-ref>
>  >>  >>  >>    <ref-name>jdbc/titanDB</ref-name>
>  >>  >>  >>      </resource-ref>
>  >>  >>  >>
>  >>  >>  >This is now enough information. You need to map a resource
>  >>  >>reference
>  >>  >>  >to this resource name. This is something like:
>  >>  >>  >                <application>null</application>
>  >>  >>  
>  >>  >>  
>  >>  
> >                <module>org/apache/geronimo/DefaultDatabase</module>
>  >>  >>  >                <name>DefaultDatasource</name>
>  >>  >>  >Such a configuration references the default datasource of
>  >>  >>Geronimo,
>  >>  >>  >which is by the way the datasource used under the cover
by
>  >>the
>  >>  >>CMP
>  >>  >>  >engine to interact with the database.
>  >>  >>  >
>  >>  >>  >Please have a look to this file:
>  >>  >>  >modules/naming-builder/src/schema/geronimo-naming.xsd and
>  >>  >>especially
>  >>  >>  >to the resource-refType complex type to understand how
>  >>mapping
>  >>  >>  >works.
>  >>  >>  >
>  >>  >>  >></entity>
>  >>  >>  >>
>  >>  >>  >><entity>
>  >>  >>  >>    <ejb-name>ShipEJB</ejb-name>
>  >>  >>  >>    <jndi-name>ShipEJB</jndi-name>
>  >>  >>  >>
>  >>  >>  >Same as above.
>  >>  >>  >
>  >>  >>  >>    <resource-ref>
>  >>  >>  >>    <ref-name>jdbc/titanDB</ref-name>
>  >>  >>  >>
>  >>  >>  >Same as above.
>  >>  >>  >
>  >>  >>  >>      </resource-ref>
>  >>  >>  >></entity>
>  >>  >>  >>
>  >>  >>  >><session>
>  >>  >>  >>    <ejb-name>TravelAgentEJB</ejb-name>
>  >>  >>  >>    <jndi-name>TravelAgentEJB</jndi-name>
>  >>  >>  >>   </session>
>  >>  >>  >></enterprise-beans>
>  >>  >>  >>    </openejb-jar>
>  >>  >>  >>
>  >>  >>
>  >>  >>  Recibe ofertas de empleo adaptadas a tu perfil. Introduce tu
>  >>CV
>  >>  >>en  MSN Empleo.
>  >>
>  >>  Busca a la vez en Internet, en directorios, en enciclopedias...  
>  >>Atrévete con el nuevo MSN Search
>
>  Descubre la descarga digital segura. Medio millón de canciones en MSN  
> Music. 

Mime
View raw message