Apache Geronimo > Discussion Forums  User List | Dev List | Wiki | Issue Tracker  

org.apache.geronimo.common.DeploymentException

View: New views
3 Messages — Rating Filter:   Alert me  

org.apache.geronimo.common.DeploymentException

by timo.ratilainen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

I have a simple web application packed in EAR-file. After deployment the application is located at geronimo/repository/default/MyApplication -folder. Why? I think it should be located in folder like: geronimo/repository/mygroup/MyApplication.

This also causes following exception when I redeploy my application:

org.apache.geronimo.common.DeploymentException: mygroup/MyApplication/1.0/car does not appear to be a the name of a module available on the selected server. Perhaps it has already been stopped or undeployed?  If you're trying to specify a TargetModuleID, use the syntax TargetName|ModuleName instead. If you're not sure what's running, try the list-modules command.
        at org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTargetModuleIDs(ConfigIDExtractor.java:205)
        at org.apache.geronimo.deployment.hot.DirectoryHotDeployer.fileUpdated(DirectoryHotDeployer.java:410)
        at org.apache.geronimo.deployment.hot.DirectoryMonitor.scanDirectory(DirectoryMonitor.java:382)
        at org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMonitor.java:216)
        at java.lang.Thread.run(Thread.java:619)


Regards,
Timo Ratilainen



Other information:

geronimo-application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<application application-name="MyApplication"
        xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
        xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
       
        <sys:environment>
                <sys:application-name>MyApplication</sys:application-name>
                <sys:moduleId>
                        <sys:groupId>mygroup</sys:groupId>
                        <sys:artifactId>MyApplication</sys:artifactId>
                        <sys:version>1.0</sys:version>
                        <sys:type>car</sys:type>
                </sys:moduleId>
                <sys:hidden-classes>
                        <sys:filter>org.springframework</sys:filter>
                        <sys:filter>org.apache.commons.</sys:filter>
                        <sys:filter>org.apache.log4j</sys:filter>
                </sys:hidden-classes>
                <sys:inverse-classloading/>
        </sys:environment>

        <app:module>
                <app:connector>mysql-connector-java-5.1.6-bin.jar</app:connector>
                <app:alt-dd>datasource.xml</app:alt-dd>
        </app:module>
       
</application>

application.xml

<?xml version="1.0" encoding="UTF-8"?>
<application version="1.4"
        xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
       
        <display-name>MyApplication</display-name>
        <module>
                <web>
                        <web-uri>MyApplicationGui.war</web-uri>
                        <context-root>/MyApplication</context-root>
                </web>
        </module>
       
        <module>
                <connector>mysql-connector-java-5.1.6-bin.jar</connector>
        </module>
       
</application>

datasource.xml

<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <dep:moduleId>
            <dep:groupId>mygroup</dep:groupId>
            <dep:artifactId>MyApplicationDB</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>rar</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>mysql</dep:groupId>
                <dep:artifactId>mysql-connector-java</dep:artifactId>
                <dep:version>5.1.6-bin</dep:version>
                <dep:type>jar</dep:type>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>MyApplicationDB</name>
                    <config-property-setting name="DatabaseName">mydb</config-property-setting>
                    <config-property-setting name="Password">root</config-property-setting>
                    <config-property-setting name="UserName">root</config-property-setting>
                    <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>1</min-size>
                            <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                            <idle-timeout-minutes>15</idle-timeout-minutes>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>








Re: org.apache.geronimo.common.DeploymentException

by Donald Woods-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Which level of Geronimo?
For "deployment" are you using cmdline, console or hot deploy directory?
Do you place the geronimo-application.xml in the ear or passing it in on
the cmdline deploy?
Did you create a geronimo-web.xml?


-Donald

timo.ratilainen wrote:

> Hello
>
> I have a simple web application packed in EAR-file. After deployment the
> application is located at geronimo/repository/default/MyApplication -folder.
> Why? I think it should be located in folder like:
> geronimo/repository/mygroup/MyApplication.
>
> This also causes following exception when I redeploy my application:
>
> org.apache.geronimo.common.DeploymentException:
> mygroup/MyApplication/1.0/car does not appear to be a the name of a module
> available on the selected server. Perhaps it has already been stopped or
> undeployed?  If you're trying to specify a TargetModuleID, use the syntax
> TargetName|ModuleName instead. If you're not sure what's running, try the
> list-modules command.
>         at
> org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTargetModuleIDs(ConfigIDExtractor.java:205)
>         at
> org.apache.geronimo.deployment.hot.DirectoryHotDeployer.fileUpdated(DirectoryHotDeployer.java:410)
>         at
> org.apache.geronimo.deployment.hot.DirectoryMonitor.scanDirectory(DirectoryMonitor.java:382)
>         at
> org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMonitor.java:216)
>         at java.lang.Thread.run(Thread.java:619)
>
> Regards,
> Timo Ratilainen
>
>
>
> Other information:
>
> geronimo-application.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application application-name="MyApplication"
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
>
> <sys:environment>
> <sys:application-name>MyApplication</sys:application-name>
> <sys:moduleId>
> <sys:groupId>mygroup</sys:groupId>
> <sys:artifactId>MyApplication</sys:artifactId>
> <sys:version>1.0</sys:version>
> <sys:type>car</sys:type>
> </sys:moduleId>
> <sys:hidden-classes>
> <sys:filter>org.springframework</sys:filter>
> <sys:filter>org.apache.commons.</sys:filter>
> <sys:filter>org.apache.log4j</sys:filter>
> </sys:hidden-classes>
> <sys:inverse-classloading/>
> </sys:environment>
>
> <app:module>
> <app:connector>mysql-connector-java-5.1.6-bin.jar</app:connector>
> <app:alt-dd>datasource.xml</app:alt-dd>
> </app:module>
>
> </application>
>
> application.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application version="1.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
>
> <display-name>MyApplication</display-name>
> <module>
> <web>
> <web-uri>MyApplicationGui.war</web-uri>
> <context-root>/MyApplication</context-root>
> </web>
> </module>
>
> <module>
> <connector>mysql-connector-java-5.1.6-bin.jar</connector>
> </module>
>
> </application>
>
> datasource.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
>     <dep:environment
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
>         <dep:moduleId>
>             <dep:groupId>mygroup</dep:groupId>
>             <dep:artifactId>MyApplicationDB</dep:artifactId>
>             <dep:version>1.0</dep:version>
>             <dep:type>rar</dep:type>
>         </dep:moduleId>
>         <dep:dependencies>
>             <dep:dependency>
>                 <dep:groupId>mysql</dep:groupId>
>                 <dep:artifactId>mysql-connector-java</dep:artifactId>
>                 <dep:version>5.1.6-bin</dep:version>
>                 <dep:type>jar</dep:type>
>             </dep:dependency>
>         </dep:dependencies>
>     </dep:environment>
>     <resourceadapter>
>         <outbound-resourceadapter>
>             <connection-definition>
>                
> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
>                 <connectiondefinition-instance>
>                     <name>MyApplicationDB</name>
>                     <config-property-setting
> name="DatabaseName">mydb</config-property-setting>
>                     <config-property-setting
> name="Password">root</config-property-setting>
>                     <config-property-setting
> name="UserName">root</config-property-setting>
>                     <connectionmanager>
>                         <local-transaction/>
>                         <single-pool>
>                             <max-size>10</max-size>
>                             <min-size>1</min-size>
>                            
> <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
>                             <idle-timeout-minutes>15</idle-timeout-minutes>
>                             <match-one/>
>                         </single-pool>
>                     </connectionmanager>
>                 </connectiondefinition-instance>
>             </connection-definition>
>         </outbound-resourceadapter>
>     </resourceadapter>
> </connector>
>
>
>
>
>
>
>
>


smime.p7s (4K) Download Attachment

Re: org.apache.geronimo.common.DeploymentException

by timo.ratilainen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the reply, but it is working now. I'm using hot deployment and I do have the geronimo-web.xml (below). I think the problem was in the deployment files in general (module names etc.). As You can see there are some other differences now, too, e.g. the datasource is not embedded in the ear package.

-Timo

Deployment files are now:

geronimo-application.xml

<?xml version="1.0" encoding="UTF-8"?>
<application
        xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
        xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
       
        <environment>
                <moduleId>
                        <groupId>mygroup</groupId>
                        <artifactId>MyApplication</artifactId>
                        <version>1.0</version>
                        <type>car</type>
                </moduleId>
                <hidden-classes>
                        <filter>org.springframework</filter>
                        <filter>org.apache.commons.</filter>
                        <filter>org.apache.log4j</filter>
                </hidden-classes>
                <inverse-classloading/>
        </environment>
         
</application>

application.xml

<?xml version="1.0" encoding="UTF-8"?>
<application version="1.4"
        xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
       
        <module id="MyApplicationWebModule">
                <web>
                        <web-uri>MyApplicationGui.war</web-uri>
                        <context-root>/MyApplication</context-root>
                </web>
        </module>
               
</application>

geronimo-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">

  <environment>
    <moduleId>
      <groupId>mygroup</groupId>
      <artifactId>MyApplicationGui</artifactId>
      <version>1.0</version>
      <type>car</type>
    </moduleId>
    <dependencies>
        <dependency>
            <groupId>console.dbpool</groupId>
                    <artifactId>MyApplicationDB</artifactId>
            </dependency>
        </dependencies>          
                <hidden-classes>
                        <filter>org.springframework</filter>
                        <filter>org.apache.commons.</filter>
                        <filter>org.apache.log4j</filter>
                </hidden-classes>    
                <inverse-classloading/>
  </environment>

        <context-root>/MyApplication</context-root>
       
        <!-- security settings, if any, goes here -->
       
        <resource-ref>
    <ref-name>jdbc/MyApplicationDB</ref-name>
        <resource-link>MyApplicationDB</resource-link>
    </resource-ref>
   
</web-app>



Donald Woods-2 wrote:
Which level of Geronimo?
For "deployment" are you using cmdline, console or hot deploy directory?
Do you place the geronimo-application.xml in the ear or passing it in on
the cmdline deploy?
Did you create a geronimo-web.xml?


-Donald
>
> geronimo-application.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application application-name="MyApplication"
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
>
> <sys:environment>
> <sys:application-name>MyApplication</sys:application-name>
> <sys:moduleId>
> <sys:groupId>mygroup</sys:groupId>
> <sys:artifactId>MyApplication</sys:artifactId>
> <sys:version>1.0</sys:version>
> <sys:type>car</sys:type>
> </sys:moduleId>
> <sys:hidden-classes>
> <sys:filter>org.springframework</sys:filter>
> <sys:filter>org.apache.commons.</sys:filter>
> <sys:filter>org.apache.log4j</sys:filter>
> </sys:hidden-classes>
> <sys:inverse-classloading/>
> </sys:environment>
>
> <app:module>
> <app:connector>mysql-connector-java-5.1.6-bin.jar</app:connector>
> <app:alt-dd>datasource.xml</app:alt-dd>
> </app:module>
>
> </application>
>
> application.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application version="1.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
>
> <display-name>MyApplication</display-name>
> <module>
> <web>
> <web-uri>MyApplicationGui.war</web-uri>
> <context-root>/MyApplication</context-root>
> </web>
> </module>
>
> <module>
> <connector>mysql-connector-java-5.1.6-bin.jar</connector>
> </module>
>
> </application>
>
> datasource.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
>     <dep:environment
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
>         <dep:moduleId>
>             <dep:groupId>mygroup</dep:groupId>
>             <dep:artifactId>MyApplicationDB</dep:artifactId>
>             <dep:version>1.0</dep:version>
>             <dep:type>rar</dep:type>
>         </dep:moduleId>
>         <dep:dependencies>
>             <dep:dependency>
>                 <dep:groupId>mysql</dep:groupId>
>                 <dep:artifactId>mysql-connector-java</dep:artifactId>
>                 <dep:version>5.1.6-bin</dep:version>
>                 <dep:type>jar</dep:type>
>             </dep:dependency>
>         </dep:dependencies>
>     </dep:environment>
>     <resourceadapter>
>         <outbound-resourceadapter>
>             <connection-definition>
>                
> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
>                 <connectiondefinition-instance>
>                     <name>MyApplicationDB</name>
>                     <config-property-setting
> name="DatabaseName">mydb</config-property-setting>
>                     <config-property-setting
> name="Password">root</config-property-setting>
>                     <config-property-setting
> name="UserName">root</config-property-setting>
>                     <connectionmanager>
>                         <local-transaction/>
>                         <single-pool>
>                             <max-size>10</max-size>
>                             <min-size>1</min-size>
>                            
> <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
>                             <idle-timeout-minutes>15</idle-timeout-minutes>
>                             <match-one/>
>                         </single-pool>
>                     </connectionmanager>
>                 </connectiondefinition-instance>
>             </connection-definition>
>         </outbound-resourceadapter>
>     </resourceadapter>
> </connector>
>
>
>
>
>
>
>
>