Quantcast
Channel: IDMware
Viewing all 34 articles
Browse latest View live

XMA/ECMA call-based export does not support multi-valued attribute-level deltas

$
0
0
Here's a seemingly undocumented feature of the XMA/ECMA. I've got an XMA that's doing call-based exports, and I've noticed that it doesn't contain atomic add & remove operations at the item level in a multi-valued attribute list. Instead, it's giving me the entire list of items in the object's current state.

This is interesting, because when I look at the pending export in the sync engine, I see the atomic operations.




When I examine the arguments passed into the ExportEntry API call, I see a Replace at the top level, but nothing on the multi-valued attribute (member in this case).

[ExportEntry]

modificationType: Replace
changedAttributes: member
csentry: [Microsoft.MetadirectoryServices.Impl.CSEntryMAImpl] CS Role CN=ROLE-CRM-Test1
DN: CN=ROLE-CRM-Test1
ObjectClass: Microsoft.MetadirectoryServices.Impl.GenericValueCollection
ObjectType: Role
RDN: CN=ROLE-CRM-Test1
displayName [String] ROLE-CRM-Test1
member [Reference] CN=007528
CN=dev.userA
CN=dev.userB
CN=dev.userC
CN=dev.userD
CN=dev.userE
CN=dev.userF
(Wouldn't it be nice if you could just serialize the CSEntry object?)

So, I looked around on the forums, and sure enough, Markus confirms my observation:

"If members is in the list of changed attributes, the member attribute of the CSEntry contains the most recent value for this attribute.

"If you need to determine the individual change for each member, you need to calculate this. The ECMA doesn’t provide multi-valued attribute level changes."


Rebecca Croft also informs me that not even the file-based export supports item-level deltas on multi-valued attributes.

I'd love to be proven wrong about this...

RS1.EXE works with SSRS 2008 R2 with SP1

$
0
0
Thanks to my anonymous friend, Baptiste Lefrançois, it appears that my RS1.exe build still works with SQL Server Reporting Services 2008 R2, but you need Service Pack 1. Here's my original post:


And here's the description, in my gracious friend's own words:

"Hello Joe,

Thanks for your help, I've understood my mistake but finally my problem was an official bug of SQL Server Report Service. I just want to tell you how I resolved it for next person who will be in the same situation. My problem was the LogonUser didn't return any cookie, and my authCookie was always null, never affected :( The specific error message was : "Authorization ticket not received by LogonUser". But I've already followed all recommended procedures on the msdn but never resolve my problem. My authentication form on ReportServer page worked perfectly with any web navigator, but with a console application impossible, allways the same [... :)] error =/ I've tried to authenticate thanks of navigator on ReportsManager page and... surprise I got the same error : "Authorization ticket not received by LogonUser". After lot's of search and googling , I've read an article explaining this bug. It was in fact an official bug and Microsoft published a fix whish was after included in the SQL SERVER 2008R2 SP1. I had only the SQL SERVER 2008R2 with no update. After install the SP1, I tested your "old" RS Utility for form authentication, rs1.exe. And It works perfectly now. Thank's so much ! Maybe my bug and the solution I've found will be helpfull for the future ;)

Thanks a lot, So Nice! =)

Baptiste"

How to use SQL Server 2008 R2 Import and Export Wizard to import a CSV file into SQL Azure

$
0
0

The SQL Server 2008 R2 Import and Export Wizard will allow you to import a CSV ‘flat’ file directly into SQL Azure. The process is relatively simple, but it’s not obvious. The following steps will help guide you through the process.

The SQL Server Import and Export Wizard is available on the SQL Server 2008 R2 media, so you must obtain your organization’s copy of SQL Server 2008 R2 software.

1. Run the wizard from the Windows Start menu, Start à Programs à SQL Server 2008 R2 à Import and Export Data.

2. Select Flat File Source as the data source, browse for your CSV file, and then select the settings appropriate for your file. For example, the fields in my file are surrounded by double-quotes if they contain commas, so I select double-quotes as my text qualifier. Also, the column names are found in the first row of my file. Click Next.

3. Verify that your data looks as you expected. Click on Advanced on the left.

4. Remember that the wizard is looking at a flat file, so it doesn’t make many assumptions about the data contained therein. It’s up to you to go through each column in this screen and adjust data types and sizes. The following table shows a mapping of data types between the wizard and SQL Server. Click Next after you’ve made your changes.

Data Type

SQL Server

(SQLOLEDB; SQLNCLI10)

DT_BOOL

bit

DT_BYTES

binary, varbinary, timestamp

DT_CY

smallmoney, money

DT_DATE

DT_DBDATE

date

DT_DBTIME

DT_DBTIME2

time(p)

DT_DBTIMESTAMP

datetime, smalldatetime

DT_DBTIMESTAMP2

datetime2

DT_DBTIMESTAMPOFFSET

datetimeoffset(p)

DT_DECIMAL

DT_FILETIME

DT_GUID

uniqueidentifier

DT_I1

DT_I2

smallint

DT_I4

int

DT_I8

bigint

DT_NUMERIC

decimal, numeric

DT_R4

real

DT_R8

float

DT_STR

char, varchar

DT_UI1

tinyint

DT_UI2

DT_UI4

DT_UI8

DT_WSTR

nchar, nvarchar, sql_variant, xml

DT_IMAGE

image

DT_NTEXT

ntext

DT_TEXT

text

Table 1 - Data type mappings (source: http://msdn.microsoft.com/en-us/library/ms141036.aspx)

5. Here’s the part that’s not obvious. You must select .Net Framework Data Provider for SqlServer as the destination. Then, enter the following information.

· Data Source – This is the fully qualified DNS name (FQDN) of your SQL Azure server.

· Initial Catalog – This must be an existing database on the SQL Azure server.

· User ID

· Password

6. Click Edit Mappings.

7. Uncheck the Nullable box for your primary key column. Did I mention that a SQL Azure table must have a primary key? Notice that there isn’t a way to specify the primary key in this dialog. We’ll have to add that to the SQL statement manually. Click the Edit SQL button.

8. Add the “Primary Key” option to the declaration of your primary key column, and click OK.

Note: If you’re using a clustered primary key, please see SQL Server Books Online for the syntax.

9. Review the data type mappings. Note that I receive warnings about the default DT_STR types, so I ignore them.

10. Keep the default setting, Run immediately, click Next, and then click Finish on the next screen.

11. Finally, review the status of the import, and enjoy using your data in SQL Azure.

Java 1.5 JRE Exception List

$
0
0
Got this with the help of jar-explorer.

deploy.jar : com/sun/deploy/association/AssociationAlreadyRegisteredException.class
deploy.jar : com/sun/deploy/association/AssociationException.class
deploy.jar : com/sun/deploy/association/AssociationNotRegisteredException.class
deploy.jar : com/sun/deploy/association/RegisterFailedException.class
deploy.jar : com/sun/deploy/net/cookie/CookieUnavailableException.class
deploy.jar : com/sun/deploy/net/proxy/ProxyConfigException.class
deploy.jar : com/sun/deploy/net/proxy/ProxyUnavailableException.class
deploy.jar : com/sun/deploy/security/CertificateConfigException.class
deploy.jar : com/sun/deploy/xml/BadTokenException.class
sunpkcs11.jar : sun/security/pkcs11/ConfigurationException.class
sunpkcs11.jar : sun/security/pkcs11/wrapper/PKCS11Exception.class
sunpkcs11.jar : sun/security/pkcs11/wrapper/PKCS11RuntimeException.class
javaws.jar : com/sun/javaws/exceptions/BadFieldException.class
javaws.jar : com/sun/javaws/exceptions/BadJARFileException.class
javaws.jar : com/sun/javaws/exceptions/BadMimeTypeResponseException.class
javaws.jar : com/sun/javaws/exceptions/BadVersionResponseException.class
javaws.jar : com/sun/javaws/exceptions/CacheAccessException.class
javaws.jar : com/sun/javaws/exceptions/CouldNotLoadArgumentException.class
javaws.jar : com/sun/javaws/exceptions/DownloadException.class
javaws.jar : com/sun/javaws/exceptions/ErrorCodeResponseException.class
javaws.jar : com/sun/javaws/exceptions/ExitException.class
javaws.jar : com/sun/javaws/exceptions/FailedDownloadingResourceException.class
javaws.jar : com/sun/javaws/exceptions/InvalidJarDiffException.class
javaws.jar : com/sun/javaws/exceptions/JARSigningException.class
javaws.jar : com/sun/javaws/exceptions/JNLParseException.class
javaws.jar : com/sun/javaws/exceptions/JNLPException.class
javaws.jar : com/sun/javaws/exceptions/JNLPSigningException.class
javaws.jar : com/sun/javaws/exceptions/JreExecException.class
javaws.jar : com/sun/javaws/exceptions/LaunchDescException.class
javaws.jar : com/sun/javaws/exceptions/MissingFieldException.class
javaws.jar : com/sun/javaws/exceptions/MissingVersionResponseException.class
javaws.jar : com/sun/javaws/exceptions/MultipleHostsException.class
javaws.jar : com/sun/javaws/exceptions/NativeLibViolationException.class
javaws.jar : com/sun/javaws/exceptions/NoLocalJREException.class
javaws.jar : com/sun/javaws/exceptions/OfflineLaunchException.class
javaws.jar : com/sun/javaws/exceptions/TooManyArgumentsException.class
javaws.jar : com/sun/javaws/exceptions/UnsignedAccessViolationException.class
javaws.jar : com/sun/javaws/net/CanceledDownloadException.class
javaws.jar : javax/jnlp/UnavailableServiceException.class
jce.jar : javax/crypto/BadPaddingException.class
jce.jar : javax/crypto/ExemptionMechanismException.class
jce.jar : javax/crypto/IllegalBlockSizeException.class
jce.jar : javax/crypto/NoSuchPaddingException.class
jce.jar : javax/crypto/ShortBufferException.class
jsse.jar : javax/net/ssl/SSLException.class
jsse.jar : javax/net/ssl/SSLHandshakeException.class
jsse.jar : javax/net/ssl/SSLKeyException.class
jsse.jar : javax/net/ssl/SSLPeerUnverifiedException.class
jsse.jar : javax/net/ssl/SSLProtocolException.class
jsse.jar : javax/security/cert/CertificateEncodingException.class
jsse.jar : javax/security/cert/CertificateException.class
jsse.jar : javax/security/cert/CertificateExpiredException.class
jsse.jar : javax/security/cert/CertificateNotYetValidException.class
jsse.jar : javax/security/cert/CertificateParsingException.class
plugin.jar : netscape/javascript/JSException.class
plugin.jar : netscape/security/ForbiddenTargetException.class
plugin.jar : sun/plugin/cache/DownloadException.class
plugin.jar : sun/plugin/cache/JarCacheVersionException.class
plugin.jar : sun/plugin/dom/exception/BrowserNotSupportedException.class
plugin.jar : sun/plugin/dom/exception/HierarchyRequestException.class
plugin.jar : sun/plugin/dom/exception/InvalidAccessException.class
plugin.jar : sun/plugin/dom/exception/InvalidStateException.class
plugin.jar : sun/plugin/dom/exception/NoModificationAllowedException.class
plugin.jar : sun/plugin/dom/exception/PluginNotSupportedException.class
plugin.jar : sun/plugin/dom/exception/WrongDocumentException.class
plugin.jar : sun/plugin/liveconnect/OriginNotAllowedException.class
rt.jar : com/sun/corba/se/impl/corba/ExceptionListImpl.class
rt.jar : com/sun/corba/se/impl/io/OptionalDataException.class
rt.jar : com/sun/corba/se/impl/io/TypeMismatchException.class
rt.jar : com/sun/corba/se/impl/logging/ActivationSystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/ActivationSystemException.class
rt.jar : com/sun/corba/se/impl/logging/InterceptorsSystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/InterceptorsSystemException.class
rt.jar : com/sun/corba/se/impl/logging/IORSystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/IORSystemException.class
rt.jar : com/sun/corba/se/impl/logging/NamingSystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/NamingSystemException.class
rt.jar : com/sun/corba/se/impl/logging/OMGSystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/OMGSystemException.class
rt.jar : com/sun/corba/se/impl/logging/ORBUtilSystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/ORBUtilSystemException.class
rt.jar : com/sun/corba/se/impl/logging/POASystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/POASystemException.class
rt.jar : com/sun/corba/se/impl/logging/UtilSystemException$1.class
rt.jar : com/sun/corba/se/impl/logging/UtilSystemException.class
rt.jar : com/sun/corba/se/impl/orbutil/threadpool/TimeoutException.class
rt.jar : com/sun/corba/se/impl/presentation/rmi/ExceptionHandler.class
rt.jar : com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl$ExceptionRW.class
rt.jar : com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl$ExceptionRWBase.class
rt.jar : com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl$ExceptionRWIDLImpl.class
rt.jar : com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl$ExceptionRWRMIImpl.class
rt.jar : com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl.class
rt.jar : com/sun/corba/se/impl/presentation/rmi/IDLTypeException.class
rt.jar : com/sun/corba/se/impl/protocol/AddressingDispositionException.class
rt.jar : com/sun/corba/se/impl/protocol/RequestCanceledException.class
rt.jar : com/sun/corba/se/spi/copyobject/ReflectiveCopyException.class
rt.jar : com/sun/corba/se/spi/legacy/connection/GetEndPointInfoAgainException.class
rt.jar : com/sun/corba/se/spi/orbutil/threadpool/NoSuchThreadPoolException.class
rt.jar : com/sun/corba/se/spi/orbutil/threadpool/NoSuchWorkQueueException.class
rt.jar : com/sun/corba/se/spi/protocol/ForwardException.class
rt.jar : com/sun/image/codec/jpeg/ImageFormatException.class
rt.jar : com/sun/image/codec/jpeg/TruncatedFileException.class
rt.jar : com/sun/imageio/plugins/jpeg/JFIFMarkerSegment$IllegalThumbException.class
rt.jar : com/sun/java/browser/dom/DOMAccessException.class
rt.jar : com/sun/java/browser/dom/DOMUnsupportedException.class
rt.jar : com/sun/java/util/jar/pack/Attribute$FormatException.class
rt.jar : com/sun/jmx/snmp/BerException.class
rt.jar : com/sun/jmx/snmp/daemon/CommunicationException.class
rt.jar : com/sun/jmx/snmp/IPAcl/ParseException.class
rt.jar : com/sun/jmx/snmp/SnmpBadSecurityLevelException.class
rt.jar : com/sun/jmx/snmp/SnmpSecurityException.class
rt.jar : com/sun/jmx/snmp/SnmpStatusException.class
rt.jar : com/sun/jmx/snmp/SnmpTooBigException.class
rt.jar : com/sun/jmx/snmp/SnmpUnknownAccContrModelException.class
rt.jar : com/sun/jmx/snmp/SnmpUnknownModelException.class
rt.jar : com/sun/jmx/snmp/SnmpUnknownModelLcdException.class
rt.jar : com/sun/jmx/snmp/SnmpUnknownMsgProcModelException.class
rt.jar : com/sun/jmx/snmp/SnmpUnknownSecModelException.class
rt.jar : com/sun/jmx/snmp/SnmpUnknownSubSystemException.class
rt.jar : com/sun/jndi/cosnaming/ExceptionMapper$1.class
rt.jar : com/sun/jndi/cosnaming/ExceptionMapper$2.class
rt.jar : com/sun/jndi/cosnaming/ExceptionMapper.class
rt.jar : com/sun/jndi/ldap/Ber$DecodeException.class
rt.jar : com/sun/jndi/ldap/Ber$EncodeException.class
rt.jar : com/sun/jndi/ldap/LdapReferralException.class
rt.jar : com/sun/org/apache/bcel/internal/classfile/CodeException.class
rt.jar : com/sun/org/apache/bcel/internal/classfile/ExceptionTable.class
rt.jar : com/sun/org/apache/bcel/internal/ExceptionConstants.class
rt.jar : com/sun/org/apache/bcel/internal/generic/ClassGenException.class
rt.jar : com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.class
rt.jar : com/sun/org/apache/bcel/internal/generic/ExceptionThrower.class
rt.jar : com/sun/org/apache/bcel/internal/generic/TargetLostException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/AssertionViolatedException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/ClassConstraintException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/CodeConstraintException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/InvalidMethodException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/LinkingConstraintException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/LoadingException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/LocalVariableInfoInconsistentException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/StaticCodeConstraintException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/StaticCodeInstructionConstraintException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/StaticCodeInstructionOperandConstraintException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/StructuralCodeConstraintException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/VerificationException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/exc/VerifierConstraintViolatedException.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/structurals/ExceptionHandler.class
rt.jar : com/sun/org/apache/bcel/internal/verifier/structurals/ExceptionHandlers.class
rt.jar : com/sun/org/apache/regexp/internal/RESyntaxException.class
rt.jar : com/sun/org/apache/xalan/internal/xsltc/cmdline/getopt/GetOptsException.class
rt.jar : com/sun/org/apache/xalan/internal/xsltc/cmdline/getopt/IllegalArgumentException.class
rt.jar : com/sun/org/apache/xalan/internal/xsltc/cmdline/getopt/MissingOptArgException.class
rt.jar : com/sun/org/apache/xalan/internal/xsltc/compiler/CompilerException.class
rt.jar : com/sun/org/apache/xalan/internal/xsltc/compiler/IllegalCharException.class
rt.jar : com/sun/org/apache/xalan/internal/xsltc/TransletException.class
rt.jar : com/sun/org/apache/xerces/internal/dom/RangeExceptionImpl.class
rt.jar : com/sun/org/apache/xerces/internal/dom3/as/DOMASException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/dv/DVFactoryException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeFacetException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeValueException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDateTimeException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/io/MalformedByteSequenceException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/xpath/regex/ParseException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/xpath/XPathException.class
rt.jar : com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaException.class
rt.jar : com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.class
rt.jar : com/sun/org/apache/xerces/internal/util/URI$MalformedURIException.class
rt.jar : com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.class
rt.jar : com/sun/org/apache/xerces/internal/xni/parser/XMLParseException.class
rt.jar : com/sun/org/apache/xerces/internal/xni/XNIException.class
rt.jar : com/sun/org/apache/xerces/internal/xs/XSException.class
rt.jar : com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.class
rt.jar : com/sun/org/apache/xml/internal/dtm/DTMDOMException.class
rt.jar : com/sun/org/apache/xml/internal/dtm/DTMException.class
rt.jar : com/sun/org/apache/xml/internal/dtm/ref/DTMNamedNodeMap$DTMException.class
rt.jar : com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Filter$StopException.class
rt.jar : com/sun/org/apache/xml/internal/utils/StopParseException.class
rt.jar : com/sun/org/apache/xml/internal/utils/URI$MalformedURIException.class
rt.jar : com/sun/org/apache/xml/internal/utils/WrappedRuntimeException.class
rt.jar : com/sun/org/apache/xml/internal/utils/WrongParserException.class
rt.jar : com/sun/org/apache/xpath/internal/functions/WrongNumberArgsException.class
rt.jar : com/sun/org/apache/xpath/internal/XPathException.class
rt.jar : com/sun/org/apache/xpath/internal/XPathProcessorException.class
rt.jar : com/sun/org/omg/CORBA/ExceptionDescription.class
rt.jar : com/sun/org/omg/CORBA/ExceptionDescriptionHelper.class
rt.jar : com/sun/security/auth/PolicyParser$ParsingException.class
rt.jar : java/awt/AWTException.class
rt.jar : java/awt/color/CMMException.class
rt.jar : java/awt/color/ProfileDataException.class
rt.jar : java/awt/datatransfer/MimeTypeParseException.class
rt.jar : java/awt/datatransfer/UnsupportedFlavorException.class
rt.jar : java/awt/dnd/InvalidDnDOperationException.class
rt.jar : java/awt/FontFormatException.class
rt.jar : java/awt/geom/IllegalPathStateException.class
rt.jar : java/awt/geom/NoninvertibleTransformException.class
rt.jar : java/awt/HeadlessException.class
rt.jar : java/awt/IllegalComponentStateException.class
rt.jar : java/awt/image/ImagingOpException.class
rt.jar : java/awt/image/RasterFormatException.class
rt.jar : java/awt/print/PrinterAbortException.class
rt.jar : java/awt/print/PrinterException.class
rt.jar : java/awt/print/PrinterIOException.class
rt.jar : java/beans/ExceptionListener.class
rt.jar : java/beans/IntrospectionException.class
rt.jar : java/beans/PropertyVetoException.class
rt.jar : java/io/CharConversionException.class
rt.jar : java/io/EOFException.class
rt.jar : java/io/FileNotFoundException.class
rt.jar : java/io/InterruptedIOException.class
rt.jar : java/io/InvalidClassException.class
rt.jar : java/io/InvalidObjectException.class
rt.jar : java/io/IOException.class
rt.jar : java/io/NotActiveException.class
rt.jar : java/io/NotSerializableException.class
rt.jar : java/io/ObjectStreamException.class
rt.jar : java/io/OptionalDataException.class
rt.jar : java/io/StreamCorruptedException.class
rt.jar : java/io/SyncFailedException.class
rt.jar : java/io/UnsupportedEncodingException.class
rt.jar : java/io/UTFDataFormatException.class
rt.jar : java/io/WriteAbortedException.class
rt.jar : java/lang/annotation/AnnotationTypeMismatchException.class
rt.jar : java/lang/annotation/IncompleteAnnotationException.class
rt.jar : java/lang/ArithmeticException.class
rt.jar : java/lang/ArrayIndexOutOfBoundsException.class
rt.jar : java/lang/ArrayStoreException.class
rt.jar : java/lang/ClassCastException.class
rt.jar : java/lang/ClassNotFoundException.class
rt.jar : java/lang/CloneNotSupportedException.class
rt.jar : java/lang/EnumConstantNotPresentException.class
rt.jar : java/lang/Exception.class
rt.jar : java/lang/ExceptionInInitializerError.class
rt.jar : java/lang/IllegalAccessException.class
rt.jar : java/lang/IllegalArgumentException.class
rt.jar : java/lang/IllegalMonitorStateException.class
rt.jar : java/lang/IllegalStateException.class
rt.jar : java/lang/IllegalThreadStateException.class
rt.jar : java/lang/IndexOutOfBoundsException.class
rt.jar : java/lang/InstantiationException.class
rt.jar : java/lang/instrument/IllegalClassFormatException.class
rt.jar : java/lang/instrument/UnmodifiableClassException.class
rt.jar : java/lang/InterruptedException.class
rt.jar : java/lang/NegativeArraySizeException.class
rt.jar : java/lang/NoSuchFieldException.class
rt.jar : java/lang/NoSuchMethodException.class
rt.jar : java/lang/NullPointerException.class
rt.jar : java/lang/NumberFormatException.class
rt.jar : java/lang/reflect/InvocationTargetException.class
rt.jar : java/lang/reflect/MalformedParameterizedTypeException.class
rt.jar : java/lang/reflect/UndeclaredThrowableException.class
rt.jar : java/lang/RuntimeException.class
rt.jar : java/lang/SecurityException.class
rt.jar : java/lang/StringIndexOutOfBoundsException.class
rt.jar : java/lang/Thread$UncaughtExceptionHandler.class
rt.jar : java/lang/TypeNotPresentException.class
rt.jar : java/lang/UnsupportedOperationException.class
rt.jar : java/net/BindException.class
rt.jar : java/net/ConnectException.class
rt.jar : java/net/HttpRetryException.class
rt.jar : java/net/MalformedURLException.class
rt.jar : java/net/NoRouteToHostException.class
rt.jar : java/net/PortUnreachableException.class
rt.jar : java/net/ProtocolException.class
rt.jar : java/net/SocketException.class
rt.jar : java/net/SocketTimeoutException.class
rt.jar : java/net/UnknownHostException.class
rt.jar : java/net/UnknownServiceException.class
rt.jar : java/net/URISyntaxException.class
rt.jar : java/nio/BufferOverflowException.class
rt.jar : java/nio/BufferUnderflowException.class
rt.jar : java/nio/channels/AlreadyConnectedException.class
rt.jar : java/nio/channels/AsynchronousCloseException.class
rt.jar : java/nio/channels/CancelledKeyException.class
rt.jar : java/nio/channels/ClosedByInterruptException.class
rt.jar : java/nio/channels/ClosedChannelException.class
rt.jar : java/nio/channels/ClosedSelectorException.class
rt.jar : java/nio/channels/ConnectionPendingException.class
rt.jar : java/nio/channels/FileLockInterruptionException.class
rt.jar : java/nio/channels/IllegalBlockingModeException.class
rt.jar : java/nio/channels/IllegalSelectorException.class
rt.jar : java/nio/channels/NoConnectionPendingException.class
rt.jar : java/nio/channels/NonReadableChannelException.class
rt.jar : java/nio/channels/NonWritableChannelException.class
rt.jar : java/nio/channels/NotYetBoundException.class
rt.jar : java/nio/channels/NotYetConnectedException.class
rt.jar : java/nio/channels/OverlappingFileLockException.class
rt.jar : java/nio/channels/UnresolvedAddressException.class
rt.jar : java/nio/channels/UnsupportedAddressTypeException.class
rt.jar : java/nio/charset/CharacterCodingException.class
rt.jar : java/nio/charset/IllegalCharsetNameException.class
rt.jar : java/nio/charset/MalformedInputException.class
rt.jar : java/nio/charset/UnmappableCharacterException.class
rt.jar : java/nio/charset/UnsupportedCharsetException.class
rt.jar : java/nio/InvalidMarkException.class
rt.jar : java/nio/ReadOnlyBufferException.class
rt.jar : java/rmi/AccessException.class
rt.jar : java/rmi/activation/ActivateFailedException.class
rt.jar : java/rmi/activation/ActivationException.class
rt.jar : java/rmi/activation/UnknownGroupException.class
rt.jar : java/rmi/activation/UnknownObjectException.class
rt.jar : java/rmi/AlreadyBoundException.class
rt.jar : java/rmi/ConnectException.class
rt.jar : java/rmi/ConnectIOException.class
rt.jar : java/rmi/MarshalException.class
rt.jar : java/rmi/NoSuchObjectException.class
rt.jar : java/rmi/NotBoundException.class
rt.jar : java/rmi/RemoteException.class
rt.jar : java/rmi/RMISecurityException.class
rt.jar : java/rmi/server/ExportException.class
rt.jar : java/rmi/server/ServerCloneException.class
rt.jar : java/rmi/server/ServerNotActiveException.class
rt.jar : java/rmi/server/SkeletonMismatchException.class
rt.jar : java/rmi/server/SkeletonNotFoundException.class
rt.jar : java/rmi/server/SocketSecurityException.class
rt.jar : java/rmi/ServerException.class
rt.jar : java/rmi/ServerRuntimeException.class
rt.jar : java/rmi/StubNotFoundException.class
rt.jar : java/rmi/UnexpectedException.class
rt.jar : java/rmi/UnknownHostException.class
rt.jar : java/rmi/UnmarshalException.class
rt.jar : java/security/AccessControlException.class
rt.jar : java/security/acl/AclNotFoundException.class
rt.jar : java/security/acl/LastOwnerException.class
rt.jar : java/security/acl/NotOwnerException.class
rt.jar : java/security/cert/CertificateEncodingException.class
rt.jar : java/security/cert/CertificateException.class
rt.jar : java/security/cert/CertificateExpiredException.class
rt.jar : java/security/cert/CertificateNotYetValidException.class
rt.jar : java/security/cert/CertificateParsingException.class
rt.jar : java/security/cert/CertPathBuilderException.class
rt.jar : java/security/cert/CertPathValidatorException.class
rt.jar : java/security/cert/CertStoreException.class
rt.jar : java/security/cert/CRLException.class
rt.jar : java/security/DigestException.class
rt.jar : java/security/GeneralSecurityException.class
rt.jar : java/security/InvalidAlgorithmParameterException.class
rt.jar : java/security/InvalidKeyException.class
rt.jar : java/security/InvalidParameterException.class
rt.jar : java/security/KeyException.class
rt.jar : java/security/KeyManagementException.class
rt.jar : java/security/KeyStoreException.class
rt.jar : java/security/NoSuchAlgorithmException.class
rt.jar : java/security/NoSuchProviderException.class
rt.jar : java/security/PrivilegedActionException.class
rt.jar : java/security/PrivilegedExceptionAction.class
rt.jar : java/security/ProviderException.class
rt.jar : java/security/SignatureException.class
rt.jar : java/security/spec/InvalidKeySpecException.class
rt.jar : java/security/spec/InvalidParameterSpecException.class
rt.jar : java/security/UnrecoverableEntryException.class
rt.jar : java/security/UnrecoverableKeyException.class
rt.jar : java/sql/BatchUpdateException.class
rt.jar : java/sql/SQLException.class
rt.jar : java/text/ParseException.class
rt.jar : java/util/concurrent/BrokenBarrierException.class
rt.jar : java/util/concurrent/CancellationException.class
rt.jar : java/util/concurrent/ExecutionException.class
rt.jar : java/util/concurrent/Executors$PrivilegedExceptionActionAdapter.class
rt.jar : java/util/concurrent/RejectedExecutionException.class
rt.jar : java/util/concurrent/TimeoutException.class
rt.jar : java/util/ConcurrentModificationException.class
rt.jar : java/util/DuplicateFormatFlagsException.class
rt.jar : java/util/EmptyStackException.class
rt.jar : java/util/FormatFlagsConversionMismatchException.class
rt.jar : java/util/FormatterClosedException.class
rt.jar : java/util/IllegalFormatCodePointException.class
rt.jar : java/util/IllegalFormatConversionException.class
rt.jar : java/util/IllegalFormatException.class
rt.jar : java/util/IllegalFormatFlagsException.class
rt.jar : java/util/IllegalFormatPrecisionException.class
rt.jar : java/util/IllegalFormatWidthException.class
rt.jar : java/util/InputMismatchException.class
rt.jar : java/util/InvalidPropertiesFormatException.class
rt.jar : java/util/jar/JarException.class
rt.jar : java/util/MissingFormatArgumentException.class
rt.jar : java/util/MissingFormatWidthException.class
rt.jar : java/util/MissingResourceException.class
rt.jar : java/util/NoSuchElementException.class
rt.jar : java/util/prefs/BackingStoreException.class
rt.jar : java/util/prefs/InvalidPreferencesFormatException.class
rt.jar : java/util/regex/PatternSyntaxException.class
rt.jar : java/util/TooManyListenersException.class
rt.jar : java/util/UnknownFormatConversionException.class
rt.jar : java/util/UnknownFormatFlagsException.class
rt.jar : java/util/zip/DataFormatException.class
rt.jar : java/util/zip/ZipException.class
rt.jar : javax/activity/ActivityCompletedException.class
rt.jar : javax/activity/ActivityRequiredException.class
rt.jar : javax/activity/InvalidActivityException.class
rt.jar : javax/imageio/IIOException.class
rt.jar : javax/imageio/metadata/IIODOMException.class
rt.jar : javax/imageio/metadata/IIOInvalidTreeException.class
rt.jar : javax/management/AttributeNotFoundException.class
rt.jar : javax/management/BadAttributeValueExpException.class
rt.jar : javax/management/BadBinaryOpValueExpException.class
rt.jar : javax/management/BadStringOperationException.class
rt.jar : javax/management/InstanceAlreadyExistsException.class
rt.jar : javax/management/InstanceNotFoundException.class
rt.jar : javax/management/IntrospectionException.class
rt.jar : javax/management/InvalidApplicationException.class
rt.jar : javax/management/InvalidAttributeValueException.class
rt.jar : javax/management/JMException.class
rt.jar : javax/management/JMRuntimeException.class
rt.jar : javax/management/ListenerNotFoundException.class
rt.jar : javax/management/MalformedObjectNameException.class
rt.jar : javax/management/MBeanException.class
rt.jar : javax/management/MBeanRegistrationException.class
rt.jar : javax/management/modelmbean/InvalidTargetObjectTypeException.class
rt.jar : javax/management/modelmbean/XMLParseException.class
rt.jar : javax/management/monitor/MonitorSettingException.class
rt.jar : javax/management/NotCompliantMBeanException.class
rt.jar : javax/management/openmbean/InvalidKeyException.class
rt.jar : javax/management/openmbean/InvalidOpenTypeException.class
rt.jar : javax/management/openmbean/KeyAlreadyExistsException.class
rt.jar : javax/management/openmbean/OpenDataException.class
rt.jar : javax/management/OperationsException.class
rt.jar : javax/management/ReflectionException.class
rt.jar : javax/management/relation/InvalidRelationIdException.class
rt.jar : javax/management/relation/InvalidRelationServiceException.class
rt.jar : javax/management/relation/InvalidRelationTypeException.class
rt.jar : javax/management/relation/InvalidRoleInfoException.class
rt.jar : javax/management/relation/InvalidRoleValueException.class
rt.jar : javax/management/relation/RelationException.class
rt.jar : javax/management/relation/RelationNotFoundException.class
rt.jar : javax/management/relation/RelationServiceNotRegisteredException.class
rt.jar : javax/management/relation/RelationTypeNotFoundException.class
rt.jar : javax/management/relation/RoleInfoNotFoundException.class
rt.jar : javax/management/relation/RoleNotFoundException.class
rt.jar : javax/management/remote/JMXProviderException.class
rt.jar : javax/management/remote/JMXServerErrorException.class
rt.jar : javax/management/RuntimeErrorException.class
rt.jar : javax/management/RuntimeMBeanException.class
rt.jar : javax/management/RuntimeOperationsException.class
rt.jar : javax/management/ServiceNotFoundException.class
rt.jar : javax/naming/AuthenticationException.class
rt.jar : javax/naming/AuthenticationNotSupportedException.class
rt.jar : javax/naming/CannotProceedException.class
rt.jar : javax/naming/CommunicationException.class
rt.jar : javax/naming/ConfigurationException.class
rt.jar : javax/naming/ContextNotEmptyException.class
rt.jar : javax/naming/directory/AttributeInUseException.class
rt.jar : javax/naming/directory/AttributeModificationException.class
rt.jar : javax/naming/directory/InvalidAttributeIdentifierException.class
rt.jar : javax/naming/directory/InvalidAttributesException.class
rt.jar : javax/naming/directory/InvalidAttributeValueException.class
rt.jar : javax/naming/directory/InvalidSearchControlsException.class
rt.jar : javax/naming/directory/InvalidSearchFilterException.class
rt.jar : javax/naming/directory/NoSuchAttributeException.class
rt.jar : javax/naming/directory/SchemaViolationException.class
rt.jar : javax/naming/event/NamingExceptionEvent.class
rt.jar : javax/naming/InsufficientResourcesException.class
rt.jar : javax/naming/InterruptedNamingException.class
rt.jar : javax/naming/InvalidNameException.class
rt.jar : javax/naming/ldap/LdapReferralException.class
rt.jar : javax/naming/LimitExceededException.class
rt.jar : javax/naming/LinkException.class
rt.jar : javax/naming/LinkLoopException.class
rt.jar : javax/naming/MalformedLinkException.class
rt.jar : javax/naming/NameAlreadyBoundException.class
rt.jar : javax/naming/NameNotFoundException.class
rt.jar : javax/naming/NamingException.class
rt.jar : javax/naming/NamingSecurityException.class
rt.jar : javax/naming/NoInitialContextException.class
rt.jar : javax/naming/NoPermissionException.class
rt.jar : javax/naming/NotContextException.class
rt.jar : javax/naming/OperationNotSupportedException.class
rt.jar : javax/naming/PartialResultException.class
rt.jar : javax/naming/ReferralException.class
rt.jar : javax/naming/ServiceUnavailableException.class
rt.jar : javax/naming/SizeLimitExceededException.class
rt.jar : javax/naming/TimeLimitExceededException.class
rt.jar : javax/print/attribute/UnmodifiableSetException.class
rt.jar : javax/print/AttributeException.class
rt.jar : javax/print/FlavorException.class
rt.jar : javax/print/PrintException.class
rt.jar : javax/print/URIException.class
rt.jar : javax/security/auth/callback/UnsupportedCallbackException.class
rt.jar : javax/security/auth/DestroyFailedException.class
rt.jar : javax/security/auth/login/AccountException.class
rt.jar : javax/security/auth/login/AccountExpiredException.class
rt.jar : javax/security/auth/login/AccountLockedException.class
rt.jar : javax/security/auth/login/AccountNotFoundException.class
rt.jar : javax/security/auth/login/CredentialException.class
rt.jar : javax/security/auth/login/CredentialExpiredException.class
rt.jar : javax/security/auth/login/CredentialNotFoundException.class
rt.jar : javax/security/auth/login/FailedLoginException.class
rt.jar : javax/security/auth/login/LoginException.class
rt.jar : javax/security/auth/RefreshFailedException.class
rt.jar : javax/security/sasl/AuthenticationException.class
rt.jar : javax/security/sasl/SaslException.class
rt.jar : javax/sound/midi/InvalidMidiDataException.class
rt.jar : javax/sound/midi/MidiUnavailableException.class
rt.jar : javax/sound/sampled/LineUnavailableException.class
rt.jar : javax/sound/sampled/UnsupportedAudioFileException.class
rt.jar : javax/sql/rowset/serial/SerialException.class
rt.jar : javax/sql/rowset/spi/SyncFactoryException.class
rt.jar : javax/sql/rowset/spi/SyncProviderException.class
rt.jar : javax/swing/text/BadLocationException.class
rt.jar : javax/swing/text/ChangedCharSetException.class
rt.jar : javax/swing/tree/ExpandVetoException.class
rt.jar : javax/swing/undo/CannotRedoException.class
rt.jar : javax/swing/undo/CannotUndoException.class
rt.jar : javax/swing/UnsupportedLookAndFeelException.class
rt.jar : javax/transaction/InvalidTransactionException.class
rt.jar : javax/transaction/TransactionRequiredException.class
rt.jar : javax/transaction/TransactionRolledbackException.class
rt.jar : javax/transaction/xa/XAException.class
rt.jar : javax/xml/datatype/DatatypeConfigurationException.class
rt.jar : javax/xml/parsers/ParserConfigurationException.class
rt.jar : javax/xml/transform/TransformerConfigurationException.class
rt.jar : javax/xml/transform/TransformerException.class
rt.jar : javax/xml/xpath/XPathException.class
rt.jar : javax/xml/xpath/XPathExpressionException.class
rt.jar : javax/xml/xpath/XPathFactoryConfigurationException.class
rt.jar : javax/xml/xpath/XPathFunctionException.class
rt.jar : org/ietf/jgss/GSSException.class
rt.jar : org/omg/CORBA/ExceptionList.class
rt.jar : org/omg/CORBA/portable/ApplicationException.class
rt.jar : org/omg/CORBA/portable/IndirectionException.class
rt.jar : org/omg/CORBA/portable/RemarshalException.class
rt.jar : org/omg/CORBA/portable/UnknownException.class
rt.jar : org/omg/CORBA/SystemException.class
rt.jar : org/omg/CORBA/UnknownUserException.class
rt.jar : org/omg/CORBA/UnknownUserExceptionHelper.class
rt.jar : org/omg/CORBA/UnknownUserExceptionHolder.class
rt.jar : org/omg/CORBA/UserException.class
rt.jar : org/omg/IOP/ExceptionDetailMessage.class
rt.jar : org/w3c/dom/DOMException.class
rt.jar : org/w3c/dom/events/EventException.class
rt.jar : org/w3c/dom/ls/LSException.class
rt.jar : org/w3c/dom/ranges/RangeException.class
rt.jar : org/xml/sax/SAXException.class
rt.jar : org/xml/sax/SAXNotRecognizedException.class
rt.jar : org/xml/sax/SAXNotSupportedException.class
rt.jar : org/xml/sax/SAXParseException.class
rt.jar : sun/applet/AppletIllegalArgumentException.class
rt.jar : sun/applet/AppletIOException.class
rt.jar : sun/applet/AppletSecurityException.class
rt.jar : sun/applet/Main$ParseException.class
rt.jar : sun/audio/AudioSecurityExceptionAction.class
rt.jar : sun/audio/InvalidAudioFormatException.class
rt.jar : sun/awt/image/ImageFormatException.class
rt.jar : sun/awt/image/PNGImageDecoder$PNGException.class
rt.jar : sun/dc/path/PathException.class
rt.jar : sun/dc/pr/PRException.class
rt.jar : sun/io/ConversionBufferFullException.class
rt.jar : sun/io/MalformedInputException.class
rt.jar : sun/io/UnknownCharacterException.class
rt.jar : sun/java2d/InvalidPipeException.class
rt.jar : sun/jdbc/odbc/JdbcOdbcBatchUpdateException.class
rt.jar : sun/management/counter/perf/InstrumentationException.class
rt.jar : sun/misc/CEFormatException.class
rt.jar : sun/misc/ExtensionInstallationException.class
rt.jar : sun/misc/InvalidJarIndexException.class
rt.jar : sun/misc/ProxyGenerator$ExceptionTableEntry.class
rt.jar : sun/misc/REException.class
rt.jar : sun/net/ConnectionResetException.class
rt.jar : sun/net/ftp/FtpLoginException.class
rt.jar : sun/net/ftp/FtpProtocolException.class
rt.jar : sun/net/smtp/SmtpProtocolException.class
rt.jar : sun/net/TelnetProtocolException.class
rt.jar : sun/net/www/ApplicationLaunchException.class
rt.jar : sun/nio/ch/AlreadyBoundException.class
rt.jar : sun/print/PrintJobAttributeException.class
rt.jar : sun/print/PrintJobFlavorException.class
rt.jar : sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.class
rt.jar : sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.class
rt.jar : sun/reflect/annotation/ExceptionProxy.class
rt.jar : sun/reflect/annotation/TypeNotPresentExceptionProxy.class
rt.jar : sun/reflect/generics/reflectiveObjects/NotImplementedException.class
rt.jar : sun/reflect/InstantiationExceptionConstructorAccessorImpl.class
rt.jar : sun/rmi/transport/proxy/CGIClientException.class
rt.jar : sun/rmi/transport/proxy/CGIServerException.class
rt.jar : sun/security/jgss/GSSExceptionImpl.class
rt.jar : sun/security/krb5/Asn1Exception.class
rt.jar : sun/security/krb5/internal/KdcErrException.class
rt.jar : sun/security/krb5/internal/KrbApErrException.class
rt.jar : sun/security/krb5/internal/KrbErrException.class
rt.jar : sun/security/krb5/KrbCryptoException.class
rt.jar : sun/security/krb5/KrbException.class
rt.jar : sun/security/krb5/RealmException.class
rt.jar : sun/security/pkcs/EncodingException.class
rt.jar : sun/security/pkcs/ParsingException.class
rt.jar : sun/security/provider/certpath/CertificateRevokedException.class
rt.jar : sun/security/provider/certpath/SunCertPathBuilderException.class
rt.jar : sun/security/provider/PolicyParser$ParsingException.class
rt.jar : sun/security/timestamp/TSResponse$TimestampException.class
rt.jar : sun/security/util/PendingException.class
rt.jar : sun/security/util/PropertyExpander$ExpandException.class
rt.jar : sun/security/validator/ValidatorException.class
rt.jar : sun/security/x509/CertException.class
rt.jar : sun/tools/jar/JarException.class

The content of element type "properties" must match "(comment?,entry*)".

$
0
0
I'm trying to make my Java XML properties file a little more human-readable by breaking the entries into blocks. Evidently my assumptions on how to do this were wrong. Here are the error, cause, and solution:

Error:

java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException: The content of element type "properties" must match "(comment?,entry*)".

Cause:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>

<comment>---SQL settings---</comment>
<entry key="SQLJNDIName">SQLDataSource</entry>
<entry key="SQLServerName">server01</entry>
<entry key="SQLPortNumber">12345</entry>
<entry key="SQLDatabaseName">db01</entry>
<entry key="SQLUser">user01</entry>
<entry key="SQLPassword">changeme</entry>
<entry key="SQLTableOwner">dbo</entry>

<comment>---TEST settings---</comment>
<entry key="TEST">TEST</entry>

</properties>


Solution: I changed the comment elements into XML comments, and it worked.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>

<!--SQL settings-->
<entry key="SQLJNDIName">SQLDataSource</entry>
<entry key="SQLServerName">server01</entry>
<entry key="SQLPortNumber">12345</entry>
<entry key="SQLDatabaseName">db01</entry>
<entry key="SQLUser">user01</entry>
<entry key="SQLPassword">changeme</entry>
<entry key="SQLTableOwner">dbo</entry>

<!--TEST settings-->
<entry key="TEST">TEST</entry>

</properties>

ReplaceGuids.ps1

$
0
0
I was looking for a way to replace all GUIDs in a Visual Studio solution, so I took the answer to this StackOverflow question (Replacing all GUIDs in a file with new GUIDs from the command line) and extended it so that the script keeps track of GUIDs that are referenced across multiple files. An example is shown in the header below.

<#
    .Synopsis
    Replace all GUIDs in specified files under a root folder, carefully keeping track
    of how GUIDs are referenced in different files (e.g. Visual Studio solution).
   
    Loosely based on GuidSwap.ps1:
    http://stackoverflow.com/questions/2201740/replacing-all-guids-in-a-file-with-new-guids-from-the-command-line
   
    .NOTES
    Version:        1.0
    Author:         Joe Zamora (blog.idmware.com)
    Creation Date:  2016-03-01
    Purpose/Change: Initial script development
 
    .EXAMPLE
    .\ReplaceGuids.ps1 "C:\Code\IDMware" -FileNamePatterns @("*.sln","*.csproj","*.cs") -Verbose -WhatIf
#>

# Add common parameters to the script.
[CmdletBinding()]
param(
    $RootFolder
    ,$LogFolder='.'
    ,[String[]]$FileNamePatterns
    ,[switch]$WhatIf
)
$global:WhatIf=$WhatIf.IsPresent

# Change directory to the location of this script.
$scriptpath=$MyInvocation.MyCommand.Path
$dir=Split-Path$scriptpath
cd$dir
$ScriptName=$MyInvocation.MyCommand.Name

If(!($RootFolder))
{
    Write-Host@"
Usage: $ScriptName  -RootFolder <rootfolder> [Options]

Options:
    -LogFolder <logfolder>                      Defaults to location of script.
   
    -FileNamePatterns @(*.ext1, *.ext2, ...)    Defaults to all files (*).
   
    -WhatIf                                     Test run without replacements.
   
    -Verbose                                    Standard Powershell flags.
    -Debug
"@
    Exit
}

if ($LogFolder-and!(Test-Path"$LogFolder"-PathTypeContainer))
{
      Write-Host"No such folder: `"$LogFolder`""
      Exit
}

<#
    .Synopsis
    This code snippet gets all the files in $Path that contain the specified pattern.
    Based on this sample:
    http://www.adminarsenal.com/admin-arsenal-blog/powershell-searching-through-files-for-matching-strings/
#>
functionEnumerate-FilesContainingPattern {
[CmdletBinding()]
param(
    $Path=(throw'Path cannot be empty.')
    ,$Pattern=(throw'Pattern cannot be empty.')
    ,[String[]]$FileNamePatterns=$null
)
    $PathArray= @()
    if (!$FileNamePatterns) {
        $FileNamePatterns= @("*")
    }

    ForEach ($FileNamePatternin$FileNamePatterns) {
        Get-ChildItem$Path-Recurse-Filter$FileNamePattern |
        Where-Object { $_.Attributes -ne"Directory"} |
        ForEach-Object {
            If (Get-Content$_.FullName | Select-String-Pattern$Pattern) {
                $PathArray+=$_.FullName
            }
        }
    }
    $PathArray
} <# function Enumerate-FilesContainingPattern #>

# Timestamps and performance.
$stopWatch= [System.Diagnostics.Stopwatch]::StartNew()
$startTime=Get-Date
Write-Verbose@"

--- SCRIPT BEGIN $ScriptName $startTime ---

"@

# Begin by finding all files under the root folder that contain a GUID pattern.
$GuidRegexPattern="[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}"
$FileList=Enumerate-FilesContainingPattern$RootFolder$GuidRegexPattern$FileNamePatterns
   
$LogFilePrefix="{0}-{1}"-f$ScriptName, $startTime.ToString("yyyy-MM-dd_HH-mm-ss")
$FileListLogFile=Join-Path$LogFolder"$LogFilePrefix-FileList.txt"
$FileList | ForEach-Object {$_ | Out-File$FileListLogFile-Append}
Write-Host"File list log file:`r`n$FileListLogFile"
cat$FileListLogFile | %{Write-Verbose$_}

# Next, do a read-only loop over the files and build a mapping table of old to new GUIDs.
$guidMap= @{}
foreach ($filePathin$FileList)
{
    $text= [string]::join([environment]::newline, (get-content-path$filePath))
    Foreach ($matchin [regex]::matches($text, $GuidRegexPattern)) {
        $oldGuid=$match.Value.ToUpper()
        if (!$guidMap.ContainsKey($oldGuid)) {
            $newGuid= [System.Guid]::newguid().ToString().ToUpper()
            $guidMap[$oldGuid] =$newGuid
        }
    }
}

$GuidMapLogFile=Join-Path$LogFolder"$LogFilePrefix-GuidMap.csv"
"OldGuid,NewGuid" | Out-File$GuidMapLogFile
$guidMap.Keys | % { "$_,$($guidMap[$_])" | Out-File$GuidMapLogFile-Append }
Write-Host"GUID map log file:`r`n$GuidMapLogFile"
cat$GuidMapLogFile | %{Write-Verbose$_}

# Finally, do the search-and-replace.
foreach ($filePathin$FileList) {
    Write-Verbose"Processing $filePath"
    $newText=New-ObjectSystem.Text.StringBuilder
    cat$filePath | % {
        $original=$_
        $new=$_
        $isMatch=$false
        $matches= [regex]::Matches($new, $GuidRegexPattern)
        foreach ($matchin$matches) {
            $isMatch=$true
            $new=$new-ireplace$match.Value, $guidMap[$match.Value.ToString().ToUpper()]
        }       
        $newText.AppendLine($new) | Out-Null
        if ($isMatch) {
            $msg="Old: $original`r`nNew: $new"
            if ($global:WhatIf) {
                Write-Host"What if:`r`n$msg"
            } else {
                Write-Verbose"`r`n$msg"
            }
        }
    }
    if (!$global:WhatIf) {
        $newText.ToString() | Set-Content$filePath
    }
}

# Timestamps and performance.
$endTime=Get-Date
Write-Verbose@"

--- SCRIPT END $ScriptName $endTime ---

Total elapsed: $($stopWatch.Elapsed)
"@


MIM metaverse SQL query - manager contributing MA

$
0
0
This is a sequel (no pun intended) to my old post, FIM metaverse SQL query - employeeID contributing MA.  Since 'manager' is a reference attribute, you need a slightly different query than for scalar attributes.

set transaction isolation level read uncommitted

SELECT TOP 1000
       mv.object_type
       ,mv.accountName
       ,mv.domain
       ,l.attribute_name
       ,ma_mgr.ma_name as [manager MA]
FROM [FIMSynchronizationService].[dbo].[mms_mv_link] l
join [FIMSynchronizationService].dbo.mms_metaverse mv
on l.object_id = mv.object_id

left join [FIMSynchronizationService].[dbo].[mms_lineage_cross_reference] cr_mgr
on cr_mgr.lineage_id = l.lineage_id
left join [FIMSynchronizationService].[dbo].[mms_management_agent] ma_mgr
on ma_mgr.ma_id = cr_mgr.ma_id

where object_type = 'person'
and l.attribute_name = 'manager'

FIM Powershell Module: Remove/unset/clear a single-valued reference attribute

$
0
0
In the latest version of the FIM Powershell Module (2016-05-18), in order to remove/unset/clear a single-valued reference attribute, you're supposed to do this:

New-FimImportChange -Operation 'Replace' -AttributeName "Manager"

Note that you just don't supply the -AttributeValue paramter.  However, in my script, I don't want to perform the extra step of checking whether my value is present; so I'd like to do this:

New-FimImportChange -Operation 'Replace' -AttributeName "Manager" -AttributeValue "$newManager"

In order to do that, I had to make a small change to New-FimImportChange in FimPowerShellModule.psm1:

###
### Process the AttributeValue Parameter
###
if (!$AttributeValue)
{
    # Allow the caller to pass an empty AttributeValue to unset it, but DO NOT set the AttributeValue on the ImportChange object.
}
elseif ($AttributeValue -is [String])
{
    $importChange.AttributeValue = $AttributeValue
}
elseif ($AttributeValue -is [DateTime])




Unable To Create New WorkflowInstance For WorkflowDefinition

$
0
0
I discovered another variant that causes the titular error message.  I was copying the FIM policy config from one data source to another, and that meant making copies of a couple activities within the same workflow.  After some troubleshooting and head-scratching, I realized that FIM was choking on the duplicate activity names (see highlights below).  As you can see, when you build a workflow from the portal, FIM names all activities "authenticationGateActivityX."  And interestingly, if you made the same mistake as I did, and you try to fix it by opening all of the activities within the portal and click "Save," FIM won't fix your mistakes!

<ns0:SequentialWorkflow
  x:Name="SequentialWorkflow"
  ActorId="00000000-0000-0000-0000-000000000000"
  WorkflowDefinitionId="00000000-0000-0000-0000-000000000000"
  RequestId="00000000-0000-0000-0000-000000000000"
  TargetId="00000000-0000-0000-0000-000000000000"
  xmlns:ns1="clr-namespace:IDMware.FIM.Workflow.Activities;Assembly=IDMware.FIM.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b6cdb71f2a5e8e65"
  xmlns:ns2="clr-namespace:FimExtensions.FimActivityLibrary;Assembly=FimExtensions.FimActivityLibrary, Version=2.0.0.0, Culture=neutral, PublicKeyToken=68dc29282b77eca9"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:ns0="clr-namespace:Microsoft.ResourceManagement.Workflow.Activities;Assembly=Microsoft.ResourceManagement, Version=4.1.3559.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
  <ns1:GenerateRandomPasswordActivity
    x:Name="authenticationGateActivity1"
    DestinationValue="{x:Null}"
    MinPasswordLength="8"
    DestinationString="RandomPassword"
    TheActivityName="Generate random password"
    MaxPasswordLength="10" />
  <ns0:FunctionActivity
    x:Name="authenticationGateActivity6"
    FunctionExpression="<fn id="SingleValueAssignment"  isCustomExpression="false"><arg>[//Target/AccountName]</arg></fn>"
    Description="Grab Target account name"
    Destination="[//WorkflowData/TargetAccountName]" />
  <ns2:PowerShellActivity
    x:Name="authenticationGateActivity5"
    TheActivityName="Powershell: Set AD password"
    PowerShellScript="C:\Scryptography\SetADPwd.ps1" />
  <ns0:FunctionActivity
    x:Name="authenticationGateActivity7"
    FunctionExpression="<fn id="SingleValueAssignment"  isCustomExpression="false"><arg>[//Target/LMSID]</arg></fn>"
    Description="Grab LMS ID"
    Destination="[//WorkflowData/LMSID]" />
  <ns1:ExecuteSQLActivity
    SQLStatement="EXECUTE [dbo].[SetLMSNewUserPassword]    @id  ,@password"x:Name="authenticationGateActivity8"
    SQLConnectionStringName="LMS"
    ParamData="<DocumentElement>   <Parameters>     <ParamName>@id</ParamName>     <ParamValue>[//WorkflowData/LMSID]</ParamValue>     <DataType>Integer</DataType>   </Parameters>   <Parameters>     <ParamName>@password</ParamName>     <ParamValue>[//WorkflowData/RandomPassword]</ParamValue>     <DataType>String</DataType>   </Parameters> </DocumentElement>"
    WorkflowKey="Results"
    TheActivityName="SQL: Set LMS password" />
  <ns0:FunctionActivity
    x:Name="authenticationGateActivity9"
    FunctionExpression="<fn id="SingleValueAssignment"  isCustomExpression="false"><arg>[//Target/VLMID]</arg></fn>"
    Description="Grab VLM ID"
    Destination="[//WorkflowData/VLMID]" />
  <ns1:ExecuteSQLActivity
    SQLStatement="EXECUTE [dbo].[SetVLMNewUserPassword]    @id  ,@password"
    x:Name="authenticationGateActivity10"
    SQLConnectionStringName="VLM"
    ParamData="<DocumentElement>   <Parameters>     <ParamName>@id</ParamName>     <ParamValue>[//WorkflowData/VLMID]</ParamValue>     <DataType>String</DataType>   </Parameters>   <Parameters>     <ParamName>@password</ParamName>     <ParamValue>[//WorkflowData/RandomPassword]</ParamValue>     <DataType>String</DataType>   </Parameters> </DocumentElement>"
    WorkflowKey="VLMResults"
    TheActivityName="SQL: Set VLM password" />
  <ns0:FunctionActivity
    x:Name="authenticationGateActivity9"
    FunctionExpression="<fn id="SingleValueAssignment"  isCustomExpression="false"><arg>[//Target/PDSID]</arg></fn>"
    Description="Grab PDS ID"
    Destination="[//WorkflowData/PDSID]" />
  <ns1:ExecuteSQLActivity
    SQLStatement="EXECUTE [dbo].[SetPDSNewUserPassword]    @id  ,@password"
    x:Name="authenticationGateActivity10"
    SQLConnectionStringName="PDS"
    ParamData="<DocumentElement>   <Parameters>     <ParamName>@id</ParamName>     <ParamValue>[//WorkflowData/PDSID]</ParamValue>     <DataType>String</DataType>   </Parameters>   <Parameters>     <ParamName>@password</ParamName>     <ParamValue>[//WorkflowData/RandomPassword]</ParamValue>     <DataType>String</DataType>   </Parameters> </DocumentElement>"
    WorkflowKey="PDSResults"
    TheActivityName="SQL: Set PDS password" />
  <ns1:ExpressionEvaluator
    x:Name="authenticationGateActivity4"
    DestinationValue="False"
    TheUpdateMode="0"
    Notes=""
    DestinationString="[//Target/SetPassword]"
    ActorID="31415926-5358-9793-2384-626433832795"
    ThisActivityName="Turn off SetPassword flag"
    ValueType="String" />
</ns0:SequentialWorkflow>


Function evaluator custom expression escape double quote

$
0
0
Curiously, there's no need to escape double quotes inside custom expressions!

ReplaceString(
    [//WorkflowData/XMLEncoded],
    "&quot;",
    """
)

CodePlex says "Bye Felicia"

$
0
0
If you've visited CodePlex recently, you may have noticed a message at the top that reads:

CodePlex is shutting down. Read about the shutdown plan, including archive and migration information, on Brian Harry's blog.

Here's a summary of the timeline, according to the link above:

March 31, 2017
Announcement of shutdown and disabled ability to create new CodePlex projects.
October 2017
CodePlex goes into read-only mode.
December 15, 2017
CodePlex shuts down completely.

I know that a lot of projects have already moved over to GitHub, and we at Identity Managed have been quietly transitioning over to Bitbucket, but there are still plenty of projects on CodePlex that should be migrated to a new host (ahem, FIM Query Tool!).

Database upgrade failure FIM 2010 R2 4.1.3766.0 to MIM 2016 RTM 4.3.0.0 (4.3.1935.0)

$
0
0
Johnny-come-lately here. I ran into the same problem that others have while upgrading from FIM to MIM. You can find the references below; they refer to a download for a Microsoft.IdentityManagement.DatabaseUpgrade.exe.config file. However, I couldn't find a link to actually download the file, so I did a bit of forensics and compared the config file from the SP1 update to that from RTM. I merged the relevant parts and BANG!, the installation succeeded. To save everyone else the trouble, here are the before and after files; and my relevant installation notes are below.

Cheers & happy holidays!

Microsoft.IdentityManagement.DatabaseUpgrade.exe-MIM2016RTM.config

Microsoft.IdentityManagement.DatabaseUpgrade.exe-FIXED.config

Error while running setup for Service and Portal
Installing Microsoft Identity Manager Service and Portal

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected Contact your support personnel or package vendor.


Run MSI with logging
set datetime=%date:~-4%-%date:~-10,2%-%date:~-7,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%
msiexec /i "E:\Service and Portal\Service and Portal.msi" /L*V "D:\Install\Service and Portal.msi-%datetime%.log"

Check error log
"D:\Install\Service and Portal.msi-2018-12-22_18-17-12.log"
MSI (s) (60:5C) [18:20:53:410]: Executing op: CustomActionSchedule(Action=UpgradeDatabase,ActionType=1042,Source=C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.IdentityManagement.DatabaseUpgrade.exe,Target=/ConnectionString:"Data Source=MY-SQL-ALIAS;Initial Catalog=FIMService;Integrated Security=SSPI;Pooling=true;Connection Timeout=225" /FimServiceAccountName:"MYDOMAIN\-svc-fimsvc" /FimServiceDatabaseName:"FIMService",)

CustomAction UpgradeDatabase returned actual error code -2 (note this may not be 100% accurate if translation happened inside sandbox)

MSI (s) (60:5C) [18:21:01:739]: Note: 1: 1722 2: UpgradeDatabase 3: C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.IdentityManagement.DatabaseUpgrade.exe 4: /ConnectionString:"Data Source=MY-SQL-ALIAS;Initial Catalog=FIMService;Integrated Security=SSPI;Pooling=true;Connection Timeout=225" /FimServiceAccountName:"MYDOMAIN\-svc-fimsvc" /FimServiceDatabaseName:"FIMService"

Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action UpgradeDatabase, location: C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.IdentityManagement.DatabaseUpgrade.exe, command: /ConnectionString:"Data Source=MY-SQL-ALIAS;Initial Catalog=FIMService;Integrated Security=SSPI;Pooling=true;Connection Timeout=225" /FimServiceAccountName:"MYDOMAIN\-svc-fimsvc" /FimServiceDatabaseName:"FIMService"

MSI (s) (60:5C) [18:21:35:553]: Product: Microsoft Identity Manager Service and Portal -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action UpgradeDatabase, location: C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.IdentityManagement.DatabaseUpgrade.exe, command: /ConnectionString:"Data Source=MY-SQL-ALIAS;Initial Catalog=FIMService;Integrated Security=SSPI;Pooling=true;Connection Timeout=225" /FimServiceAccountName:"MYDOMAIN\-svc-fimsvc" /FimServiceDatabaseName:"FIMService"
Copy from installation media
From
"E:\Service and Portal"

To
"D:\Install\Service and Portal"
Try this command manually
"D:\Install\Service and Portal\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.IdentityManagement.DatabaseUpgrade.exe"  /ConnectionString:"Data Source=MY-SQL-ALIAS;Initial Catalog=FIMService;Integrated Security=SSPI;Pooling=true;Connection Timeout=225" /FimServiceAccountName:"MYDOMAIN\-svc-fimsvc" /FimServiceDatabaseName:"FIMService"

Check trace log
"D:\Install\Service and Portal\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.IdentityManagement.DatabaseUpgrade_tracelog.txt"
Microsoft.ResourceManagement Verbose: 0 : --********************************************************
--*                
    DateTime=2018-12-23T03:02:53.7616813Z
Microsoft.ResourceManagement Verbose: 0 : Execute SQL : The following sql statement failed.
 --********************************************************
--*                                                      *
--*   Copyright (C) Microsoft. All rights reserved.      *
--*                                                      *
--********************************************************
CREATE PROCEDURE [fim].[GetIdentifiersFromObjectKeys]
    @objectKeyList fim.ObjectKeyListInternal READONLY
AS
BEGIN

    SELECT
        [o].[ObjectKey],
    DateTime=2018-12-23T03:02:54.0898207Z
Microsoft.ResourceManagement Verbose: 0 : Execute SQL : The transaction failed with the following errors System.Data.SqlClient.SqlException: Column, parameter, or variable #1: Cannot find data type fim.ObjectKeyListInternal.
Must declare the table variable "@objectKeyList".
Parameter or variable '@objectKeyList' has an invalid data type.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Dat
    DateTime=2018-12-23T03:02:54.0898207Z
Microsoft.ResourceManagement Verbose: 0 : Schema upgrade : Completed processing script file GeneratedDBUpgradeScript.sql
    DateTime=2018-12-23T03:02:54.0898207Z
Microsoft.ResourceManagement Verbose: 0 : Adding SQL Agent jobs
    DateTime=2018-12-23T03:02:54.0898207Z
Microsoft.ResourceManagement Verbose: 0 : SQL Agent jobs were added
    DateTime=2018-12-23T03:02:54.3884661Z
Microsoft.ResourceManagement Verbose: 0 : Schema upgrade: Completed with following errors.
    DateTime=2018-12-23T03:02:57.4545928Z
Microsoft.ResourceManagement Verbose: 0 : Execute SQL : The upgrade tool has rolled back.
The sql transaction running the script GeneratedDBUpgradeScript.sql failed.
 Exception: System.Data.SqlClient.SqlException: Column, parameter, or variable #1: Cannot find data type fim.ObjectKeyListInternal.
Must declare the table variable "@objectKeyList".
Parameter or variable '@objectKeyList' has an invalid data type.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParse
    DateTime=2018-12-23T03:02:57.4545928Z
Microsoft.ResourceManagement Error: 3 : Database upgrade : Encountered errors when upgrading the database schema.
    DateTime=2018-12-23T03:02:57.4545928Z
Check FIM version
Forefront Identity Manager 2010 R2
4.1.3766.0






Check database version
SELECT [Version]
      ,[BinaryVersion]
FROM [FIMService].[fim].[Version]
Version
BinaryVersion
1128
4.1.3766.0
Hack DatabaseUpgrade.config file
References:





Merge config file from SP1 to RTM
D:\Install\Service and Portal\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.IdentityManagement.DatabaseUpgrade.exe.config

Replace this
<!-- 2001 == vNext -->
<Version Id="1122to2001" SourceVersion="1122" TargetVersion="2001">
  <SqlScripts>
    <SqlScript Id="PreProcess1122" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1122" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1122" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>

With this
<Version Id="1122to1123" SourceVersion="1122" TargetVersion="1123">
  <SqlScripts>
    <SqlScript Id="PreProcess1122" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1122" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1122" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>
<!-- Next 100 update blocks are reserved for future LDR1 patches-->
<Version Id="1123to1124" SourceVersion="1123" TargetVersion="1124">
  <SqlScripts>
    <SqlScript Id="PreProcess1123" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1123" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1123" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>
<Version Id="1124to1125" SourceVersion="1124" TargetVersion="1125">
  <SqlScripts>
    <SqlScript Id="PreProcess1124" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1124" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1124" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>
<Version Id="1125to1126" SourceVersion="1125" TargetVersion="1126">
  <SqlScripts>
    <SqlScript Id="PreProcess1125" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1125" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1125" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>
<Version Id="1126to1127" SourceVersion="1126" TargetVersion="1127">
  <SqlScripts>
    <SqlScript Id="PreProcess1126" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1126" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1126" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>
<Version Id="1127to1128" SourceVersion="1127" TargetVersion="1128">
  <SqlScripts>
    <SqlScript Id="PreProcess1127" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1127" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1127" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>
<!-- 2001 == vNext -->
<Version Id="1128to2001" SourceVersion="1128" TargetVersion="2001">
  <SqlScripts>
    <SqlScript Id="PreProcess1128" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PreProcess" />
    <SqlScript Id="Upgrade1128" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="SchemaUpgrade" />
    <SqlScript Id="PostProcess1128" File="NoOperation.sql" EmbeddedAsResource="true" ContinueOnError="false" Type="PostProcess" />
  </SqlScripts>
</Version>
Restore FIMService database from backup


Enable Service Broker on FIMService datbase


Re-Run MSI with logging
set datetime=%date:~-4%-%date:~-10,2%-%date:~-7,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%
msiexec /i "D:\Install\Service and Portal\Service and Portal.msi" /L*V "D:\Install\Service and Portal.msi-%datetime%.log"


(Not a showstopper)

The database upgrade tool has encountered at least one error when upgrading FIM configuration objects. Please see the Forefront Identity Manager application event log for more detail.




SUCCESS!


FYI, event log
Forefront Identity Manager event log
Log Name:      Forefront Identity Manager
Source:        Microsoft.ResourceManagement
Date:          12/23/2018 9:07:30 AM
Event ID:      3
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      MYMIMSERVER.mydomain.local
Description:
Workflow host activation failed for workflow definition id : d69415a1-490f-4990-b31d-f41108ace09d, version key: 201. Exception: Object reference not set to an instance of an object.   at Microsoft.ResourceManagement.Workflow.Hosting.HostActivator.ActivateHost(ResourceManagementWorkflowDefinition workflowDefinition, Boolean suspendWorkflowStartupAndTimerOperations)
   at Microsoft.ResourceManagement.Workflow.Hosting.HostActivator.RetrieveWorkflowDataForHostActivator()

FYI, trace log
"D:\Program Files\Microsoft Identity Manager\2016\Service\Microsoft.IdentityManagement.DatabaseUpgrade_tracelog.txt"
    DateTime=2018-12-23T16:47:55.1994988Z
Microsoft.ResourceManagement Information: 1 : WS: Action.Put.Execute.Enter
    DateTime=2018-12-23T16:47:55.1994988Z
Microsoft.ResourceManagement Error: 3 : Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 2627, Level 14, State 1, Procedure PostProcessManagementPolicyRuleUpdate, Line 585, Message: Violation of PRIMARY KEY constraint 'PK_ManagementPolicyRuleAttribute'. Cannot insert duplicate key in object 'fim.ManagementPolicyRuleAttribute'. The duplicate key value is (2879, 105).
    DateTime=2018-12-23T16:47:55.2776260Z
Microsoft.ResourceManagement Error: 3 : Microsoft.ResourceManagement.WebServices.Exceptions.UnwillingToPerformException: Other ---> System.Data.SqlClient.SqlException: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 2627, Level 14, State 1, Procedure PostProcessManagementPolicyRuleUpdate, Line 585, Message: Violation of PRIMARY KEY constraint 'PK_ManagementPolicyRuleAttribute'. Cannot insert duplicate key in object 'fim.ManagementPolicyRuleAttribute'. The duplicate key value is (2879, 105).
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.HasMoreRows()
   at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
   at System.Data.SqlClient.SqlDataReader.NextResult()
   at Microsoft.ResourceManagement.Data.DataAccess.ProcessRequest(RequestType request)
   --- End of inner exception stack trace ---
    DateTime=2018-12-23T16:47:55.2776260Z
Microsoft.ResourceManagement Warning: 2 : Request 'a3048c6f-fad9-40de-a3eb-b711439d1e6d' failed while trying to commit the changes to the database.  Exception: 'Dispatch Request Failure Source: 'Other''.
    DateTime=2018-12-23T16:47:55.2932514Z
Microsoft.ResourceManagement Verbose: 0 : Request 'a3048c6f-fad9-40de-a3eb-b711439d1e6d' updates have been persisted to permanent storage.
    DateTime=2018-12-23T16:47:55.3088755Z
Microsoft.ResourceManagement Information: 1 : RequestIdentifier 'a3048c6f-fad9-40de-a3eb-b711439d1e6d' exited RequestDispatcher with RequestStatus 'Failed'.
    DateTime=2018-12-23T16:47:55.3088755Z
Microsoft.ResourceManagement Error: 3 : Out-of-box object import : Errors encountered when upgrading the configuration object urn:uuid:a61f2b61-4258-4a02-8fdc-840c739a4bfa.
    DateTime=2018-12-23T16:47:55.3401291Z
Microsoft.ResourceManagement Verbose: 0 : Out-of-box object import : Exception message.
 Failure when making web service call.

SourceObjectID = urn:uuid:a61f2b61-4258-4a02-8fdc-840c739a4bfa
Error = Microsoft.ResourceManagement.WebServices.Exceptions.UnwillingToPerformException: Other ---> System.Data.SqlClient.SqlException: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 2627, Level 14, State 1, Procedure
    DateTime=2018-12-23T16:47:55.3401291Z
Microsoft.ResourceManagement Verbose: 0 : Out-of-box object import : Completed processing object import file ConfigurationChange2004.xml.
Check database version
SELECT [Version]
      ,[BinaryVersion]
FROM [FIMService].[fim].[Version]
Version
BinaryVersion
2004
4.3.0.0
MIM Sync version



MIM Service version






Client-side fix: Cisco AnyConnect reconnects every few minutes

$
0
0
TL;DR If Cisco AnyConnect is disconnecting, reconnecting every few minutes, try blocking UDP in/out ports for the vpnagent executable/service.

Cisco AnyConnect Secure Mobility Client version 4.7.04056

This one drove me nuts for the longest time until I found time to dedicate to troubleshooting it myself. Symptoms were that my AnyConnect client had been disconnecting, reconnecting every few minutes (2:50 to be exact!), which would, in turn, timeout my RDP session. Total reconnect time was only a few seconds, but you can imagine how having your concentration broken every three minutes is a productivity killer!

I had troubleshot this with my ISP, Comcast/Xfinity and my customer (whose site I was connecting to via VPN). Both essentially were pointing fingers at each other. It would be easy to blame the ISP because the problem didn't happen over my hotspot, but I can't help but think that the VPN server wasn't configured to properly handle such situations. Anyway, I decided to live with it (for far too long) until I could do some troubleshooting myself and figure out next steps.

My troubleshooting steps are below, in case anyone is interested.

Wireshark

Wireshark VPN test-2019-12-09-A.pcapng

Wireshark VPN test-2019-12-09-G-Comcast.pcapng

Wireshark VPN test-2019-12-09-F-Hotspot.pcapng

Wireshark VPN test-2019-12-09-E-Comcast-Reconnect at 129 sec.pcapng

Wireshark VPN test-2019-12-09-D-Hotspot.pcapng

Wireshark VPN test-2019-12-09-C-Comcast-Reconnect at 91 sec.pcapng

Wireshark VPN test-2019-12-09-B.pcapng

Noticed that most application traffic happens via DTLS (OpenSSL) over UDP, but every 20 seconds, there's a TLSv1.2 transmission from the client [PSH, ACK], but no response from the server.  Client retransmits the [PSH, ACK] in intervals of 0.3, 0.6, 1.2, 2.4, 4.8, 9.6 seconds, and then sends a RST.

Googled search

cisco vpn client tls every 20 seconds no ack

https://community.cisco.com/t5/vpn-and-anyconnect/anyconnect-vpn-session-disconnect-and-reconnect/td-p/2474657

Article above references this, which was the most helpful

https://www.cisco.com/c/en/us/support/docs/security/anyconnect-secure-mobility-client/116881-technote-anyconnect-00.html

As long as DTLS is enabled, the client applies the DTLS MTU (in this case 1418) on the VPN adapter (which is enabled before the DTLS tunnel is established and is needed for routes/filters enforcement), to ensure optimum performance. If the DTLS tunnel cannot be established or it is dropped at some point, the client fails over to TLS and adjusts the MTU on the virtual adapter (VA) to the TLS MTU value (this requires a session level reconnect).

Block UDP (in & out) for VPN client in Windows Firewall

C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnagent.exe

 

MIMWAL Generate Unique Value workflow activity & simultaneous activities on the same object

$
0
0
Has anyone noticed that running simultaneous (yet distinct) "Generate Unique Value" activities (in two separate workflows) on the same object causes the UniquenessKey to be updated on one of them?  For example, if I try to generate an AccountName and an Email for Luke Landlubber at the same time, in two distinct, parallel workflows, the outcomes will look inconsistent:

AccountName: LLandlubber
Email: Luke.Landlubber1@example.com

or

AccountName: LLandlubber1
Email: Luke.Landlubber@example.com

After some initial confusion, I noticed the pattern and made the email workflow wait on account name, and it produced the desired result:

AccountName: LLandlubber
Email: Luke.Landlubber@example.com

Update 2021-04-09

Looks like this isn't an issue with MIMWAL after all (thankfully).  Turns out, I had a race condition where a user would transition into a set *twice*, nearly simultaneously.  Not something you'd expect, right?  I suspect it had something to do with a nested set.  Possibly even an issue with the version installed (4.4.1302.0).  Anyway, I believe it's fixed after I flattened the transition set, meaning that I took the criteria of the nested set and added that directly to the parent set.

Unless you hear otherwise, you can assume that I had no more issues.  :^)
Viewing all 34 articles
Browse latest View live