[Mifos-developer] impossible to build mifos

2 views
Skip to first unread message

Sergio Segura Gomez

unread,
Aug 19, 2010, 5:12:12 PM8/19/10
to mifos-d...@lists.sourceforge.net
hi
it's me again Sergio

i don't know how to start this i have tried everything that you tell
me, and i still can't build mifos.

i do "mvn test" , it works
i do "mvn clean install", doesn't works, but the test database is
created always
i do "mvn surefire-report:report-only from application, the file don't
show errors, just skipped

i am using the default configurations, i don't have any MIFOS_CONF
variable, i have not moved any file of the source, just i've done "git
pull" one or two times.

i am working everything locally in my OS, i just use git from cygwin.

i have created a user:mifos with pass: mifos with all privilegies:
mysql> select * from user where User = 'mifos';
+------+-------+-------------------------------------------
+-------------+------
-------+-------------+-------------+-------------+-----------
+-------------+----
-----------+--------------+-----------+------------+-----------------
+----------
--+------------+--------------+------------+-----------------------
+------------
------+--------------+-----------------+------------------
+------------------+--
--------------+---------------------+--------------------
+------------------+---
---------+--------------+----------+------------+-------------
+--------------+--
-------------+-------------+-----------------+----------------------+
| Host | User | Password |
Select_priv | Inser
t_priv | Update_priv | Delete_priv | Create_priv | Drop_priv |
Reload_priv | Shu
tdown_priv | Process_priv | File_priv | Grant_priv | References_priv |
Index_pri
v | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv |
Lock_tables
_priv | Execute_priv | Repl_slave_priv | Repl_client_priv |
Create_view_priv | S
how_view_priv | Create_routine_priv | Alter_routine_priv |
Create_user_priv | Ev
ent_priv | Trigger_priv | ssl_type | ssl_cipher | x509_issuer |
x509_subject | m
ax_questions | max_updates | max_connections | max_user_connections |
+------+-------+-------------------------------------------
+-------------+------
-------+-------------+-------------+-------------+-----------
+-------------+----
-----------+--------------+-----------+------------+-----------------
+----------
--+------------+--------------+------------+-----------------------
+------------
------+--------------+-----------------+------------------
+------------------+--
--------------+---------------------+--------------------
+------------------+---
---------+--------------+----------+------------+-------------
+--------------+--
-------------+-------------+-----------------+----------------------+
| % | mifos | *D0891121583F7420107F5DE564165580782982D9 |
Y | Y
| Y | Y | Y | Y |
Y | Y
| Y | Y | Y | Y |
Y
| Y | Y | Y | Y | Y
| Y | Y | Y |
Y | Y
| Y | Y |
Y | Y
| Y | | |
| |
0 | 0 | 0 | 0 |
+------+-------+-------------------------------------------
+-------------+------
-------+-------------+-------------+-------------+-----------
+-------------+----
-----------+--------------+-----------+------------+-----------------
+----------
--+------------+--------------+------------+-----------------------
+------------
------+--------------+-----------------+------------------
+------------------+--
--------------+---------------------+--------------------
+------------------+---
---------+--------------+----------+------------+-------------
+--------------+--
-------------+-------------+-----------------+----------------------+
1 row in set (0.00 sec)

from mysql workbench:

Host User Password Select_priv Insert_priv Update_priv Delete_priv
Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv
Grant_priv References_priv Index_priv Alter_priv Show_db_priv
Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv
Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv
Create_routine_priv Alter_routine_priv Create_user_priv Event_priv
Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject
max_questions max_updates max_connections max_user_connections
% mifos *D0891121583F7420107F5DE564165580782982D9 Y Y Y Y Y Y Y Y Y Y
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0

so, i looked at mifos.log file in application folder, it has this:

2010-08-19/11:26:40.820/CDT ERROR, org.mifos.logger, LoggingTest,
testLogging, 38, test error log
2010-08-19/11:26:40.849/CDT FATAL, org.mifos.logger, LoggingTest,
testLogging, 40, test fatal log
2010-08-19/11:26:40.859/CDT FATAL, org.mifos.logger, LoggingTest,
testLogging, 41, test fatal log
2010-08-19/11:26:40.862/CDT FATAL, org.mifos.logger, LoggingTest,
testLogging, 42, test fatal log
java.lang.Exception
at
org.mifos.framework.components.logger.LoggingTest.testLogging(LoggingTest.java:
42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:
79)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:
140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:
127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:
345)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
1009)
2010-08-19/11:38:12.375/CDT ERROR, org.mifos.logger, LoggingTest,
testLogging, 38, test error log
2010-08-19/11:38:12.389/CDT FATAL, org.mifos.logger, LoggingTest,
testLogging, 40, test fatal log
2010-08-19/11:38:12.393/CDT FATAL, org.mifos.logger, LoggingTest,
testLogging, 41, test fatal log
2010-08-19/11:38:12.399/CDT FATAL, org.mifos.logger, LoggingTest,
testLogging, 42, test fatal log
java.lang.Exception
at
org.mifos.framework.components.logger.LoggingTest.testLogging(LoggingTest.java:
42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:
79)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:
140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:
127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:
345)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
1009)
2010-08-19/11:47:57.673/CDT ERROR,
org.hibernate.util.JDBCExceptionReporter, ?, ?, ?, Duplicate entry
'testUser' for key 'personnel_login_idx'
2010-08-19/11:51:00.672/CDT ERROR,
org.hibernate.jdbc.AbstractBatcher, ?, ?, ?, Exception executing
batch:
org.hibernate.StaleStateException: Batch update returned unexpected
row count from update [0]; actual row count: 0; expected: 1
at org.hibernate.jdbc.Expectations
$BasicExpectation.checkBatched(Expectations.java:85)
at org.hibernate.jdbc.Expectations
$BasicExpectation.verifyOutcome(Expectations.java:70)
at
org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:
90)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:
70)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
268)

of course is just a part, but i look that is something wrong in
hibernate configurations.

can anyone help with this? I will really appreciate it and you would
have all my disposal.

btw while the "mvn clean install" is running it launchs a window of
firefox with the url starting with http://localhost:8083, it is ok or
is an error?, it page shows that the application haven't found. and
i've noticed it launchs a windows with selenium too, and i think it s
doing the tasks well

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev

skw...@gmail.com

unread,
Aug 19, 2010, 6:14:10 PM8/19/10
to Mifos software development
Hi Sergio,

I feel your pain :( You can ignore the fatal error messages you see in
Mifos.log as they are part of unit test for logging code. Sounds like
you are bogged down when maven is executing the test phase of the
build cycle. You can tell maven to skip the tests with this: "mvn
clean install -Dmaven.test.skip=true". This should give you a build
(in <mifos source root dir>/application/target/mifos-webapp.war) which
you can use to deploy in Tomcat. If it deploys and you can access
mifos locally, this means maven and database are working properly and
the problem is lurking somewhere in test.

When doing "mvn clean install", it is normal to see firefox open up to
location localhost:8083 as it is running acceptance test. What isn't
normal is "application not found" - you should see a mifos page.

Good luck!
Stanley

Sergio Segura Gomez

unread,
Aug 19, 2010, 7:00:06 PM8/19/10
to mifos-d...@lists.sourceforge.net
@skwoka

hi and thank you, it works, almost i think

after do that
i just setting again the MIFOS_CONF variable and the local.properties
file with this:

main.database=test
main.database.host=localhost
main.database.port=3306
main.database.user=mifos
main.database.password=mifos

then i did deploy the mifos-webapp.war, the deploy was succesfull and
i can see the login page

just can't to login =/. the user is mifos right? and the password is
testmifos right? because that is the user and password i know.

i tried with mifostest and mifos passwords.

java.lang.NullPointerException
java.lang.System.arraycopy(Native Method)

org.mifos.security.authentication.PasswordHashing.verifyPassword(PasswordHashing.java:
70)

org.mifos.security.authentication.MifosDaoAuthenticationProvider.additionalAuthenticationChecks(MifosDaoAuthenticationProvider.java:
51)

org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:
139)

org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:
120)

org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:
48)

org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:
97)

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:
200)

org.mifos.security.authentication.MifosLegacyUsernamePasswordAuthenticationFilter.doFilter(MifosLegacyUsernamePasswordAuthenticationFilter.java:
102)
org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:
105)
org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:
79)
org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:
149)

org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:
237)

org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:
167)

On Aug 19, 5:14 pm, "skw...@gmail.com" <skw...@gmail.com> wrote:
> Hi Sergio,
>
> I feel your pain :( You can ignore the fatal error messages you see in
> Mifos.log as they are part of unit test for logging code. Sounds like
> you are bogged down when maven is executing the test phase of the
> build cycle. You can tell maven to skip the tests with this: "mvn
> clean install -Dmaven.test.skip=true".  This should give you a build
> (in <mifos source root dir>/application/target/mifos-webapp.war) which
> you can use to deploy in Tomcat. If it deploys and you can access
> mifos locally, this means maven and database are working properly and
> the problem is lurking somewhere in test.
>
> When doing "mvn clean install", it is normal to see firefox open up to
> location localhost:8083 as it is running acceptance test. What isn't
> normal is "application not found" - you should see a mifos page.
>
> Good luck!
> Stanley
>
> On Thu, Aug 19, 2010 at 2:12 PM, Sergio Segura Gomez
>

> ...
>
> read more »

Graeme Ruthven

unread,
Aug 19, 2010, 7:35:33 PM8/19/10
to Mifos software development
> -----Original Message-----
> From: Sergio Segura Gomez [mailto:master.she...@gmail.com]
> Sent: Friday, 20 August 2010 11:00 a.m.
> To: mifos-d...@lists.sourceforge.net
> Subject: Re: [Mifos-developer] impossible to build mifos
>
> @skwoka
>
> hi and thank you, it works, almost i think
>
> after do that
> i just setting again the MIFOS_CONF variable and the local.properties
> file with this:
>
> main.database=test
> main.database.host=localhost
> main.database.port=3306
> main.database.user=mifos
> main.database.password=mifos
>
> then i did deploy the mifos-webapp.war, the deploy was succesfull and
> i can see the login page
>
> just can't to login =/. the user is mifos right? and the password is
> testmifos right? because that is the user and password i know.
>
> i tried with mifostest and mifos passwords.

Have you run the SQL scripts to create the schema and initialise the
password?

Regards
Graeme

skw...@gmail.com

unread,
Aug 19, 2010, 7:39:13 PM8/19/10
to Mifos software development
Your main database is "test", I assume it is the same database as the
one used in integration and acceptance testing. I'm guessing that the
password problem could be the result of running integration and
acceptance tests. I suggest creating a new database for development
and use it as your "main" database. It's also a good idea to have a
separate database for development since during test, the database gets
dropped and re-created. To give you an idea what I'm referring to, the
following configuration is what I am using in development:

main.database=mifos
main.database.host=localhost
main.database.port=3306
main.database.user=mifos
main.database.password=mifos

integration.database=mifostest
integration.database.host=localhost
integration.database.port=3306
integration.database.user=mifos
integration.database.password=mifos

acceptance.database=mifostest
acceptance.database.host=localhost
acceptance.database.port=3306
acceptance.database.user=mifos
acceptance.database.password=mifos

Create your new database and run the following initialization scripts:
<mifos src>/acceptanceTests/target/classes/sql/latest-schema.sql
<mifos src>/acceptanceTests/target/classes/sql/latest-data.sql
<mifos src>/acceptanceTests/target/classes/sql/custom_data.sql
<mifos src>/acceptanceTests/target/classes/sql/init_mifos_password.sql

Sergio Segura Gomez

unread,
Aug 19, 2010, 8:04:25 PM8/19/10
to mifos-d...@lists.sourceforge.net
i did something better =), well faster, i run init_mifos_password.sql
in test database, and it's working =)
of course that I am going to bear in mind your configuration skwoka.

i've noticed the password for user mifos was null =/, i don't know if
it is related with the failure in test integration.


thank you for all of you that helped me with this, and took some of
your time to guide me.

i want to share all the process with others i don't know if in the
wiki or for other media, what is your advice?

i will try my mifos recently builded and see in the code how integrate
some specifications of the client.

i really thank you.

manoj Sharma

unread,
Aug 20, 2010, 12:04:48 AM8/20/10
to Mifos software development
Hi shekko.sergio,

Please try to build mifos from command prompt.

Steps:
(1)Install the maven 2.1.1
(2) Set the path in environment variable
(3)Set VM in  environment variable
(4) do mvn clean command
(5)do mvn package
(6)mvn package (Goal) war:war
(7) mvn -e

I thing you can build mifos from this command and also you can get war file mifos-webapp file in target folder
--
Thanks & Regards,
Manoj Kumar Sharma
Senior Java Programmer
Magnus Consulting Group Pvt. Ltd.
Kathmandu Nepal
Mailto:  ma...@magnus.com.np
Website:www.magnus.com.np
+977-9808603590(Mobile)
+977-1-4494440,4464339(Office)



Reply all
Reply to author
Forward
0 new messages