context : My Objective is to create two custom tables that will be added or created in the joget database when my custom plugin is installed
the exception is thrown from this line →
ProductsDao productdao = (ProductsDao) AppContext.getInstance().getAppContext().getBean("productsDao");
and in productsApplicationContext.xml
the datasource property is referring to a bean called setupDataSource which is not found at runtime , which is why i think its throwing this exception .
<bean id="productSessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="setupDataSource"/>
<property name="mappingResources">
<list>
<value>/org/joget/sample/products/model/Products.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.format_sql">false</prop>
</props>
</property>
</bean>