djencks
thanks for your response. I will cut out not used properties. But it seems
not related to the class loading issues. The no found class is in
<dependency>
<groupId>com.frontwavetech.external</groupId>
<artifactId>frontwavetech-external-common-configuration</artifactId>
<version>1.5</version>
</dependency>
thanks
george
djencks wrote:
>
> I don't see anything wrong yet :-)
>
> On the other hand it is rather confusing trying to read these files
> after they've been reformatted via email and with all the commented
> out stuff.
>
> Can you take out
>
> - commented out stuff
> - properties defining deployers you don't use
> - the dependencies in the plan (they should be inserted by the build
> process) (If you are showing the processed plan, fine, but tell us
> so :-)
>
> Also, which jar has the classes needed for the config plugin?
>
> thanks
> david jencks
>
> On Jun 12, 2009, at 3:44 PM, gongli710 wrote:
>
>>
>> Hi, geronimo experts
>>
>> I am learning geronimo, and developed 2 plugins as experiement. I
>> wrote 2
>> gbean in 2 plugins:
>>
>> LoggingGbean in logging plugin with name as eyelight/loggingService,
>> the
>> plugin was build and deployed successful.
>>
>> ConfigurationGbean in config plugin with name as
>> eyelight/configurationService, and this gbean has reference to
>> eyelight/loggingService. I added logging plugin car as dependency
>> in this
>> config plugin pom.xml, otherwise the build failed with error : or
>> matches to
>> reference name eyelight/loggingService.
>>
>> when I deployed it to geronimo after build, geronimo report error ,
>> the
>> configurtionGbean can not find its owen classes ( all libs have
>> been add to
>> depenecies). I suspect when I add logging plugin car as depency in
>> configiration plugin, the class loading of configuration plugin was
>> changed
>> in some way, it just load class from logging plugin class
>> dependency. So I
>> add configrationGbean's libs to logging plugin depencies, the
>> configurationGbean can start and initiaed successfully.
>>
>> but I think this is not normal. One plugin need to include lib jars
>> belong
>> other plugins just becase those plugin reference it.
>>
>> Maybe I made some mistakes on plugin plan, pom.xml writing, I am so
>> new to
>> geronimo development. Any advice is appriciated here.
>>
>>
>> logging plugin pom.xml
>>
>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd">
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>com.frontwavetech.eyelight.server</groupId>
>> <artifactId>eyelight-server-logging-geronimo</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <packaging>car</packaging>
>>
>> <properties>
>> <!-- This property is required by the car:package mojo -->
>> <geronimoVersion>2.1.4</geronimoVersion>
>>
>>
>> <gbeanDeployerBootstrap>org.apache.geronimo.framework/geronimo-gbean-
>> deployer-bootstrap/${geronimoVersion}/car</gbeanDeployerBootstrap>
>>
>> <gbeanDeployer>org.apache.geronimo.framework/geronimo-gbean-deployer/
>> ${geronimoVersion}/car</gbeanDeployer>
>>
>> <j2eeDeployer>org.apache.geronimo.configs/j2ee-deployer/$
>> {geronimoVersion}/car</j2eeDeployer>
>>
>> <clientDeployer>org.apache.geronimo.configs/client-deployer/$
>> {geronimoVersion}/car</clientDeployer>
>>
>> <connectorDeployer>org.apache.geronimo.configs/connector-deployer/$
>> {geronimoVersion}/car</connectorDeployer>
>>
>> <openejbDeployer>org.apache.geronimo.configs/openejb-deployer/$
>> {geronimoVersion}/car</openejbDeployer>
>>
>> <openejbcorbaDeployer>org.apache.geronimo.configs/openejb-corba-
>> deployer/${geronimoVersion}/car</openejbcorbaDeployer>
>>
>> <axisDeployer>org.apache.geronimo.configs/axis-deployer/$
>> {geronimoVersion}/car</axisDeployer>
>>
>> <cxfDeployer>org.apache.geronimo.configs/cxf-deployer/$
>> {geronimoVersion}/car</cxfDeployer>
>>
>> <axis2Deployer>org.apache.geronimo.configs/axis2-deployer/$
>> {geronimoVersion}/car</axis2Deployer>
>>
>> <tomcatDeployer>org.apache.geronimo.configs/tomcat6-deployer/$
>> {geronimoVersion}/car</tomcatDeployer>
>>
>> <jetty6Deployer>org.apache.geronimo.configs/jetty6-deployer/$
>> {geronimoVersion}/car</jetty6Deployer>
>>
>> <jasperDeployer>org.apache.geronimo.configs/jasper-deployer/$
>> {geronimoVersion}/car</jasperDeployer>
>>
>> <jpaDeployer>org.apache.geronimo.configs/persistence-jpa10-deployer/$
>> {geronimoVersion}/car</jpaDeployer>
>> </properties>
>>
>>
>> <dependencies>
>>
>> <dependency>
>> <groupId>org.apache.geronimo.framework</groupId>
>> <artifactId>geronimo-gbean-deployer</artifactId>
>> <version>${geronimoVersion}</version>
>> <type>car</type>
>> <scope>provided</scope>
>> </dependency>
>>
>> <dependency>
>> <groupId>org.apache.geronimo.framework</groupId>
>> <artifactId>geronimo-kernel</artifactId>
>> <version>${geronimoVersion}</version>
>> <type>jar</type>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.eyelight.server</groupId>
>> <artifactId>eyelight-server-logging</artifactId>
>> <version>${version}</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.eyelight</groupId>
>> <artifactId>eyelight-common-core</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <type>jar</type>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>> <artifactId>frontwavetech-external-log4j</artifactId>
>> <version>1.2.16</version>
>> <type>jar</type>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>>
>> <artifactId>frontwavetech-external-backport-util-concurrent</
>> artifactId>
>> <version>3.1-Java12</version>
>> <type>jar</type>
>> </dependency>
>>
>> </dependencies>
>>
>> <build>
>> <pluginManagement>
>> <plugins>
>>
>> <plugin>
>> <groupId>org.apache.geronimo.buildsupport</groupId>
>> <artifactId>car-maven-plugin</artifactId>
>> <version>${geronimoVersion}</version>
>> <extensions>true</extensions>
>> <configuration>
>> <!-- where in plugin catalog this should go -->
>> <category>MyCategory</category>
>> </configuration>
>> </plugin>
>>
>> </plugins>
>> </pluginManagement>
>>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.geronimo.buildsupport</groupId>
>> <artifactId>car-maven-plugin</artifactId>
>> <configuration>
>> <deploymentConfigs>
>> <!-- gbean deployer is default. For jee apps
>> include all deployers your app needs, see properties -->
>>
>> <!--<deploymentConfig>${gbeanDeployer}</deploymentConfig>-->
>>
>> <!--<deploymentConfig>${j2eeDeployer}</deploymentConfig>-->
>>
>> <!--<deploymentConfig>${jetty6Deployer}</deploymentConfig>-->
>>
>> <!--<deploymentConfig>${jasperDeployer}</deploymentConfig>-->
>>
>> <!--<deploymentConfig>${jpaDeployer}</deploymentConfig>-->
>> </deploymentConfigs>
>> <!-- if you are deploying a jee app specify it
>> here -->
>> <!--
>> <module>
>>
>> <groupId>org.apache.roller</groupId>
>>
>> <artifactId>roller-weblogger-geronimo</artifactId>
>> <type>war</type>
>> </module>
>> -->
>> <!-- Normally you can use the maven dependencies
>> unaltered. If you need to specify import scope
>> you can list the dependencies here as you want
>> them in
>> the plan.xml -->
>> <useMavenDependencies>
>> <value>true</value>
>> <includeVersion>true</includeVersion>
>> </useMavenDependencies>
>> <!-- the instance sets up most of the optional
>> geronimo-plugin.xml content -->
>> <instance>
>> <plugin-artifact>
>> <!-- prerequisites prevent your module from
>> being installed unless already present -->
>> <!--
>> <prerequisite>
>> <id>
>>
>> <groupId>mysql</groupId>
>>
>> <artifactId>mysql-connector-java</artifactId>
>>
>> <version>3.1.12</version>
>>
>> <type>jar</type>
>> </id>
>>
>> <resource-type>Database Connector</resource-type>
>>
>> <description>
>> (why
>> this
>> can't be installed as a dependency)
>> </
>> description>
>> </prerequisite>
>> -->
>> <!-- extract stuff from the car to the
>> specified
>> location (good for config info -->
>> <!--<copy-file relative-to="server"
>> dest-dir="var/roller-data">themes</copy-file>-->
>> <!-- content that should go into
>> var/config/config.xml for module customization -->
>> <!-- note the variable ${RollerContextPath}
>> which is further specified in var/config/config-
>> substitutions.properties -->
>> <!--
>> <config-xml-
>> content
>> server="default">
>> <gbean
>> name="org.apache.geronimo.plugins/roller-jetty/1.0-SNAPSHOT/car">
>>
>> <attribute
>> name="contextPath">${RollerContextPath}</attribute>
>> </gbean>
>>
>> </config-xml-content>
>> -->
>> <!-- a user-tweakable variable to go into
>> var/config/config-substitutions.properties -->
>> <!--<config-substitution
>> key="RollerContextPath">/roller</config-substitution>-->
>> <!-- artifact aliases let your module
>> substitute
>> for another one, e.g one db for another -->
>> <!--<artifact-alias
>> key="org.apache.geronimo.plugins/roller-derby-database/1.0-SNAPSHOT/
>> car">org.apache.geronimo.plugins/roller-mysql-database/1.0-SNAPSHOT/
>> car</artifact-alias>-->
>>
>> </plugin-artifact>
>> </instance>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>>
>> </project>
>>
>> logging plugin plan.xml
>> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
>> <gbean name="eyelight/loggingService"
>> class="com.frontwavetech.eyelight.server.logging.LoggingServiceGBean">
>> </gbean>
>>
>> </module>
>>
>>
>> Configuration plugin pom.xml
>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd">
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>com.frontwavetech.eyelight.server</groupId>
>> <artifactId>eyelight-server-configuration-geronimo</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <packaging>car</packaging>
>>
>> <properties>
>> <!-- This property is required by the car:package mojo -->
>> <geronimoVersion>2.1.4</geronimoVersion>
>>
>>
>> <gbeanDeployerBootstrap>org.apache.geronimo.framework/geronimo-gbean-
>> deployer-bootstrap/${geronimoVersion}/car</gbeanDeployerBootstrap>
>>
>> <gbeanDeployer>org.apache.geronimo.framework/geronimo-gbean-deployer/
>> ${geronimoVersion}/car</gbeanDeployer>
>>
>> <j2eeDeployer>org.apache.geronimo.configs/j2ee-deployer/$
>> {geronimoVersion}/car</j2eeDeployer>
>>
>> <clientDeployer>org.apache.geronimo.configs/client-deployer/$
>> {geronimoVersion}/car</clientDeployer>
>>
>> <connectorDeployer>org.apache.geronimo.configs/connector-deployer/$
>> {geronimoVersion}/car</connectorDeployer>
>>
>> <openejbDeployer>org.apache.geronimo.configs/openejb-deployer/$
>> {geronimoVersion}/car</openejbDeployer>
>>
>> <openejbcorbaDeployer>org.apache.geronimo.configs/openejb-corba-
>> deployer/${geronimoVersion}/car</openejbcorbaDeployer>
>>
>> <axisDeployer>org.apache.geronimo.configs/axis-deployer/$
>> {geronimoVersion}/car</axisDeployer>
>>
>> <cxfDeployer>org.apache.geronimo.configs/cxf-deployer/$
>> {geronimoVersion}/car</cxfDeployer>
>>
>> <axis2Deployer>org.apache.geronimo.configs/axis2-deployer/$
>> {geronimoVersion}/car</axis2Deployer>
>>
>> <tomcatDeployer>org.apache.geronimo.configs/tomcat6-deployer/$
>> {geronimoVersion}/car</tomcatDeployer>
>>
>> <jetty6Deployer>org.apache.geronimo.configs/jetty6-deployer/$
>> {geronimoVersion}/car</jetty6Deployer>
>>
>> <jasperDeployer>org.apache.geronimo.configs/jasper-deployer/$
>> {geronimoVersion}/car</jasperDeployer>
>>
>> <jpaDeployer>org.apache.geronimo.configs/persistence-jpa10-deployer/$
>> {geronimoVersion}/car</jpaDeployer>
>> </properties>
>>
>>
>> <dependencies>
>>
>> <dependency>
>> <groupId>org.apache.geronimo.framework</groupId>
>> <artifactId>geronimo-kernel</artifactId>
>> <version>${geronimoVersion}</version>
>> <type>jar</type>
>> </dependency>
>>
>> <dependency>
>> <groupId>org.apache.geronimo.framework</groupId>
>> <artifactId>geronimo-gbean-deployer</artifactId>
>> <version>${geronimoVersion}</version>
>> <type>car</type>
>> <scope>provided</scope>
>> </dependency>
>>
>> <dependency>
>> <groupId>org.apache.geronimo.framework</groupId>
>> <artifactId>plugin</artifactId>
>> <version>${geronimoVersion}</version>
>> <type>car</type>
>> <scope>provided</scope>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.eyelight.server</groupId>
>> <artifactId>eyelight-server-configuration</artifactId>
>> <version>${version}</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>> <artifactId>frontwavetech-external-common-lang</artifactId>
>> <version>2.4</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>> <artifactId>frontwavetech-external-common-collection</
>> artifactId>
>> <version>3.2</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>>
>> <artifactId>frontwavetech-external-common-configuration</artifactId>
>> <version>1.5</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.eyelight</groupId>
>> <artifactId>eyelight-common-core</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.eyelight.server</groupId>
>> <artifactId>eyelight-server-logging</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.eyelight.server</groupId>
>> <artifactId>eyelight-server-logging-geronimo</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <type>car</type>
>> </dependency>
>>
>> </dependencies>
>>
>> <build>
>> <pluginManagement>
>> <plugins>
>>
>> <plugin>
>> <groupId>org.apache.geronimo.buildsupport</groupId>
>> <artifactId>car-maven-plugin</artifactId>
>> <version>${geronimoVersion}</version>
>> <extensions>true</extensions>
>> <configuration>
>> <!-- where in plugin catalog this should go -->
>> <category>eyelight-server-configuration</
>> category>
>> </configuration>
>> </plugin>
>>
>> </plugins>
>> </pluginManagement>
>>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.geronimo.buildsupport</groupId>
>> <artifactId>car-maven-plugin</artifactId>
>> <configuration>
>> <deploymentConfigs>
>> <!-- gbean deployer is default. For jee apps
>> include all deployers your app needs, see properties -->
>>
>> <deploymentConfig>${gbeanDeployer}</deploymentConfig>
>>
>> <!--<deploymentConfig>${j2eeDeployer}</deploymentConfig>-->
>>
>> <!--<deploymentConfig>${jetty6Deployer}</deploymentConfig>-->
>>
>> <!--<deploymentConfig>${jasperDeployer}</deploymentConfig>-->
>>
>> <!--<deploymentConfig>${jpaDeployer}</deploymentConfig>-->
>> </deploymentConfigs>
>> <!-- Normally you can use the maven dependencies
>> unaltered. If you need to specify import scope
>> you can list the dependencies here as you want
>> them in
>> the plan.xml -->
>> <useMavenDependencies>
>> <value>true</value>
>> <includeVersion>true</includeVersion>
>> </useMavenDependencies>
>> <!-- the instance sets up most of the optional
>> geronimo-plugin.xml content -->
>> <instance>
>> <plugin-artifact>
>> <copy-file relative-to="server"
>> dest-dir="var/eyelight">eyelight-server.properties</copy-file>
>> </plugin-artifact>
>> </instance>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>>
>> </project>
>>
>> configuration plugin plan.xml
>> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
>> <environment>
>> <moduleId>
>> <groupId>com.frontwavetech.eyelight.server</groupId>
>> <artifactId>eyelight-server-configuration-geronimo</
>> artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <type>car</type>
>> </moduleId>
>>
>> <dependencies>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>> <artifactId>frontwavetech-external-common-lang</artifactId>
>> <version>2.4</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>> <artifactId>frontwavetech-external-common-collection</
>> artifactId>
>> <version>3.2</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.external</groupId>
>>
>> <artifactId>frontwavetech-external-common-configuration</artifactId>
>> <version>1.5</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.frontwavetech.eyelight</groupId>
>> <artifactId>eyelight-common-core</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> </dependency>
>> </dependencies>
>>
>> <reverse-classloading/>
>>
>> <hidden-classes/>
>>
>> <non-overridable-classes/>
>>
>> </environment>
>>
>>
>> <gbean name="eyelight/configurationService"
>> class
>> =
>> "com
>> .frontwavetech
>> .eyelight.server.configuration.ConfigurationServiceGBean">
>> <attribute
>> name="configurationFileName">var/eyelight/eyelight-
>> server.properties</attribute>
>> <reference name="loggingService">
>> <name>eyelight/loggingService</name>
>> </reference>
>> </gbean>
>>
>> </module>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-a-gbean-in-one-plugin-reference-to-the-gbeans-in-other-plugin--tp24007150s134p24007150.html
>> Sent from the Apache Geronimo - Dev mailing list archive at
>> Nabble.com.
>>
>
>
--
View this message in context:
http://www.nabble.com/How-a-gbean-in-one-plugin-reference-to-the-gbeans-in-other-plugin--tp24007150s134p24021916.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.