Expand my Community achievements bar.

SOLVED

error in "deploy model to lcds":

Avatar

Former Community Member

when I deploy model to lcds, I get the error as follow:

ERROR: The annotation "datasource" must be set on the model for deployment.

ERROR: Unknow annotation "datasource" on entity, "Nsrjbxx", include in the "DMS" annotation group.

the model is:

<model xmlns="http://ns.adobe.com/Fiber/1.0">

  <annotation name="ActionScriptGeneration">

    <item name="FullyQualifyReferences">true</item>

  </annotation>

  <entity name="Nsrjbxx" persistent="true">

    <annotation name="ServerProperties">

      <item name="ServerType">LCDS</item>

    </annotation>

    <annotation name="DMS">

      <item name="Table">nsrjbxx</item>

      <item name="datasource">java:/comp/env/jdbc/wkproxy</item>

    </annotation>

    <annotation name="RDS">

      <item name="introspectedColumns">Id,swglm,loginid,passwd,proxybs,wskpserver</item>

    </annotation>

    <annotation name="service Group">

      <item name="service">NsrjbxxService</item>

    </annotation>

    <id name="id" type="integer">

      <annotation name="DMS">

        <item name="ColumnName">Id</item>

      </annotation>

    </id>

    <property name="swglm" type="string" required="true" length="20">

      <annotation name="DMS">

        <item name="ColumnName">swglm</item>

      </annotation>

    </property>

    <property name="loginid" type="string" length="255">

      <annotation name="DMS">

        <item name="ColumnName">loginid</item>

      </annotation>

    </property>

    <property name="passwd" type="string" length="20">

      <annotation name="DMS">

        <item name="ColumnName">passwd</item>

      </annotation>

    </property>

    <property name="proxybs" type="string" length="255">

      <annotation name="DMS">

        <item name="ColumnName">proxybs</item>

      </annotation>

    </property>

    <property name="wskpserver" type="string" length="255">

      <annotation name="DMS">

        <item name="ColumnName">wskpserver</item>

      </annotation>

    </property>

  </entity>

</model>

Any help?

1 Accepted Solution

Avatar

Correct answer by
Level 8

The datasource is not actually set for the model, but for the entity. Add a DMS annotation with a datasource item  in the model element:

<model xmlns="http://ns.adobe.com/Fiber/1.0">

  <annotation name="ActionScriptGeneration">

    <item name="FullyQualifyReferences">true</item>

  </annotation>

<annotation name="DMS">

      <item name="datasource">java:/comp/env/jdbc/wkproxy</item>

</annotation>

<entity>

.

.

.

Setting the datasource for an entity is OK when you are overriding the default datasource that is set on the model.

Hope that helps

scott

View solution in original post

3 Replies

Avatar

Correct answer by
Level 8

The datasource is not actually set for the model, but for the entity. Add a DMS annotation with a datasource item  in the model element:

<model xmlns="http://ns.adobe.com/Fiber/1.0">

  <annotation name="ActionScriptGeneration">

    <item name="FullyQualifyReferences">true</item>

  </annotation>

<annotation name="DMS">

      <item name="datasource">java:/comp/env/jdbc/wkproxy</item>

</annotation>

<entity>

.

.

.

Setting the datasource for an entity is OK when you are overriding the default datasource that is set on the model.

Hope that helps

scott

Avatar

Employee

As Scott mentioned, you want to have the "datasource" annotation at the model level, not the entity level.  In the next release of Data Services (or if you are using ADEP now), you can have per-entity datasources, but not in LCDS 3.1.

Tom