Svn repository migration

Moving repository to different server is rather straight forward.

I started off by shutting down the svn daemon, just to make sure nobody can commit any more changes.

Then I dumped all the revisions to a file using svnadmin tool.

svnadmin dump /path/to/repo > repo.dump

File was transferred to server where svn would be hosted and after creating repository there I was able to restore whole content, again, with svnadmin tool.

svnadmin load /path/to/new.repo < repo.dump.

SVN restore can take a while, because restoring svn repo is just like making regular commits against it, details of each revision are stored inside the dump file as regular text. Restoring large repository is rather lengthy process.

Once this is done I had to make sure all working copies of the code were aware of new repo location. This is done with svn switch command with –relocate flag. The command takes the form:

svn switch --relocate svn://old.location/project/path svn://new.location/project/path .
Posted in Dev | Leave a comment

Nullable attributes in SOAP requests

Setting element value to null when its XSD allows it is done by first importing XMLSchema-Instance namespace into SOAP Envelope:

  1. xmlns:xsi="

then we can use:

  1. xsi:nil="true"

attribute for all elements we want to be null. Allowing element to carry null value is done by setting its attributenillable=”true”.

Note that when we set minOccurs=”0″
we’re not allowing to pass null as value for that element, we just state that this element might not be present at all in the request. Setting both minOccurs=”0″ and nillable=”true” we’re saying that element might not be there and if it’s there it might contain null value. This is particularly important when testing such element:

IF TType.Element && TType.Element != null THEN
Posted in Dev | Leave a comment

Oracle Business Rules Engine fact types

Just a quick note about variables types defined in your XSD schema that can be asserted as Fact in Oracle BR Engine.

Only elements defined as Global in XSD can be fed to engine.

Your schema should look something like this:

  2. <?xml version="1.0" encoding="windows-1250" ?>
  3. <xsd:schema xmlns:xsd=""
  4.             xmlns=""
  5.             targetNamespace=""
  6.             elementFormDefault="qualified">
  7. <xsd:element name="Company" type="tCompany" />
  8.     <xsd:complexType name="tCompany">
  9.     <xsd:sequence>
  10.         <xsd:element name="companyId" type="xsd:int"/>
  11.         <xsd:element name="companyName" type="xsd:string"/>
  12.         <xsd:element name="companyCode" type="xsd:string" nillable="true"/>
  13.         <xsd:element name="companyAddress">
  14.           <xsd:complexType>
  15.             <xsd:sequence>
  16.               <xsd:element name="street" type="xsd:string"/>
  17.               <xsd:element name="city" type="xsd:string"/>
  18.               <xsd:element name="postalCode" type="xsd:string"/>
  19.             </xsd:sequence>
  20.           </xsd:complexType>
  21.         </xsd:element>
  22.         <xsd:element name="companyNipNumber" type="xsd:string"/>
  23.             <xsd:element name="currentStockPrice" type="xsd:double"/>
  24.         </xsd:sequence>
  25.       </xsd:complexType>  
  26. </xsd:schema>

before Company type can be used in BR engine.

Only direct descendants of schema elements are considered global.

Posted in Uncategorized | Leave a comment

Posting from Microsoft Word 2010 is fun!

This is just a short entry, posted right from MS Word 2010. Setting all this up is really easy.

Also writing posts inside word-processing software is much more effective. You get to use all the features that Word has to offer.

Ribbon’s Blog Post menu integrates with your blogging platform.

Picture 1 Blog Post Menu

From there you can publish your post, edit post’s categories, load up existing post and manage all your blog accounts if you happen to have more than one blog.

To get started choose File menu -> New -> Blog post. If that’s your first blog post you will be prompted to connect to your blogging platform in few wizardy steps.

Complete instruction on how to set up your blog to cooperate with Word can be found on It’s a step-by-step instruction for 2007, but it hasn’t change much for 2010.

I applied formatting to this post right from word. Floating picture on the left was also formatted in word with a fancy shadow set to it.

Bulletized text and headings are also supported

  • Item one
  • Two
  • Done!
Posted in Dev | Leave a comment

Migrating MySQL data to Oracle 11g I

SqlDeveloper comes with a handy tool for migrating your MySQL data bases to Oracle DB. There’s a little trap there thou; NLS (National Language Support) in not tested and officially supported in migration tools.

SQL scripts generated with migration tools assume american NLS. Just to be sure your schema is created correctly, check session NLS first by running:


most important once would be:

they should be set to 'AMERICAN', 'AMERICA', '.'

if they are different run:

  1. span class=”st0″>’AMERICAN’‘AMERICA’  NLS_NUMERIC_CHARACTERS= ‘.’;

before executing generated script.

Posted in Dev | Tagged , , | Leave a comment

Weblogic location changed file stores user name and password needed to run managed weblogic server.

It’s format is simple:


Save it to: $MIDLLEWARE_HOME/user_projects/domains/[YOUR_DOMAIN]/security.

Note that security folder might not be there, if so, create it.

Posted in Dev | Tagged , | Leave a comment

Removing weblogic domain (WebLogic 10.3)

Removing weblogic domain in few easy steps.

  • Stop your WebLogic instance.
  • Remove domain folder from $MIDDLEWARE_HOME/user_projects/domains/[domain_to_be_removed]
  • Remove domain’s applications folder from $MIDDLEWARE_HOME/user_projects/application/[domain_to_be_removed]
  • Finally, edit domain registry file – domain-registry.xml, found your $MIDDLEWARE_HOME.

Domain’s gone!

Posted in Dev | Tagged , | Leave a comment

Word on judging by looking on statistic data

I just had a look at statistics of repository of one of the projects I’m working on. I’m one of the three developers working on it right now and it’s been five months since we started. I saw that number of commits is degrading, we check in less often. One can jump into conclusions that work dramatically slowed down during past two months. We don’t reach even half of the number of commits we used to. It wonders me now, can I believe this statistics. Is it the summer time? Are we just tired after five moths of heavy coding. Or perhaps we just stopped committing like crazy, perhaps we became more mature commiters, we now do less commits and check in more files per commit, making sure everything works locally for us before we submit our code to tests.

Even before I started to think how to analyse my repository data, google had the answer. I came across this neat project called StatSVN. This little java program will generate all the fancy statistic you might need out of your svn repo log file.

All you need to do to get started is to download it, export svn log for your project and feed it to statsvn. It will generate nice report in html with nice looking and all-telling graphs. I tested that on my repo with this steps:

1. Navigate to project directory

> cd d:\projects\myproject

2. Export svn log in xml format (make sure you have svn command line client installed and and available in your PATH – StatSVN will needs that later on too)

> svn log -v --xml >mylogfile.log

3. Now, create directory for your report files

> mkdir d:\misc\statsvn\myproject
> cd  d:\misc\statsvn\myproject

4. From within created directory run statsvn.jar with two arguments a)path to log file generated and b)path your project directory

>java -jar d:\tools\statsvn\statsvn.jar d:\projects\myproject\mylogfile.log d:\projects\myproject

StatSVN will do the rest.

Now, I will sit down and look at graphs and try to understand what is happening with my project.

Here’s bunch of links to get you started:

StatSvn Project
User Manual
Sample report generated out of StatSVN repo

Posted in Dev | Leave a comment

Code generators

Just a quick reflection today. I’m posting this because this post made me think hard about code generation. To generate or not to generate, that is the question. Haven’t decided as of yet.  Anyways….

I just got newsletter from Zend and its ‘Tips & Tricks’ section caught my eye. Apparently Zend Studio 7 can ‘take your productivity to a whole new level’ by means of generating portions of code for you. I haven’t watched whole presentation they have, but I can see what’s coming. Programmer will use simple shortcut and Zend Studio will create a Zend component for him, generating all classes and whatever code is necessary to make things work.

I don’t really wanna jump into conclusions too fast, but I think I’ve seen this already. Code generators in Visual Studio. They soooo nice. Drag and drop elements onto your Win or WebForm and … forget about tedious coding. It will be all done for you.

And I also seen how hard it is to make a smallest change in generated code. It seemed to me that once you start using these generators you stuck with them, often struggling to make things work.

I’m hoping this is not the case for Zend Studio.

Not too long ago I watched presentation about C# 3.0 features and I could not help feeling that many many of these features relay heavily on code generated by compiler.

Code generators ARE all around us. What wonders me: Are we on the right path ?

I plan to come back to that issue sometime soon.

Posted in Dev | 1 Comment

We need to change the way we debug application, you know

Yesterday I came across this presentation from google tech talk.

The new ‘silver bullet’ debugger for eclipse platform presented is quite mind blowing tool. The way it works is very simple. Debugger records execution of your application. Once the recording is done you can literally see what was happening with your code at any given time. You can travel back and forth to any place in code and in time to see what was the state of the application. But I can’t possibly describe how awesome it is. See for yourself.

Speaking of debugging, Google have released a javascript debugger for eclipse that works with its chrome browser, this might prove very useful with modern web applications. check it out

Posted in Curiosities | Tagged | Leave a comment