Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geogig-dev] geogig-geoserver data store extension



On Thu, Sep 3, 2015 at 1:52 PM, <Schmidt.Sebastian2@xxxxxx> wrote:
Gabriel,

thanks for your quick reaction.

Got finally some features served as WMS. I really like the feature of switching branches on the Geoserver UI and having a different Branch displayed almost instantly.

Cool. Note you can also configure separate datastores out of the same repository but with each datastore pointing to a different branch. In case it helps with your use case.

 
As for full the stacktrace, I tried to attach it onto the first message
- perhaps the mailing list did steal it away. I would send it to you on PM if still desired.

No it didn't, it was just me jumping to the end of the message looking for the cheese and stopped when I figured the URI weirdness. Sorry. 

You're right, I traced it down to GeoServerStoreRepositoryResolver.java
(https://github.com/boundlessgeo/geoserver-exts/blob/master/geogig/src/main/java/org/geogig/geoserver/config/GeoServerStoreRepositoryResolver.java)
in the meantime.
For simplicity of prototyping I patched it a little on line 17:

old:
try {
             RepositoryInfo info = repositoryManager.get(repository);
             return URI.create(info.getLocation());
         } catch (IOException e) {
             throw Throwables.propagate(e);
         }

new:
try {
             RepositoryInfo info = repositoryManager.get(repository);
             return URI.create("file:/" + info.getLocation().replace("\\","/"));
         } catch (IOException e) {
             throw Throwables.propagate(e);
         }


Which works fine for my special use case, but would probably break on
linux machines or when different protocols are used (Repo accessed via http
on remote machines)...

Using forward slashes for paths also on windows machines generally helps
a lot for interoperability, but you need also the file: protocol in
front to make it work.

Great, I'll add a unit test to make sure we properly handle both cases.

Cheers,
Gabriel

Kind regards,
Sebastian
_______________________________________________
geogig-dev mailing list
geogig-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geogig-dev



--

Gabriel Roldán
Software Developer | Boundless
groldan@xxxxxxxxxxxxxxxx
@boundlessgeo



Back to the top