Symbol Chimere
Symbol Chimere

Reputation: 11

Connecting WSO2 IS to SQL Server

I am trying to change the default db of my wso2 is using this https://renukahosamani.wordpress.com/2017/02/23/setting-up-microsoft-sql-as-default-database-for-wso2-ei-6-0/

I have followed all the steps provided here and in the wso2 documentation but for some reason I still cannot get it to work properly - can anyone help?

I am new to WSO2 and running it on an ubuntu server.

This is the error

[Fatal Error] master-datasources.xml:17:44: The content of elements must consist of well-formed character data or markup.
[2019-08-26 12:18:03,974] ERROR {org.wso2.carbon.ndatasource.core.internal.DataS ourceServiceComponent} - Error in intializing system data sources: Error in ini tializing system data sources: Error in initializing system data sources at '/us r/lib/wso2/wso2is/5.7.0/repository/conf/datasources/master-datasources.xml' - Er ror in creating an XML document from file: The content of elements must consist of well-formed character data or markup.

org.wso2.carbon.ndatasource.common.DataSourceException: Error in initializing sy stem data sources: Error in initializing system data sources at '/usr/lib/wso2/w so2is/5.7.0/repository/conf/datasources/master-datasources.xml' - Error in creat ing an XML document from file: The content of elements must consist of well-form ed character data or markup.

I do not no why this is happening can anyone help please

below is user-mgmt.xml

<UserManager>
    <Realm>
        <Configuration>
                <AddAdmin>true</AddAdmin>
            <AdminRole>admin</AdminRole>
            <AdminUser>
                <UserName>admin</UserName>
                <Password>admin</Password>
            </AdminUser>
            <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
            <Property name="isCascadeDeleteEnabled">true</Property>
 <Property name="initializeNewClaimManager">true</Property>
            <Property name="dataSource">jdbc/WSO2CarbonDB</Property>
        </Configuration>

and master-datsource.xml

datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">

<providers>
    <provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
</providers>

<datasources>

    <datasource>
        <name>WSO2_CARBON_DB</name>
        <description>The datasource used for registry and user manager</description>
        <jndiConfig>
            <name>jdbc/wso2</name>
        </jndiConfig>
        <definition type="RDBMS">
            <configuration>
                <url>jdbc:sqlserver://<192.168.3.63>:<1433>;databaseName=<wso2>;SendStringParametersAsUnicode=false</url>
                <username>wso2</username>
                <password>Innov@tive</password>
                <driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
                <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
                <defaultAutoCommit>false</defaultAutoCommit>
            </configuration>
        </definition>
    </datasource>

so now this is what i get i have tried to change the jdbc driver but still the same thing

[2019-08-27 11:30:54,493] ERROR {org.wso2.carbon.user.core.common.DefaultRealm} -  nullType class java.lang.reflect.InvocationTargetException
org.wso2.carbon.user.core.UserStoreException: nullType class java.lang.reflect.InvocationTargetException


Caused by: java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Upvotes: 1

Views: 710

Answers (1)

Modify your url in master-datasources.xml to the below configuration and give a try.

jdbc:sqlserver://192.168.3.63:1433;databaseName=wso2;SendStringParametersAsUnicode=false

Upvotes: 1

Related Questions