Facing java.net.UnknownHostException: D in starterstore-boot-1.0.1 local setup

I have followed the steps mentioned in below link.
https://documentation.bloomreach.com/12/library/solutions/commerce-starterstore/installation.html

While starting server i got below exception.

ERROR ResourceResolversInitializingThread [RepositoryMapResourceResolverProvider.refreshResourceResolvers:240] Failed to load child context for resource space, ‘productsResource’.
[INFO] [talledLocalContainer] org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.net.UnknownHostException: D
[INFO] [talledLocalContainer] at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:89) ~[spring-beans-4.3.18.RELEASE.jar:4.3.18.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283) ~[spring-context-4.3.18.RELEASE.jar:4.3.18.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:163) ~[spring-context-4.3.18.RELEASE.jar:4.3.18.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.18.RELEASE.jar:4.3.18.RELEASE]
[INFO] [talledLocalContainer] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[spring-context-4.3.18.RELEASE.jar:4.3.18.RELEASE]
[INFO] [talledLocalContainer] at org.onehippo.cms7.crisp.core.resource.RepositoryMapResourceResolverProvider.createChildApplicationContext(RepositoryMapResourceResolverProvider.java:314) ~[hippo-addon-crisp-core-2.6.1.jar:2.6.1]
[INFO] [talledLocalContainer] at org.onehippo.cms7.crisp.core.resource.RepositoryMapResourceResolverProvider.refreshResourceResolvers(RepositoryMapResourceResolverProvider.java:230) [hippo-addon-crisp-core-2.6.1.jar:2.6.1]
[INFO] [talledLocalContainer] at org.onehippo.cms7.crisp.core.resource.RepositoryMapResourceResolverProvider$ResourceResolversInitializingThread.run(RepositoryMapResourceResolverProvider.java:331) [hippo-addon-crisp-core-2.6.1.jar:2.6.1]
[INFO] [talledLocalContainer] Caused by: java.net.UnknownHostException: D

Still i have logged in to http://localhost:8080/cms/ .
while checking commercetool api connection (content->myproject->products->selecting any product document) getting below error.

An error has occurred, sorry for that.

org.onehippo.cms7.crisp.api.resource.ResourceException: No resource space for ‘commercetools’.
Failed to instantiate plugin class ‘org.onehippo.forge.exdocpicker.impl.field.ExternalDocumentFieldSelectorPlugin’ for wicket id ‘home.cluster.cms-static.plugin.servicesLoader.cluster.cms-services.plugin.hippostdEditorFactory.cluster.cms-preview.plugin.viewerPlugin.cluster.default.right.item’ in plugin ‘home.cluster.cms-static.plugin.servicesLoader.cluster.cms-services.plugin.hippostdEditorFactory.cluster.cms-preview.plugin.viewerPlugin.cluster.default.plugin.relatedextdocselector’ (JcrPluginConfig:/hippo:namespaces/starterstoreboot/productdecorator/editor:templates/default/relatedextdocselector)

Thanks,
Arun

Well, the nested exception is:
java.net.UnknownHostException

so it looks like you haven’t configured something correctly.

Hi Arun,

Thanks for reporting the problem. It looks like a bug that occurs on Windows machine. [1]
StarterStore-Boot has a custom properties loading bean definition in its CRISP registry configuration [2], in repository-data/application/src/main/resources/hcm-config/configuration/modules/crispregistry.yaml, like the following:

        >\r\n\r\n  <bean class=\"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer\"\
        >\r\n    <property name=\"location\" value=\"file://${catalina.base}/conf/hst.properties\"\
        \ />\r\n  </bean>\r\n\r\n  ...

The file:// url protocol seems to cause the problem like [1]. You might want to try it with adding one more slash for now.

Regards,

Woonsan

P.S. In the coming version, we’re removing that properties loading bean there at all, by instead reading the configuration through standard HST API, so this won’t happen again later.

[1] https://stackoverflow.com/questions/2680837/java-net-unknownhostexception-on-file-method
[2] https://documentation.bloomreach.com/library/concepts/crisp-api/configuring-crisp-addon.html

3 Likes

Thank you Woonsan. It’s working now.

Regards,
Arun