Hi,
I have tried to use Artifactory with MSSQL Server and have been successful in using it.
I also faced an issue with mssql.properties file, but this file can be created as
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
createTable=CREATE TABLE ${tablePrefix}${table}(ID VARCHAR(255) PRIMARY KEY, LENGTH BIGINT, LAST_MODIFIED BIGINT, DATA IMAGE)
and should be saved as mssql.properties and can be placed in classpath.
Also, you need to manually create a database MSSQL with name 'Artifactory'
And now when you will start artifactory, it will create a required table inside MSSQL databse 'Artifactory' and you can use it easily for uploading files.
Also this file cane be placed inside jackrabbit jar file inside org\apache\jackrabbit\core\data\db and can be bundled again and can be used. Or if you are running artifactory using tomcat, you can place this 'mssql.properties' file at this location 'Apache Software Foundation\Tomcat 5.5\shared\classes\org\apache\jackrabbit\core\data\db'.
Please revert back if required.
vanithap wrote:
Hi,
This is what I have in etc\repo\mssql\repo.xml
Under MSSQL FileSystem, does the param name schema = mssql sounds right?
Under MSSQL Datastore, does the param name databasetype = mssql sounds right?
I tried changing from mssql to SQLSEREVR and also MS SQLSERVER2000. It did not work.
I am getting the following error.
Any help is greatly appreciated.
MSSQL Filesystem
FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem"
param name="driver" value="net.sourceforge.jtds.jdbc.Driver"
param name="url" value="jdbc:jtds:sqlserver://ipaddress:1433/Artifactory"
param name="user" value="username"
param name="password" value="password"
param name="schema" value="mssql"
param name="schemaObjectPrefix" value="rep_"
FileSystem
MSSQL Datastore
DataStore class="org.artifactory.jcr.jackrabbit.ArtifactoryDbDataStoreImpl"
param name="url" value="jdbc:jtds:sqlserver://ipaddress:1433/Artifactory"
param name="tablePrefix" value=""
param name="user" value="username"
param name="password" value="password"
param name="databaseType" value="mssql"
param name="driver" value="net.sourceforge.jtds.jdbc.Driver"
param name="minRecordLength" value="512"
param name="maxConnections" value="15"
param name="copyWhenReading" value="true"
DataStore
MSSQL Persistance Manager
PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager"
param name="url"
value="jdbc:jtds:sqlserver://ipaddress:1433/Artifactory"
param name="user" value="username"
param name="password" value="password"
param name="schemaObjectPrefix" value="${wsp.name}_"
PersistenceManager
org.apache.jackrabbit.core.data.DataStoreException: Configuration error: The resource 'mssql.properties' could not be found; Please verify the databaseType property
at org.artifactory.jcr.jackrabbit.ArtifactoryDbDataStoreImpl.initDatabaseType(ArtifactoryDbDataStoreImpl.java:592) [artifactory-update-2.0.3.jar:na]
at org.artifactory.jcr.jackrabbit.ArtifactoryDbDataStoreImpl.init(ArtifactoryDbDataStoreImpl.java:554) [artifactory-update-2.0.3.jar:na]
at org.apache.jackrabbit.core.RepositoryImpl.createDataStore(RepositoryImpl.java:662) [jackrabbit-core-1.4.9.jar:na]
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:271) [jackrabbit-core-1.4.9.jar:na]
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557) [jackrabbit-core-1.4.9.jar:na]
at org.artifactory.jcr.InitJcrRepoStrategy.createJcrRepository(InitJcrRepoStrategy.java:82) [artifactory-core-2.0.3.jar:na]
at org.artifactory.jcr.JcrServiceImpl.basicInit(JcrServiceImpl.java:612) [artifactory-core-2.0.3.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_13]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_13]