cancel
Showing results for 
Search instead for 
Did you mean: 

Hybris SQL Server 2017 Usage Error

ersinv
Explorer
0 Kudos
616

Hi I want to use SQL Server with hybris but faced an error in initialize step. When I use MySql or HSQL database, I dont faced any issue. My Configuration:

     db.url=jdbc:sqlserver://localhost:1433;DatabaseName=TestDB;responseBuffering=adaptive;loginTimeout=10
     db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
     db.username=test
     db.password=pass
     db.tableprefix=

I faced an error in initialized step:

 [java] ERROR [main] [ExtensionManager] unexpected error notifying processing on session creation : null
      [java]  java.lang.NullPointerException: null
      [java]     at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) ~[?:1.8.0_121]
      [java]     at de.hybris.platform.persistence.property.PersistenceInfoCache.getCachedExternalTableTypes(PersistenceInfoCache.java:67) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.property.DBPersistenceManager.getExternalTableTypes(DBPersistenceManager.java:926) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.typecache.impl.DefaultFlexibleSearchTypeCacheProvider.getExternalTableTypes(DefaultFlexibleSearchTypeCacheProvider.java:134) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:90) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:75) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.FromClause.createSingleType(FromClause.java:86) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.FromClause.translateNested(FromClause.java:70) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.ParsedText$2.translate(ParsedText.java:292) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.FlexibleSearchTools.replace(FlexibleSearchTools.java:307) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.ParsedText.translate(ParsedText.java:286) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.FromClause.translate(FromClause.java:45) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.ParsedQuery.translate(ParsedQuery.java:467) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.ParsedQuery.getTranslatedQuery(ParsedQuery.java:237) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.persistence.flexiblesearch.QueryParser.translateQuery(QueryParser.java:233) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.translate(FlexibleSearch.java:2001) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1411) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1380) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloSession.search(JaloSession.java:2286) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloSession.search(JaloSession.java:2215) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.cronjob.jalo.CronJobManager.getRunningOrRestartedCronJobsForNode(CronJobManager.java:884) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.cronjob.jalo.CronJobManager.abortRunningCronJobsForClusterNode(CronJobManager.java:958) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.cronjob.jalo.CronJobManager.startupCronjobEngine(CronJobManager.java:351) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.cronjob.jalo.CronJobManager.onFirstSessionCreation(CronJobManager.java:342) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.jalo.extension.ExtensionManager.notifyOnFirstSessionCreation(ExtensionManager.java:292) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloSession.activate(JaloSession.java:789) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloSession.initSessionContext(JaloSession.java:381) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloSession.createInstance(JaloSession.java:258) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloConnection.createSession(JaloConnection.java:807) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloConnection.createSession(JaloConnection.java:758) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloConnection.createAnonymousCustomerSession(JaloConnection.java:676) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloConnection.createAnonymousCustomerSession(JaloConnection.java:646) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloSession.getCurrentSession(JaloSession.java:871) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.jalo.JaloSession.getCurrentSession(JaloSession.java:845) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.task.impl.DefaultTaskService$2.lambda$0(DefaultTaskService.java:557) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.task.impl.DefaultTaskService.lambda$0(DefaultTaskService.java:539) ~[processingserver.jar:?]
      [java]     at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.2.RELEASE.jar:?]
      [java]     at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:164) ~[spring-retry-1.2.2.RELEASE.jar:?]
      [java]     at de.hybris.platform.task.impl.DefaultTaskService.refreshCurrentSessionWithRetry(DefaultTaskService.java:539) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.task.impl.DefaultTaskService$2.run(DefaultTaskService.java:556) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.task.impl.DefaultTaskService.waitAndRunExclusiveAction(DefaultTaskService.java:820) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.task.impl.DefaultTaskService.init(DefaultTaskService.java:549) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.task.impl.DefaultTaskService$1.start(DefaultTaskService.java:160) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.cronjob.jalo.CronJobManager.startTaskEngine(CronJobManager.java:1879) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.cronjob.jalo.CronJobManager$CronJobTenantListener.afterTenantStartUp(CronJobManager.java:174) ~[processingserver.jar:?]
      [java]     at de.hybris.platform.core.BlockingTenantStartupNotifier.lambda$1(BlockingTenantStartupNotifier.java:119) ~[coreserver.jar:?]
      [java]     at de.hybris.platform.core.ClassLoaderUtils.executeWithWebClassLoaderParentIfNeeded(ClassLoaderUtils.java:42) [coreserver.jar:?]
      [java]     at de.hybris.platform.core.BlockingTenantStartupNotifier.notifyAllListeners(BlockingTenantStartupNotifier.java:106) [coreserver.jar:?]
      [java]     at de.hybris.platform.core.BlockingTenantStartupNotifier.executeStartupNotify(BlockingTenantStartupNotifier.java:73) [coreserver.jar:?]
      [java]     at de.hybris.platform.core.AbstractTenant.executeInitsIfNecessary(AbstractTenant.java:1318) [coreserver.jar:?]
      [java]     at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:678) [coreserver.jar:?]
      [java]     at de.hybris.platform.core.Registry.activateTenant(Registry.java:719) [coreserver.jar:?]
      [java]     at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:566) [coreserver.jar:?]
      [java]     at de.hybris.platform.core.Registry.activateMasterTenantForInit(Registry.java:635) [coreserver.jar:?]
      [java]     at de.hybris.platform.util.ClientExecuter.execute(ClientExecuter.java:39) [coreserver.jar:?]
      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
      [java]     at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
      [java]     at de.hybris.bootstrap.loader.Loader.execute(Loader.java:142) [ybootstrap.jar:?]
      [java]     at de.hybris.bootstrap.loader.Loader.main(Loader.java:118) [ybootstrap.jar:?]
 

Thanks.

former_member620692
Active Contributor
0 Kudos

We did not face any such issue with MS SQL Server. Two suggestions:

  1. Use databaseName instead of DatabaseName. It's just for convention and I do not think it should be causing an issue. Please refer Microsoft official site https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-2017 for reference.

  2. Please strictly follow the instructions mentioned at https://help.hybris.com/1808/hcd/8c10641f86691014ab1ad4f02d3be056.html

Even after this, if the issue persists, please raise a support ticket for a quick resolution.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member645853
Participant
0 Kudos

For me it was problem with connection to database. I've changed db.url.