Hi; I deployed war file of simple application with single entity with two attribute to test the deployment process of war file on the platform.
I did not change any configuration of xml file, i just created war file as stated in document and deployed it in a server. However i am getting this error message. i am wondering if i need to add bean configuration of entity factory in spring.xml file.
INFO myhostspot.com-startStop-1 org.apache.catalina.startup.HostConfig - Deploying web application archive /home/kyz/tomcat/webapps/myhostspot.com/app-core.war
INFO myhostspot.com-startStop-1 org.apache.catalina.core.ContainerBase.[Catalina].[myhostspot.com].[/app-core] - No Spring WebApplicationInitializer types detected on classpath
ERROR myhostspot.com-startStop-1 org.apache.catalina.core.ContainerBase.[Catalina].[myhostspot.com].[/app-core] - Exception sending context initialized event to listener instance of class com.haulmont.cuba.core.sys.AppContextLoader
java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [cuba-spring.xml]: Cannot resolve reference to bean 'cubaDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cubaDataSource' defined in class path resource [cuba-spring.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name [jdbc/CubaDS] is not bound in this Context. Unable to find [jdbc].
at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(AbstractWebAppContextLoader.java:60)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4751)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5175)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
presistant.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
<persistence-unit name="testWar" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
.....
<exclude-unlisted-classes/>
<properties>
<property name="eclipselink.cache.shared.default" value="false"/>
<property name="eclipselink.session-event-listener" value="com.haulmont.cuba.core.sys.persistence.EclipseLinkSessionEventListener"/>
<property name="eclipselink.target-database" value="com.haulmont.cuba.core.sys.persistence.CubaPostgreSQLPlatform"/>
<property name="eclipselink.weaving" value="static"/>
<property name="eclipselink.logging.logger" value="com.haulmont.cuba.core.sys.logging.EclipseLinkLog"/>
</properties>
</persistence-unit>
</persistence>
==============spring.xml file is as follows====
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.2.xsd">
<!-- Annotation-based beans -->
<context:component-scan base-package="com.company.testwar"/>
</beans>
thks