1 last thing...

The trick to starting a server with *Gfsh* and including all the required
dependencies is to look at the "classpath" of the server started by *Spring
Boot*, or the GemFire API, specifically, the classpath output in the server
log when the server starts.  Then, construct the classpath for the
*Gfsh* `start
server` command, '--classpath' option using the classpath from the log file.

For example, from my *Spring Boot* configured and bootstrapped Geode Server
started in my IDE (which is highly convenient during development, too;
think "debugging"):

Using the *Class Path* shown above, I can selectively choose the JARs and
the required, transitive dependencies, as needed by my application on the
cluster servers' classpath.  Of course, this is still too complex and error
prone since it is easy to miss a dependency.  But, it is
cumbersomely/painfully doable.


[info 2019/02/28 11:00:05.151 PST <main> tid=0x1]
---------------------------------------------------------------------------

  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with this
  work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with the
  License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
  License for the specific language governing permissions and limitations
  under the License.

---------------------------------------------------------------------------
Build-Date: 2018-05-18 19:17:56 +0000
Build-Id: root 4
Build-Java-Version: 1.8.0_171
Build-Platform: Linux 4.4.0-89-generic amd64
GemFire-Source-Date: 2018-05-18 18:25:45 +0000
GemFire-Source-Repository: support/9.5
GemFire-Source-Revision: e195f9c6129d22ef45dee135aa046270f150987b
Product-Name: Pivotal GemFire
Product-Version: 9.5.1
Source-Date: 2018-05-14 21:27:11 +0000
Source-Repository: support/9.5
Source-Revision: 1e8b8ba1aff46cf218f297686c5f08d594983ba1
Native version: native code unavailable
Running on: /10.99.199.24, 8 cpu(s), x86_64 Mac OS X 10.13.6
Communications version: 85
Process ID: 16326
User: jblum
Current dir:
/Users/jblum/pivdev/spring-data-examples-workspace/spring-session-data-gemfire-serialization-example/spring-gemfire-server/target
Home dir: /Users/jblum
Command Line Parameters:
  -ea

-Dspring.profiles.active=disable-session-indexes,pulse.authentication.default
  -Dgemfire.loadClassOnEveryDeserialization=true
  -javaagent:/Applications/IntelliJ IDEA 17
CE.app/Contents/lib/idea_rt.jar=63655:/Applications/IntelliJ IDEA 17
CE.app/Contents/bin
  -Dfile.encoding=UTF-8
*Class Path:*

/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/charsets.jar
  ...

/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/tools.jar

/Users/jblum/pivdev/spring-data-examples-workspace/spring-session-data-gemfire-serialization-example/spring-gemfire-server/target/classes

/Users/jblum/.m2/repository/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar

/Users/jblum/.m2/repository/org/springframework/boot/spring-boot-starter/2.1.3.RELEASE/spring-boot-starter-2.1.3.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/boot/spring-boot/2.1.3.RELEASE/spring-boot-2.1.3.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/spring-context/5.1.5.RELEASE/spring-context-5.1.5.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/spring-aop/5.1.5.RELEASE/spring-aop-5.1.5.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/spring-expression/5.1.5.RELEASE/spring-expression-5.1.5.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.1.3.RELEASE/spring-boot-autoconfigure-2.1.3.RELEASE.jar

/Users/jblum/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar

/Users/jblum/.m2/repository/org/springframework/spring-core/5.1.5.RELEASE/spring-core-5.1.5.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/spring-jcl/5.1.5.RELEASE/spring-jcl-5.1.5.RELEASE.jar
  /Users/jblum/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar

/Users/jblum/.m2/repository/org/springframework/session/spring-session-data-gemfire/2.1.2.RELEASE/spring-session-data-gemfire-2.1.2.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/data/spring-data-gemfire/2.1.3.RELEASE/spring-data-gemfire-2.1.3.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/spring-tx/5.1.5.RELEASE/spring-tx-5.1.5.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/spring-web/5.1.5.RELEASE/spring-web-5.1.5.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/data/spring-data-commons/2.1.3.RELEASE/spring-data-commons-2.1.3.RELEASE.jar

/Users/jblum/.m2/repository/io/pivotal/gemfire/geode-core/9.5.1/geode-core-9.5.1.jar

/Users/jblum/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar

/Users/jblum/.m2/repository/org/jgroups/jgroups/3.6.14.Final/jgroups-3.6.14.Final.jar

/Users/jblum/.m2/repository/commons-validator/commons-validator/1.6/commons-validator-1.6.jar

/Users/jblum/.m2/repository/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar

/Users/jblum/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar

/Users/jblum/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar

/Users/jblum/.m2/repository/commons-digester/commons-digester/2.1/commons-digester-2.1.jar

/Users/jblum/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
  /Users/jblum/.m2/repository/it/unimi/dsi/fastutil/8.1.1/fastutil-8.1.1.jar

/Users/jblum/.m2/repository/javax/resource/javax.resource-api/1.7/javax.resource-api-1.7.jar

/Users/jblum/.m2/repository/javax/transaction/javax.transaction-api/1.3/javax.transaction-api-1.3.jar
  /Users/jblum/.m2/repository/net/java/dev/jna/jna/4.5.2/jna-4.5.2.jar

/Users/jblum/.m2/repository/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar

/Users/jblum/.m2/repository/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar

/Users/jblum/.m2/repository/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-core/1.4.0/shiro-core-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-lang/1.4.0/shiro-lang-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-cache/1.4.0/shiro-cache-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-crypto-hash/1.4.0/shiro-crypto-hash-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-crypto-core/1.4.0/shiro-crypto-core-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-crypto-cipher/1.4.0/shiro-crypto-cipher-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-config-core/1.4.0/shiro-config-core-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-config-ogdl/1.4.0/shiro-config-ogdl-1.4.0.jar

/Users/jblum/.m2/repository/org/apache/shiro/shiro-event/1.4.0/shiro-event-1.4.0.jar

/Users/jblum/.m2/repository/io/github/lukehutch/fast-classpath-scanner/2.18.1/fast-classpath-scanner-2.18.1.jar

/Users/jblum/.m2/repository/com/healthmarketscience/rmiio/rmiio/2.1.2/rmiio-2.1.2.jar

/Users/jblum/.m2/repository/io/pivotal/gemfire/geode-common/9.5.1/geode-common-9.5.1.jar

/Users/jblum/.m2/repository/io/pivotal/gemfire/geode-json/9.5.1/geode-json-9.5.1.jar

/Users/jblum/.m2/repository/io/pivotal/gemfire/geode-cq/9.5.1/geode-cq-9.5.1.jar

/Users/jblum/.m2/repository/io/pivotal/gemfire/geode-lucene/9.5.1/geode-lucene-9.5.1.jar

/Users/jblum/.m2/repository/org/apache/lucene/lucene-analyzers-common/6.6.2/lucene-analyzers-common-6.6.2.jar

/Users/jblum/.m2/repository/org/apache/lucene/lucene-core/6.6.2/lucene-core-6.6.2.jar

/Users/jblum/.m2/repository/org/apache/lucene/lucene-queries/6.6.2/lucene-queries-6.6.2.jar

/Users/jblum/.m2/repository/org/apache/lucene/lucene-analyzers-phonetic/6.6.2/lucene-analyzers-phonetic-6.6.2.jar

/Users/jblum/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar

/Users/jblum/.m2/repository/org/apache/lucene/lucene-queryparser/6.6.2/lucene-queryparser-6.6.2.jar

/Users/jblum/.m2/repository/io/pivotal/gemfire/geode-wan/9.5.1/geode-wan-9.5.1.jar
  /Users/jblum/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar

/Users/jblum/.m2/repository/org/aspectj/aspectjweaver/1.9.2/aspectjweaver-1.9.2.jar

/Users/jblum/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar

/Users/jblum/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.8/jackson-databind-2.9.8.jar

/Users/jblum/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.8/jackson-core-2.9.8.jar

/Users/jblum/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar

/Users/jblum/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar

/Users/jblum/.m2/repository/org/springframework/session/spring-session-data-geode/2.1.2.RELEASE/spring-session-data-geode-2.1.2.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/session/spring-session-core/2.1.4.RELEASE/spring-session-core-2.1.4.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/shell/spring-shell/1.2.0.RELEASE/spring-shell-1.2.0.RELEASE.jar
  /Users/jblum/.m2/repository/com/google/guava/guava/17.0/guava-17.0.jar
  /Users/jblum/.m2/repository/jline/jline/2.12/jline-2.12.jar

/Users/jblum/.m2/repository/org/springframework/spring-context-support/5.1.5.RELEASE/spring-context-support-5.1.5.RELEASE.jar

/Users/jblum/.m2/repository/org/springframework/spring-beans/5.1.5.RELEASE/spring-beans-5.1.5.RELEASE.jar
  /Users/jblum/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar

/Users/jblum/pivdev/spring-data-examples-workspace/spring-session-data-gemfire-serialization-example/application-core-enums/target/classes

/Users/jblum/pivdev/spring-data-examples-workspace/spring-session-data-gemfire-serialization-example/application-core-model/target/classes

/Users/jblum/pivdev/spring-data-examples-workspace/spring-session-data-gemfire-serialization-example/application-ext-model/target/classes

/Users/jblum/.m2/repository/org/assertj/assertj-core/3.11.1/assertj-core-3.11.1.jar

/Users/jblum/.m2/repository/org/projectlombok/lombok/1.18.6/lombok-1.18.6.jar
  /Applications/IntelliJ IDEA 17 CE.app/Contents/lib/idea_rt.jar
Library Path:
  /Users/jblum/Library/Java/Extensions
  /Library/Java/Extensions
  /Network/Library/Java/Extensions
  /System/Library/Java/Extensions
  /usr/lib/java
  .
System Properties:
    PID = 16326
    awt.toolkit = sun.lwawt.macosx.LWCToolkit
...






On Thu, Feb 28, 2019 at 10:52 AM John Blum <jb...@pivotal.io> wrote:

> As an example of #1...
>
> I could use *Gfsh* (and, in certain cases, myself and other
> users/customers alike do start servers with *Gfsh*, [1]) , but
> alternatively and conveniently I could launch my servers with (preferably) 
> *Spring
> Boot* [2] or even using the GemFire API [3].
>
> All that is needed for [2] and [3] is a Maven POM, like so...
>
>
> https://github.com/jxblum/spring-session-data-gemfire-serialization-example/blob/master/native-gemfire-server/pom.xml#L24-L50
>
> As you can see, to launch [1], I need to figure out my classpath (which is
> entirely possible using the Maven POM) but cumbersome and a real PITA...
>
>
> https://github.com/jxblum/spring-session-data-gemfire-serialization-example/blob/master/native-gemfire-server/src/main/resources/geode/bin/start-cluster.gfsh#L13-L28
>
> Additionally, this is rather small and simple example.  A true enterprise
> application has literally hundreds of dependencies, not all of which would
> be required on the server classpath, but depending on the "feature" used, a
> fair amount would need to be on the servers' classpath for any reasonably
> practical/realistic application.
>
> -John
>
>
> [1]
> https://github.com/jxblum/spring-session-data-gemfire-serialization-example/blob/master/native-gemfire-server/src/main/resources/geode/bin/start-cluster.gfsh
> [2]
> https://github.com/jxblum/spring-session-data-gemfire-serialization-example/blob/master/spring-gemfire-server/src/main/java/example/app/gemfire/server/SpringGemFireServerApplication.java#L44-L61
> [3]
> https://github.com/jxblum/spring-session-data-gemfire-serialization-example/blob/master/native-gemfire-server/src/main/java/example/app/gemfire/server/NativeGemFireServerApplication.java
>
>
> On Thu, Feb 28, 2019 at 10:35 AM John Blum <jb...@pivotal.io> wrote:
>
>> Dan-
>>
>> 2 things:
>>
>> 1) Users and customers (alike), in certain cases, do launch Geode Servers
>> using Spring Boot, either with java -jar and a FAT JAR or other ways.
>>
>> 2) I have been saying for sometime now that I think it would be nice to
>> be able to launch a server using a classpath configured with a Maven POM
>> file, sort of like...
>>
>> gfsh> start server --name=X --maven-pom=/path/to/maven/pom.xml
>>
>> --mave-pom would set the server classpath accordingly and reliably.  All
>> too often, users/customers miss critical dependencies on the cluster
>> servers' classpath, especially transitive dependencies, that are required
>> by their application artifacts: custom CacheLoaders, Functions, etc.
>>
>> Food for thought.
>>
>> -John
>>
>>
>>
>>
>> On Thu, Feb 28, 2019 at 10:22 AM Dan Smith <dsm...@pivotal.io> wrote:
>>
>>> Currently, geode servers just have a flat classpath with all of the
>>> dependencies of all of the modules. Having the ability to add optional
>>> modules sounds like a good feature, though.
>>>
>>> John - what you are describing applies to maven dependencies - and I do
>>> think that we should isolate optional features into separate maven
>>> dependencies like geode-lucene. But that doesn't help with servers
>>> launched
>>> through gfsh start server unless we provide a way to configure which
>>> geode
>>> modules are present on the server's classpath.
>>>
>>> -Dan
>>>
>>> On Thu, Feb 28, 2019 at 10:03 AM John Blum <jb...@pivotal.io> wrote:
>>>
>>> > Well, that just requires that you appropriately declare dependencies
>>> with
>>> > the "optionality" and "scope" (e.g. "compile", "test", "provided",
>>> etc).
>>> >
>>> > Additionally, Geode modules could selectively pull in the required
>>> deps as
>>> > needed.  For example, `geode-lucene` would only pull in the Apache
>>> Lucene
>>> > dependencies if the `geode-lucene` module is used.
>>> >
>>> > No brainer.
>>> >
>>> > On Thu, Feb 28, 2019 at 9:47 AM Charlie Black <cbl...@pivotal.io>
>>> wrote:
>>> >
>>> > > Hopefully, we are thinking about classpath of the server and lazily
>>> > adding
>>> > > these jars only when a feature is turned on.
>>> > >
>>> > > On Thu, Feb 28, 2019 at 9:45 AM Dan Smith <dsm...@pivotal.io> wrote:
>>> > >
>>> > > > I see that geo, grumpy-core, and commons math came from adding
>>> > geospatial
>>> > > > support to redis -
>>> > > >
>>> > > >
>>> > >
>>> >
>>> https://github.com/apache/geode/commit/7bf02251fd047cb1cf575c01b80a9807108618da
>>> > > >
>>> > > > -Dan
>>> > > >
>>> > > > On Thu, Feb 28, 2019 at 9:41 AM Anthony Baker <aba...@pivotal.io>
>>> > wrote:
>>> > > >
>>> > > > > Looks a number of the new dependencies came in transitively with
>>> the
>>> > > > guava
>>> > > > > version bump.
>>> > > > >
>>> > > > > > On Feb 27, 2019, at 5:32 PM, Anthony Baker <aba...@pivotal.io>
>>> > > wrote:
>>> > > > > >
>>> > > > > > I was reviewing the release branch and noticed a number of new
>>> > > > > dependencies have been added since the last release.  When you
>>> add a
>>> > > new
>>> > > > > dependency, please review and follow the project license guide
>>> [1].
>>> > In
>>> > > > > particular, update the LICENSE file in
>>> geode-assembly/src/main/dist
>>> > > > > depending on the license type.
>>> > > > > >
>>> > > > > > Currently we need to update the LICENSE file with the
>>> additional
>>> > > > > MIT/BSD/CDDL dependencies.  We may also need to update NOTICE
>>> files.
>>> > > > > There’s also a version conflict with multiple versions of
>>> Jackson in
>>> > > use
>>> > > > > (2.9.6 / 2.9.8).
>>> > > > > >
>>> > > > > > @Sai - these need to be fixed on release/1.9.0
>>> > > > > >
>>> > > > > > Here’s the list of additions:
>>> > > > > >
>>> > > > > >       animal-sniffer-annotations-1.17.jar
>>> > > > > >       checker-qual-2.5.2.jar
>>> > > > > >       commons-math3-3.2.jar
>>> > > > > >       error_prone_annotations-2.2.0.jar
>>> > > > > >       failureaccess-1.0.jar
>>> > > > > >       geo-0.7.1.jar
>>> > > > > >       grumpy-core-0.2.2.jar
>>> > > > > >       istack-commons-runtime-2.2.jar
>>> > > > > >       j2objc-annotations-1.1.jar
>>> > > > > >       javax.activation-1.2.0.jar
>>> > > > > >       javax.activation-api-1.2.0.jar
>>> > > > > >       jsr305-3.0.2.jar
>>> > > > > >
>>> >  listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
>>> > > > > >
>>> > > > > > Removed:
>>> > > > > >
>>> > > > > >       activation-1.1.1
>>> > > > > >       jaxb-core-2.2.11.jar
>>> > > > > >
>>> > > > > > Anthony
>>> > > > > >
>>> > > > > > [1]
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> https://cwiki.apache.org/confluence/display/GEODE/License+Guide+for+Contributors
>>> > > > > <
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> https://cwiki.apache.org/confluence/display/GEODE/License+Guide+for+Contributors
>>> > > > > >
>>> > > > > >
>>> > > > >
>>> > > > >
>>> > > >
>>> > >
>>> > >
>>> > > --
>>> > > Charlie Black | cbl...@pivotal.io
>>> > >
>>> >
>>> >
>>> > --
>>> > -John
>>> > john.blum10101 (skype)
>>> >
>>>
>>
>>
>> --
>> -John
>> john.blum10101 (skype)
>>
>
>
> --
> -John
> john.blum10101 (skype)
>


-- 
-John
john.blum10101 (skype)

Reply via email to