But after adding dependency to starterStore and making this default from channel setting
I am getting NoSuchBeanDefinitionException from spring in ModuleInstanceImple.java
“bean = (T) applicationContext.getBean(requiredType);”.
Did you set the “Module Name” field in your connector document to com.born.commercedxp.bison.connectors.bigcommerceconnector?
Did you make the dependency of your module be included in both cms and site war projects? In other words, can you find your module jar file in cms/WEB-INF/lib/ and site/WEB-INF/lib?
Thanks for the response.
Yes I have given module name as you have mentioned and jar was only available in cms lib , so i tried making it available in site lib too but still facing same issue.
Do you have a bean, of type c.b.c.api.v2.connector.provider.ConnectorRepositoryProvider [1] in the xml file, which must be src/main/resources/META-INF/spring-assembly/addon/com/born/commercedxp/bison/connectors/bigcommerceconnector/*.xml, of your module?
And, can you check if you have the starterstore-api-x.x.x.jar file only in ${catalina.base}/shared/lib, nowhere else.
Inside spring-assembly in base.xml below is the bean I have configured which extends
com.bloomreach.commercedxp.api.v2.connector.provider.AbstractConnectorRepositoryProvider
I verified starterstore-api-x.x.x.jar only available inside shared/lib ,
still facing same issue.
one more doubt:
demo-connector is working fine if I follow the document. but if I change module name(which should be unique and should be same in connector module name in cms and in module.xml ) its not able to find the module. So are there any restrictions to define module name which I need to be aware of.
No, this actually is exact same as demo connector only package names I have changed yet.
I have created new module and followed same classes and configs from demo connector(only names changed) , response is from same static file “demoproducts.json”. No logic changes.
I did debug and found that module instance is available but while trying to get component from that instance below line not able to load the bean from that module inside ModuleInstanceImpl.java.
applicationContext.getBean(requiredType)
So some how container not getting my class loaded.
And yes I have verified the document to be published.
Can you test it again after changing the maven coordinates (groupId, artifactId and version) of your connector module and update the dependency accordingly if you didn’t?
If not working, could you show some contents of the connector jar file like the following?
Suppose that you have webapps/cms/WEB-INF/lib/starterstore-connectors-bigcommerce-x.x.x.jar.
# print file list of the jar
jar tvf webapps/cms/WEB-INF/lib/starterstore-connectors-bigcommerce-x.x.x.jar
# print module.xml using unzip or you can extract the jar to copy and paste...
unzip -p webapps/cms/WEB-INF/lib/starterstore-connectors-bigcommerce-x.x.x.jar META-INF/hst-assembly/addon/module.xml
# print the beans xml file using unzip or you can extract the jar to copy and paste...
unzip -p webapps/cms/WEB-INF/lib/starterstore-connectors-bigcommerce-x.x.x.jar META-INF/spring-assembly/addon/...../connector-base.xml
In your debugger, is the name member or #getName() property of the ModuleInstance the same as what you configured in <name>...</name> in the module.xml and in your connector cms document?
Hi Woonsan
Yes, I able to see the “name” member as I have configured.
Below are the details
1)jar tvf webapps\cms\WEB-INF\lib\bigcommerceconnector-2.0.0.jar
0 Thu May 09 15:12:52 IST 2019 META-INF/
142 Thu May 09 15:12:50 IST 2019 META-INF/MANIFEST.MF
0 Thu May 09 15:12:48 IST 2019 com/
0 Thu May 09 15:12:48 IST 2019 com/born/
0 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/
0 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/
0 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/
0 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/
0 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/
0 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/
0 Thu May 09 15:12:44 IST 2019 com.born.commercedxp.bison.connectors.bigcommerceconnector/
0 Thu May 09 15:12:44 IST 2019 META-INF/hst-assembly/
0 Thu May 09 15:12:44 IST 2019 META-INF/hst-assembly/addon/
0 Thu May 09 15:12:44 IST 2019 META-INF/spring-assembly.addon.com.born.commercedxp.bison.connectors.bigcommerceconnector/
2602 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoCartEntryModel.class
3125 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoCartModel.class
2038 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoCategoryModel.class
1595 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoCustomerModel.class
1581 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoData.class
1614 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoMoneyAmount.class
1146 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoPrice.class
5386 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoProductItem.class
2062 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/model/MyDemoResponse.class
458 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/MyDemoConstants.class
622 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/BCConnectorRepositoryProviderImpl.class
2582 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoAddressRepositoryImpl.class
1141 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoCartRepositoryImpl$1.class
7597 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoCartRepositoryImpl.class
3794 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoCategoryRepositoryImpl.class
4357 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoCustomerRepositoryImpl.class
1462 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoDataLoader$LazyHolder.class
983 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoDataLoader.class
3885 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoOrderRepositoryImpl.class
7016 Thu May 09 15:12:48 IST 2019 com/born/commercedxp/bison/connectors/bigcommerceconnector/repository/MyDemoProductRepositoryImpl.class
9457 Thu May 09 15:12:44 IST 2019 com.born.commercedxp.bison.connectors.bigcommerceconnector/demoproducts.json
1168 Thu May 09 15:12:44 IST 2019 META-INF/hst-assembly/addon/module.xml
3534 Thu May 09 15:12:44 IST 2019 META-INF/spring-assembly.addon.com.born.commercedxp.bison.connectors.bigcommerceconnector/base.xml
0 Thu May 09 15:12:54 IST 2019 META-INF/maven/
0 Thu May 09 15:12:54 IST 2019 META-INF/maven/com.born.commercedxp.bison.connectors/
0 Thu May 09 15:12:54 IST 2019 META-INF/maven/com.born.commercedxp.bison.connectors/bigcommerceconnector/
4969 Thu May 09 08:53:20 IST 2019 META-INF/maven/com.born.commercedxp.bison.connectors/bigcommerceconnector/pom.xml
147 Thu May 09 15:12:52 IST 2019 META-INF/maven/com.born.commercedxp.bison.connectors/bigcommerceconnector/pom.properties