Hi Petri,

Thank you for your valuable reply, reinstalling Mysql helped me to get over
the issue and the flyway migration was successful.

now I have reached another roadblock where the tomcat is not running the
https server.
Not sure if this is  because of the Keystore error or something else

WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin
Match [Server/Service/Connector] failed to set property [keystoreFile] to
[C:\Users\Bharath\Desktop\apache-tomcat-9.0.38\.keystore]

I have attached both server.xml and log file for your reference, could you
please check and see if you could identify and help me with the issue



Regards,
Bharath
Lead Implementation Analyst | Mifos Initiative
Skype: live:cbharath4| Mobile: +91.7019635592
http://mifos.org  <http://facebook.com/mifos>
<http://www.twitter.com/mifos>


On Wed, Oct 7, 2020 at 12:01 AM Petri Tuomola <petri.tuom...@gmail.com>
wrote:

> Hi Bharath
>
> This issue was discussed under
> https://issues.apache.org/jira/browse/FINERACT-980
>
> Basically Flyway does not know how to upgrade an existing Fineract
> database using Drizzle JDBC driver. It does know how to create a new one
> though.
>
> So for your local set-up you have two choices:
>
> - Delete your databases and start from scratch. In such case Drizzle
> should be able to create the latest database version. This is what happens
> on the integration test server every time we run a build, so that clearly
> works. But of course you lose any data you have in your database.
>
> - Change your local set-up to use a more up-to-date JDBC driver. One
> choice is the MySQL Connector/J. You can find instructions on how to switch
> to that at the bottom of the docker-compose.yml file.
>
> Hope this helps!
>
> Regards
> Petri
>
>
> On 6 Oct 2020, at 9:20 PM, Bharath Gowda <bgo...@mifos.org> wrote:
>
> Hi Petri,
>
> Appreciate your efforts in helping to resolve this issue.
>
> Recently, I have been struggling with running Fineract WAR on Tomcat
> 9.0.38 on my Windows Machine
>
> I have followed all the steps properly which you had listed in this thread
> 1. Install MySQL and Tomcat
> 2. Build Fineract WAR from the latest develop branch: ./gradlew clean
> bootWar
> 3. Create tenants database:  ./gradlew createDB -PdbName=fineract_tenants
> 4. Create default tenant database:  ./gradlew createDB
> -PdbName=fineract_default
> 5. Deploy Fineract WAR on Tomcat using manager webapp (
> http://localhost:8080/manager/html <http://localhost:8080/manager>)
>
> I am stuck with error
> "org.flywaydb.core.internal.exception.FlywayDbUpgradeRequiredException:
> MySQL upgrade required: MySQL 0.1 is outdated and no longer supported by
> Flyway. Flyway currently supports MySQL 5.1 and newer."
>
> With some digging got to know about a similar issue around 6 months ago
> and something to do with drizzle jdbc driver, but I am not able to get this
> resolved on my local, any help would be greatly appreciated.
> I have attached my log for reference
>
> Would really be great if anyone else too could help me who knows about
> this issue.
>
>
> Regards,
> Bharath
> Lead Implementation Analyst | Mifos Initiative
> Skype: live:cbharath4| Mobile: +91.7019635592
> http://mifos.org  <http://facebook.com/mifos>
> <http://www.twitter.com/mifos>
>
>
> On Tue, Oct 6, 2020 at 11:36 PM Petri Tuomola <pe...@tuomola.org> wrote:
>
>> All
>>
>> Looking at the log file shared by Tube, turns out that he has stumbled on
>> quite an interesting problem:
>>
>> It seems that you can’t run Fineract on a machine that is not connected
>> to the internet.
>>
>> I think the duplicate index error was relating to a corrupt MySQL
>> instance. After that’s fixed, the following error remains:
>>
>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>> Configuration problem: Failed to import bean definitions from relative
>> location [securityContext.xml]
>> Offending resource: URL
>> [file:/usr/local/Cellar/tomcat/9.0.38/libexec/webapps/fineract-provider/WEB-INF/classes/META-INF/spring/appContext.xml];
>> nested exception is
>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
>> 223 in XML document from URL
>> [file:/usr/local/Cellar/tomcat/9.0.38/libexec/webapps/fineract-provider/WEB-INF/classes/META-INF/spring/securityContext.xml]
>> is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber:
>> 223; columnNumber: 63; cvc-complex-type.2.4.c: The matching wildcard is
>> strict, but no declaration can be found for element
>> 'oauth:authorization-server’.
>>
>> I can reproduce this by simply unplugging the network cable from my own
>> machine. It seems that our JAR/WAR does not include some xsds needed to
>> validate the XML config files. If the machine used is connected to the
>> internet, these are downloaded automatically - but if not, Fineract does
>> not start.
>>
>> Given these are related to Spring Security, I wonder if this will be
>> fixed by upgrading the Spring Security JARs?
>>
>> Anyway - I’ll log a JIRA for this, but thought I’d share it for your
>> information/entertainment...
>>
>> Regards
>> Petri
>>
>> On 6 Oct 2020, at 7:24 PM, Petri Tuomola <pe...@tuomola.org> wrote:
>>
>> Hi Tube - that all looks OK.
>>
>> Doing ./gradlew just means running the gradlew in the current directory
>> on UNIX-like OS, as typically you would not have current directory in your
>> PATH.
>>
>> Can you send me (petri.tuom...@gmail.com) your full Tomcat log file
>> please. Maybe I can see what’s going wrong somewhere earlier. Not just the
>> section with the error, but the entire file please.
>>
>> Regards
>> Petri
>>
>> On 6 Oct 2020, at 7:15 PM, ጓይላና Tube <eminemme...@gmail.com> wrote:
>>
>> hi.
>> Petri Tuomola thank you for your response. here are the list of commands
>> i have followed to build fineract.
>> 1.install mysql version 5.7 and Tomcat version 9 2.
>> 2. i have created tenants database using  *gradlew createDB
>> -PdbName=fineract_tenants *command
>> 3. i have created Created default tenant database using  *gradlew
>> createDB -PdbName=fineract_default *command
>> 4. i have created fineract War using *gradlew clean bootwar* command
>> 5. deploy created war file inside *Tomcat/Webapps*.
>>
>> But, is there any difference between  *gradlew clean bootwar* and *./gradlew
>> clean bootwar*? because when i run ./gralew clean bootwar command am
>> getting
>> an error message *'.' is not recognized as an internal or external
>> command*
>>
>> *Regards *
>>
>>
>>
>>
>> <catalina.2020-10-06.log>
>
>
>
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="7005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
			  
			  <Resource type="javax.sql.DataSource"
name="jdbc/fineract_tenants"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="com.mysql.jdbc.Driver" 
url="jdbc:mysql://localhost:3306/fineract_tenants"
username="root"
password="mysql"
initialSize="3"
maxActive="10"
maxIdle="6"
minIdle="3"
validationQuery="SELECT 1"
testOnBorrow="true"
testOnReturn="true"
testWhileIdle="true"
timeBetweenEvictionRunsMillis="30000"
minEvictableIdleTimeMillis="60000"
logAbandoned="true"
suspectTimeout="60"
/>
</GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="7443" maxThreads="200" scheme="https"
secure="true" SSLEnabled="true"
keystoreFile="C:\Users\Bharath\Desktop\apache-tomcat-9.0.38\.keystore"
keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"
URIEncoding="UTF-8"
compression="force"
compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"/>
    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="7080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the
         AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <!--
    <Connector protocol="AJP/1.3"
               address="::1"
               port="8009"
               redirectPort="8443" />
    -->

    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>
    </Engine>
  </Service>
</Server>

Reply via email to