I am creating a customization file for OSB, and I would need to add an alert in this, so whenever it is loaded, the affected resources are modified to include those alerts.
So far I have followed instructions explained in See Example - Adding and Deleting SLA Alert Rules. I have created a customization file with the same structure than the example (actions - add - value), just changing the value for the alert or even using the one shown in the example.
Anyway, when I try to apply this customization file on OSB, I always get the error:
org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to
com.oracle.xmlns.servicebus.monitoring.alert.AlertRuleDocument
My customization file is:
<?xml version="1.0" encoding="UTF-8"?>
<cus:Customizations xmlns:cus="http://www.bea.com/wli/config/customizations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.bea.com/wli/config/xmltypes" xmlns:aler="http://www.bea.com/wli/monitoring/alert">
<cus:customization xsi:type="cus:EnvValueActionsCustomizationType">
<cus:description>Alertes Generals de ProxyService</cus:description>
<cus:owners>
<xt:ownerQuery>
<xt:resourceTypes>ProxyService</xt:resourceTypes>
<xt:refsToSearch xsi:type="xt:LocationRefType">
<xt:type>Folder</xt:type>
<xt:path>bus_ver/EA</xt:path>
</xt:refsToSearch>
</xt:ownerQuery>
</cus:owners>
<cus:actions>
<xt:add>
<xt:envValueType>Service SLA Alert Rule</xt:envValueType>
<xt:location>AverageResponse</xt:location>
<xt:value>
<aler:alertRule enabled="true" name="prova"> <aler:description>provades</aler:description> <aler:expirationDate>2016-03-31+02:00</aler:expirationDate>
<aler:startTime>00:00:00.000+01:00</aler:startTime>
<aler:endTime>00:05:00.000+01:00</aler:endTime>
<aler:frequency>every-time</aler:frequency>
<aler:severity>normal</aler:severity>
<aler:stopProcessing>false</aler:stopProcessing>
<aler:condition aggregation-interval="10">
<con1:monCondExpr xmlns:con1="http://xmlns.oracle.com/servicebus/monitoring/alert/condition">
<con1:function>count</con1:function>
<con1:lhs>Operation.peticionSincrona.error-count</con1:lhs>
<con1:operator>=</con1:operator>
<con1:rhs>1</con1:rhs>
</con1:monCondExpr>
</aler:condition>
<aler:alertDestination ref="bus_ver/AlertaProva"/>
</aler:alertRule>
</xt:value>
</xt:add>
</cus:actions>
</cus:customization>
</cus:Customizations>
Does anyone know how to solve this or maybe I am doing something unproperly?
Thanks for your help.
Finally I made work a customization file with an alert like this:
<?xml version="1.0" encoding="UTF-8"?>
<cus:Customizations xmlns:cus="http://www.bea.com/wli/config/customizations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.bea.com/wli/config/xmltypes" xmlns:aler="http://xmlns.oracle.com/servicebus/monitoring/alert">
<cus:customization xsi:type="cus:EnvValueActionsCustomizationType">
<cus:description>Alertes Generals de ProxyService</cus:description>
<cus:owners>
<xt:ownerQuery>
<xt:resourceTypes>ProxyService</xt:resourceTypes>
<xt:refsToSearch xsi:type="xt:LocationRefType">
<xt:type>Folder</xt:type>
<xt:path>bus_ver/EA</xt:path>
</xt:refsToSearch>
</xt:ownerQuery>
</cus:owners>
<cus:actions>
<xt:replace>
<xt:envValueType>Service SLA Alert Rule List</xt:envValueType>
<xt:value>
<aler:alertRules>
<aler:alertRule enabled="true" name="prova" xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:con="http://www.bea.com/wli/sb/services/security/config" xmlns:oper="http://xmlns.oracle.com/servicebus/proxy/operations" xmlns:env="http://www.bea.com/wli/config/env" xmlns:tran="http://www.bea.com/wli/sb/transports">
<aler:description>provades</aler:description>
<aler:expirationDate>2016-03-31+02:00</aler:expirationDate>
<aler:startTime>00:00:00.000+01:00</aler:startTime>
<aler:endTime>00:05:00.000+01:00</aler:endTime>
<aler:frequency>every-time</aler:frequency>
<aler:severity>normal</aler:severity>
<aler:stopProcessing>false</aler:stopProcessing>
<aler:condition aggregation-interval="10">
<con1:monCondExpr xmlns:con1="http://xmlns.oracle.com/servicebus/monitoring/alert/condition">
<con1:function>count</con1:function>
<con1:lhs>Operation.peticionSincrona.error-count</con1:lhs>
<con1:operator>=</con1:operator>
<con1:rhs>1</con1:rhs>
</con1:monCondExpr>
</aler:condition>
<aler:alertDestination ref="bus_ver/AlertaProva"/>
</aler:alertRule>
</aler:alertRules>
</xt:value>
</xt:replace>
</cus:actions>
</cus:customization>
Main differences that provoked error in initial XML:
xmlns:aler="http://xmlns.oracle.com/servicebus/monitoring/alert" -> OK vs xmlns:aler="http://www.bea.com/wli/monitoring/alert" -> KO
Service SLA Alert Rule List -> OK vs Service SLA Alert Rule -> KO
Related
Scenario: I created a SSRS Report in Visual Studio 15. The report works, I can preview it without errors. I made a copy of the RDL file by right clicking and copying and pasting it withing Visual Studio. When I attempt to preview the copy I get the following error:
Name cannot begin with the '>' character, hexadecimal value 0x3E. Line
5645, position 64
What's even weirder is I deleted everything (DataSets, datasources, parameters etc) and I still get the same error. What's really strange is it still refers to line 5645. After deleting everything from the report there are only 29 lines!
Another thing I found odd, and this could be key to solving the mystery is the file name and line # is blank in the error window.
Below is the the content of the RDL file after deleting it's content:
<?xml version="1.0" encoding="utf-8"?>
<Report MustUnderstand="df" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:df="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition/defaultfontfamily">
<df:DefaultFontFamily>Segoe UI</df:DefaultFontFamily>
<AutoRefresh>0</AutoRefresh>
<ReportSections>
<ReportSection>
<Body>
<Height>13.03466in</Height>
<Style />
</Body>
<Width>33.9775in</Width>
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
</ReportSection>
</ReportSections>
<ReportParametersLayout>
<GridLayoutDefinition>
<NumberOfColumns>4</NumberOfColumns>
<NumberOfRows>2</NumberOfRows>
</GridLayoutDefinition>
</ReportParametersLayout>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>9922849d-3925-4879-911b-cdeeeb45c5d6</rd:ReportID>
</Report>
The solution was changing the project from Release to Debug mode:
I want to be able to scan SSRS report definition (.rdl) files and alter them programmatically. I am following a Microsoft tutorial (albeit a little out-of-date but can't find an up-to-date version).
The tutorial is here: https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2005/aa337455(v%3dsql.90)
I have downloaded the XML Schema File from the Microsoft website - ReportDefinition.xsd - and am now following the steps 4 to 6 that say to open the Visual Studio Command Prompt and run the utility XSD to generate the ReportDefinition.vb file that contains the classes for the RDL schema.
However, when I run the command as per the instructions:
xsd /c /l:VB /n:SampleRDLSchema ReportDefinition.xsd
... I simply get the error message:
Error: '.', hexadecimal value 0x00, is an invalid character. Line 2, position 1.
This is the first few lines of the file; I can't see the characters 0x00 the error message refers to:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All rights reserved. -->
<xsd:schema targetNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"
elementFormDefault="qualified">
<xsd:annotation>
<xsd:documentation>
The following schema describes the structure of the
Report Definition Language (RDL) for Microsoft SQL Server 2008 R2.
Given this is a Microsoft written set of instructions to use a Microsoft utility running against a Microsoft supplied file, I'm a bit baffled as to why there should be an error in it.
Can anyone help? Thanks.
The issue being reported at the start of line 2 could indicate that this is an encoding issue. The attribute encoding="utf-8" on the first line indicates that the file should be interpreted as having a a UTF-8 encoding. So after the first line, the xsd utitlity would try to read the file as UTF-8. If the file actually uses a different encoding, then an error would be produced like the one you have encountered.
To test this, remove encoding="utf-8" from the first line & run the command again.
For me, it was another issue. My file contained some includes like :
<xs:include schemaLocation="XMLFILE.xsd"/>
So the error meaning is "it cannot find the XMLFILE.xsd". Make sure you have all related xml files from all includes in all files. You know it when you right clicking on the file in visual studio and do "View Code (F7)". If the include is underlined in red, the file is missing or something in the "XMLFile.xsd" is missing.
Please Microsoft's crew, showing a clear error message can save us a ton of hours of works... Don't you?
I am trying to move to the latest version of Wakanda Enterprise and my solution, originally created in V10 enterprise, won't even launch. Below are the error codes. I searched for some kind of index to look up the codes but I could not find one.
2016-09-28 13:50:33 [wakanda.PlannerTool2.PlannerTool2.xbox] ERROR - [614] "{newname}" is an invalid name for file {path}., task #1299
2016-09-28 13:50:33 [wakanda.PlannerTool2.PlannerTool2.iasv] ERROR - [1054] Cannot post 'applicationWillStart' message to services, task #1299
2016-09-28 13:50:33 [wakanda.PlannerTool2.PlannerTool2.xbox] ERROR - [650] Directory not found (dirNFErr)., task #1299
I tried this on 2 different machines (both Mac) and am an admin on one of them-- both had the same error codes.
I am trying to upgrade to 11.197492 and the same exact errors happen when I try to launch using 11.196912
My .waProject file:
<?xml version="1.0" encoding="UTF-8"?>
<project>
`<folder path="./Widgets/">`
`<tag name="widgets"/>`
`</folder>`
`<folder path="./Themes/">`
`<tag name="themes"/>`
`</folder>`
`<file path="./Model.waModel">`
`<tag name="catalog"/>`
`</file>`
`<file path="./Settings.waSettings">`
`<tag name="settings"/>`
`</file>`
`<file path="./Permissions.waPerm">`
`<tag name="permissions"/>`
`</file>`
`<file path="./bootstrap.js">`
`<tag name="bootStrap"/>`
`</file>`
</project>
thanks in advance. Publishing with my VisualStudio/ClickOnce I get always the following error.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\carlos\Documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\publish\ConsoleApplication1.application resulted in exception. Following failure messages were detected:
+ Configuration system failed to initialize
+ Unrecognized configuration section startup. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe.Config line 2)
The dfsvc.exe.Config is:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="false">
<supportedRuntime version="v4.0" sku="client" />
</startup>
</configuration>
Is something that I should install on my PC? Thanks again.
I found a solution,
I don't know exactly which was the fix, I did three steps:
1 - I repaired .net fx intallation
2 - Ran mage -cc to clear clickonce store
3 - Rebooted
thanks
Looking to get an xml feed of just pinned builds. I see that I can filter on successful / unsuccessful builds, but can't find a flag / option to filter by pinned. Any suggestions?
Have a look at the Rest API from TeamCity
You can load a list of all builds:
http://YOURSERVER/httpAuth/app/rest/builds
The result ist something like this:
<builds nextHref="/httpAuth/app/rest/builds?count=100&start=100" count="100">
<build id="4324" number="273" status="SUCCESS" buildTypeId="bt9" href="/httpAuth/app/rest/builds/id:4324" webUrl="http://YOURSERVER/viewLog.html?buildId=4324&buildTypeId=bt9"/>
<build id="4323" number="283" status="ERROR" buildTypeId="bt10" href="/httpAuth/app/rest/builds/id:4323" webUrl="http://YOURSERVER/viewLog.html?buildId=4323&buildTypeId=bt10"/>
<build id="4322" number="56" status="SUCCESS" buildTypeId="bt44" href="/httpAuth/app/rest/builds/id:4322" webUrl="http://YOURSERVER/viewLog.html?buildId=4322&buildTypeId=bt44"/>
</builds>
By look at the href you can get detailed Info for this Build. And there is an attribute pinned
The count and the start position of the list of build can you control by adding GET Parameters like this: ?count=5&start=200
If you want it for specific Projects or Project Configuratins you have to go this way:
With this API you can retrieve all Projects.
(use http://YOURSERVER/httpAuth/app/rest/projects)
With this info you can get the Configurations.
(example: http://YOURSERVER/httpAuth/app/rest/projects/id:project3)
Here you get the detail info about a specific configuration:
(example: http://YOURSERVER/httpAuth/app/rest/buildTypes/id:bt17
And finally with this list you can get details of this build:
(example: http://YOURSERVER/httpAuth/app/rest/builds/id:4144
The result of the last call is something like this:
<build id="4271" number="151" status="SUCCESS" href="/httpAuth/app/rest/builds/id:4271" webUrl="http://YOURSERVER/viewLog.html?buildId=4271&buildTypeId=bt2" personal="false" history="false" pinned="false">
<statusText>Tests passed: 177</statusText>
<buildType id="bt2" name="trunk Legacy" href="/httpAuth/app/rest/buildTypes/id:bt2" projectName="Common" projectId="project2" webUrl="http://YOURSERVER/viewType.html?buildTypeId=bt2"/>
<startDate>20100923T082041+0200</startDate>
<finishDate>20100923T082320+0200</finishDate>
<agent name="buildagent" id="3" href="/httpAuth/app/rest/agents/id:3"/>
<tags/>
<properties>
<property name="env.SvnSubDirectory" value="trunk"/>
</properties>
<revisions>
<revision display-version="9335">
<vcs-root href="/httpAuth/app/rest/vcs-roots/id:1,ver:1" name="Common"/>
</revision>
</revisions>
<changes href="/httpAuth/app/rest/changes?build=id:4271" count="1"/>
<relatedIssues/>
Not what you asked for, but as I found this question when searching for a similar thing for Version 9:
On TeamCity 9, you can easily just access
https://teamcity.YOURCOMPANY.com/app/rest/builds?locator=pinned:true
Documentation: https://confluence.jetbrains.com/display/TCD9/REST+API#RESTAPI-BuildLocator