我似乎遇到了让geoserver使用内置geowebcache来创建tile的问题 .

我创建了一个名为geotiles的文件夹,我在系统环境变量中添加了该文件夹 . 我还补充说:

<context-param>
        <param-name>GEOWEBCACHE_CACHE_DIR</param-name>
        <param-value>C:\geotiles</param-value>
    </context-param>

进入geoserver / WEB-INF中的web.xml .

我已将项目设置为3857,4326和900913,目前位于900913 .

到目前为止,它已经在我的geotiles文件夹中创建了一个geowebcache.xml和一个tmp文件夹,但是关于它 . 到目前为止,我正在粘贴我的geowebcache.xml文件 .

<?xml version="1.0" encoding="utf-8"?>
<gwcConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://geowebcache.org/schema/1.5.0 http://geowebcache.org/schema/1.5.0/geowebcache.xsd" xmlns="http://geowebcache.org/schema/1.5.0">
  <version>1.5.0</version>
  <backendTimeout>120</backendTimeout>
  <gridSets>
    <gridSet>
      <name>CMA_EPSG:4326</name>
      <description>A default WGS84 tile matrix set where the first zoom level covers the world with two tiles on the horizonal axis and one tile over the vertical axis and each subsequent zoom level is calculated by half the resolution of its previous one.</description>
      <srs>
        <number>4326</number>
      </srs>
      <extent>
        <coords>
          <double>1830416.01738695</double>
          <double>-4142368.28270507</double>
          <double>3662526.00111207</double>
          <double>-2525543.22436482</double>
        </coords>
      </extent>
      <alignTopLeft>false</alignTopLeft>
      <resolutions>
        <double>0.703125</double>
        <double>0.3515625</double>
        <double>0.17578125</double>
        <double>0.087890625</double>
        <double>0.0439453125</double>
        <double>0.02197265625</double>
        <double>0.010986328125</double>
        <double>0.0054931640625</double>
        <double>0.00274658203125</double>
        <double>0.001373291015625</double>
        <double>6.866455078125E-4</double>
        <double>3.433227539062E-4</double>
        <double>1.716613769531E-4</double>
        <double>8.58306884766E-5</double>
        <double>4.29153442383E-5</double>
        <double>2.14576721191E-5</double>
        <double>1.07288360596E-5</double>
        <double>5.3644180298E-6</double>
        <double>2.6822090149E-6</double>
        <double>1.3411045074E-6</double>
        <double>6.705522537E-7</double>
        <double>3.352761269E-7</double>
      </resolutions>
      <metersPerUnit>111319.49079327358</metersPerUnit>
      <pixelSize>2.8E-4</pixelSize>
      <scaleNames>
        <string>EPSG:4326:0</string>
        <string>EPSG:4326:1</string>
        <string>EPSG:4326:2</string>
        <string>EPSG:4326:3</string>
        <string>EPSG:4326:4</string>
        <string>EPSG:4326:5</string>
        <string>EPSG:4326:6</string>
        <string>EPSG:4326:7</string>
        <string>EPSG:4326:8</string>
        <string>EPSG:4326:9</string>
        <string>EPSG:4326:10</string>
        <string>EPSG:4326:11</string>
        <string>EPSG:4326:12</string>
        <string>EPSG:4326:13</string>
        <string>EPSG:4326:14</string>
        <string>EPSG:4326:15</string>
        <string>EPSG:4326:16</string>
        <string>EPSG:4326:17</string>
        <string>EPSG:4326:18</string>
        <string>EPSG:4326:19</string>
        <string>EPSG:4326:20</string>
        <string>EPSG:4326:21</string>
      </scaleNames>
      <tileHeight>256</tileHeight>
      <tileWidth>256</tileWidth>
      <yCoordinateFirst>false</yCoordinateFirst>
    </gridSet>
    <gridSet>
      <name>CMA_EPSG:900913</name>
      <description>This well-known scale set has been defined to be compatible with Google Maps and Microsoft Live Map projections and zoom levels. Level 0 allows representing the whole world in a single 256x256 pixels. The next level represents the whole world in 2x2 tiles of 256x256 pixels and so on in powers of 2. Scale denominator is only accurate near the equator.</description>
      <srs>
        <number>900913</number>
      </srs>
      <extent>
        <coords>
          <double>1830416.01738695</double>
          <double>-4142368.28270507</double>
          <double>3662526.00111207</double>
          <double>-2525543.22436482</double>
        </coords>
      </extent>
      <alignTopLeft>false</alignTopLeft>
      <resolutions>
        <double>156543.03390625</double>
        <double>78271.516953125</double>
        <double>39135.7584765625</double>
        <double>19567.87923828125</double>
        <double>9783.939619140625</double>
        <double>4891.9698095703125</double>
        <double>2445.9849047851562</double>
        <double>1222.9924523925781</double>
        <double>611.4962261962891</double>
        <double>305.74811309814453</double>
        <double>152.87405654907226</double>
        <double>76.43702827453613</double>
        <double>38.218514137268066</double>
        <double>19.109257068634033</double>
        <double>9.554628534317017</double>
        <double>4.777314267158508</double>
        <double>2.388657133579254</double>
        <double>1.194328566789627</double>
        <double>0.5971642833948135</double>
        <double>0.2985821416974068</double>
        <double>0.1492910708487034</double>
        <double>0.0746455354243517</double>
      </resolutions>
      <metersPerUnit>1.0</metersPerUnit>
      <pixelSize>2.8E-4</pixelSize>
      <scaleNames>
        <string>EPSG:900913:0</string>
        <string>EPSG:900913:1</string>
        <string>EPSG:900913:2</string>
        <string>EPSG:900913:3</string>
        <string>EPSG:900913:4</string>
        <string>EPSG:900913:5</string>
        <string>EPSG:900913:6</string>
        <string>EPSG:900913:7</string>
        <string>EPSG:900913:8</string>
        <string>EPSG:900913:9</string>
        <string>EPSG:900913:10</string>
        <string>EPSG:900913:11</string>
        <string>EPSG:900913:12</string>
        <string>EPSG:900913:13</string>
        <string>EPSG:900913:14</string>
        <string>EPSG:900913:15</string>
        <string>EPSG:900913:16</string>
        <string>EPSG:900913:17</string>
        <string>EPSG:900913:18</string>
        <string>EPSG:900913:19</string>
        <string>EPSG:900913:20</string>
        <string>EPSG:900913:21</string>
      </scaleNames>
      <tileHeight>256</tileHeight>
      <tileWidth>256</tileWidth>
      <yCoordinateFirst>false</yCoordinateFirst>
    </gridSet>
    <gridSet>
      <name>CMA_EPSG:3857</name>
      <srs>
        <number>3857</number>
      </srs>
      <extent>
        <coords>
          <double>1830416.01738695</double>
          <double>-4142368.28270507</double>
          <double>3662526.00111207</double>
          <double>-2525543.22436482</double>
        </coords>
      </extent>
      <alignTopLeft>false</alignTopLeft>
      <resolutions>
        <double>156543.03390625</double>
        <double>78271.516953125</double>
        <double>39135.7584765625</double>
        <double>19567.87923828125</double>
        <double>9783.939619140625</double>
        <double>4891.9698095703125</double>
        <double>2445.9849047851562</double>
        <double>1222.9924523925781</double>
        <double>611.4962261962891</double>
        <double>305.74811309814453</double>
        <double>152.87405654907226</double>
        <double>76.43702827453613</double>
        <double>38.218514137268066</double>
        <double>19.109257068634033</double>
        <double>9.554628534317017</double>
        <double>4.777314267158508</double>
        <double>2.388657133579254</double>
        <double>1.194328566789627</double>
        <double>0.5971642833948135</double>
        <double>0.2985821416974068</double>
        <double>0.1492910708487034</double>
        <double>0.0746455354243517</double>
      </resolutions>
      <metersPerUnit>1.0</metersPerUnit>
      <pixelSize>2.8E-4</pixelSize>
      <scaleNames>
        <string>EPSG:3857_0</string>
        <string>EPSG:3857_1</string>
        <string>EPSG:3857_2</string>
        <string>EPSG:3857_3</string>
        <string>EPSG:3857_4</string>
        <string>EPSG:3857_5</string>
        <string>EPSG:3857_6</string>
        <string>EPSG:3857_7</string>
        <string>EPSG:3857_8</string>
        <string>EPSG:3857_9</string>
        <string>EPSG:3857_10</string>
        <string>EPSG:3857_11</string>
        <string>EPSG:3857_12</string>
        <string>EPSG:3857_13</string>
        <string>EPSG:3857_14</string>
        <string>EPSG:3857_15</string>
        <string>EPSG:3857_16</string>
        <string>EPSG:3857_17</string>
        <string>EPSG:3857_18</string>
        <string>EPSG:3857_19</string>
        <string>EPSG:3857_20</string>
        <string>EPSG:3857_21</string>
      </scaleNames>
      <tileHeight>256</tileHeight>
      <tileWidth>256</tileWidth>
      <yCoordinateFirst>false</yCoordinateFirst>
    </gridSet>
  </gridSets>
  <layers/>
</gwcConfiguration>

这就是我的geserver日志到目前为止的样子 .

2014-08-12 10:52:11,266 INFO [seed.GWCTask] - Thread group finished SEED task after 1.813 seconds
2014-08-12 10:52:11,266 ERROR [seed.MTSeeder] - Problem communicating with GeoServer
org.geowebcache.GeoWebCacheException: Problem communicating with GeoServer
    at org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:522)
    at org.geoserver.gwc.layer.GeoServerTileLayer.seedTile(GeoServerTileLayer.java:711)
    at org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:136)
    at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)
    at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)
    at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.security.authentication.InsufficientAuthenticationException: Cannot access WMS.GetMap as anonymous
    at org.geoserver.security.OperationSecurityCallback.operationDispatched(OperationSecurityCallback.java:71)
    at org.geoserver.ows.Dispatcher.fireOperationDispatchedCallback(Dispatcher.java:729)
    at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:724)
    at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:263)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    at org.geoserver.gwc.GWC.dispatchOwsRequest(GWC.java:1162)
    at org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:572)
    at org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:517)

这是我的缓存默认值的样子:

enter image description here

enter image description here

我也在我的geoserver日志中得到了这个:

2014-08-12 10:51:43,952 INFO [geoserver.gwc] - Saving GeoSeverTileLayer CMAInfo:tbl_drwg_zoning_outline
2014-08-12 10:51:43,952 INFO [file.FileBlobStore] - C:\geotiles\CMAInfo_tbl_drwg_zoning_outline does not exist or is not writable
2014-08-12 10:51:43,952 INFO [file.FileBlobStore] - C:\geotiles\CMAInfo_tbl_drwg_zoning_outline does not exist or is not writable
2014-08-12 10:51:43,952 INFO [file.FileBlobStore] - C:\geotiles\CMAInfo_tbl_drwg_zoning_outline does not exist or is not writable
2014-08-12 10:52:09,453 INFO [seed.SeedTask] - GWC Seeder Thread-1 begins seeding layer : CMAInfo:Base
2014-08-12 10:52:09,485 WARN [layer.MetaTile] - ********* Native JAI is not installed, meta tile cropping may be slow ********
2014-08-12 10:52:09,547 INFO [geoserver.wms]

这是我所有的图层,我在日志中得到它 . 我还认为它可能是我的文件夹访问权限,但我设置了用户和每个人都有完全读写访问权限,但仍然没有做任何事情 .

如果有人能告诉我,我是否遗漏了某些东西,或者缺少了一个步骤,或者我错过了什么 .