# geronimo-user mailing list archives

##### Site index · List index
Message view
Top
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject Re: deploying a database plan
Date Sat, 26 Nov 2005 06:49:47 GMT
As far as I know you need to use Maven 1.0.2 or 1.1-beta-2.  There was
also some talk about having proper nightly builds so it wasn't
necessary to get the source to have the latest version, but I don't
know where that stands.

Thanks,
Aaron

On 11/26/05, Brian Bonner <bkbonner@gmail.com> wrote:
> Thanks.  I stand corrected.  I didn't pay close enough attention to
> that.  I found the group referenced and found resource-ref in the
> sequence as you pointed out.  I was referring to the files in the
> schema directory when I cut/pasted that info.
>
> I'll look into building it from the source.  Is Geronimo supporting M2
> yet?  (I hope so) Or do I need to use 1.1beta2 of Maven?  (hopefully
>
> Brian
>
>
> On 11/26/05, Aaron Mulder <ammulder@alumni.princeton.edu> wrote:
> > On 11/26/05, Brian Bonner <bkbonner@gmail.com> wrote:
> > > I meant to say 'jira'.  Anyway, I just checked out
> > > geronimo-web-1.0.xsd  in the schema dir of geronimo-1.0M5.  It looks
> > > like naming:naming-ref is not a valid top-level element:
> >
> > naming:resource-ref is in <xs:group
> > ref="naming:jndiEnvironmentRefsGroup"/> -- and note that an xs:group
> > is literally just a placeholder for a number of other elements, not an
> > element itself, so naming:resource-ref really does appear at the top
> > level of the file.
> >
> > Thanks,
> >     Aaron
> >
> > > <xs:complexType name="web-appType">
> > >         <xs:sequence>
> > >             <xs:element ref="sys:import" minOccurs="0" maxOccurs="unbounded"/>
> > >             <xs:element ref="sys:dependency" minOccurs="0"
> > > maxOccurs="unbounded"/>
> > >
> > >             <xs:element name="context-root" type="xs:string" minOccurs="0"/>
> > > type="xs:boolean" minOccurs="0"/>
> > >             <xs:element name="container-config"
> > > type="web:container-configType" minOccurs="0"/>
> > >
> > >             <xs:group ref="naming:jndiEnvironmentRefsGroup"/>
> > >             <xs:element ref="naming:message-destination" minOccurs="0"
> > > maxOccurs="unbounded"/>
> > >
> > >             <xs:sequence minOccurs="0">
> > >                 <xs:element name="security-realm-name" type="xs:string"/>
> > >                 <xs:element ref="security:security" minOccurs="0"/>
> > >             </xs:sequence>
> > >
> > >             <xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
> > >
> > >         </xs:sequence>
> > >         <xs:attribute name="configId" type="xs:string" use="required"/>
> > >         <xs:attribute name="parentId" type="xs:string" use="optional"/>
> > >     </xs:complexType>
> > >
> > > Maybe this is different in cvs?
> > >
> > > Brian
> > >
> > > On 11/26/05, Brian Bonner <bkbonner@gmail.com> wrote:
> > > > Aaron, the eclipse XML Builder was giving me errors saying that it
> > > > wasn't valid.  Only when I put it in the container-config did it not
> > > > give me an error.
> > > >
> > > > I'll look at the xsd and post what I find.  I'll open up a gira with
> > > > my web.xml and geronimo-web.xml.
> > > >
> > > > Thanks.
> > > >
> > > > Brian
> > > >
> > > > On 11/26/05, Aaron Mulder <ammulder@alumni.princeton.edu> wrote:
> > > > > I don't think you should have the container-config element in your
> > > > > geronimo-web.xml (the nameing:resource-ref should just be at the
top
> > > > > level).  In fact, I'm not sure why we're not rejecting that as a
> > > > > deployment plan.  Could you file a JIRA with your web.xml and
> > > > > geronimo-web.xml and note that you're not getting a helpful deployment
> > > > > error?  I'd like to make sure someone looks at the underlying problem.
> > > > >
> > > > > Thanks,
> > > > >     Aaron
> > > > >
> > > > > On 11/26/05, Brian Bonner <bkbonner@gmail.com> wrote:
> > > > > > Aaron, thanks (and thanks for sending it to the list)  My bad.
> > > > > >
> > > > > > I was able to get it deployed ok.  I'm now running into a wierd
> > > > > > problem.  I'm trying to deploy my app, but I get:
> > > > > >
> > > > > > C:\mvneclipse\target>deploy deploy paraware-1.0-SNAPSHOT.war
> > > > > >
> > > > > >     Error: Unable to distribute paraware-1.0-SNAPSHOT.war:
> > > > > >     Unable to resolve resource reference 'jdbc/DB' (no matching
> > > > > >     resources found)
> > > > > >
> > > > > >
> > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
> > > > > >         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> > > > > >         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
> > > > > >         xmlns:security="http://geronimo.apache.org/xml/ns/security-1.0"
> > > > > >         configId="com/paraware/TestService" parentId="org/apache/geronimo/
> > > > > > Server">
> > > > > >
> > > > > >         <context-root>test</context-root>
> > > > > >         <container-config>
> > > > > >                 <naming:resource-ref>
> > > > > >                         <naming:ref-name>jdbc/DB</naming:ref-name>
> > > > > >
> > > > > >                 </naming:resource-ref>
> > > > > >         </container-config>
> > > > > > </web-app>
> > > > > >
> > > > > >
> > > > > > My web.xml file includes:
> > > > > >
> > > > > >     <resource-ref id="ResourceRef_1">
> > > > > >         <res-ref-name>jdbc/DB</res-ref-name>
> > > > > >         <res-type>javax.sql.DataSource</res-type>
> > > > > >         <res-auth>Container</res-auth>
> > > > > >         <res-sharing-scope>Shareable</res-sharing-scope>
> > > > > >     </resource-ref>
> > > > > >
> > > > > >
> > > > > >
> > > > > > I ran the debugConsole and received:
> > > > > >
> > > > > > #  J2EEApplication=null,J2EEServer=geronimo,j2eeType=ResourceAdapterModule,name=net/sf/jt400
> > > > > > [running]
> > > > > > # J2EEApplication=null,J2EEServer=geronimo,j2eeType=ResourceAdapterModule,name=org/apache/geronimo/SystemDatabase
> > > > > > [running]
> > > > > > # J2EEApplication=null,J2EEServer=geronimo,j2eeType=ResourceAdapterModule,name=org/apache/geronimo/SystemJMS
> > > > > > [running]
> > > > > > # J2EEApplication=null,J2EEServer=geronimo,j2eeType=WebModule,name=org/apache/geronimo/applications/Welcome/Tomcat
> > > > > > [running]
> > > > > > # J2EEApplication=null,J2EEServer=geronimo,j2eeType=WebModule,name=org/apache/geronimo/DebugConsole
> > > > > > [running]
> > > > > > # J2EEApplication=null,J2EEServer=geronimo,JCAResource=net/sf/jt400,j2eeType=JCAConnectionFactory,name=AS400DataSource
> > > > > > [running]
> > > > > > # J2EEApplication=null,J2EEServer=geronimo,JCAResource=net/sf/jt400,j2eeType=JCAConnectionManager,name=AS400DataSource
> > > > > > [running]
> > > > > > # J2EEApplication=null,J2EEServer=geronimo,JCAResource=net/sf/jt400,j2eeType=JCAManagedConnectionFactory,name=AS400DataSource
> > > > > > [running]
> > > > > >
> > > > > >
> > > > > > It looks like the match is there, but I'm still getting the
error.  Any ideas?
> > > > > >
> > > > > > Brian
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 11/24/05, Aaron Mulder <ammulder@alumni.princeton.edu>
wrote:
> > > > > > > On 11/24/05, Brian Bonner <bkbonner@gmail.com> wrote:
> > > > > > > > Aaron, I looked at the tomcat switch.  The only difference
I saw
> > > > > > > > between config.jetty.xml and config.tomcat.xml was
the ports that each
> > > > > > > > were run on (e.g for http 8080 being the default for
each config and
> > > > > > > > 8090 being what the other 'jetty or tomcat' was running
on).  Or did I
> > > > > > > > miss something?
> > > > > > > >
> > > > > > > > Anyway,  I copied config.tomcat.xml over config.xml
and copied
> > > > > > > > config.tomcat.list over config.list.
> > > > > > > > I tried the command again:
> > > > > > > > I got this error:
> > > > > > > >
> > > > > > > > deploy deploy C:\geronimo-1.0-M5\repository\tranql\rars\tranql-connector-1.0.rar
> > > > > > > > geronimo-ra.xml
> > > > > > > >     Error: Unable to distribute tranql-connector-1.0.rar:
No builder
> > > > > > > >     found for namespace:
> > > > > > > >     http://geronimo.apache.org/xml/ns/j2ee/connector-1.0
or default
> > > > > > > >     namespace: http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0
> > > > > > >
> > > > > > > There should also be a difference in the defaultNamespace
attribute
> > > > > > > for the WebBuilder GBean in the o/a/g/RuntimeDeployer configuration.
> > > > > > > In fact, that should be affecting the error message (where
it says "or
> > > > > > > default namespace:
> > > > > > > http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0",
that should be
> > > > > > > ...tomcat-1.0).  Can you stop your server and check the
> > > > > > > var/config/config.xml and check the WebBuilder attributes?
If it
> > > > > > > still says Jetty, can you try copying config.tomcat.xml
over
> > > > > > > config.xml again while the server is definitely shut down
and then try
> > > > > > > it again?  I don't see how it's still reporting a default
of Jetty if
> > > > > > > the Tomcat config.xml is in place (unelss maybe you copied
it while
> > > > > > > the server was running, in which case it may have just
been
> > > > > > > overwritten).
> > > > > > >
> > > > > > > Thanks,
> > > > > > >     Aaron
> > > > > > >
> > > > > > > > Here's the list from deploy list-modules:
> > > > > > > >
> > > > > > > > Found 33 modules
> > > > > > > >   + org/apache/geronimo/applications/Welcome/Tomcat
@ http://L3B7594:8090/
> > > > > > > >   + org/apache/geronimo/Tomcat
> > > > > > > >   + org/apache/geronimo/RMINaming
> > > > > > > >   + org/apache/geronimo/ActiveMQServer
> > > > > > > >   + org/apache/geronimo/TomcatRuntimeDeployer
> > > > > > > >   + org/apache/geronimo/Server
> > > > > > > >   + org/apache/geronimo/Security
> > > > > > > >   + org/apache/geronimo/SystemDatabase
> > > > > > > >   + org/apache/geronimo/SystemJMS
> > > > > > > >   + org/apache/geronimo/RuntimeDeployer
> > > > > > > >   + org/apache/geronimo/Console/Tomcat
> > > > > > > >       `-> geronimo-console-standard-1.0-M5.war
@ http://L3B7594:8090/console-sta
> > > > > > > > ndard
> > > > > > > >       `-> geronimo-console-framework-1.0-M5.war
@ http://L3B7594:8090/console
> > > > > > > >   + org/apache/geronimo/System
> > > > > > > >     org/apache/geronimo/juddiServer/1.0-M5/Jetty
> > > > > > > >     org/apache/geronimo/Jetty
> > > > > > > >     org/apache/geronimo/SampleSecurityRealm
> > > > > > > >     org/apache/geronimo/DefaultDatabase
> > > > > > > >     org/apache/geronimo/SpringDeployer
> > > > > > > >     org/apache/geronimo/DebugConsole
> > > > > > > >     org/apache/geronimo/DeployerSystem
> > > > > > > >     org/apache/geronimo/ClientSystem
> > > > > > > >     org/apache/geronimo/ClientSecurity
> > > > > > > >     org/apache/geronimo/Client
> > > > > > > >     org/apache/geronimo/ClientCORBA
> > > > > > > >     org/apache/geronimo/applications/Welcome/Jetty
> > > > > > > >     org/apache/geronimo/Demo
> > > > > > > >     org/apache/geronimo/SpringRuntime
> > > > > > > >     org/apache/geronimo/ServerCORBA
> > > > > > > >     org/apache/geronimo/Directory
> > > > > > > >     org/apache/geronimo/OfflineDeployer
> > > > > > > >     org/apache/geronimo/juddiServer/1.0-M5/Tomcat
> > > > > > > >     org/apache/geronimo/Console/Jetty
> > > > > > > >     org/apache/geronimo/JettyRuntimeDeployer
> > > > > > > >     net/sf/jt400
> > > > > > > >
> > > > > > > > I presume the + indicates that it's running and the
> > > > > > > > TomcatRuntimeDeployer and RuntimeDeployer are both
running.
> > > > > > > >
> > > > > > > > Thanks.
> > > > > > > >
> > > > > > > > On 11/24/05, Brian Bonner <bkbonner@gmail.com>
wrote:
> > > > > > > > > Hi, Aaron.
> > > > > > > > > On 11/24/05, Aaron Mulder <ammulder@alumni.princeton.edu>
wrote:
> > > > > > > > > > On 11/24/05, Brian Bonner <bkbonner@gmail.com>
wrote:
> > > > > > > > > > > Hi, I'm relatively new.  I've been
doing reading and I want to deploy
> > > > > > > > > > > a datasource using this plan:
> > > > > > > > > > >
> > > > > > > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > > > > > > <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
> > > > > > > > > > >         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> > > > > > > > > > >         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
> > > > > > > > > > > configId="net/sf/jt400"
> > > > > > > > > > >         parentId="org/apache/geronimo/Server">
> > > > > > > > > > >
> > > > > > > > > > >         <resourceadapter>
> > > > > > > > > > >
> > > > > > > > > > >                 <outbound-resourceadapter>
> > > > > > > > > > >                         <connection-definition>
> > > > > > > > > > >                                 <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
> > > > > > > > > > >                                 <connectiondefinition-instance>
> > > > > > > > > > >
<name>AS400Datasource</name>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
<config-property-setting name="Driver">
> > > > > > > > > > >
com.ibm.as400.access.AS400JDBCDriver
> > > > > > > > > > >
</config-property-setting>
> > > > > > > > > > >
<config-property-setting name="ConnectionURL">
> > > > > > > > > > >
jdbc:as400:192.168.1.15
> > > > > > > > > > >
</config-property-setting>
> > > > > > > > > > >
<config-property-setting name="CommitBeforeAutocommit">
> > > > > > > > > > >
true
> > > > > > > > > > >
</config-property-setting>
> > > > > > > > > > >
<config-property-setting name="ExceptionSorterClass">
> > > > > > > > > > >
org.tranql.connector.NoExceptionsAreFatalSorter
> > > > > > > > > > >
</config-property-setting>
> > > > > > > > > > >
<connectionmanager>
> > > > > > > > > > >
<local-transaction />
> > > > > > > > > > >
<single-pool>
> > > > > > > > > > >
<max-size>10</max-size>
> > > > > > > > > > >
<min-size>0</min-size>
> > > > > > > > > > >
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
> > > > > > > > > > >
<idle-timeout-minutes>30</idle-timeout-minutes>
> > > > > > > > > > >
<match-one />
> > > > > > > > > > >
</single-pool>
> > > > > > > > > > >
</connectionmanager>
> > > > > > > > > > >                                 </connectiondefinition-instance>
> > > > > > > > > > >                         </connection-definition>
> > > > > > > > > > >                 </outbound-resourceadapter>
> > > > > > > > > > >         </resourceadapter>
> > > > > > > > > > > </connector>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I copied tranql-connector-1.0.rar from
the /repository/tranql/rars
> > > > > > > > > > > directory and placed it in the same
directory as my plan.  Is this
> > > > > > > > > > > required?
> > > > > > > > > >
> > > > > > > > > > You don't need to copy the RAR.  For example,
if you ran this from the
> > > > > > > > > > Geronimo install directory, you could run
"java -jar deployer.jar
> > > > > > > > > > deploy plan.xml repository/tranql/rars/tranql-connection-1.0.rar"
> > > > > > > > > >
> > > > > > > > > > > Am I using the correct namespaces to
validate the database plan?
> > > > > > > > > >
> > > > > > > > > > That looks like the correct namespace for
M5 and beyond.
> > > > > > > > > Thanks.  I wanted to make sure.  For some odd
reason, I'm not getting
> > > > > > > > > content assist (in Eclipse) for the sys:dependency
in the connector.
> > > > > > > > > >
> > > > > > > > > > > Is this the correct way to generate
the datasource on the server?
> > > > > > > > > >
> > > > > > > > > > If you have a source build, there's a portlet
in the console that can
> > > > > > > > > > walk you through the process (but it's new
since M5).
> > > > > > > > > I'm using M5.
> > > > > > > > > >
> > > > > > > > > > > Is there a way to reference the rar
on the server?
> > > > > > > > > > >
> > > > > > > > > > > I run this command and I get this error:
> > > > > > > > > > > deploy --user system --password manager
deploy
> > > > > > > > > > > tranql-connector-1.0.rar geronimo-ra.xml
> > > > > > > > > > >     Error: Unable to distribute tranql-connector-1.0.rar:
No builder
> > > > > > > > > > >     found for namespace:
> > > > > > > > > > >     http://geronimo.apache.org/xml/ns/j2ee/connector-1.0
or default
> > > > > > > > > > >     namespace: http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0
> > > > > > > > > >
> > > > > > > > > > It sounds like perhaps the connector deployer
isn't running?
> > > > > > > > > >
> > > > > > > > > > > I have started the tomcat instance
and stopped jetty on the server
> > > > > > > > > > > manually using deploy.
> > > > > > > > > >
> > > > > > > > > > Well, this might have caused you trouble.
I think the deployer is
> > > > > > > > > > configured to run against Tomcat or Jetty,
whichever the server
> > > > > > > > > > shipped with.  So if you just disable one
and enable the other your
> > > > > > > > > > web apps are likely to be deployed the wrong
way.  The best way to
> > > > > > > > > > switch between Tomcat and Jetty is to copy
over the
> > > > > > > > > > "config.product.xml" to "config.xml" in
geronimo/var/config while the
> > > > > > > > > > server is not running -- though that will
have the side effect of
> > > > > > > > > > resetting the list of running applications
next time you start the
> > > > > > > > > > server (so you may have to restart some
of them).
> > > > > > > > > >
> > > > > > > > > > I'm not sure why this would have affected
the connector deployer,
> > > > > > > > > > unless maybe you stopped more that you realize.
Can you run "java
> > > > > > > > > > -jar deployer.jar list-modules" and post
the output?  It should show
> > > > > > > > > > o/a/g/RuntimeDeployer and o/a/g/(WebServer)RuntimeDeployer
as running.
> > > > > > > > > >
> > > > > > > > > > Aaron
> > > > > > > > > >
> > > > > > > > > > P.S. If you have a source build, you can
also run "java -jar
> > > > > > > > > > deployer.jar login" so you don't have to
> > > > > > > > > > on the command line every time.
> > > > > > > > >
> > > > > > > > > I have since put things back the way they were
(default Geronimo
> > > > > > > > > 1.0M5) w/o switching to tomcat (since I obviously
screwed it up).  I
> > > > > > > > > ran the deploy and it worked.  I'm going to go
> > > > > > > > > switch I did to see what I messed up.
> > > > > > > > >
> > > > > > > > > I'll verify if the deployer's running.  I'm pretty
sure it was when I
> > > > > > > > > did a list-modules, but I could be wrong.
> > > > > > > > >
> > > > > > > > > btw, I've been using your book (PDF) on M4 for
> > > > > > > > > >
> > > > > > > > > > > Any help would be appreciated.
> > > > > > > > > > >
> > > > > > > > > > > Thanks.
> > > > > > > > > > >
> > > > > > > > > > > Brian
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Mime
View raw message