Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view

Hi, Admin.

I changed the database of my Knowage and created a new MySQL schema called veltibi.

The following are the changes in server.xml:

 

<GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
 

                <Environment name="resource_path" type="java.lang.String" value="D:\knowage_ce\Knowage-Server-CE\resources"/>
                <Environment name="service_url" type="java.lang.String" value="http://localhost:8080/knowage"/>
                <Environment name="host_url" type="java.lang.String" value="http://localhost:8080"/>
                <Environment name="sso_class" type="java.lang.String" value="it.eng.spagobi.services.common.FakeSsoService"/>
                <Environment description="HMAC key" name="hmacKey" type="java.lang.String" value="abc123"/>

    <!--        <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/knowage" password="password" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/knowage_ce" username="root"/>
                <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/foodmart" password="password" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/foodmart_ce" username="root"/>
                <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/ds_cache" password="password" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/foodmart_ce" username="root"/>
    -->
                <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/knowage" password="password" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/veltibi" username="root"/>
    <!--        <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/ds_cache" password="password" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/foodmart_ce" username="root"/>
                <Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/veltidw" password="postgres" type="javax.sql.DataSource" url="jdbc:postgresql://localhost:5432/veltidw" username="postgres"/>
                <Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/ds_cache" password="postgres" type="javax.sql.DataSource" url="jdbc:postgresql://localhost:5432/veltidw" username="postgres"/>
    -->
</GlobalNamingResources>

But, I can not open a table widget.

The error displayed is:

"New Widget Widget
Unable to load data from dataset test
Please check dataset & widget config"

I downloaded the file on the Knowage website to populate the new database:
mysql-dbscripts-6.0.0_20170616.zip

What I have to do?

Thanks and congratulations for the new version !!!!

in General Configuration by (150 points)
edited by

1 Answer

+1 vote
 
Best answer
Hi Fabiano,

Now you have only one connection to a new Knowage schema, so can you better desribe what are you doing ?

It's a good practice to have a cache_ds, you can use a dedicated schema or the same Knowage schema.

Check if the Data Source definition has the flag "write default" selected.

let me know

Angelo
by (20.7k points)
selected by
Thanks for the prompt reply Angelo.

I'm creating a dashboard environment for a specific customer (a proof of concept). To do this, I created the "jdbc:mysql://localhost:3306/veltibi" and executed the DDL available on the Knowage website (mysql-dbscripts-6.0.0_20170616.zip). After that, I changed the server.xml file (without pointing to a cache_ds) as shown, and ran startup.bat.

I have a DW database also in MySQL, and for this I created a datasource, but without the "write default" selected.

Now with this change, the error has not occurred anymore.

Thank you very much for your help, and in case of any further questions, I'll get in touch. Very good your work.

Fabiano.
...