forked from wildfly/wildfly-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ControllerLogger.java
3739 lines (3208 loc) · 169 KB
/
ControllerLogger.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.controller.logging;
import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.ERROR;
import static org.jboss.logging.Logger.Level.INFO;
import static org.jboss.logging.Logger.Level.WARN;
import static org.jboss.logging.annotations.Message.NONE;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.file.Path;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CancellationException;
import javax.xml.namespace.QName;
import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.jboss.as.controller.ExpressionResolver;
import org.jboss.as.controller.ModelVersion;
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.OperationStepHandler;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.ProcessType;
import org.jboss.as.controller.UnauthorizedException;
import org.jboss.as.controller._private.OperationCancellationException;
import org.jboss.as.controller._private.OperationFailedRuntimeException;
import org.jboss.as.controller.access.rbac.UnknowRoleException;
import org.jboss.as.controller.capability.registry.RegistrationPoint;
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.as.controller.interfaces.InterfaceCriteria;
import org.jboss.as.controller.notification.Notification;
import org.jboss.as.controller.parsing.Element;
import org.jboss.as.controller.persistence.ConfigurationPersistenceException;
import org.jboss.as.controller.registry.OperationEntry;
import org.jboss.as.controller.registry.Resource;
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.ModelType;
import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
import org.jboss.logging.Logger.Level;
import org.jboss.logging.annotations.Cause;
import org.jboss.logging.annotations.LogMessage;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;
import org.jboss.logging.annotations.Param;
import org.jboss.modules.ModuleLoadException;
import org.jboss.modules.ModuleNotFoundException;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.StartException;
import org.yaml.snakeyaml.error.Mark;
import org.yaml.snakeyaml.nodes.NodeId;
/**
* @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
*/
@SuppressWarnings({"DefaultAnnotationParam", "deprecation"})
@MessageLogger(projectCode = "WFLYCTL", length = 4)
public interface ControllerLogger extends BasicLogger {
/**
* Default root logger with category of the package name.
*/
ControllerLogger ROOT_LOGGER = Logger.getMessageLogger(ControllerLogger.class, "org.jboss.as.controller");
/**
* Logger for management operation messages.
*/
ControllerLogger MGMT_OP_LOGGER = Logger.getMessageLogger(ControllerLogger.class, "org.jboss.as.controller.management-operation");
/**
* A logger for logging deprecated resources usage
*/
ControllerLogger DEPRECATED_LOGGER = Logger.getMessageLogger(ControllerLogger.class, "org.jboss.as.controller.management-deprecated");
/**
* A logger for access control related messages.
*/
ControllerLogger ACCESS_LOGGER = Logger.getMessageLogger(ControllerLogger.class, "org.jboss.as.controller.access-control");
/**
* Logs a warning message indicating the address, represented by the {@code address} parameter, could not be
* resolved, so cannot match it to any InetAddress.
*
* @param address the address that could not be resolved.
*/
@LogMessage(level = WARN)
@Message(id = 1, value = "Cannot resolve address %s, so cannot match it to any InetAddress")
void cannotResolveAddress(String address);
/**
* Logs an error message indicating there was an error booting the container.
*
* @param cause the cause of the error.
*/
@LogMessage(level = ERROR)
@Message(id = 2, value = "Error booting the container")
void errorBootingContainer(@Cause Throwable cause);
/**
* Logs an error message indicating there was an error booting the container.
*
* @param cause the cause of the error.
* @param bootStackSize the boot stack size.
* @param name the property name to increase the boot stack size.
*/
@LogMessage(level = ERROR)
@Message(id = 3, value = "Error booting the container due to insufficient stack space for the thread used to " +
"execute boot operations. The thread was configured with a stack size of [%1$d]. Setting " +
"system property %2$s to a value higher than [%1$d] may resolve this problem.")
void errorBootingContainer(@Cause Throwable cause, long bootStackSize, String name);
/**
* Logs an error message indicating the class, represented by the {@code className} parameter, caught exception
* attempting to revert the operation, represented by the {@code op} parameter, at the address, represented by the
* {@code address} parameter.
*
* @param cause the cause of the error.
* @param className the name of the class that caught the error.
* @param op the operation.
* @param address the address.
*/
@LogMessage(level = ERROR)
@Message(id = 4, value = "%s caught exception attempting to revert operation %s at address %s")
void errorRevertingOperation(@Cause Throwable cause, String className, String op, PathAddress address);
/**
* Logs an error message indicating a failure to execute the operation, represented by the {@code op} parameter, at
* the address represented by the {@code path} parameter.
*
* @param cause the cause of the error.
* @param op the operation.
* @param path the path the operation was executed on.
*/
@LogMessage(level = ERROR)
@Message(id = 5, value = "Failed executing operation %s at address %s")
void failedExecutingOperation(@Cause Throwable cause, ModelNode op, PathAddress path);
/**
* Logs an error message indicating a failure executing the subsystem, represented by the {@code name} parameter,
* boot operations.
*
* @param cause the cause of the error.
* @param name the name of subsystem.
*/
@LogMessage(level = ERROR)
@Message(id = 6, value = "Failed executing subsystem %s boot operations")
void failedSubsystemBootOperations(@Cause Throwable cause, String name);
/**
* Logs an error message indicating to failure to close the resource represented by the {@code closeable} parameter.
*
* @param cause the cause of the error.
* @param closeable the resource.
*/
@LogMessage(level = ERROR)
@Message(id = 7, value = "Failed to close resource %s")
void failedToCloseResource(@Cause Throwable cause, Closeable closeable);
/**
* Logs an error message indicating to failure to close the resource represented by the {@code writer} parameter.
*
* @param cause the cause of the error.
* @param writer the resource.
*/
@LogMessage(level = ERROR)
void failedToCloseResource(@Cause Throwable cause, XMLStreamWriter writer);
/**
* Logs an error message indicating to failure to close the resource represented by the {@code reader} parameter.
*
* @param cause the cause of the error.
* @param reader the resource.
*/
@LogMessage(level = ERROR)
void failedToCloseResource(@Cause Throwable cause, XMLStreamReader reader);
/**
* Logs an error message indicating a failure to persist configuration change.
*
* @param cause the cause of the error.
*/
@LogMessage(level = ERROR)
@Message(id = 8, value = "Failed to persist configuration change")
void failedToPersistConfigurationChange(@Cause Throwable cause);
/**
* Logs an error message indicating a failure to store the configuration file.
*
* @param cause the cause of the error.
* @param name the name of the configuration.
*/
@LogMessage(level = ERROR)
@Message(id = 9, value = "Failed to store configuration to %s")
void failedToStoreConfiguration(@Cause Throwable cause, String name);
/**
* Logs an error message indicating an invalid value for the system property, represented by the {@code name}
* parameter, was found.
*
* @param value the invalid value.
* @param name the name of the system property.
* @param defaultValue the default value being used.
*/
@LogMessage(level = ERROR)
@Message(id = 10, value = "Invalid value %s for system property %s -- using default value [%d]")
void invalidSystemPropertyValue(String value, String name, int defaultValue);
/**
* Logs a warning message indicating the address, represented by the {@code address} parameter, is a wildcard
* address and will not match any specific address.
*
* @param address the wildcard address.
* @param inetAddress the inet-address tag.
* @param anyAddress the any-address tag.
*/
@LogMessage(level = WARN)
@Message(id = 11, value = "Address %1$s is a wildcard address, which will not match against any specific address. Do not use " +
"the '%2$s' configuration element to specify that an interface should use a wildcard address; " +
"use '%3$s'")
void invalidWildcardAddress(String address, String inetAddress, String anyAddress);
// /**
// * Logs an error message indicating no handler for the step operation, represented by the {@code stepOpName}
// * parameter, at {@code address}.
// *
// * @param stepOpName the step operation name.
// * @param address the address
// * @deprecated use {@link #noSuchResourceType(PathAddress)} or {@link #noHandlerForOperation(String, PathAddress)}
// */
// @LogMessage(level = ERROR)
// @Message(id = 12, value = "No handler for %s at address %s")
// void noHandler(String stepOpName, PathAddress address);
/**
* Logs an error message indicating operation failed.
*
* @param cause the cause of the error.
* @param op the operation that failed.
* @param opAddress the address the operation failed on.
*/
@LogMessage(level = ERROR)
@Message(id = 13, value = "Operation (%s) failed - address: (%s)")
void operationFailed(@Cause Throwable cause, ModelNode op, ModelNode opAddress);
/**
* Logs an error message indicating operation failed.
*
* @param op the operation that failed.
* @param opAddress the address the operation failed on.
* @param failureDescription the failure description.
*/
@LogMessage(level = ERROR)
@Message(id = Message.INHERIT, value = "Operation (%s) failed - address: (%s) - failure description: %s")
void operationFailed(ModelNode op, ModelNode opAddress, ModelNode failureDescription);
// WFCORE-792 -- no longer used
// /**
// * Logs an error message indicating operation failed.
// *
// * @param cause the cause of the error.
// * @param op the operation that failed.
// * @param opAddress the address the operation failed on.
// * @param propertyName the boot stack size property name.
// * @param defaultSize the default boot stack size property size.
// */
// @LogMessage(level = ERROR)
// @Message(id = 14, value = "Operation (%s) failed - address: (%s) -- due to insufficient stack space for the thread used to " +
// "execute operations. If this error is occurring during server boot, setting " +
// "system property %s to a value higher than [%d] may resolve this problem.")
// void operationFailedInsufficientStackSpace(@Cause Throwable cause, ModelNode op, ModelNode opAddress, String propertyName, int defaultSize);
/**
* Logs a warning message indicating a wildcard address was detected and will ignore other interface criteria.
*/
@LogMessage(level = WARN)
@Message(id = 15, value = "Wildcard address detected - will ignore other interface criteria.")
void wildcardAddressDetected();
/**
* Logs a warning message indicating an invocation on a {@link org.jboss.as.controller.ProxyController} did not provide a final response.
*/
@LogMessage(level = ERROR)
@Message(id = 16, value = "Received no final outcome response for operation %s with address %s from remote " +
"process at address %s. The result of this operation will only include the remote process' preliminary response to " +
"the request.")
void noFinalProxyOutcomeReceived(ModelNode op, ModelNode opAddress, ModelNode proxyAddress);
/**
* Logs an error message indicating operation failed due to a client error (e.g. an invalid request).
*
* @param op the operation that failed.
* @param opAddress the address the operation failed on.
* @param failureDescription the failure description.
*/
@LogMessage(level = Logger.Level.DEBUG)
@Message(id = 17, value = "Operation (%s) failed - address: (%s) - failure description: %s")
void operationFailedOnClientError(ModelNode op, ModelNode opAddress, ModelNode failureDescription);
// /**
// * Logs an error indicating that createWrapper should be called
// *
// * @param name the subsystem name
// */
// @LogMessage(level = Logger.Level.WARN)
// @Message(id = 18, value = "A subsystem '%s' was registered without calling ExtensionContext.createTracker(). The subsystems are registered normally but won't be cleaned up when the extension is removed.")
// void registerSubsystemNoWrapper(String name);
/**
* Logs a warning message indicating graceful shutdown of native management request handling
* communication did not complete within the given timeout period.
*
* @param timeout the timeout, in ms.
*/
@LogMessage(level = Logger.Level.WARN)
@Message(id = 19, value = "Graceful shutdown of the handler used for native management requests did not complete within [%d] ms but shutdown of the underlying communication channel is proceeding")
void gracefulManagementChannelHandlerShutdownTimedOut(int timeout);
/**
* Logs a warning message indicating graceful shutdown of native management request handling
* communication failed.
*
* @param cause the timeout, in ms.
*/
@LogMessage(level = Logger.Level.WARN)
@Message(id = 20, value = "Graceful shutdown of the handler used for native management requests failed but shutdown of the underlying communication channel is proceeding")
void gracefulManagementChannelHandlerShutdownFailed(@Cause Throwable cause);
/**
* Logs a warning indicating an invalid value for how long to wait for active management operations to clear before allowing a communication channel close to proceed.
* @param cause the the cause of the failure
* @param propertyName the name of the system property
* @param propValue the value provided
*/
@LogMessage(level = Logger.Level.WARN)
@Message(id = 21, value = "Invalid value '%s' for system property '%s' -- value must be convertible into an int")
void invalidChannelCloseTimeout(@Cause NumberFormatException cause, String propertyName, String propValue);
/**
* Logs a warning message indicating multiple addresses or nics matched the selection criteria provided for
* an interface
*
* @param interfaceName the name of the interface configuration
* @param addresses the matching addresses
* @param nis the matching nics
* @param inetAddress the selected address
* @param networkInterface the selected nic
*/
@LogMessage(level = Logger.Level.WARN)
@Message(id = 22, value = "Multiple addresses or network interfaces matched the selection criteria for interface '%s'. Matching addresses: %s. Matching network interfaces: %s. The interface will use address %s and network interface %s.")
void multipleMatchingAddresses(String interfaceName, Set<InetAddress> addresses, Set<String> nis, InetAddress inetAddress, String networkInterface);
/**
* Logs a warning message indicating multiple addresses or nics matched the selection criteria provided for
* an interface
*
* @param toMatch the name of the interface configuration
* @param addresses the matching addresses
* @param nis the matching nics
*/
@LogMessage(level = Logger.Level.WARN)
@Message(id = 23, value = "Value '%s' for interface selection criteria 'inet-address' is ambiguous, as more than one address or network interface available on the machine matches it. Because of this ambiguity, no address will be selected as a match. Matching addresses: %s. Matching network interfaces: %s.")
void multipleMatchingAddresses(String toMatch, Set<InetAddress> addresses, Set<String> nis);
/**
* Logs an error message indicating the target definition could not be read.
*
* @param cause the cause of the error.
*/
@LogMessage(level = Level.ERROR)
@Message(id = 24, value = "Could not read target definition!")
void cannotReadTargetDefinition(@Cause Throwable cause);
// /**
// * Logs an error message indicating a failure to transform.
// *
// * @param cause the cause of the error.
// */
// @LogMessage(level = Level.ERROR)
// @Message(id = 25, value = "Could not transform")
// void cannotTransform(@Cause Throwable cause);
//
// /**
// * Logs a warning message indicating the there is not transformer for the subsystem.
// *
// * @param subsystemName the subsystem name
// * @param major the major version
// * @param minor the minor version
// */
// @LogMessage(level = Level.WARN)
// @Message(id = 26, value = "We have no transformer for subsystem: %s-%d.%d model transfer can break!")
// void transformerNotFound(String subsystemName, int major, int minor);
/**
* Logs a warning message indicating that an operation was interrupted before service stability was reached
*/
@LogMessage(level = Level.ERROR)
@Message(id = 27, value = "Operation was interrupted before service container stability could be reached. Process should be restarted. Step that first updated the service container was '%s' at address '%s'")
void interruptedWaitingStability(String operation, PathAddress address);
@LogMessage(level = Level.INFO)
@Message(id = 28, value = "Attribute '%s' in the resource at address '%s' is deprecated, and may be removed in " +
"a future version. See the attribute description in the output of the read-resource-description operation " +
"to learn more about the deprecation.")
void attributeDeprecated(String name, String address);
/**
* Logs a warning message indicating a temp file could not be deleted.
*
* @param name temp filename
*/
@LogMessage(level = Level.WARN)
@Message(id = 29, value = "Cannot delete temp file %s, will be deleted on exit")
void cannotDeleteTempFile(String name);
@Message(id = 30, value = "No resource definition is registered for address %s")
String noSuchResourceType(PathAddress address);
@Message(id = 31, value = "No operation named '%s' exists at address %s")
String noHandlerForOperation(String operationName, PathAddress address);
@Message(id = 32, value = "There were problems during the transformation process for target host: '%s' %nProblems found: %n%s")
@LogMessage(level = WARN)
void transformationWarnings(String hostName, Set<String> problems);
@Message(id = 33, value = "Extension '%s' is deprecated and may not be supported in future versions")
@LogMessage(level = INFO)
void extensionDeprecated(String extensionName);
@Message(id = 34, value = "Subsystems %s provided by legacy extension '%s' are not supported on servers running this version. " +
"The extension is only supported for use by hosts running a previous release in a mixed-version managed domain. " +
"On this server the extension will not register any subsystems, and future attempts to create or address " +
"subsystem resources on this server will result in failure.")
@LogMessage(level = INFO)
void ignoringUnsupportedLegacyExtension(List<String> subsystemNames, String extensionName);
/**
* Logs an error message indicating that updating the audit log failed
*/
@LogMessage(level = Level.ERROR)
@Message(id = 35, value = "Update of the management operation audit log failed")
void failedToUpdateAuditLog(@Cause Exception e);
/**
* Logs an error message indicating that audit logging is being disabled due to logging failures.
*/
@LogMessage(level = Level.ERROR)
@Message(id = 36, value = "[%d] consecutive management operation audit logging failures have occurred; disabling audit logging")
void disablingLoggingDueToFailures(short failureCount);
/**
* Logs an error message indicating that a handler failed writing a log message
*/
@LogMessage(level = Level.ERROR)
@Message(id = 37, value = "Update of the management operation audit log failed in handler '%s'")
void logHandlerWriteFailed(@Cause Throwable t, String name);
/**
* Logs an error message indicating that audit logging is being disabled due to logging failures.
*/
@LogMessage(level = Level.ERROR)
@Message(id = 38, value = "[%d] consecutive management operation audit logging failures have occurred in handler '%s'; disabling this handler for audit logging")
void disablingLogHandlerDueToFailures(int failureCount, String name);
/**
* Creates an exception indicating the {@code name} is already defined.
*
* @param name the name that is already defined.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 39, value = "%s already defined")
XMLStreamException alreadyDefined(String name, @Param Location location);
// /**
// * Creates an exception indicating the {@code value} has already been declared.
// *
// * @param name the attribute name.
// * @param value the value that has already been declared.
// * @param location the location of the error.
// *
// * @return a {@link XMLStreamException} for the error.
// */
// @Message(id = 40, value = "%s %s already declared")
// XMLStreamException alreadyDeclared(String name, String value, @Param Location location);
/**
* Creates an exception indicating the {@code value} has already been declared.
*
* @param name the attribute name.
* @param value the value that has already been declared.
* @param parentName the name of the parent.
* @param parentValue the parent value.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 41, value = "A %s %s already declared has already been declared in %s %s")
XMLStreamException alreadyDeclared(String name, String value, String parentName, String parentValue, @Param Location location);
/**
* Creates an exception indicating the {@code value} has already been declared.
*
* @param name1 the first attribute name.
* @param name2 the second attribute name.
* @param value the value that has already been declared.
* @param parentName the name of the parent.
* @param parentValue the parent value.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 42, value = "A %s or a %s %s already declared has already been declared in %s %s")
XMLStreamException alreadyDeclared(String name1, String name2, String value, String parentName, String parentValue, @Param Location location);
/**
* Creates an exception indicating the {@code type} with the {@code name} is already registered at the
* {@code location}.
*
* @param type the type.
* @param name the name.
* @param location the location.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 43, value = "An %s named '%s' is already registered at location '%s'")
IllegalArgumentException alreadyRegistered(String type, String name, String location);
/**
* Creates an exception indicating an ambiguous file name was found as there are multiple files ending in the
* {@code suffix} were found in the directory.
*
* @param backupType the backup type.
* @param searchDir the search directory.
* @param suffix the file suffix.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 44, value = "Ambiguous configuration file name '%s' as there are multiple files in %s that end in %s")
IllegalStateException ambiguousConfigurationFiles(String backupType, File searchDir, String suffix);
/**
* Creates an exception indicating an ambiguous name, represented by the {@code prefix} parameter, was found in
* the directory, represented by the {@code dir} parameter.
*
* @param prefix the file prefix.
* @param dir the search directory.
* @param files the ambiguous files.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 45, value = "Ambiguous name '%s' in %s: %s")
IllegalArgumentException ambiguousName(String prefix, String dir, Collection<String> files);
// /**
// * Creates an exception indicating a thread was interrupted waiting for a response for asynch operation.
// *
// * @return a {@link RequestProcessingException} for the error.
// */
// @Message(id = 46, value = "Thread was interrupted waiting for a response for asynch operation")
// RequestProcessingException asynchOperationThreadInterrupted();
//
// /**
// * Creates an exception indicating no asynch request with the batch id, represented by the {@code batchId}
// * parameter.
// *
// * @param batchId the batch id.
// *
// * @return a {@link RequestProcessingException} for the error.
// */
// @Message(id = 47, value = "No asynch request with batch id %d")
// RequestProcessingException asynchRequestNotFound(int batchId);
/**
* A message indicating the attribute, represented by the {@code attributeName} parameter, is not writable.
*
* @param attributeName the attribute name.
*
* @return the message.
*/
@Message(id = 48, value = "Attribute %s is not writable")
String attributeNotWritable(String attributeName);
// /**
// * A message indicating the attribute, represented by the {@code attributeName} parameter, is a registered child of
// * the resource.
// *
// * @param attributeName the name of the attribute.
// * @param resource the resource the attribute is a child of.
// *
// * @return the message.
// */
// @Message(id = 49, value = "'%s' is a registered child of resource (%s)")
// String attributeRegisteredOnResource(String attributeName, ModelNode resource);
/**
* Creates an exception indicating the inability to determine a default name based on the local host name.
*
* @param cause the cause of the error.
*
* @return a {@link RuntimeException} for the error.
*/
@Message(id = 50, value = "Unable to determine a default name based on the local host name")
RuntimeException cannotDetermineDefaultName(@Cause Throwable cause);
/**
* Creates an exception indicating the file could not be created.
*
* @param path the path to the file.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 51, value = "Could not create %s")
IllegalStateException cannotCreate(String path);
/**
* Creates an exception indicating the file could not be deleted.
*
* @param file the file to delete.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 52, value = "Could not delete %s")
IllegalStateException cannotDelete(File file);
/**
* Creates an exception indicating a submodel cannot be registered with a {@code null} path.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 53, value = "Cannot register submodels with a null PathElement")
IllegalArgumentException cannotRegisterSubmodelWithNullPath();
// /**
// * Creates an exception indicating a non-runtime-only submodel cannot be registered with a runtime-only parent.
// *
// * @return an {@link IllegalArgumentException} for the error.
// */
// @Message(id = 54, value = "Cannot register non-runtime-only submodels with a runtime-only parent")
// IllegalArgumentException cannotRegisterSubmodel();
/**
* Creates an exception indicating the inability to remove the {@code name}.
*
* @param name the name.
*
* @return an {@link OperationFailedRuntimeException} for the error.
*/
@Message(id = 55, value = "Cannot remove %s")
OperationFailedRuntimeException cannotRemove(String name);
/**
* Creates an exception indicating the file could not be renamed.
*
* @param fromPath the from file.
* @param toPath the to file.
*
*/
@LogMessage(level = Level.ERROR)
@Message(id = 56, value = "Could not rename %s to %s")
void cannotRename(@Cause IOException ioe, Path fromPath, Path toPath);
/**
* Creates an exception indicating the inability to write the {@code name}.
*
* @param name the name.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 57, value = "Cannot write to %s")
IllegalArgumentException cannotWriteTo(String name);
/**
* Creates an exception indicating a child, represented by the {@code childName} parameter, of the parent element,
* represented by the {@code parentName} parameter, has already been declared.
*
* @param childName the child element name.
* @param parentName the parent element name.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 58, value = "Child %s of element %s already declared")
XMLStreamException childAlreadyDeclared(String childName, String parentName, @Param Location location);
/**
* Creates an exception indicating the canonical file for the boot file could not be found.
*
* @param cause the cause of the error.
* @param file the boot file.
*
* @return an {@link RuntimeException} for the error.
*/
@Message(id = 59, value = "Could not get canonical file for boot file: %s")
RuntimeException canonicalBootFileNotFound(@Cause Throwable cause, File file);
/**
* Creates an exception indicating the canonical file for the main file could not be found.
*
* @param cause the cause of the error.
* @param file the main file.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 60, value = "Could not get canonical file for main file: %s")
IllegalStateException canonicalMainFileNotFound(@Cause Throwable cause, File file);
// /**
// * A message indicating the channel is closed.
// *
// * @return the message.
// */
// @Message(id = 61, value = "Channel closed")
// String channelClosed();
/**
* A message indicating the composite operation failed and was rolled back.
*
* @return the message.
*/
@Message(id = 62, value = "Composite operation failed and was rolled back. Steps that failed:")
String compositeOperationFailed();
/**
* A message indicating the composite operation was rolled back.
*
* @return the message.
*/
@Message(id = 63, value = "Composite operation was rolled back")
String compositeOperationRolledBack();
/**
* Creates an exception indicating a configuration file whose complete name is the same as the {@code backupType} is
* not allowed.
*
* @param backupType the backup type.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 64, value = "Configuration files whose complete name is %s are not allowed")
IllegalArgumentException configurationFileNameNotAllowed(String backupType);
/**
* Creates an exception indicating no configuration file ending in the {@code suffix} was found in the directory,
* represented by the {@code dir} parameter.
*
* @param suffix the suffix.
* @param dir the search directory.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 65, value = "No configuration file ending in %s found in %s")
IllegalStateException configurationFileNotFound(String suffix, File dir);
/**
* Creates an exception indicating the directory. represented by the {@code pathName} parameter, was not found.
*
* @param pathName the path name.
*
* @return an {@link IllegalArgumentException} for the error.
*/
@Message(id = 66, value = "No directory %s was found")
IllegalArgumentException directoryNotFound(String pathName);
/**
* Creates an exception indicating either the {@code remoteName} or the {@code localName} domain controller
* configuration must be declared.
*
* @param remoteName the remote element name.
* @param localName the local element name.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 67, value = "Either a %s or %s domain controller configuration must be declared.")
XMLStreamException domainControllerMustBeDeclared(String remoteName, String localName, @Param Location location);
/**
* Creates an exception indicating an attribute, represented by the {@code name} parameter, has already been
* declared.
*
* @param name the attribute name.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 68, value = "An attribute named '%s' has already been declared")
XMLStreamException duplicateAttribute(String name, @Param Location location);
/**
* Creates an exception indicating a duplicate declaration.
*
* @param name the name of the duplicate entry.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 69, value = "Duplicate %s declaration")
XMLStreamException duplicateDeclaration(String name, @Param Location location);
/**
* Creates an exception indicating a duplicate declaration.
*
* @param name the name of the duplicate entry.
* @param value the duplicate entry.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 70, value = "Duplicate %s declaration %s")
XMLStreamException duplicateDeclaration(String name, String value, @Param Location location);
/**
* Creates an exception indicating ad duplicate path element, represented by the {@code name} parameter, was found.
*
* @param name the name of the duplicate entry.
*
* @return an {@link OperationFailedRuntimeException} for the error.
*/
@Message(id = 71, value = "Duplicate path element '%s' found")
OperationFailedRuntimeException duplicateElement(String name);
/**
* Creates an exception indicating a duplicate interface declaration.
*
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 72, value = "Duplicate interface declaration")
XMLStreamException duplicateInterfaceDeclaration(@Param Location location);
/**
* Creates an exception indicating an element, represented by the {@code name} parameter, has already been
* declared.
*
* @param name the element name.
* @param location the location of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 73, value = "An element of this type named '%s' has already been declared")
XMLStreamException duplicateNamedElement(String name, @Param Location location);
// /**
// * Creates an exception indicating a duplicate profile was included.
// *
// * @param location the location of the error.
// *
// * @return a {@link XMLStreamException} for the error.
// */
// @Message(id = 74, value = "Duplicate profile included")
// XMLStreamException duplicateProfile(@Param Location location);
/**
* Creates an exception indicating the resource is a duplicate.
*
* @param name the name of the resource.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 75, value = "Duplicate resource %s")
IllegalStateException duplicateResource(String name);
/**
* Creates an exception indicating the resource type is a duplicate.
*
* @param type the duplicate type.
*
* @return an {@link IllegalStateException} for the error.
*/
@Message(id = 76, value = "Duplicate resource type %s")
IllegalStateException duplicateResourceType(String type);
// /**
// * A message indicating the element, represented by the {@code name} parameter, is not supported the file,
// * represented by the {@code file} parameter.
// *
// * @param name the name of the element.
// * @param fileName the file name.
// *
// * @return the message.
// */
// @Message(id = 77, value = "Element %s is not supported in a %s file")
// String elementNotSupported(String name, String fileName);
// /**
// * A message indicating an error waiting for Tx commit/rollback.
// *
// * @return the message.
// */
// @Message(id = 78, value = "Error waiting for Tx commit/rollback")
// String errorWaitingForTransaction();
/**
* Creates an exception indicating a failure to initialize the module.
*
* @param cause the cause of the error.
* @param name the name of the module.
*
* @return a {@link RuntimeException} for the error.
*/
@Message(id = 79, value = "Failed initializing module %s")
RuntimeException failedInitializingModule(@Cause Throwable cause, String name);
/**
* A message indicating the failed services.
*
* @return the message.
*/
@Message(id = 80, value = "Failed services")
String failedServices();
/**
* Creates an exception indicating a failure to backup the file, represented by the {@code file} parameter.
*
* @param cause the cause of the error.
* @param file the file that failed to backup.
*
* @return a {@link ConfigurationPersistenceException} for the error.
*/
@Message(id = 81, value = "Failed to back up %s")
ConfigurationPersistenceException failedToBackup(@Cause Throwable cause, File file);
/**
* Creates an exception indicating a failure to create backup copies of configuration the file, represented by the
* {@code file} parameter.
*
* @param cause the cause of the error.
* @param file the configuration file that failed to backup.
*
* @return a {@link ConfigurationPersistenceException} for the error.
*/
@Message(id = 82, value = "Failed to create backup copies of configuration file %s")
ConfigurationPersistenceException failedToCreateConfigurationBackup(@Cause Throwable cause, File file);
/**
* Creates an exception indicating a failure to load a module.
*
* @param cause the cause of the error.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = 83, value = "Failed to load module")
XMLStreamException failedToLoadModule(@Cause Throwable cause);
/**
* Creates an exception indicating a failure to load a module.
*
* @param cause the cause of the error.
* @param name the module name.
*
* @return a {@link XMLStreamException} for the error.
*/
@Message(id = Message.INHERIT, value = "Failed to load module %s")
XMLStreamException failedToLoadModule(@Cause Throwable cause, String name);
/**
* Creates an exception indicating a failure to marshal the configuration.
*
* @param cause the cause of the error.
*
* @return a {@link ConfigurationPersistenceException} for the error.
*/
@Message(id = 84, value = "Failed to marshal configuration")
ConfigurationPersistenceException failedToMarshalConfiguration(@Cause Throwable cause);