This discussion is archived
8 Replies Latest reply: Aug 9, 2013 10:16 AM by SatyaVenkat RSS

Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case

SatyaVenkat Newbie
Currently Being Moderated

Hi Group,

 

Getting error while executing AtgDust test case.Below is the log.

 

**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/Unable to resolve component /atg/commerce/catalog/CatalogToolsjava.lang.NullPointerException
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.commerce.catalog.CatalogTypeInfo.initialize(CatalogTypeInfo.java:254)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.commerce.catalog.CatalogTools.doStartService(CatalogTools.java:421)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.commerce.catalog.custom.CustomCatalogTools.doStartService(CustomCatalogTools.java:581)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at sn.commerce.catalog.SNCatalogTools.doStartService(SNCatalogTools.java:1482)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.GenericService.startService(GenericService.java:559)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.NucleusNameResolver.startService(NucleusNameResolver.java:1704)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.NucleusNameResolver.configureAndStartService(NucleusNameResolver.java:1375)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:907)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:666)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:647)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:492)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.Nucleus.resolveName(Nucleus.java:2620)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.GenericService.resolveName(GenericService.java:378)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at atg.nucleus.GenericService.resolveName(GenericService.java:413)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at sn.testscripts.FetchSkuWeightTest.testSkuWeightInInventory(FetchSkuWeightTest.java:82)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at java.lang.reflect.Method.invoke(Method.java:597)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestCase.runTest(TestCase.java:164)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestCase.runBare(TestCase.java:130)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestResult$1.protect(TestResult.java:106)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestResult.runProtected(TestResult.java:124)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestResult.run(TestResult.java:109)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestCase.run(TestCase.java:120)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestSuite.runTest(TestSuite.java:230)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at junit.framework.TestSuite.run(TestSuite.java:225)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:289)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:656)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:537)
**** ErrorTue Aug 06 16:58:09 IST 20131375788489948/

 

Can any one in this group help me on this issue.

 

Thanks,

Satya.

  • 1. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    Ricky S Explorer
    Currently Being Moderated

    did u include DCS module? looks like classpath don't have classes/resources jars from DCS module.

  • 2. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    SatyaVenkat Newbie
    Currently Being Moderated

    Hi,

     

    Below is the code which i used.

     

    public void setUp(){

    configDir = NucleusTestUtils.getConfigpath(this.getClass().getName(),true);

    copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/DAS/config"}, configDir.getAbsolutePath(), new String[] {".svn"});

      copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/DPS/config"}, configDir.getAbsolutePath(), new String[] {".svn"});

      copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/DCS/config"}, configDir.getAbsolutePath(), new String[] {".svn"});

      copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/DSS/config"}, configDir.getAbsolutePath(), new String[] {".svn"});

      copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/DAF/Deployment/config"}, configDir.getAbsolutePath(), new String[] {".svn"});

      copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/SN/Foundation/config/"}, configDir.getAbsolutePath(), new String[] {".svn"});

      copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/SN/BaseConfig/config/"}, configDir.getAbsolutePath(), new String[] {".svn"});

      copyConfigurationFiles(new String[] {"C:/ATG/ATG10.1.2/SN/Common/config/"}, configDir.getAbsolutePath(), new String[] {".svn"});

    }

     

    public void test(){
         mNucleus = NucleusTestUtils.startNucleus(configDir);

         mCatalogTools=(SNCatalogTools) mNucleus.resolveName("/atg/commerce/catalog/CatalogTools");

         assertNotNull(mCatalogTools);

    }


    Can you please look at this code.

    Is layer order is important?

    or can you please tell me the way how i can write this test case.


    Thanks,

    Satya.

  • 3. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    Ricky S Explorer
    Currently Being Moderated

    try below code -  i just did it for OOTB CatalogTools -

     

    public void test(){

              mNucleus =  NucleusTestUtils.startNucleusWithModules(new String[] { "DCS" },

                       this.getClass(),

                       this.getClass().getName(),

                       "/atg/commerce/catalog/CatalogTools");

     

    CatalogTools mCatalogTools=(CatalogTools) nucleus.resolveName("/atg/commerce/catalog/CatalogTools");

               

                 assertNotNull(mCatalogTools);

    }

  • 4. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    SatyaVenkat Newbie
    Currently Being Moderated

    Hi,

     

    Thanks for your reply,above code is working and resolving component.

    But it's connecting to HSQLDB Datasource db by  default.But i want to connect to real db (Oracle),how can i do this.

    But in my case we have Customized CatalogTools and customCatalog.xml .How can i resolve my Custom CatalogTools.

     

    Here is the log .

    Can you please look at the below bold lines in log,and let me know is it ok or any configuration need to be done.

    -------------------

    Testsuite: sn.testscripts.FetchSkuWeightTest

    Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 6.565 sec

    ------------- Standard Output ---------------

    **** info Wed Aug 07 08:06:48 IST 2013 1375843008724 /atg/dynamo/service/jdbc/FakeXADataSource HSQLDB DataSource starting with properties {URL=jdbc:hsqldb:mem:FakeXADataSource, user=sa, password=, driver=org.hsqldb.jdbcDriver}

    **** info Wed Aug 07 08:06:49 IST 2013 1375843009867 /atg/commerce/catalog/ProductCatalog Setting loadColumnInfosInSeparateThread to false.

    **** info Wed Aug 07 08:06:49 IST 2013 1375843009867 /atg/commerce/catalog/ProductCatalog

    **** info Wed Aug 07 08:06:49 IST 2013 1375843009867 /atg/commerce/catalog/ProductCatalog Initializing the primary GSA component and checking tables...

    **** info Wed Aug 07 08:06:49 IST 2013 1375843009867 /atg/commerce/catalog/ProductCatalog Disabled loading of column info for initial startup

    **** Warning Wed Aug 07 08:06:50 IST 2013 1375843010954 DistributorSender No remote servers configured

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011075 /atg/multisite/SiteRepository Setting loadColumnInfosInSeparateThread to false.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011076 /atg/multisite/SiteRepository

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011076 /atg/multisite/SiteRepository Initializing the primary GSA component and checking tables...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011076 /atg/multisite/SiteRepository Disabled loading of column info for initial startup

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011129 /atg/commerce/pricing/priceLists/PriceLists Setting loadColumnInfosInSeparateThread to false.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011129 /atg/commerce/pricing/priceLists/PriceLists

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011129 /atg/commerce/pricing/priceLists/PriceLists Initializing the primary GSA component and checking tables...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011129 /atg/commerce/pricing/priceLists/PriceLists Disabled loading of column info for initial startup

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011191 /atg/commerce/pricing/priceLists/PriceLists SQL Repository startup complete

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011371 /atg/commerce/pricing/priceLists/PriceLists Setting loadColumnInfosInSeparateThread to false.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011371 /atg/commerce/pricing/priceLists/PriceLists Restarting the GSA component to successfully load XML templates...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011391 /atg/commerce/pricing/priceLists/PriceLists SQL Repository startup complete

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011579 /atg/dynamo/server/SQLRepositoryEventServer Service /atg/dynamo/server/SQLRepositoryEventServer listening at http://SandeepKandari:55592/

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011579 /atg/commerce/pricing/priceLists/PriceLists Importing files...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011579 /atg/commerce/pricing/priceLists/PriceLists Importing files...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011579 /atg/commerce/pricing/priceLists/PriceLists No files specified for import.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011579 /atg/commerce/pricing/priceLists/PriceLists No files specified for import.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011579 /atg/commerce/pricing/priceLists/PriceLists Component finished starting up.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011579 /atg/commerce/pricing/priceLists/PriceLists Component finished starting up.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011582 /atg/multisite/SiteRepository SQL Repository startup complete

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011592 /atg/multisite/SiteRepository Setting loadColumnInfosInSeparateThread to false.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011592 /atg/multisite/SiteRepository Restarting the GSA component to successfully load XML templates...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011650 /atg/multisite/SiteRepository SQL Repository startup complete

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011673 /atg/multisite/SiteRepository Importing files...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011673 /atg/multisite/SiteRepository Importing files...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011673 /atg/multisite/SiteRepository No files specified for import.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011673 /atg/multisite/SiteRepository No files specified for import.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011673 /atg/multisite/SiteRepository Component finished starting up.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011673 /atg/multisite/SiteRepository Component finished starting up.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011759 /atg/commerce/catalog/ProductCatalog SQL Repository startup complete

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011828 /atg/commerce/catalog/ProductCatalog Setting loadColumnInfosInSeparateThread to false.

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011828 /atg/commerce/catalog/ProductCatalog Restarting the GSA component to successfully load XML templates...

    **** info Wed Aug 07 08:06:51 IST 2013 1375843011973 /atg/commerce/catalog/ProductCatalog SQL Repository startup complete

    **** info Wed Aug 07 08:06:52 IST 2013 1375843012132 /atg/commerce/catalog/ProductCatalog Importing files...

    **** info Wed Aug 07 08:06:52 IST 2013 1375843012132 /atg/commerce/catalog/ProductCatalog Importing files...

    **** info Wed Aug 07 08:06:52 IST 2013 1375843012133 /atg/commerce/catalog/ProductCatalog No files specified for import.

    **** info Wed Aug 07 08:06:52 IST 2013 1375843012133 /atg/commerce/catalog/ProductCatalog No files specified for import.

    **** info Wed Aug 07 08:06:52 IST 2013 1375843012133 /atg/commerce/catalog/ProductCatalog Component finished starting up.

    **** info Wed Aug 07 08:06:52 IST 2013 1375843012133 /atg/commerce/catalog/ProductCatalog Component finished starting up.

     

     

     

     

      Nucleus running, app server startup continuing

     

     

     

    ------------- ---------------- ---------------

    ------------- Standard Error -----------------

    Warning: Could not find resource "sn/testscripts/data/sn.testscripts.FetchSkuWeightTest" in CLASSPATH

    Aug 7, 2013 8:06:47 AM org.hibernate.validator.util.Version <clinit>

    INFO: Hibernate Validator 4.1.0.Final

    ------------- ---------------- ---------------

     

     

    Testcase: test took 6.565 sec

  • 5. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    Ricky S Explorer
    Currently Being Moderated

    create /atg/dynamo/service/jdbc/FakeXADataSource in ur application module's config folder.

     

    Populate the required connection details. then execute the following -

     

    public void test(){

              mNucleus =  NucleusTestUtils.startNucleusWithModules(new String[] { "DCS","UR_MODULE" },

                       this.getClass(),

                       this.getClass().getName(),

                       "/atg/commerce/catalog/CatalogTools");

     

    CatalogTools mCatalogTools=(CatalogTools) nucleus.resolveName("/atg/commerce/catalog/CatalogTools");

               

                 assertNotNull(mCatalogTools);

    }

     

     

    Should resolve ur customized catalog.

  • 6. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    SatyaVenkat Newbie
    Currently Being Moderated

    Hi ,

     

    Thank you ,it's resolving my custom catalog tools component.

    But still it's starting HSQLDB only even though i created /atg/dynamo/service/jdbc/FakeXADataSource in my module.

    Atgdust by default is using below Nucleus.properties only i think.If you know can you please tell how to override these Nucleus properties.I tried by writing Nucleus.properties in my module but this time also not working.

     

    Nucleus.properties .

    ------------------

    # Enable Class Replacement

    enableClassReplacement=true

    # Specify classes to be replaced when running in test mode

    classReplacementMap=\

    atg.adapter.gsa.GSARepository=atg.adapter.gsa.InitializingGSA,\

    atg.service.jdbc.FakeXADataSource=atg.service.jdbc.HSQLDBDataSource,\

    atg.service.idgen.SQLIdGenerator=atg.service.idgen.InitializingSQLIdGenerator,\

    atg.service.idgen.ObfuscatedSQLIdGenerator=atg.service.idgen.InitializingObfuscatedSQLIdGenerator

     

    Can you please look at this issue once.

     

    Thanks,

    Satya.

  • 7. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    Ricky S Explorer
    Currently Being Moderated

    i saw this Nucleus.properties file.

     

    As a Work around --

     

    try going to the atgDust.jar - in the above file remove -  atg.service.jdbc.FakeXADataSource=atg.service.jdbc.HSQLDBDataSource,\ and save in the jar.

     

    thn in the same jar modify the FakeXADataSource and add ur DB details.

     

    It will work..   " NOT THE BEST APPROACH THOUGH "

  • 8. Re: Getting error(Unable to resolve component CatalogTools) while executing AtgDust test case
    SatyaVenkat Newbie
    Currently Being Moderated

    Hi ,

     

    Thank you very much,it's working with above approach and resolving my custom CatalogTools component.

    But,if you place ProductCatalog.properties (atg/commerce/catalog/ProductCatalog.properties) and my customCatalog.xml file (atg/commerce/catalog/custom/customCatalog.xml) in to the atgdust.jar in the respected config path then only it's working fine.

     

    Instead of placing these file into the atgdust.jar,if there is any another approach you know could you please let me know.

     

    Thanks,

    Satya.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points