Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
SOLVED

error in "deploy model to lcds":

Avatar

Level 1

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

0 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