1 Reply Latest reply on Apr 19, 2017 5:58 AM by andey

    unable to deploy my project throwing following exception

    faiksheikh

      07:37:19,415 INFO  [ResolverUtil] Scanning for classes in [/home/jboss-4.2.3.GA-nmc/server/default/deploy/egov.ear/lib/dms.jar] matching criteria: org.apache.struts2.config.ClasspathPackageProvider$1@28d47c65

      07:37:19,419 INFO  [ResolverUtil] Scanning for classes in [/home/jboss-4.2.3.GA-nmc/server/default/tmp/deploy/tmp3540637106577812285egi.jar] matching criteria: org.apache.struts2.config.ClasspathPackageProvider$1@28d47c65

      07:37:19,473 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/BaseFormActionTest$1XYZ.class' due to a java.lang.NoClassDefFoundError with message: org/egov/web/actions/BaseFormActionTest

      07:37:19,477 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/BaseFormActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,481 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/common/HomepageActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,482 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/common/MailSenderActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,484 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/docmgmt/AjaxFileDownloadActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,487 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/docmgmt/BasicDocumentManagerActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,490 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/docmgmt/DocumentManagerActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,491 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/workflow/InboxActionTest$1.class' due to a java.lang.NoClassDefFoundError with message: org/egov/web/actions/workflow/InboxActionTest

      07:37:19,491 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/workflow/InboxActionTest$2.class' due to a java.lang.NoClassDefFoundError with message: org/egov/web/actions/workflow/InboxActionTest

      07:37:19,493 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/workflow/InboxActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,494 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/workflow/WorkflowAdminActionTest$1.class' due to a java.lang.NoClassDefFoundError with message: org/egov/web/actions/workflow/WorkflowAdminActionTest

      07:37:19,496 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/workflow/WorkflowAdminActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,508 INFO  [ResolverUtil] Scanning for classes in [/home/jboss-4.2.3.GA-nmc/server/default/tmp/deploy/tmp4230093891967957879egf.jar] matching criteria: org.apache.struts2.config.ClasspathPackageProvider$1@28d47c65

      07:37:19,596 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/bill/BillRegisterSearchActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,601 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/bill/SalaryBillRegisterActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,604 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/bill/SalaryBillRegisterViewActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,612 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/budget/BudgetReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,620 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/contra/ContraBTCActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,624 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/contra/ContraCTBActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,629 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/contra/PayInSlipActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,633 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/masters/AccountChequeActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,636 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/masters/ChartOfAccountsActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,640 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/payment/AdvanceRequisitionPaymentActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,642 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/payment/ConcurrenceReportActionTest$1.class' due to a java.lang.NoClassDefFoundError with message: org/egov/web/actions/payment/ConcurrenceReportActionTest

      07:37:19,645 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/payment/ConcurrenceReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,647 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/payment/OutstandingReportActionTest$1.class' due to a java.lang.NoClassDefFoundError with message: org/egov/web/actions/payment/OutstandingReportActionTest

      07:37:19,650 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/payment/OutstandingReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,654 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/payment/PaymentReversalActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,657 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/BalanceSheetReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,661 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/BankBookReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,665 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/BillPaymentVoucherPrintActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,668 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/BillRegisterReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,673 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/BudgetAppropriationRegisterReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,676 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/BudgetVarianceReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,680 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/ChequeIssueRegisterReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,682 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/ExpenseJournalVoucherPrintActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,685 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/IncomeExpenditureReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,688 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/report/PendingTDSReportActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,697 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/BaseVoucherActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,701 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/BillVoucherActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,705 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/CancelBillActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,710 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/CommonActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,715 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/JournalVoucherActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,719 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/JournalVoucherModifyActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,723 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/JournalVoucherPrintActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,730 WARN  [ResolverUtil] Could not examine class 'org/egov/web/actions/voucher/JournalVoucherReverseActionTest.class' due to a java.lang.NoClassDefFoundError with message: junit/framework/TestCase

      07:37:19,740 INFO  [ResolverUtil] Scanning for classes in [/home/jboss-4.2.3.GA-nmc/server/default/deploy/egov.ear/lib/license.jar] matching criteria: org.apache.struts2.config.ClasspathPackageProvider$1@28d47c65

      07:37:19,750 INFO  [ResolverUtil] Scanning for classes in [/home/jboss-4.2.3.GA-nmc/server/default/deploy/egov.ear/lib/veterinarylicense.jar] matching criteria: org.apache.struts2.config.ClasspathPackageProvider$1@28d47c65

      07:37:19,754 INFO  [ResolverUtil] Scanning for classes in [/home/jboss-4.2.3.GA-nmc/server/default/tmp/deploy/tmp8459409906296701354veterinarylicense-exp.war/WEB-INF/classes/org/egov/license/veterinary] matching criteria: org.apache.struts2.config.ClasspathPackageProvider$1@28d47c65

      07:39:46,317 WARN  [RootClass] composite-id class does not override equals(): org.egov.ptis.domain.entity.property.PropertyMaterlizeView

      07:39:46,317 WARN  [RootClass] composite-id class does not override hashCode(): org.egov.ptis.domain.entity.property.PropertyMaterlizeView

      07:39:46,331 WARN  [RootClass] composite-id class does not override equals(): org.egov.ptis.domain.entity.property.DefaultersMaterializedView

      07:39:46,331 WARN  [RootClass] composite-id class does not override hashCode(): org.egov.ptis.domain.entity.property.DefaultersMaterializedView

      07:39:46,333 WARN  [RootClass] composite-id class does not override equals(): org.egov.ptis.domain.entity.property.InstDmdCollMaterializeView

      07:39:46,333 WARN  [RootClass] composite-id class does not override hashCode(): org.egov.ptis.domain.entity.property.InstDmdCollMaterializeView

      07:39:46,334 WARN  [RootClass] composite-id class does not override equals(): org.egov.ptis.domain.entity.property.CollReportDetailsMV

      07:39:46,334 WARN  [RootClass] composite-id class does not override hashCode(): org.egov.ptis.domain.entity.property.CollReportDetailsMV

      07:39:46,399 WARN  [RootClass] composite-id class does not override equals(): org.egov.ptis.domain.entity.property.CurrFloorDmdCalcMaterializeView

      07:39:46,399 WARN  [RootClass] composite-id class does not override hashCode(): org.egov.ptis.domain.entity.property.CurrFloorDmdCalcMaterializeView

      07:39:46,412 INFO  [NamingHelper] JNDI InitialContext properties:{}

      07:39:46,412 ERROR [DatasourceConnectionProvider] Could not find datasource:

      java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to javax.sql.DataSource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)

        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)

        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)

        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)

        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)

        at org.egov.infstr.utils.HibernateUtil.createSessionFactory(HibernateUtil.java:124)

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:140)

        at org.egov.infstr.utils.HibernateUtil.getCurrentSession(HibernateUtil.java:281)

        at org.egov.infstr.utils.HibernateUtil.beginTransaction(HibernateUtil.java:321)

        at org.egov.infstr.scheduler.quartz.AbstractQuartzJob.executeInternal(AbstractQuartzJob.java:44)

        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

        at org.quartz.core.JobRunShell.run(JobRunShell.java:223)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

      07:39:46,418 ERROR [HibernateUtil] Error occurred in SessionFactory getSessionFactory

      org.hibernate.HibernateException: Could not find datasource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)

        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)

        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)

        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)

        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)

        at org.egov.infstr.utils.HibernateUtil.createSessionFactory(HibernateUtil.java:124)

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:140)

        at org.egov.infstr.utils.HibernateUtil.getCurrentSession(HibernateUtil.java:281)

        at org.egov.infstr.utils.HibernateUtil.beginTransaction(HibernateUtil.java:321)

        at org.egov.infstr.scheduler.quartz.AbstractQuartzJob.executeInternal(AbstractQuartzJob.java:44)

        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

        at org.quartz.core.JobRunShell.run(JobRunShell.java:223)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

      Caused by: java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to javax.sql.DataSource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)

        ... 15 more

      07:39:46,418 ERROR [JTAJobRunShell] Job PTIS_BILL_JOB_GROUP.PTISBillJob3 threw an unhandled Exception:

      java.lang.ExceptionInInitializerError

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:143)

        at org.egov.infstr.utils.HibernateUtil.getCurrentSession(HibernateUtil.java:281)

        at org.egov.infstr.utils.HibernateUtil.beginTransaction(HibernateUtil.java:321)

        at org.egov.infstr.scheduler.quartz.AbstractQuartzJob.executeInternal(AbstractQuartzJob.java:44)

        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

        at org.quartz.core.JobRunShell.run(JobRunShell.java:223)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

      Caused by: org.hibernate.HibernateException: Could not find datasource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)

        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)

        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)

        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)

        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)

        at org.egov.infstr.utils.HibernateUtil.createSessionFactory(HibernateUtil.java:124)

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:140)

        ... 6 more

      Caused by: java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to javax.sql.DataSource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)

        ... 15 more

      07:39:46,419 ERROR [ErrorLogger] Job (PTIS_BILL_JOB_GROUP.PTISBillJob3 threw an exception.

      org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ExceptionInInitializerError]

        at org.quartz.core.JobRunShell.run(JobRunShell.java:234)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

      Caused by: java.lang.ExceptionInInitializerError

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:143)

        at org.egov.infstr.utils.HibernateUtil.getCurrentSession(HibernateUtil.java:281)

        at org.egov.infstr.utils.HibernateUtil.beginTransaction(HibernateUtil.java:321)

        at org.egov.infstr.scheduler.quartz.AbstractQuartzJob.executeInternal(AbstractQuartzJob.java:44)

        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

        at org.quartz.core.JobRunShell.run(JobRunShell.java:223)

        ... 1 more

      Caused by: org.hibernate.HibernateException: Could not find datasource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)

        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)

        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)

        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)

        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)

        at org.egov.infstr.utils.HibernateUtil.createSessionFactory(HibernateUtil.java:124)

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:140)

        ... 6 more

      Caused by: java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to javax.sql.DataSource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)

        ... 15 more

      07:39:46,419 WARN  [LoggingJobHistoryPlugin] Job [PTIS_BILL_JOB_GROUP.PTISBillJob3] execution failed with exception: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ExceptionInInitializerError]

      org.quartz.JobExecutionException: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ExceptionInInitializerError] [See nested exception: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ExceptionInInitializerError]]

        at org.quartz.core.JobRunShell.run(JobRunShell.java:240)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

      Caused by: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ExceptionInInitializerError]

        at org.quartz.core.JobRunShell.run(JobRunShell.java:234)

        ... 1 more

      Caused by: java.lang.ExceptionInInitializerError

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:143)

        at org.egov.infstr.utils.HibernateUtil.getCurrentSession(HibernateUtil.java:281)

        at org.egov.infstr.utils.HibernateUtil.beginTransaction(HibernateUtil.java:321)

        at org.egov.infstr.scheduler.quartz.AbstractQuartzJob.executeInternal(AbstractQuartzJob.java:44)

        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

        at org.quartz.core.JobRunShell.run(JobRunShell.java:223)

        ... 1 more

      Caused by: org.hibernate.HibernateException: Could not find datasource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)

        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)

        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)

        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)

        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)

        at org.egov.infstr.utils.HibernateUtil.createSessionFactory(HibernateUtil.java:124)

        at org.egov.infstr.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:140)

        ... 6 more

      Caused by: java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to javax.sql.DataSource

        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)

        ... 15 more

        • 1. Re: unable to deploy my project throwing following exception
          andey

          Based on the stack trace, I'm guessing you are using a JNDI datasource.  Looks like you don't have the URL correct, you are resolving to the NamingContext rather than a datasource within that NamingContext.  Do a diff on the config file to see the before (working) and after (not working) datasource definitions.

           

          org.jnp.interfaces.NamingContext is definitely not a javax.sql.DataSource. I suspect you're just looking up the wrong address in JNDI. (NamingContext is a "directory" in the JNDI tree).

          Make sure you've configured JBoss to set up a JNDI DataSource at the same name - see JBoss docs below if you're unfamiliar with the process.

           

          Server Configuration Guide

          Getting Started Guide