1 2 Previous Next 16 Replies Latest reply on May 24, 2004 9:03 AM by jae

    Problem updating my code with latest CVS, news module

    Daniel Le Berre Newbie

      Hi Guys,

      I got my website running with a CVS snapshot I got a few weeks after Nukes 1.0 (in order to have the news module).

      I am trying to update my code to the current CVS to be 1.1 compatible. The main changes we made was on the templates.

      I got the following errors when trying to compile the updated code. Where should the constant STORY_POSTED be defined?

      Daniel

      [execmodules] /home-local/nukes-snapshot/news/src/main/org/jboss/nukes/addons/modules/news/News.java:49: cannot resolve symbol
      [execmodules] symbol : variable STORY_POSTED
      [execmodules] location: class org.jboss.nukes.addons.modules.news.News
      [execmodules] stories = module.storyHome.findByState(new Integer(STORY_POSTED));
      [execmodules] ^
      [execmodules] /home-local/nukes-snapshot/news/src/main/org/jboss/nukes/addons/modules/news/News.java:71: cannot resolve symbol
      [execmodules] symbol : variable STORY_POSTED
      [execmodules] location: class org.jboss.nukes.addons.modules.news.News
      [execmodules] stories = module.storyHome.findByStateOrderByDate(new Integer(STORY_POSTED));
      [execmodules] ^
      [execmodules] /home-local/nukes-snapshot/news/src/main/org/jboss/nukes/addons/modules/news/News.java:92: cannot resolve symbol
      [execmodules] symbol : variable STORY_POSTED
      [execmodules] location: class org.jboss.nukes.addons.modules.news.News
      [execmodules] Collection stories = module.storyHome.findByStateAndTopic(new Integer(STORY_POSTED), topic);
      [execmodules] ^
      [execmodules] /home-local/nukes-snapshot/news/src/main/org/jboss/nukes/addons/modules/news/News.java:109: cannot resolve symbol
      [execmodules] symbol : variable STORY_ID_NAME
      [execmodules] location: class org.jboss.nukes.addons.modules.news.News
      [execmodules] Integer storyId = page.getParameterAsInteger(STORY_ID_NAME);
      [execmodules] ^
      [execmodules] /home-local/nukes-snapshot/news/src/main/org/jboss/nukes/addons/modules/news/News.java:116: cannot resolve symbol
      [execmodules] symbol : method getCounter ()
      [execmodules] location: interface org.jboss.nukes.addons.modules.news.ejb.StoryEJBLocal
      [execmodules] story.setCounter(story.getCounter() + 1);
      [execmodules] ^
      [execmodules] /home-local/nukes-snapshot/news/src/main/org/jboss/nukes/addons/modules/news/News.java:116: cannot resolve symbol
      [execmodules] symbol : method setCounter (java.lang.String)
      [execmodules] location: interface org.jboss.nukes.addons.modules.news.ejb.StoryEJBLocal
      [execmodules] story.setCounter(story.getCounter() + 1);
      [execmodules] ^
      [execmodules] /home-local/nukes-snapshot/news/src/main/org/jboss/nukes/addons/modules/news/News.java:133: cannot resolve symbol
      [execmodules] symbol : method getCommentable ()
      [execmodules] location: interface org.jboss.nukes.addons.modules.news.ejb.StoryEJBLocal
      [execmodules] if (story.getCommentable())
      [execmodules] ^
      [execmodules] 7 errors
      
      


        • 1. Re: Problem updating my code with latest CVS, news module
          Sherman Wood Apprentice



          Could you get the latest snapshot and try that? The news module has had a lot of changes in it.

          Sherman

          • 2. Re: Problem updating my code with latest CVS, news module
            Daniel Le Berre Newbie

            I got the following message when updating from CVS:

            cvs update: conflict: news/src/main/org/jboss/nukes/addons/modules/news/News.java is modified but no longer in the repository
            C news/src/main/org/jboss/nukes/addons/modules/news/News.java
            M news/src/main/org/jboss/nukes/addons/modules/news/NewsModule.java
            


            Where is the new News.java file? I made some changes to display the news latest first, and select only the top N. I would like to keep those features.

            • 3. Re: Problem updating my code with latest CVS, news module
              Daniel Le Berre Newbie

              I just moved the News.java file away and it compiles fine now.

              I need to update the template files now.

              Daniel

              • 4. Re: Problem updating my code with latest CVS, news module
                jae Master

                that class no longer exists. the new code will automatically show the most recent story first.

                also, you will have to drop the tables in the database so they can be re-created when the news module is deployed (it is now a pure cmp solution).

                if you are using postgres, there are a couple issues that i have fixes for, but haven't checked them in yet (will today). you're best bet is going to do a fresh checkout and avoid the snapshots, i think their is a problem w/ their creation (as reported in another post).

                • 5. Re: Problem updating my code with latest CVS, news module
                  Daniel Le Berre Newbie

                  Well, I sorted my compilation problems.

                  However, I just cannot run nukes anymore.

                  I tried to deploy one by one all the components by hand (using a fresh install but the same database), it did not work (error 404 while trying to access localhost:8080/nukes/).

                  Using a fresh database, the tables do not create themselves (I thought that it was the case in the new release).

                  So I tried to create the installer, and I got the following error:

                  deploy-installer:
                  
                  BUILD FAILED
                  file:/home-local/nukes-snapshot/distrib/build.xml:331: Warning: Could not find file /home-local/nukes-snapshot/distrib/output/lib/nukes-installer.war to copy.
                  


                  In that directory, I only have a .jar file:
                  ls output/lib/
                  CVS/ nukes-installer-lib.jar
                  


                  Any idea what's going on?

                  --Daniel

                  • 6. Re: Problem updating my code with latest CVS, news module
                    jae Master

                    only the news module will create it's own tables, the other modules have not been fully converted over to the pure cmp solution (my applologies if i didn't make it clear enough that this was news specific).

                    i'm not sure about the installer issue though. did you configure the local.properties file in the build directory to use the correct database?

                    did you run a "deploy" command in the "nukes" directory to deploy the core modules?

                    • 7. Re: Problem updating my code with latest CVS, news module
                      Daniel Le Berre Newbie

                      Ok, I now understand why I lost only the news in my database. Hopefully, I made a backup just before :-=)

                      Yes, I setup everything a few months ago, for mysql. I have been able to install everything using the installer at that time. After that, I used to deploy each component by hand (sh build.sh deploy in the module directory)


                      Anyway, I just removed everything and tried to reinstall the "old" version of nukes and it does not work either.

                      I am wondering if the problem is not related to jboss and not nukes itself. Which files should I remove in order to have a fresh nukes install (i.e. I want to get rid off all the parameters I set using the jmx-console).

                      • 8. Re: Problem updating my code with latest CVS, news module
                        jae Master

                        if you're using mysql, then you'd want to drop all the nukes tables and re-create them w/ either the ddls or the installer b/c the jmx parameters that you are setting are stored in the database.

                        • 9. Re: Problem updating my code with latest CVS, news module
                          Daniel Le Berre Newbie

                          ok, thanks.


                          I will try to do a fresh install with the latest CVS snapshot and then try to include one by one all my previous tables (mainly bb and news).

                          • 10. Re: Problem updating my code with latest CVS, news module
                            jae Master

                            don't use the latest snapshot, pls update from cvs directly. there have been reports that the snapshots aren't creating the .tpl files correctly.

                            you're definately not going to be able to use your existing news tables w/ the latest code b/c the column names, etc have all changed.

                            pls let me know right away how the new code works w/ mysql. i just committed the changes necessary to be compatible w/ postgres. i don't think they will cause any problems w/ mysql (everything works ok w/ hsqldb), but pls confirm. (guess i should go install mysql somewhere as well).

                            • 11. Re: Problem updating my code with latest CVS, news module
                              Daniel Le Berre Newbie

                              Hi guys,

                              From a fresh snapshot, I was able to run the installer fine.

                              Some fields were removed in the tables users, posts and topics.

                              I removed them from my data.

                              The database is now populated with my former data. Unfortunately, if the forum is working fine, the news are not working any longer.

                              I noticed that news table news_stories and news_topics have been added.

                              Is there some documentation somewhere that explains how to move from the former format to the new one?

                              --Daniel

                              • 12. Re: Problem updating my code with latest CVS, news module
                                jae Master

                                no documentation exists. the release of news in nukes 1.1 will be it's official release, and nothing prior is supported, including database schema.

                                you could write a parser script that takes the old data and loads it into the new table format. the new schema is pretty self-explanitory. you will need to reference the pre-1.1 (it's tagged in cvs) code to determine the mapping of that schema.

                                • 13. Re: Problem updating my code with latest CVS, news module
                                  Daniel Le Berre Newbie

                                  ok, I will do that.

                                  Is there somewhere a list of modules:
                                  - that will be released and maintained from 1.1
                                  - a roadmap for the current unsupported modules (a ranking of module integration in the next Nukes releases)

                                  I noticed for instance that the poll block is still not displaying the poll question. It should not be difficult to fix this definitely and support that module from 1.1.

                                  Daniel

                                  • 14. Re: Problem updating my code with latest CVS, news module
                                    jae Master

                                    the target modules for the 1.1 release are
                                    - core
                                    - forums (bb)
                                    - news
                                    - downloads

                                    i'm not really sure where the polls module falls on the list. right now i am in the process of "qa-ing" the news and downloads module for release.

                                    i will try and take a look at the polls module and see how far off it is from being ready for official support (some of the goals in releasing new modules is to clean up any spagetti code, fix bugs, externalize to templates, move to pure cmp, etc), but i wouldn't expect to see it until at least the 1.2 release.

                                    feel free to take a stab at cleaning up the code, etc. post back if you need help getting past something.

                                    1 2 Previous Next