Hello,
<br><br>
I have problem in the development of CRUD with JPA. I am working with NWDS EC 7.1 Ehp1 SP2. I have the following DCs:<br><br>
- <b>Dictionary</b>(deploy whit successfully)<br><br>
- <b>EJB</b> (deploy whit successfully)<br><br>
-
Entity
<br>@Entity
<br>@Table(name="<TABLE_NAME>", schema="SAPSR3DB")
<br>public class BusinessProcess implements Serializable {
<br> ....
<br>}
<br>* I also already tried without the scheme
<br><br>------- Session
<br>@Stateless(name="KpiSessionBean")
<br>public class KpiSessionBean implements KpiSessionLocal {
<br> <t>@PersistenceContext(unitName="kpiUnit")
<br> protected EntityManager em;
<br> ....
<br>}
<br><br>------- persistence.xml
<br><persistence-unit name="kpiUnit">
<br> <jta-data-source>CUSTOM_ALIAS</jta-data-source>
<br> </persistence-unit>
<br></persistence>
<br><br>-.<b>EAR Application</b> (deploy whit successfully)
-
data-source-aliases.xml
<data-source-aliases xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="data-source-aliases.xsd">
<br> <application-name>kpi2bpm/app</application-name>
<br> <aliases>
<br> <data-source-name>CUSTOM_DS</data-source-name>
<br> <alias>CUSTOM_ALIAS</alias>
<br> </aliases>
<br>;</data-source-aliases>
<br><br>-.<b>EAR DataSource</b> (deploy whit successfully)
<br><br>----
data-sources.xml
<br>;<data-sources>
<br>;<data-source>
<br> <data-source-name>CUSTOM_DS</data-source-name>
<br> <driver-name>SYSTEM_DRIVER</driver-name>
<br> <sql-engine>native_sql</sql-engine>
<br> <jdbc-1.x>
<br> <driver-class-name>oracle.jdbc.driver.OracleDriver</driver-class-name>
<br> <url>jdbc:oracle:thin:@<i><host>:<port>:<SID></i></url>
<br> <user-name><i><user></i></user-name>
<br> <password>*****</password>
</jdbc-1.x>
<br>;<data-source>
<br>;</data-sources>
<br>* I tried with sql-engine: native_sql, open_sql and vendor_sql.
<br>**.: In <i>nwa / Configuration Management / Infrastructure / Application Resources</i> the DataSource and Alias are with state fully available.
<br><br>- <b>WD CRUD</b> (deploy whit successfully)
<br><br><br>During the execute of the method create employee i am getting the following error: <b>u201CCould not get a value to be injected from the factory. u201C</b>
<br><br>
u2026u2026
<br>sap.engine.services.ejb3.runtime.impl.StatelessInstanceLifecycleManager.access$000 (StatelessInstanceLifecycleManager.java:23)
<br>at com.sap.engine.services.ejb3.runtime.impl.StatelessInstanceLifecycleManager$PoolUserImpl.createObject(StatelessInstanceLifecycleManager.java:34)
<br>at com.sap.engine.services.ejb3.util.pool.ContainerPoolImpl.doResizeOneStepUp(ContainerPoolImpl.java:373)
<br>... 103 more
<br>Caused by: com.sap.engine.lib.injection.InjectionException: Injection on field em of instance <br>br.com.braskem.kpi.ejb.session.KpiSessionBean@2ed53897 failed. <b>Could not get a value to be injected from the factory.</b>
<br>at com.sap.engine.lib.injection.FieldInjector.inject(FieldInjector.java:115)
<br>at com.sap.engine.lib.injection.InjectionMatrix.inject(InjectionMatrix.java:45)
<br>at com.sap.engine.services.ejb3.runtime.impl.Interceptors_DependencyInjection.invoke(Interceptors_DependencyInjection.java:22)
<br>... 119 more
<br>Caused by: java.lang.RuntimeException: The persistence unit is inconsistent with the database schema:
<br><b>Error on entity >><i><ENTITY_NAME></i><<: The table >><i><TABLE_NAME></i><< does not exist.</b>
<br>u2026u2026
<br><br>I checked in <i>nwa/ Problem Management / Database / Open SQL Data Browser</i> the table exist, and also registered in C_DDDBTABLERT table.
<br><br>Any pointers to trouble shoot this ?
<br>Thank you very much!!