Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Fiber - Template error - ASOfflineAdapter

Avatar

Level 2

When I generate the offline adapters from my data model, I get following error:

template error in "ASOfflineAdapter.ftl": Method public fiber.gen.as.offline.SQLiteQueryGenerator fiber.gen.as.offline.OfflineHelper.getSQLiteQueryGenerator(java.lang.String) threw an exception when invoked on fiber.gen.as.offline.OfflineHelper@2ebe81 Mobile_App  Unknown Data Model Code Generation Marker

is this a known issue and is here already a solution for?

My data model contains 18 entities with several relationships between them.

Thx!

7 Replies

Avatar

Level 2

Ok, very simpel!

Don't use "Type" as a key in your entity.

Stupid mistake, but when you're searching for that...

Avatar

Employee

Sorry about that!

The generator probably should have caught that and thrown a meaningful error.  Can you post an FML entity snippet that reproduces the problem?  We can take a look at making this better in the future.

Tom

Avatar

Level 2

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

<annotation name="VisualModeler" x="634" y="12" width="115" height="78"/>

<annotation name="ServerProperties" ServerType="LCDS"/>

<annotation name="ActionScriptGeneration" OfflineAdapterPackage="com.mobility.offline" Package="com.mobility" ImplicitServicePackage="com.mobility.services" MDFPackage="com.mobility.form" GenerateOfflineAdapter="true"/>

<annotation name="JavaGeneration" Package="com.mobility.java" GenerateAssembler="true" AssemblerPackage="com.mobility.assembler"/>

<id name="ID" type="string" generated="true"/>

<id name="Type" type="string" generated="true"/>

<property name="Description" type="string"/>

</entity>

When the name of an id is "Type", the offline adapter file is generated empty with a error message.

Avatar

Level 2

I have opened a bug on this problem.

KenS

Data Services QE

Avatar

Level 2

We are not reproducing this issue using current builds of the modeler plugins.  Can you let us know what builds you are using.  Check plugin build number from the help/about eclipse dialog.  Click installation details. Copy the 'Installed Software' view's contents and reply.  Thanks.

Avatar

Level 2

This issue is not reproduced with more current modeler plugins.  If others run into this issue, please use the workaround.  The workaround is to not use keywords as names.