geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject Re: deploying a database plan
Date Sat, 26 Nov 2005 05:55:58 GMT
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 bad
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>
>         <context-priority-classloader>true</context-priority-classloader>
>         <container-config>
>                 <naming:resource-ref>
>                         <naming:ref-name>jdbc/DB</naming:ref-name>
>
> <naming:resource-link>AS400Datasource</naming:resource-link>
>                 </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="UserName">user</config-property-setting>
> > > > > >                                         <config-property-setting
name="Password">demo</config-property-setting>
> > > > > >                                         <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 put the username and password
> > > > > 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 back and made the
> > > > 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 guidance.  It's been helpful.
> > > > >
> > > > > > Any help would be appreciated.
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > > Brian
> > > > > >
> > > > >
> > > >
> > >
> >
>

Mime
View raw message