Thanks Facundo,

I avoided mentioning the ear problem on this thread, because it's really
trying to build a working customized war... and it succeeds. The point I was
trying to make is that you can suck down geoserver.war with no data, pack in
your own data (customize), and you can run it straight out of the maven
build process. Being able to run in in the dev environment, means you can
use the geoserver web interface, to manipulate the config/data in the
./src/main/webapp/data dir. Hence, you can upload/data/style... eta. Checkin
to scm.. and build your own spatial geoserver release.

... the next part which I want.. is to pack this customized geoserver.war
into the same ear as the client application.war(s) that will use and abuse
what geoserver has to offer.

What did you think of this approach? Easy/Hard/Worthwhile?



On Wed, Apr 23, 2008 at 3:30 PM, Facundo Garat <[EMAIL PROTECTED]>
wrote:

> Andrew,
>   i don't know if i'm on the right path...after this is the problem with
> deploying as ear in glassfish right?? if so, here are my results until now.
>
>   I follow this procedure, everything right. I get Jetty up and running.
> then i generate an ear from mygeoserver.war and deploy it in glassfish.. I
> get this error instead of the you reported. I have all ready to continue
> test this.
>
>  Any ideas of this error?!..
>
> [#|2008-04-23T02:44:11.118-0300|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=Thread-24;|23
> Apr 02:44:11 ERROR [context.ContextLoader] - Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'config' defined in URL
> [jar:file:/opt/SDK/domains/domain1/applications/j2ee-apps/mygeoserver/mygeoserver-1.0.0-SNAPSHOT_war/WEB-INF/lib/main-1.6.3.jar!/applicationContext.xml]:
> Initialization of bean failed; nested exception is
> java.lang.ExceptionInInitializerError: null
> java.lang.ExceptionInInitializerError
>         at
> org.geotools.gce.geotiff.GeoTiffFormatFactorySpi.createFormat(GeoTiffFormatFactorySpi.java:85)
>         at
> org.geotools.coverage.grid.io.GridFormatFinder.getFormatArray(GridFormatFinder.java:148)
>         at
> org.vfny.geoserver.util.CoverageStoreUtils.<clinit>(CoverageStoreUtils.java:46)
>         at
> org.vfny.geoserver.global.xml.XMLConfigReader.loadCoverageDTOFromXML(XMLConfigReader.java:1944)
>         at
> org.vfny.geoserver.global.xml.XMLConfigReader.loadCoverage(XMLConfigReader.java:1825)
>         at
> org.vfny.geoserver.global.xml.XMLConfigReader.loadCoverages(XMLConfigReader.java:1778)
>         at
> org.vfny.geoserver.global.xml.XMLConfigReader.loadCatalog(XMLConfigReader.java:385)
>         at
> org.vfny.geoserver.global.xml.XMLConfigReader.load(XMLConfigReader.java:217)
>         at
> org.vfny.geoserver.global.xml.XMLConfigReader.<init>(XMLConfigReader.java:179)
>         at
> org.vfny.geoserver.global.Config.setApplicationContext(Config.java:64)
>         at
> org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:84)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:362)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:312)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
>         at
> org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4523)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5184)
>         at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
>         at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584)
>         at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222)
>         at
> com.sun.enterprise.web.WebContainer.loadJ2EEApplicationWebModules(WebContainer.java:1147)
>         at
> com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:141)
>         at
> com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:244)
>         at
> com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
>         at
> com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:210)
>         at
> com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:645)
>         at
> com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:928)
>         at
> com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:912)
>         at
> com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:461)
>         at
> com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
>         at
> com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
>         at
> com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
>         at
> com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
>         at
> com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
>         at
> com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
>         at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
>         at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
>         at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
>         at
> com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
>         at
> com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
>         at
> com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>         at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
>         at $Proxy1.invoke(Unknown Source)
>         at
> com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
>         at
> com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
>         at
> com.sun.enterprise.deployment.client.DeploymentClientUtils.startApplication(DeploymentClientUtils.java:145)
>         at
> com.sun.enterprise.deployment.client.DeployAction.run(DeployAction.java:537)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.IllegalArgumentException: vendorName == null!
>         at
> javax.imageio.spi.IIOServiceProvider.<init>(IIOServiceProvider.java:59)
>         at
> javax.imageio.spi.ImageReaderWriterSpi.<init>(ImageReaderWriterSpi.java:214)
>         at
> javax.imageio.spi.ImageReaderSpi.<init>(ImageReaderSpi.java:192)
>         at
> com.sun.media.imageioimpl.plugins.tiff.TIFFImageReaderSpi.<init>(TIFFImageReaderSpi.java:73)
>         at
> org.geotools.gce.geotiff.GeoTiffFormat.<clinit>(GeoTiffFormat.java:75)
>         ... 70 more
> |#]
>
>
> On Tue, Apr 22, 2008 at 9:56 PM, Andrew Hughes <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > On Wed, Apr 23, 2008 at 10:23 AM, Andrew Hughes <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Ok Guys... Here Goes....
> > >
> > > apologies this is off the top of my head and on not on my dev machine
> > > to test right now...
> > >
> > >    1. Create a copy of geoserver, with an empty data dir. -
> > >    geoserver "nodata". (In future this should be in a public repo already)
> > >    1. download geoserver.war (I used v1.6.3)
> > >       2. extract the contents with jar -xvf geoserver.war
> > >       3. take a backup of the /data dir.... cp -Rv ./data /tmp/.
> > >       (you will need this later)
> > >       4. remove the contents of the data dir... rm -rf ./data/*
> > >       5. remove original geoserver.war rm -rf geoserver.war
> > >       6. repack into new war, without data.. jar -cvf jar -xvf
> > >       geoserver-1.6.0-nodata.war *
> > >       2. Install the nodata geoserver in the local maven repo
> > >    (~/.m2/repository/) (In future this should be in a public repo already)
> > >       1. mvn install:install-file
> > >       -Dfile=geoserver-1.6.3-nodata.war -DgroupId=org.geoserver
> > >       -DartifactId=geoserver -Dversion=1.6.3 -Dpackaging=war 
> > > -Dclassifier=nodata
> > >       -DgeneratePom=true -DcreateChecksum=true
> > >       3. Create a Maven project that uses the above.... and
> > >    containts geoserver_data_dir contents. (In future this is the only part
> > >    required by a developer if geoserver-nodata is hosted in a public repo 
> > > - in
> > >    fact a customer archetype could fix this too).
> > >    1. mkdir ./mygeoserver
> > >       2. mkdir(s) ./mygeoserver/src/main/webapp/data
> > >       3. cp -Rv /tmp/data/.  (this is the backup you took
> > >       earlier)
> > >
> > > should be cp -Rv /tmp/data/* ./src/main/webapp/data/.
> >
> > >
> > >    1.
> > >       2. create ./mygeoserver/pom.xml (attached below)
> > >    1. Run your geoserver
> > >       1. cd ./mygeoserver
> > >       2. mvn clean install jetty:run-war -Pjetty.port=2468
> > >       3. open a browser up to   http://localhost:2468/geoserver
> > >
> > > ALL DONE! Now your geoserver is reading/writing/messing with data in
> > > the ./src/main/webapp/data/ dir.. and that means you can check that into
> > > your scm. It also means you can do filter building on things, multi module
> > > projects, staged releases, profile builds... it goes on and on - all good
> > > reasons to do this.
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <project>
> > >         <modelVersion>4.0.0</modelVersion>
> > >         <artifactId>mygeoserver</artifactId>
> > >         <groupId>yourGroupId</groupId>
> > >         <packaging>war</packaging>
> > >         <version>1.0.0-SNAPSHOT</version>
> > >         <name>mygeoserver</name>
> > >         <description>Customized geoserver type 'mvn install
> > > jetty:run-war -Djetty.port=2468' and goto http://localhost:2468
> > > .</description>
> > >         <build>
> > >                 <plugins>
> > >                         <plugin>
> > >                                 <groupId>org.mortbay.jetty</groupId>
> > >
> > > <artifactId>maven-jetty-plugin</artifactId>
> > >                                 <configuration>
> > >
> > > <contextPath>/geoserver</contextPath>
> > >                                         <systemProperties>
> > >                                             <systemProperty>
> > >
> > > <name>GEOSERVER_DATA_DIR</name>
> > >
> > > <value>${basedir}/src/main/webapp/data</value>
> > >                                             </systemProperty>
> > >                                         </systemProperties>
> > >                                 </configuration>
> > >                         </plugin>
> > >                 </plugins>
> > >         </build>
> > >         <dependencies>
> > >                 <dependency>
> > >                         <groupId>org.geoserver</groupId>
> > >                         <artifactId>geoserver</artifactId>
> > >                         <version>1.6.3</version>
> > >                         <classifier>nodata</classifier>
> > >                         <type>war</type>
> > >                 </dependency>
> > >         </dependencies>
> > > </project>
> > >
> > >
> > > On Wed, Apr 16, 2008 at 9:30 AM, Andrew Hughes <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Releasing/Deploying a war to a repository is 'default' behaviour of
> > > > the 'mvn release:prepare release:perform' goals - providing the
> > > > <packaging>war</packaging>.
> > > >
> > > > One thing that was an annoying problem is the 30MB release, but we
> > > > might be able to save 7MB of that by removing ./data. I had a small 
> > > > think
> > > > about this, and it *should* be possible to release two instances of the
> > > > geoserver war. One version as it is now, and another with a
> > > > classifier=nodata, resulting in geoserver-1.6.0-nodata.war. This can be 
> > > > the
> > > > dependency that the "standalone/out the box"...
> > > >
> > > > <dependency>
> > > >    <groupId>geoserver</groupId>
> > > >    <artifactId>geoserver</artifactId>
> > > >    <version>1.6.0</version>
> > > >    <classifier>nodata</classifier>
> > > > </dependency>
> > > >
> > > > Anyway, its all talk for now... but food for thought.
> > > >
> > > > --AH
> > > >
> > > >
> > > >
> > > > On Tue, Apr 15, 2008 at 10:56 PM, Andrea Aime <[EMAIL PROTECTED]>
> > > > wrote:
> > > > > Andrew Hughes ha scritto:
> > > > >  ...
> > > > >
> > > > >
> > > > > >    Hum, ok, but I don't know how to push a .war onto a
> > > > repository... I'm
> > > > > >    not even sure we would like to do so. Each .war is 30MB, we'd
> > > > have to
> > > > > >    make sure the .war are pushed onto the repo only during the
> > > > release
> > > > > >    process (as opposed to publishing them daily as we for, for
> > > > instance,
> > > > > >    with the geotools jars)
> > > > > >
> > > > > >
> > > > > > I would have to say, that this *should* really only be used with
> > > > releases
> > > > > and not SNAPSHOTS, but of course we all like to test.
> > > > > >
> > > > >
> > > > >  Very much agreed... thought I have no idea how to make a .war be
> > > > deployed,
> > > > > nor how to make an artifact be deployed only during the release...
> > > > probably
> > > > > using some profile...
> > > > >
> > > > >
> > > > >
> > > > > >    Hum, this sounds like a good candidate for a community
> > > > module.
> > > > > >    Interested in working on it and providing some guidance on
> > > > how to
> > > > > >    use it in the
> > > > > >    wiki?
> > > > > >
> > > > > >
> > > > > > I will try to find some time to see how complex this is in the
> > > > next couple
> > > > > of days.
> > > > > >
> > > > >
> > > > >  Nice. Looking forward to hear your findings.
> > > > >  Cheers
> > > > >  Andrea
> > > > >
> > > >
> > > >
> > >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> >
> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > Geoserver-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geoserver-devel
> >
> >
>
>
> --
> -----------------------------------------
> Facundo Garat Mayer
> [EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to