OB3 MP7.1 -- error after openbravo.war was built

<<

Antuan Avdioukhine

Posts: 42

Joined: Sat Feb 25, 2012 4:11 pm

Post Thu Mar 01, 2012 5:40 pm

OB3 MP7.1 -- error after openbravo.war was built

Collegues, greetings.

I tried to build OB3 from sources on gentoo with Sun JDK 1.6, Ant version 1.8.1, Tomcat 6.0.35.

First, I configured Openbravo.properties (with GUI wizard, then by hands in editor). Then, I'd read "Troubleshutting Guide", after I'd experienced "Out of memory" problems. But "hibernate .. class not found" error still persists. I observed results of "ant -diagnostics" and "ant -v" and found, that recomended solution does not works, then I tried to run "ant -noclasspath install.source", but result was the same. Nevertheless openbravo.war was built and after some tomcat tuning steps was deployed and OB3 starts. After login with default login/pass I got message "system in maintenance mode", but navigation through OB applications does not displays any errors, just data absence.

So, I researched step-by-step all procedures, which completed until errors, reading build.xml file and repeating all targets manually. All "depend" targets (init, create.database, wad.lib, trl.lib, compile.complete.deploy) completed without errors, after that openbravo.war was found in ./lib directory (deploy.mode=war). Next target (antcall inheritall="true" inheritrefs="true" target="apply.module") also completed successfully. Error raised when I tried to run import.sample.data target.

An now is a question: is these skipped targets (inside install.sources, after and including import.sample.data) required for normal operations? Maybe it is reasonable for me to step to tuning installed instance and not to waste time trying get no errors while building with default scenario?

Thanks in advance.
<<

Gorka Gil

Posts: 90

Joined: Wed Mar 18, 2009 7:25 pm

Post Fri Mar 02, 2012 1:13 pm

Re: OB3 MP7.1 -- error after openbravo.war was built

Hi,

Have you setup the ANT_OPS ?

# echo "-Xmx1280M -XX:MaxPermSize=256M" >> /etc/env.d/99ant

then run again ant install.sources (as you have already discover the target that more ram uses t is the sampledata import)

also setup CATALINA_BASE:
# echo "CATALINA_HOME=/usr/share/tomcat-6" >> /etc/env.d/99tomcat
# echo "CATALINA_BASE=/var/lib/tomcat-6" >> /etc/env.d/99tomcat

then if you have setup catalina_base you can use deploy.mode=class (the default) that don't create a war but copy directly to the tomcat context when doing install.sorce or smartbuild.

Antuan Avdioukhine wrote:An now is a question: is these skipped targets (inside install.sources, after and including import.sample.data) required for normal operations?


Yes, you can not skip targets in the install.source , except you know exactly what you are doing. This normally causes that the check of it is correctly compiled openbravo fail and only allow you to login as system administrator. For fix that you have to run install.source or smartbuild.

In case that you don't want to have sampledata, you can delete it " rm referencedata/sampledata/* " and run again " ant install.source ".

Antuan Avdioukhine wrote:Maybe it is reasonable for me to step to tuning installed instance and not to waste time trying get no errors while building with default scenario?


After all the time that you spent on the custom install I think you are very near and also you will have better knowledge about the way how works Openbravo. Also if you plan to develop something on top of Openbravo you will need a custom install.

On the other hand, the virtual appliances or iso are there in case that you don't want to spent time on this or to get a better supported environment.

Personally I think that the custom install it is more near to the Gentoo philosophy: compile every package and have more control over the installation.
<<

Antuan Avdioukhine

Posts: 42

Joined: Sat Feb 25, 2012 4:11 pm

Post Fri Mar 02, 2012 6:11 pm

Re: OB3 MP7.1 -- error after openbravo.war was built

Hi, thanks for response.

Well.

Gorka Gil wrote:Hi,

Have you setup the ANT_OPS ?

Yes, sure, also double-cheked CATALINA_BASE, ANT_BASE, ANT_HOME and CATALINA_OPTS. I'm using gentoo, so there is another places to put env-vars, but result was checked twice and more.

Gorka Gil wrote:then if you have setup catalina_base you can use deploy.mode=class (the default) that don't create a war but copy directly to the tomcat context when doing install.sorce or smartbuild.

I tried different deploy modes. But, as I said, build and deploy finished without errors. Errors raised only while building targets import.sample.data and load.logoimages. So, I guess that deploy.mode does not affects this error.

By the way, smartbuild target does not performs tasks which raise errors in install.source.

Gorka Gil wrote:
Antuan Avdioukhine wrote:An now is a question: is these skipped targets (inside install.sources, after and including import.sample.data) required for normal operations?


Yes, you can not skip targets in the install.source , except you know exactly what you are doing. This normally causes that the check of it is correctly compiled openbravo fail and only allow you to login as system administrator. For fix that you have to run install.source or smartbuild.

So, I just want to achieve state "I know what I'm doing" 8-) This is no my first experience building large project, but first on on java with ant. And now I'm trying standard way to eliminate error -- repeat all tasks step by step and drop unneeded ones. As I got import.sample.data and load.logoimages just imports data into existing database (even no using OB itself, but building wrapping mini-application), and if skip it and jump to setApplied target, which completes without errors also.

Gorka Gil wrote:
Antuan Avdioukhine wrote:Maybe it is reasonable for me to step to tuning installed instance and not to waste time trying get no errors while building with default scenario?


After all the time that you spent on the custom install I think you are very near and also you will have better knowledge about the way how works Openbravo. Also if you plan to develop something on top of Openbravo you will need a custom install.

On the other hand, the virtual appliances or iso are there in case that you don't want to spent time on this or to get a better supported environment.

Personally I think that the custom install it is more near to the Gentoo philosophy: compile every package and have more control over the installation.

Gentoo philosophy rules 8-) Actually, I'm starting UNIX/Linux experience using FreeBSD and Slakware, now switched to Gentoo, because, right, I prefer "to know what I do". Perhups later I'll take an advance of developing OB applications as well as practice installing and support OB, so I have to "stepping on moslty all rakes", as we said in Russia :D Because of that installing virtual appliance (which I proceeded learning installation options) is not my way.

So, let's start over and procees with install.source.
My environment (only what is related to process):
  Code:
ANT_HOME=/usr/share/ant
ANT_OPTS='-Xms256M -Xmx1024M -XX:MaxPermSize=256M -Djava.library.path=/usr/lib'
CATALINA_BASE=/var/lib/tomcat-6/
CATALINA_HOME=/usr/share/tomcat-6/
JAVAC=/etc/java-config-2/current-system-vm/bin/javac
JAVACC_HOME=/usr/share/javacc/
JAVA_HOME=/etc/java-config-2/current-system-vm
JDK_HOME=/etc/java-config-2/current-system-vm
OPT_JAR_LIST='bcel ant/ant-apache-bcel bsf ant/ant-apache-bsf log4j ant/ant-apache-log4j oro ant/ant-apache-oro regexp ant/ant-apache-regexp xml-commons-resolver ant/ant-apache-resolver checkstyle jakarta-commons-beanutils jakarta-commons-cli jakarta-commons-logging jakarta-commons-collections jaxp_parser_impl cobertura junit4 xerces-j2 ant/ant-commons-logging jakarta-commons-net ant/ant-commons-net javamail jaf ant/ant-javamail jdepend ant/ant-jdepend jsch ant/ant-jsch jtidy ant/ant-junit ant/ant-nodeps ant/ant-swing jaxp_transform_impl ant/ant-trax xalan-j2-serializer'

(/etc/java-config-2/current-system-vm expands to /usr/lib/jvm//sun-jdk-1.6/)
Although OPT_JAR_LIST was set and filled according to http://wiki.openbravo.com/wiki/Installa ... leshooting, I got error (org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select ur from ADUserRoles ur where ur.userContact.id='0' and ur.active='Y' and ur.role.active='Y' order by ur.role.id asc]). Running ant with --execdebug option, I notes that "system antlr", which may affects this error, used despite OPT_JAR_LIST value. Actually I'd not found any reference about OPT_JAR_LIST, it seems to me, that it variable is used by ant wrapper script from some specific linux distribution(s) (fedora? ubuntu?). So I stucked at this point for now.

(Some time later) I found ANT_TASKS variable is used similar (as I believe) to OPT_JAR_LIST. Ok, I'll try to rebuild and completelly reinstall OB.
<<

Gorka Gil

Posts: 90

Joined: Wed Mar 18, 2009 7:25 pm

Post Fri Mar 02, 2012 7:18 pm

Re: OB3 MP7.1 -- error after openbravo.war was built

Hi,

Antuan Avdioukhine wrote:I tried different deploy modes. But, as I said, build and deploy finished without errors. Errors raised only while building targets import.sample.data and load.logoimages. So, I guess that deploy.mode does not affects this error.

By the way, smartbuild target does not performs tasks which raise errors in install.source.


Sure, deploy mode don't affect to this error, only that it is one step lees to not create a war :)

smartbuild only builds what it is missing, you can see here more info about targets here http://wiki.openbravo.com/wiki/Development_Build_Tasks

Antuan Avdioukhine wrote:Although OPT_JAR_LIST was set and filled according to http://wiki.openbravo.com/wiki/Installa ... leshooting, I got error (org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select ur from ADUserRoles ur where ur.userContact.id='0' and ur.active='Y' and ur.role.active='Y' order by ur.role.id asc]). Running ant with --execdebug option, I notes that "system antlr", which may affects this error, used despite OPT_JAR_LIST value. Actually I'd not found any reference about OPT_JAR_LIST, it seems to me, that it variable is used by ant wrapper script from some specific linux distribution(s) (fedora? ubuntu?). So I stucked at this point for now.


The problem about ant you have debug well, the problem it is that the antlr of the system it executed before the antlr of openbravo.

Try to renaming or deleting:
/usr/share/ant/lib/ant-antlr.jar

Antuan Avdioukhine wrote:Gentoo philosophy rules Actually, I'm starting UNIX/Linux experience using FreeBSD and Slakware, now switched to Gentoo, because, right, I prefer "to know what I do". Perhups later I'll take an advance of developing OB applications as well as practice installing and support OB, so I have to "stepping on moslty all rakes", as we said in Russia Because of that installing virtual appliance (which I proceeded learning installation options) is not my way.


He he I'm also a Gentoo user for some years and at first was hard to spent many hours burning the cpu compiling packages but after a time you get used xD

If you want to join Openbravo community you are more than welcome !!


Regards,
Gorka
<<

Antuan Avdioukhine

Posts: 42

Joined: Sat Feb 25, 2012 4:11 pm

Post Sat Mar 03, 2012 12:53 am

Re: OB3 MP7.1 -- error after openbravo.war was built

Hi again ;)
Gorka Gil wrote:Hi,
smartbuild only builds what it is missing, you can see here more info about targets here http://wiki.openbravo.com/wiki/Development_Build_Tasks

Yep, I'll bookmark this page.

Gorka Gil wrote:The problem about ant you have debug well, the problem it is that the antlr of the system it executed before the antlr of openbravo.

Try to renaming or deleting:
/usr/share/ant/lib/ant-antlr.jar

It was "plan Z", too radically. :mrgreen:

So, solution was too simple. I blame myself -- I read ant script wrapper and did not see obvious thing. As I wrote, I'd tried to find any instructions how to use OPT_JAR_LIST env-var. And I'd tried to use it in my environment, but, as I wrote, nothing was affected. Well, let read ant script wrapper. Oops. Despite this script ignores OPT_JAR_LIST, it uses almost undocumented environment var called ANT_TASKS. As I investigated, it may be filled by names of system-wide ant jar's, set to 'all', which means that all system-wide ant jar's would be used, 'none' for none of its, and empty, which means -- ta-daaaa -- ALL! So, keeping in mind that OB sources distribution has all libs it need for build and run, we set ANT_TASKS to 'none' and... I have to inform my mom. "Mo-o-o-o-m!Mom! my openbravo had built successfully! Mom, no errors, I swear! Mom, you can have a look, it really works! Mom, may I have my pint of beer? Mom. you promised.." :lol:

Well, no jokes. I think, it must me written in "Troubeshouting guide": OB distribution has all libs that needed for successfully build and run OB, so it is good idea to prevent using of any system-wide libs during building and installation. How to do it -- I guess it is distribution-depended, because as I found, ant wrapper script is proprietary according to distribution. For current gentoo distribution solution it set environment var ANT_TASKS to "none".

Gorka Gil wrote:
Antuan Avdioukhine wrote:Gentoo philosophy rules Actually, I'm starting UNIX/Linux experience using FreeBSD and Slakware, now switched to Gentoo, because, right, I prefer "to know what I do". Perhups later I'll take an advance of developing OB applications as well as practice installing and support OB, so I have to "stepping on moslty all rakes", as we said in Russia Because of that installing virtual appliance (which I proceeded learning installation options) is not my way.


He he I'm also a Gentoo user for some years and at first was hard to spent many hours burning the cpu compiling packages but after a time you get used xD

If you want to join Openbravo community you are more than welcome !!

I'd joined yet ;) Well, will be working together :)
<<

Gorka Gil

Posts: 90

Joined: Wed Mar 18, 2009 7:25 pm

Post Wed Mar 07, 2012 12:26 pm

Re: OB3 MP7.1 -- error after openbravo.war was built

Hi,

Antuan Avdioukhine wrote:It was "plan Z", too radically.


Agree it is very radical, but since I only use ant for Openbravo then no too much problem for me :D

Antuan Avdioukhine wrote:So, solution was too simple. I blame myself -- I read ant script wrapper and did not see obvious thing. As I wrote, I'd tried to find any instructions how to use OPT_JAR_LIST env-var. And I'd tried to use it in my environment, but, as I wrote, nothing was affected. Well, let read ant script wrapper. Oops. Despite this script ignores OPT_JAR_LIST, it uses almost undocumented environment var called ANT_TASKS. As I investigated, it may be filled by names of system-wide ant jar's, set to 'all', which means that all system-wide ant jar's would be used, 'none' for none of its, and empty, which means -- ta-daaaa -- ALL! So, keeping in mind that OB sources distribution has all libs it need for build and run, we set ANT_TASKS to 'none' and... I have to inform my mom. "Mo-o-o-o-m!Mom! my openbravo had built successfully! Mom, no errors, I swear! Mom, you can have a look, it really works! Mom, may I have my pint of beer? Mom. you promised.."

Well, no jokes. I think, it must me written in "Troubeshouting guide": OB distribution has all libs that needed for successfully build and run OB, so it is good idea to prevent using of any system-wide libs during building and installation. How to do it -- I guess it is distribution-depended, because as I found, ant wrapper script is proprietary according to distribution. For current gentoo distribution solution it set environment var ANT_TASKS to "none".


Great catch !!! If you want you can add a point for Gentoo with this information in the wiki page (http://wiki.openbravo.com/wiki/Installa ... leshooting) in the same way that it is for Fedora.

Note: If you have an old openbravo wiki account you can edit, if no, we are working to solve a problem that new accounts can not edit.


Antuan Avdioukhine wrote:I'd joined yet Well, will be working together


Awesome !!
<<

Antuan Avdioukhine

Posts: 42

Joined: Sat Feb 25, 2012 4:11 pm

Post Fri Mar 16, 2012 5:59 pm

Re: OB3 MP7.1 -- error after openbravo.war was built

Greetings!

Gorka Gil wrote:Great catch !!! If you want you can add a point for Gentoo with this information in the wiki page (http://wiki.openbravo.com/wiki/Installa ... leshooting) in the same way that it is for Fedora.

Note: If you have an old openbravo wiki account you can edit, if no, we are working to solve a problem that new accounts can not edit.

Unfortunatelly, I cannot login there. When I'd filled registration form, I checked 'Openbravo Wiki' to create account on Wiki too. But now when I jump to Wiki page, it does not displays that I logged on, and when I tried to 'Login/Register' site redirects to page with empty place where form may be placed -- e.g. there is headings, footer, left-hand menu, "LogIn" header and nothing else. ;(
<<

Gorka Gil

Posts: 90

Joined: Wed Mar 18, 2009 7:25 pm

Post Fri Mar 16, 2012 6:09 pm

Re: OB3 MP7.1 -- error after openbravo.war was built

We are still fixing the synchronization between our single sing on and our wiki for new users.

Once we solved it, I will ping you.

Sorry for the inconveniences.
<<

Antuan Avdioukhine

Posts: 42

Joined: Sat Feb 25, 2012 4:11 pm

Post Sat Mar 17, 2012 12:26 am

Re: OB3 MP7.1 -- error after openbravo.war was built

Gorka Gil wrote:We are still fixing the synchronization between our single sing on and our wiki for new users.

Once we solved it, I will ping you.

Sorry for the inconveniences.

Never mind. I'll be waiting.

Well, maybe two my proposals for improvement of forum actions would be considered?
1. Tunable flag in user's profile that makes all user's post to be watched and reply notifications to be send always.
2. Tunable session age, including that they calls "remember me on this computer", allowing in addition to be persistently logged on from two or more computers (e.g., work computer, home computer and any "flying device" such at tablet or notebook).
<<

Antuan Avdioukhine

Posts: 42

Joined: Sat Feb 25, 2012 4:11 pm

Post Mon Jun 25, 2012 1:25 am

Re: OB3 MP7.1 -- error after openbravo.war was built

Gorka Gil wrote:We are still fixing the synchronization between our single sing on and our wiki for new users.

Once we solved it, I will ping you.

Sorry for the inconveniences.


Hi

I'd posted an additions to troubleshooting guide.

Return to Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Website Terms


Designed by ST Software for PTF.