mysql or postgresql +osmosis + windows

Hi! I would like to install local osm using osmosis (v0.40.1) in my win 7.
At the beginning I built db schema for mysql using this file http://gweb.bretth.com/apidb06-pgsql-latest.sql.
When executing comand

osmosis --read-xml file="ru.osm.bz2" --buffer --write-apidb validateSchemaVersion=no dbType="mysql" host="localhost" database="api06_test" user="usr" password="pwd"

I have an error:

SEVERE: Thread for task 1-read-xml failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: An output error has occurred, aborting.
	at org.openstreetmap.osmosis.core.store.DataPostbox.checkForOutputErrors(DataPostbox.java:78)
	at org.openstreetmap.osmosis.core.store.DataPostbox.populateCentralQueue(DataPostbox.java:134)
	at org.openstreetmap.osmosis.core.store.DataPostbox.put(DataPostbox.java:184)
	at org.openstreetmap.osmosis.core.buffer.v0_6.EntityBuffer.process(EntityBuffer.java:38)
	at org.openstreetmap.osmosis.xml.v0_6.impl.NodeElementProcessor.end(NodeElementProcessor.java:118)
	at org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler.endElement(OsmHandler.java:107)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:108)
	at java.lang.Thread.run(Unknown Source)

Next I tried to build database schema in postgresql using creation scripts within the script/contrib directory Osmosis.
I have an error:

"/path/to/libpgosm.so": No such file or directory

Anybody can help?