Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

JForum re-install database problem.

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

I have decided to use the JForum and I have got a big problem. Maybe solution is easy and obvious, but I have no experience with it.
When I want to use JForum i have to download it and deploy on my server. I choose a database, type a password etc. But ... for example, when i want to restart my server I have to walk through installation process again. So I have to create new database, so I lose my data in DB, because JForum creates new, empty DB.
I want to use "old" (not empty) DB when I re-install my JForum. Can I do it?
I've tried export my DB before restart server, and then import it, but it doesn't work. (For example i can't log-in because password isn't correct (hash is changed when I did re-install).
I use Wildfly server and PostgreSql DB.

Please, help me.
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

when i want to restart my server I have to walk through installation process again.


Why do you think you have to to do that? Installation is a one-time thing that you never need to do again (and should not do again, precisely for the reason that you lose your data).

By the way, you are using JForum 2.4.1, yes? All earlier versions have serious security issues and should be avoided. That version is supported in the forums at http://jforum.andowson.com/forums/list.page
 
John Dorian
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you for reply.

yes I use 2.4.1 version.
I ask about it because, - for example - : when my server will crash and restart will be necassary i'll lose my data in DB, because i'll have to delploy JForum again, so walk through a installation process again. So i I want to do copy of my JForum's DB from time to time and import it to the JForum when it will be necessary. Can i do it?

Other case.

When new version of JForum will be avalible i'll download it, and i'll deploy it on my server. And i'll want to use my old DB, how Will I import it?
 
John Dorian
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Why do you think you have to to do that? Installation is a one-time thing that you never need to do again (and should not do again, precisely for the reason that you lose your data).


Every time i restart my WildFly service and run my JForum, installation form is displayed and every time forum is created from scratch.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

because i'll have to delploy JForum again


That's what I'm asking - why do you think you need to do that? You don't need to, and should not.

When new version of JForum will be avalible i'll download it, and i'll deploy it on my server. And i'll want to use my old DB, how Will I import it?


In that case you would run the upgrade procedure, not the installation procedure, so there's no need to export or import the DB. If a DB migration is necessary, then that version's wiki page (e.g. https://sourceforge.net/p/jforum2/wiki2/NewFeatures241/) would mention it, and there would be a DB script in the "upgrade" directory (see the source at https://sourceforge.net/p/jforum2/code/HEAD/tree/trunk/).
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Every time i restart my WildFly service and run my JForum, installation form is displayed and every time forum is created from scratch.



Only just saw this. The installation form is displayed even if you access an URL like http://localhost:8080/jforum2/? That sounds odd. You should actually remove the mapping of the InstallServlet after the initial install, so that nobody accidentally accesses it.
 
John Dorian
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The installation form is displayed even if you access an URL like http://localhost:8080/jforum2/?


Yes.

You should actually remove the mapping of the InstallServlet after the initial install, so that nobody accidentally accesses it.



How should I do it? In web.xml :



remove these lines :

?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, after the initial run that extracts the war file. Or does your servlet container a) not unpack the war file, or b) does it do so every time the server is started?
 
John Dorian
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Am I doing wrong?
1. Download JForum.2.4.1.war
2. Change its name on test.war
3. Copy it to a standalone/deployments directory on my server.
4. Waiting for a deployed status.
5. test.war file is deployed.
6. type in browser's url bar: localhost:8080/test
7. Installation form.
8. Installation is completed.
9. It works.
10. Turn off server.
11. Unpack test.war file locally (not in the server)
12. Remove "mapping" lines from web.xml
13. Create new test.war file : jar -cvf test.war * (in unpacked catalog)
14. Copy test.war file to a standalone/deployments directory on my server.
15. Run server
16. Waiting for deployed status
17 test.war file is deployed
18. type in browser's url bar: localhost:8080/test
19 ... and error occurs:

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hard to say, you may want to ask the question over at http://jforum.andowson.com/forums/list.page where JForum 2.x is supported.
 
John Dorian
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I completely don't understand.
Problem occurs when deploying process is run:
If I install JForum and then remove test.deployed file without restart server, and when i refresh page (after create new test.deployed file) page is loading about 5 minuts and error occurs.
If I dont walk through a install process page loads without errors.

Where is the problem?
WildFly configuration, JForum, anything else?

Is any alternative for JForum 2.4.1 which I can use?
 
John Dorian
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok i solved my problem.
Manual installation helped.
Thanks guys for help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic