Skip to content

Commit c4b5056

Browse files
committed
Initialisation error
1 parent 9cf9f90 commit c4b5056

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed

docs/trouble-shooting.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,29 @@ <h5>Typically stacktrace</h5>
201201

202202
<p>&nbsp;</p>
203203

204+
<h2 id="initialisation-error">Initialisation Error</h2>
205+
<p>
206+
ERROR: Unsupported initialisation of @OneToMany or @ManyToMany on: <em>&lt;className&gt;</em>
207+
fields: <em>&lt;field names&gt;</em>
208+
Refer: https://ebean.io/docs/trouble-shooting#initialisation-error
209+
</p>
210+
<p>
211+
This error is telling us that the ebean-agent is looking at some initialisation code for
212+
one of the OneToMany, ManyToMany or DbArray collections and that it is initialising an
213+
unsupported collection or in some way isn't supported.
214+
</p>
215+
<p>
216+
The supported initialisation for OneToMany, ManyToMany, DbArray collections are:
217+
</p>
218+
<ul>
219+
<li><b>List</b> - new ArrayList<>(), List.of(), Collections.emptyList()</li>
220+
<li><b>Set</b> - new LinkedHashSet<>(), Set.of(), Collections.emptySet()</li>
221+
<li><b>Map</b> - new LinkedHashMap<>(), Map.of(), Collections.emptyMap()</li>
222+
</ul>
223+
<h4>Actions</h4>
224+
<h5>1. Change the OneToMany, ManyToMany, DbArray fields to initialise to a supported collection type.</h5>
225+
226+
204227
<h2 id="datasource">DataSource user is null?</h2>
205228

206229
<h4>Actions</h4>

search.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@
143143
"keywords":"",
144144
"url":"/docs/query"
145145
}
146+
,{
147+
"title":"",
148+
"caption":"",
149+
"category":"Read Replicas",
150+
"priority":"0",
151+
"keywords":"",
152+
"url":"/docs/read-replicas"
153+
}
146154
,{
147155
"title":"",
148156
"caption":"",
@@ -1175,6 +1183,22 @@
11751183
"keywords":"",
11761184
"url":"/docs/database/postgres#ebean-postgres"
11771185
}
1186+
,{
1187+
"title":"Postgres / Array type",
1188+
"caption":"",
1189+
"category":"Database platforms",
1190+
"priority":"3",
1191+
"keywords":"",
1192+
"url":"/docs/database/postgres/arraytype"
1193+
}
1194+
,{
1195+
"title":"Postgres / PostGIS",
1196+
"caption":"",
1197+
"category":"Database platforms",
1198+
"priority":"3",
1199+
"keywords":"",
1200+
"url":"/docs/database/postgres/postgis"
1201+
}
11781202
,{
11791203
"title":"Redis - L2 cache",
11801204
"caption":"",
@@ -4095,6 +4119,78 @@
40954119
"keywords":"",
40964120
"url":"/docs/query/streaming#findStream"
40974121
}
4122+
,{
4123+
"title":"@Transaction(readOnly=true)",
4124+
"caption":"",
4125+
"category":"Read Replicas",
4126+
"priority":"3",
4127+
"keywords":"",
4128+
"url":"/docs/read-replicas#transactionReadOnly"
4129+
}
4130+
,{
4131+
"title":"Amazon AWS Aurora",
4132+
"caption":"",
4133+
"category":"Read Replicas",
4134+
"priority":"3",
4135+
"keywords":"",
4136+
"url":"/docs/read-replicas#aurora"
4137+
}
4138+
,{
4139+
"title":"DataSourceBuilder readOnlyUrl",
4140+
"caption":"",
4141+
"category":"Read Replicas",
4142+
"priority":"3",
4143+
"keywords":"",
4144+
"url":"/docs/read-replicas#readOnlyUrl"
4145+
}
4146+
,{
4147+
"title":"DatabaseBuilder readOnlyDataSource",
4148+
"caption":"",
4149+
"category":"Read Replicas",
4150+
"priority":"3",
4151+
"keywords":"",
4152+
"url":"/docs/read-replicas#readOnlyDataSource"
4153+
}
4154+
,{
4155+
"title":"Overview",
4156+
"caption":"",
4157+
"category":"Read Replicas",
4158+
"priority":"3",
4159+
"keywords":"",
4160+
"url":"/docs/read-replicas#overview"
4161+
}
4162+
,{
4163+
"title":"Query.usingMaster()",
4164+
"caption":"",
4165+
"category":"Read Replicas",
4166+
"priority":"3",
4167+
"keywords":"",
4168+
"url":"/docs/read-replicas#queryUseMaster"
4169+
}
4170+
,{
4171+
"title":"ReadOnly Database",
4172+
"caption":"",
4173+
"category":"Read Replicas",
4174+
"priority":"3",
4175+
"keywords":"",
4176+
"url":"/docs/read-replicas#readOnlyDatabase"
4177+
}
4178+
,{
4179+
"title":"Using the Master",
4180+
"caption":"",
4181+
"category":"Read Replicas",
4182+
"priority":"3",
4183+
"keywords":"",
4184+
"url":"/docs/read-replicas#usingMaster"
4185+
}
4186+
,{
4187+
"title":"Using the Read Replica",
4188+
"caption":"",
4189+
"category":"Read Replicas",
4190+
"priority":"3",
4191+
"keywords":"",
4192+
"url":"/docs/read-replicas#queryUseReadReplica"
4193+
}
40984194
,{
40994195
"title":"CI Testing",
41004196
"caption":"",

0 commit comments

Comments
 (0)