geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Flynn" <Dan.Fl...@icrossing.com>
Subject how in the world do you get the org.apache.geronimo.system.sharedlib.SharedLib to work?
Date Thu, 06 May 2010 20:43:49 GMT
I cannot figure out how to configure my application classpath in
Geronimo v2.2.  I have an EAR project with a single Web Module.  I will
add other modules after I get this simple configuration to work.  My app
needs to access files in several directories and I cannot get them onto
the classpath.  According to the docs, I should configure a gbean like
this:

 

    <dep:gbean name="SharedLib1"
class="org.apache.geronimo.system.sharedlib.SharedLib">

        <dep:attribute name="classesDirs">c:/mypropertiesdir,c:/myxmldir
</dep:attribute>

 

        <dep:reference name="ServerInfo">

           <dep:name>ServerInfo</dep:name>

        </dep:reference>

    </dep:gbean>

 

What the docs are not very specific about is where this gbean definition
goes.  I am using a single geronimo-application.xml.  According to the
1.1 docs, gbeans could be defined at the end of the application
deployment plan.  It looks like that's no longer the case in 2.2.  So,
I've defined it in the web module section.  It passes validation, but
when I publish the application it fails.  It actually tells me it failed
for an unknown reason.  I don't understand why this is so difficult.  I
have read every piece of documentation out there and nothing works.  Has
anyone seen an example of this configuration for Geronimo 2.x?  I can
only find snippets of deployment plans in the documentation.  There is
no comprehensive example anywhere.  My full deployment plan is at the
end of this message.

 

Is there a simpler way to add folders to the classpath?  These folders
all exist within the application, so if there is some way to add
relative paths in Geronimo, that would also be fine.  Thanks in advance.

 

<?xml version="1.0" encoding="UTF-8"?>

<app:application
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" 

xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-
2.0" 

xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" 

xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" 

xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" 

xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0" 

xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" 

xmlns:pers="http://java.sun.com/xml/ns/persistence" 

xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" 

xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" 

xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" 

application-name="MyAppEAR">

    <dep:environment>

        <dep:moduleId>

            <dep:groupId>MyGroup</dep:groupId>

            <dep:artifactId>MyApp</dep:artifactId>

            <dep:version>1.4</dep:version>

            <dep:type>ear</dep:type>

        </dep:moduleId>

        <dep:dependencies/>

        <dep:hidden-classes/>

        <dep:non-overridable-classes/>

    </dep:environment>

    <app:module>

        <app:web>MyAppWeb.war</app:web>

        <web:web-app>

            <dep:environment>

                <dep:moduleId>

                    <dep:groupId>MyGroup</dep:groupId>

                    <dep:artifactId>MyAppWeb</dep:artifactId>

                    <dep:version>2.4</dep:version>

                    <dep:type>war</dep:type>

                </dep:moduleId>

            </dep:environment>

            <web:context-root>/MyAppWeb</web:context-root>

                <dep:gbean
class="org.apache.geronimo.system.sharedlib.SharedLib" name="mylib">

                    <dep:attribute name="classesDirs" >
c:/mypropertiesdir,c:/myxmldir </dep:attribute>

                </dep:gbean>

        </web:web-app>

    </app:module>

 

</app:application>

 


iCrossing Privileged and Confidential Information
This email message is for the sole use of the intended recipient(s) and may contain confidential
and privileged information of iCrossing. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by reply email
and destroy all copies of the original message.



Mime
View raw message