I'm trying to generate an automated staging area with BIML.
The source database is Progress and is connected by ODBC.
I'm using the following walkthroughs:
https://www.cathrinewilhelmsen.net/2015/07/12/biml-extension-methods-getdatabaseschema/
http://bimlscript.com/walkthrough/Details/3121
1-2-Environment.biml:
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<## template tier="0" #>
<Connections>
<OleDbConnection Name="Source" ConnectionString="Provider=MSDASQL;DSN=XXX;UID=XXX;PWD=XXX;" />
<OdbcConnection Name="Source2" ConnectionString="DSN=XXX;UID=XXX;PWD=XXX;" />
<OleDbConnection Name="Target" ConnectionString="Provider=SQLOLEDB;Server=localhost;Initial Catalog=DWH_Staging;Integrated Security=SSPI;" />
</Connections>
<Databases>
<Database Name="DWH_Staging" ConnectionName="Target" />
<Database Name="pa" ConnectionName="Source" />
</Databases>
<Schemas>
<Schema Name="test" DatabaseName="DWH_Staging" />
<Schema Name="pub" DatabaseName="pa" />
</Schemas>
Source2 is the normal ODBC Connection, Source is a test by using OLEDB for ODBC.
1-2-CreateTableMetadata.biml
<## import namespace="System.Data" #>
<## import namespace="Varigence.Biml.CoreLowerer.SchemaManagement" #>
<#
var sourceConnection = RootNode.DbConnections["Source"];
var importResult = sourceConnection.GetDatabaseSchema();
#>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Tables>
<# foreach (var table in importResult.TableNodes) { #>
<Table Name="Staging_<#=table.Schema.Name#>_<#=table.Name#>" SchemaName="DWH_Staging.test">
<Columns>
<# foreach (var column in table.Columns) { #>
<# if (column.DataType == System.Data.DbType.AnsiString) { #>
<Column Name="<#=column.Name#>" DataType="String" Length="<#=column.Length#>">
<Annotations>
<Annotation AnnotationType="Tag" Tag="ConvertToUnicode">yes</Annotation>
</Annotations>
</Column>
<# } else { #>
<#=column.GetBiml()#>
<# } #>
<# } #>
</Columns>
<Annotations>
<Annotation AnnotationType="Tag" Tag="SourceSchemaQualifiedName"><#=table.SchemaQualifiedName#></Annotation>
</Annotations>
</Table>
<# } #>
</Tables>
</Biml>
1-x-DeployTargetTables.biml:
<## template tier="2" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="MasterTableDeploy" ConstraintMode="Parallel">
<Tasks>
<# foreach (var table in RootNode.Tables) { #>
<ExecuteSQL Name="Create <#=table.Name#>" ConnectionName="Target">
<DirectInput><#=table.GetDropAndCreateDdl()#></DirectInput>
</ExecuteSQL>
<# } #>
</Tasks>
</Package>
</Packages>
</Biml>
The problem is, the generated MasterTableDeploy.dtsx package doesn't contain anything, it's just empty.
As a test I used our own SQL Server as a Source, which works perfectly fine.
Using the Progress ODBC Source doesn't do anything, no error message.
Any ideas?
I had a similar problem while trying to connect to a Db2 database using an ODBC connection. I ended up decompiling BimlEngine.dll and found out that this functionality is not implemented for ODBC connections.
Sorry
I know this is late, but maybe it can help others.
There is an issue with some of the ODBC providers and GetDatabaseSchema(). For me ImportDB() (the older version of GetDatabaseSchema()) worked fine.
Related
I've established new mediawiki environment but I am getting the following error while migrating the sqlite db to the new environment. Also I upgraded to version of mediawiki 1.22 to 1.32. Is there Anybody has any idea about that situation or new steps to establish sqlite from older one.
Turning off Content Handler DB fields for this part of upgrade.
...have ss_active_users field in site_stats table.
An error occurred:
A database query error has occurred. Did you forget to run your application's database schema
updater after upgrading?
Query: UPDATE site_stats SET ss_active_users = '0' WHERE ss_row_id = '1'
Function: DatabaseUpdater::doActiveUsersInit
Error: 8 attempt to write a readonly database
Purging caches...<!DOCTYPE html>
<html><head><title>Dahili hata - MediaWiki</title><style>body { font-family: sans-serif;
margin: 0; padding: 0.5em 2em; }</style></head><body>
<div class="errorbox mw-content-ltr"><p>[Y#YbH#8tt-A18niaaU7SwQAAANQ] /mediawiki/mw-
config/index.php?page=Upgrade Wikimedia\Rdbms\DBQueryError from line 1506 of
/var/www/html/mediawiki/includes/libs/rdbms/database/Database.php: A database query error has
occurred. Did you forget to run your application's database schema updater after upgrading?
<br />
Query: DELETE FROM objectcache<br />
Function: DatabaseUpdater::purgeCache<br />
Error: 8 attempt to write a readonly database<br />
</p><p>Backtrace:</p><p>#0
/var/www/html/mediawiki/includes/libs/rdbms/database/Database.php(1476):
Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)<br />
#1 /var/www/html/mediawiki/includes/libs/rdbms/database/Database.php(1236):
Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)<br />
#2 /var/www/html/mediawiki/includes/libs/rdbms/database/Database.php(2964):
Wikimedia\Rdbms\Database->query(string, string)<br />
#3 /var/www/html/mediawiki/includes/installer/DatabaseUpdater.php(1071):
Wikimedia\Rdbms\Database->delete(string, string, string)<br />
#4 /var/www/html/mediawiki/includes/installer/DatabaseInstaller.php(396): DatabaseUpdater-
>purgeCache()<br />
#5 /var/www/html/mediawiki/includes/installer/WebInstallerUpgrade.php(65): DatabaseInstaller-
>doUpgrade()<br />
#6 /var/www/html/mediawiki/includes/installer/WebInstaller.php(272): WebInstallerUpgrade-
>execute()<br />
#7 /var/www/html/mediawiki/mw-config/index.php(79): WebInstaller->execute(array)<br />
#8 /var/www/html/mediawiki/mw-config/index.php(38): wfInstallerMain()<br />
#9 {main}</p></div>
</body></html>
I resolved problem myself, I've shared steps with some guys who want to migrate the mediawiki with sqlite.
sqlite3 my_wiki.sqlite .dump > backup_sqlite.sqlite
The file which has been created by above should be migrate to new sqlite location and than run the that commands for migration old data.
sqlite3 mediawiki.sqlite < backup_sqlite.sqlite
I'm trying to take the version from version.sbt and and populate it to logback.xml's log appender's applicationVersion field.
version.sbt
version in ThisBuild := "0.4.63"
logback.xml
<configuration debug="true" scan="true" scanPeriod="60 seconds">
<appender name="ADP-MESSAGING" class="com.agoda.adp.messaging.logging.appenders.LogbackAppender">
<applicationName>MyApp</applicationName>
<applicationAssemblyName>myapp</applicationAssemblyName>
<applicationVersion>0.4.61</applicationVersion>
<!-- <applicationVersion>${application.version}</applicationVersion> -->
<apiKey>s234W##$WFW$#$#</apiKey>
<getCallerData>false</getCallerData>
</appender>
....
<root level="WARN">
<appender-ref ref="ADP-MESSAGING" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
I tried by adding ${application.version}, ${version} but no success.
How can I do this?
Please share your thoughts.
Thanks
The values interpolated in a logback.xml file are simply Java system properties. All you have to do is add a value to your Java commandline defining the value you want:
// NOTE: This will only work when running through sbt. You'll have to
// append the same value to your startup scripts when running elsewhere.
javaOptions += "-Dapplication.version=" + version.value
With this flag, you should be able to interpolate the version in your XML file:
<applicationVersion>${application.version}</applicationVersion>
You can add logback PropertyDefiner implementation:
package org.mypackage
import ch.qos.logback.core.PropertyDefinerBase
class VersionPropertyDefiner extends PropertyDefinerBase {
override def getPropertyValue: String = BuildInfo.version
}
You will get autogenerated (managed) scala code BuildInfo.version if you use BuildInfoPlugin in your project build settings.
Then you can define and use variable in your logback.xml configuration:
<configuration debug="true" scan="true" scanPeriod="60 seconds">
<define name="appVersion" class="org.mypackage.VersionPropertyDefiner"/>
<appender name="ADP-MESSAGING" class="com.agoda.adp.messaging.logging.appenders.LogbackAppender">
<applicationName>MyApp</applicationName>
<applicationAssemblyName>myapp</applicationAssemblyName>
<applicationVersion>${appVersion}</applicationVersion>
<apiKey>s234W##$WFW$#$#</apiKey>
<getCallerData>false</getCallerData>
</appender>
....
<root level="WARN">
<appender-ref ref="ADP-MESSAGING" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
From high level architecture overview for bigbluebutton http://docs.bigbluebutton.org/overview/architecture.html I understand that red5 server communicates with client using rtmp or by tunning rtmp via nginx. And then red5 server communicate with FreeSwitch using redis (with fsesl-akka). It mean we are able to desploy red5 in separately server. The result should be 3 servers:
Server for nginx/tomcat7 to run client, bbb-web
Server for Red5 + redis which handle rtmp for module videoconf/sharing/call/audio
Server for Freeswitch
Currently, I am able to config module to use rtmp from separately Red5 server by changing client/conf/config.xml
<config>
<localeversion suppressWarning="false">0.9.0</localeversion>
<version>VERSION</version>
<help url="http://10.0.121.16/help.html"/>
<javaTest url="http://10.0.121.16/testjava.html"/>
<porttest host="10.0.121.16" application="video/portTest" timeout="10000"/>
<bwMon server="10.0.121.16" application="video/bwTest"/>
<application uri="rtmp://10.0.121.16/bigbluebutton" host="http://10.0.121.16/bigbluebutton/api/enter"/>
<language userSelectionEnabled="true" />
<skinning enabled="true" url="http://10.0.121.16/client/branding/css/BBBDefault.css.swf" />
<shortcutKeys showButton="true" />
<browserVersions chrome="CHROME_VERSION" firefox="FIREFOX_VERSION" flash="FLASH_VERSION" java="1.7.0_51" />
<layout showLogButton="false" defaultLayout="bbb.layout.name.defaultlayout"
showToolbar="true" showFooter="true" showMeetingName="true" showHelpButton="true"
showLogoutWindow="true" showLayoutTools="true" confirmLogout="true"
showRecordingNotification="true"/>
<meeting muteOnStart="false" />
<logging enabled="true" target="trace" level="info" format="{dateUTC} {time} :: {name} :: [{logLevel}] {message}" uri="http://10.0.121.16"/>
<lock disableCamForLockedUsers="false" disableMicForLockedUsers="false" disablePrivateChatForLockedUsers="false"
disablePublicChatForLockedUsers="false" lockLayoutForLockedUsers="false" lockOnJoin="true" lockOnJoinConfigurable="false"/>
<modules>
<module name="ChatModule" url="http://10.0.121.16/client/ChatModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/bigbluebutton"
dependsOn="UsersModule"
privateEnabled="true"
fontSize="12"
position="top-right"
baseTabIndex="701"
colorPickerIsVisible="false"
maxMessageLength="1024"
/>
<module name="UsersModule" url="http://10.0.121.16/client/UsersModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/bigbluebutton"
allowKickUser="true"
enableEmojiStatus="true"
enableSettingsButton="true"
baseTabIndex="301"
/>
<module name="DeskShareModule"
url="http://10.0.121.16/client/DeskShareModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/deskShare"
publishURI="10.0.121.16"
useTLS="false"
showButton="true"
autoStart="false"
autoFullScreen="false"
baseTabIndex="201"
/>
<module name="PhoneModule" url="http://10.0.121.16/client/PhoneModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/sip"
autoJoin="true"
listenOnlyMode="true"
presenterShareOnly="false"
skipCheck="false"
showButton="true"
enabledEchoCancel="true"
useWebRTCIfAvailable="true"
showPhoneOption="false"
echoTestApp="9196"
dependsOn="UsersModule"
/>
<module name="VideoconfModule" url="http://10.0.121.16/client/VideoconfModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/video"
dependson = "UsersModule"
baseTabIndex="401"
presenterShareOnly = "false"
controlsForPresenter = "false"
autoStart = "false"
skipCamSettingsCheck="false"
showButton = "true"
showCloseButton = "true"
publishWindowVisible = "true"
viewerWindowMaxed = "false"
viewerWindowLocation = "top"
smoothVideo="false"
applyConvolutionFilter="false"
convolutionFilter="-1, 0, -1, 0, 6, 0, -1, 0, -1"
filterBias="0"
filterDivisor="4"
displayAvatar = "false"
focusTalking = "false"
glowColor = "0x4A931D"
glowBlurSize = "30.0"
priorityRatio = "0.67"
/>
<module name="WhiteboardModule" url="http://10.0.121.16/client/WhiteboardModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/bigbluebutton"
dependsOn="PresentModule"
baseTabIndex="601"
whiteboardAccess="presenter"
keepToolbarVisible="false"
/>
<module name="PollingModule" url="http://10.0.121.16/client/PollingModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/bigbluebutton"
dependsOn="PresentModule"
/>
<module name="PresentModule" url="http://10.0.121.16/client/PresentModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/bigbluebutton"
host="http://10.0.121.16"
showPresentWindow="true"
showWindowControls="true"
openExternalFileUploadDialog="false"
dependsOn="UsersModule"
baseTabIndex="501"
maxFileSize="30"
/>
<module name="LayoutModule" url="http://10.0.121.16/client/LayoutModule.swf?v=VERSION"
uri="rtmp://10.0.121.16/bigbluebutton"
layoutConfig="http://10.0.121.16/client/conf/layout.xml"
enableEdit="false"
/>
</modules>
</config>
Where 10.0.121.14 - run Red5 + redis. 10.0.121.16 run nginx + tomcat7. Any document/help/suggestion from expert for solve this issue?
Seperate Red5 servers can distribute video and deskshare modules, just need to get the archiving scripts to pull the .flv files from stream directory when processing. I would leave the basic red5 on bbb server to handle the rest of messaging with local redis store.
If you want to not have red5 on server all together, then you would need to enable the red5 server to have access to connect to redis. Be careful. downt think and password is set, so you dont want to expose this on public interface without using correct iptable rules.
regards,
Stephen
hostbbb.com
The modified model_source of a dexterity type is not available for other clients until the other client restarts.
Invalidating or clearing the SCHEMA_CACHE is not a working solution: every client seems to have its own SCHEMA_CACHE which afik cannot be cleared or invalidated from another client.
Is there any solution to solve this problem?
The scenario presented here uses ipython as second client. The same can be reproduced through the web by starting two clients: (1) create a dexterity type in client1, and (2) edit the XML Field Model in client2.
I'd like to put this as an issue on https://github.com/plone/plone.dexterity but as for today issues seem not to be available in the plone.dexterity github project
utils.sync()
from Products.CMFCore.utils import getToolByName
from plone.dexterity.fti import DexterityFTI
id = 'mydexteritytype'
plone_site = app.Plone
tool_portal_types = getToolByName(plone_site, 'portal_types')
if tool_portal_types.hasObject(id): tool_portal_types.manage_delObjects(id)
utils.commit()
utils.sync()
fti = DexterityFTI(id)
fti.id = id
data = {}
data['title'] = id
data['i18n_domain'] = 'plone'
data['behaviors'] = "\n".join([
'plone.app.dexterity.behaviors.metadata.IDublinCore',
'plone.app.content.interfaces.INameFromTitle',
])
data['model_source'] = '''
<model xmlns:security="http://namespaces.plone.org/supermodel/security"
xmlns:marshal="http://namespaces.plone.org/supermodel/marshal"
xmlns:form="http://namespaces.plone.org/supermodel/form"
xmlns="http://namespaces.plone.org/supermodel/schema">
<schema>
<field name="original" type="zope.schema.TextLine">
<default>original</default>
<description/>
<title>original</title>
</field>
</schema>
</model>'''
data['klass'] = 'plone.dexterity.content.Container'
data['filter_content_types'] = True
data['icon_expr'] = 'string:${portal_url}/document_icon.png'
fti.manage_changeProperties(**data)
tool_portal_types._setObject(fti.id, fti)
utils.commit()
After running the code above, the new created mydexteritytype is available for all other clients.
The modifications produced by the following code will be only available in the client running the code. All other clients are not aware of the changes.
utils.sync()
from plone.dexterity.interfaces import IDexterityFTI
from zope.component import getUtility
fti = getUtility(IDexterityFTI, name=id)
model_source = '''
<model xmlns:security="http://namespaces.plone.org/supermodel/security"
xmlns:marshal="http://namespaces.plone.org/supermodel/marshal"
xmlns:form="http://namespaces.plone.org/supermodel/form"
xmlns="http://namespaces.plone.org/supermodel/schema">
<schema>
<field name="modified" type="zope.schema.TextLine">
<default>modified</default>
<description/>
<title>modified</title>
</field>
</schema>
</model>'''
fti.manage_changeProperties(model_source=model_source)
from plone.dexterity.schema import SCHEMA_CACHE
SCHEMA_CACHE.invalidate(fti)
SCHEMA_CACHE.clear()
utils.commit()
This pull-request is supposed to fix this issue:
https://github.com/plone/plone.dexterity/pull/137
I try to build up a asp.net web application with windows workflow foundation.
I have found some useful sites like:
http://msdn.microsoft.com/en-us/library/bb628441%28v=vs.90%29.aspx
http://msdn.microsoft.com/en-us/library/bb675262%28v=vs.90%29.aspx
The workflow is an Activity
<Activity mc:Ignorable="sap" x:Class="ApproachWithWorkflows.WriteLineActivity" sap:VirtualizedContainerService.HintSize="654,676" mva:VisualBasic.Settings="Assembly references and imported namespaces for internal implementation" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Xml" xmlns:s3="clr-namespace:System;assembly=System.Core" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Flowchart sad:XamlDebuggerXmlReader.FileName="C:\Documents and Settings\hauke\Desktop\Uni\Masterarbeit SVN SE\Software\Workflowansatz\ApproachWithWorkflows\ApproachWithWorkflows\WriteLineActivity.xaml" sap:VirtualizedContainerService.HintSize="614,636">
<sap:WorkflowViewStateService.ViewState>
<scg3:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<av:Point x:Key="ShapeLocation">270,2.5</av:Point>
<av:Size x:Key="ShapeSize">60,75</av:Size>
<av:PointCollection x:Key="ConnectorLocation">300,77.5 300,107.5 295.5,107.5 295.5,129</av:PointCollection>
</scg3:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Flowchart.StartNode>
<x:Reference>__ReferenceID0</x:Reference>
</Flowchart.StartNode>
<FlowStep x:Name="__ReferenceID0">
<sap:WorkflowViewStateService.ViewState>
<scg3:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">190,129</av:Point>
<av:Size x:Key="ShapeSize">211,59</av:Size>
</scg3:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<WriteLine sap:VirtualizedContainerService.HintSize="211,59" Text="worked.." />
</FlowStep>
I created an asp.net project with a simple button:
<asp:Button Text="Purchase" ID="Label1" runat="server" OnClick="btnClick" />
In the code behind, I try to call the workflow (and initialized the WorkflowRuntime in the global.asax by Application_Start):
WorkflowRuntime workflowRuntime = Application["WorkflowRuntime"] as WorkflowRuntime;
ManualWorkflowSchedulerService manualScheduler =
workflowRuntime.GetService(typeof(ManualWorkflowSchedulerService))
as ManualWorkflowSchedulerService;
WorkflowInstance instance = workflowRuntime.CreateWorkflow(
typeof(ApproachWithWorkflows.WriteLineActivity));
instance.Start();
manualScheduler.RunWorkflow(instance.InstanceId);
When I now execute the application and press the button, I get an error like "The input workflow type must be an Activity.\r\nParameter name: workflowType" at CreateWorkflow.
But the Activity is an Activity! What am I doing wrong?
It looks like you're using WF 3.5 runtime classes to execute a WF 4.0 activity. Take a look at WorkflowInvoker or WorkflowApplication.