Problem compiling stendhal 0.66

Help
v00d00
2008-02-04
2013-06-06
  • v00d00
    v00d00
    2008-02-04

    Hi guys!

    First of all I want to thank you for the great game and engine. However I couldn't manage to compile it on my Fedora 8. I have JDK 7 (1.7.0). Here are the ERRORs I'm getting:

    server_build:
        [mkdir] Created dir: /root/build/stendhal-0.66/build/build_server
         [copy] Copying 1 file to /root/build/stendhal-0.66/build/build_server/data/conf
         [copy] Copying 1 file to /root/build/stendhal-0.66/build/build_server/games/stendhal/server
         [copy] Copying 1 file to /root/build/stendhal-0.66/build/build_server/games/stendhal/server
        [javac] Compiling 397 source files to /root/build/stendhal-0.66/build/build_server
        [javac] ----------
        [javac] 1. WARNING in /root/build/stendhal-0.66/src/games/stendhal/server/core/rp/guilds/GuildMember.java (at line 45)
        [javac]     private String playerName;
        [javac]                    ^^^^^^^^^^
        [javac] The field GuildMember.playerName is never read locally
        [javac] ----------
        [javac] ----------
        [javac] 2. WARNING in /root/build/stendhal-0.66/src/games/stendhal/server/core/scripting/ScriptingSandbox.java (at line 60)
        [javac]     zone = StendhalRPWorld.get().addArea(name, content);
        [javac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        [javac] The method addArea(String, String) from the type StendhalRPWorld is deprecated
        [javac] ----------
        [javac] ----------
        [javac] 3. WARNING in /root/build/stendhal-0.66/src/games/stendhal/server/entity/npc/ConversationParser.java
        [javac]  (at line 230)
        [javac]     if (Grammar.isPreposition(nextWord) && !nextWord.equals("of")) {
        [javac]         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        [javac] The method isPreposition(String) from the type Grammar is deprecated
        [javac] ----------
        [javac] 3 problems (3 warnings)
          [jar] Building jar: /root/build/stendhal-0.66/build/lib/stendhal-server-0.66.jar
        [mkdir] Created dir: /root/build/stendhal-0.66/build/build_server_maps
        [javac] Compiling 239 source files to /root/build/stendhal-0.66/build/build_server_maps
        [javac] ----------
        [javac] 1. ERROR in /root/build/stendhal-0.66/src/games/stendhal/server/entity/npc/action/TeleportAction.java (at line 3)
        [javac]     import org.apache.commons.lang.builder.EqualsBuilder;
        [javac]            ^^^^^^^^^^^^^^^^^^^^^^^
        [javac] The import org.apache.commons.lang cannot be resolved
        [javac] ----------
        [javac] 2. ERROR in /root/build/stendhal-0.66/src/games/stendhal/server/entity/npc/action/TeleportAction.jav
        [javac] a (at line 4)
        [javac]     import org.apache.commons.lang.builder.HashCodeBuilder;
        [javac]            ^^^^^^^^^^^^^^^^^^^^^^^
        [javac] The import org.apache.commons.lang cannot be resolved
        [javac] ----------
        [javac] 3. ERROR in /root/build/stendhal-0.66/src/games/stendhal/server/entity/npc/action/TeleportAction.java (at line 57)
        [javac]     return HashCodeBuilder.reflectionHashCode(this);
        [javac]            ^^^^^^^^^^^^^^^
        [javac] HashCodeBuilder cannot be resolved
        [javac] ----------
        [javac] 4. ERROR in /root/build/stendhal-0.66/src/games/stendhal/server/entity/npc/action/TeleportAction.java (at line 62)
        [javac]     return EqualsBuilder.reflectionEquals(this, obj, false,
        [javac]            ^^^^^^^^^^^^^
        [javac] EqualsBuilder cannot be resolved
        [javac] ----------
        [javac] ----------
        [javac] 5. ERROR in /root/build/stendhal-0.66/src/games/stendhal/server/entity/npc/condition/LevelGreaterThanCondition.java (at line 7)
        [javac]     import org.apache.commons.lang.builder.EqualsBuilder;
        [javac]            ^^^^^^^^^^^^^^^^^^^^^^^
        [javac] The import org.apache.commons.lang cannot be resolved
        [javac] ----------

    It's only excerpt of the whole log (there are 115 errors and 3 warnings), but I believe all these errors are related. Probably the issue is org.apache.commons.lang library but unfortunately I'm not Java programmer so I'm not sure.

    Any help would be much appreciated!

    Thanks

     
    • oslsachem
      oslsachem
      2008-02-05

      You are probably using an IDE (NetBeans, Eclipse...), as opposed to the plain command-line JDK, and this IDE can't find the jar named commons-lang.jar because:
      - You haven't specified where the IDE can find the jar in the filesystem (classpath, your project's IDE configuration isn't right: http://arianne.sourceforge.net/wiki/index.php?title=Configure_a_development_environment_%28IDE%29 )
      - the commons-lang.jar file simply doesn't exist there where the IDE expects the jar to be (the jar has to be downloaded and put in the right directory: http://arianne.cvs.sourceforge.net/arianne/stendhal/libs/ )

      I hope this can help. Good luck :)

       
      • v00d00
        v00d00
        2008-02-06

        Hi,

        Thanks for suggestion. However I'm not using an IDE, I'm using Apache Ant for building. I tried to download older versions of common-lang.jar but it didn't help. Libs path is fine; I've checked build.ant.properties and to make sure tried to comment out other libs and got a lot more errors. I'm not sure if there is some extra settings of Apache Ant of JDK paths or something else which could resolve this issue.

        Please advise.

        Thanks

         
        • Katie Russell
          Katie Russell
          2008-02-06

          you call it common-lang.jar in your last comment - was this a typo? The name should be commons-lang.jar (with an s after commons) and it should be in your libs folder.

           
          • v00d00
            v00d00
            2008-02-06

            Yes, it was typo. It's commons-lang.jar.

            Any ideas?

            Thanks

             
            • Are you using released source code or CVS?

              CVS should work out of the box, while on released source code AFAIK we don't add compiled libraries, so perhaps the problem can be caused by an invalid/corrupt/outofdate/toomuchupdate jar?

              Anyway, as kymara points the problem is related to commons-lang library.
              Let me know what do you use so we can fix the problem as soon as possible.

               
              • v00d00
                v00d00
                2008-02-06

                Hi Miguel, Guys,

                Thanks for advice. I've used released source code not CVS. I'll try with CVS.

                I made a typo while writing post on the forum, it's actually commons-lang.jar lib so that's not the problem. Regarding possible corruption of commons-lang.jar I doubt it's the case because I've tried with original Apache library which btw. have same size as the one you're distributing via sourceforge. Moreover I tried with version commons-lang.jar 2.0 and it didn't work as well. I didn't tried with version 1.0 because I believe it's too old.

                I'm using Fedora Core 8, Apache Ant 1.7, JDK 6 update 4. I've installed Ant optional packages.

                My building process is following:

                1. downloaded stendhal released source code 0.66
                2. unpacked stendhal tar.gz into build dir
                3. created libs dir
                4. downloaded all .jar packs required (and published on sourceforge) into libs dir
                5. from the stendhal dir started ant (before that I issued ant clean command to remove possible files from prev. build)

                As you can see from the log above ([jar] Building jar: /root/build/stendhal-0.66/build/lib/stendhal-server-0.66.jar ) stendhal server has been built (with few warnings probably because new JDK version I'm using) but ant filed during the compilation of server-maps source code.

                Thanks for comments.

                Waiting for your further instructions.

                 
                • oslsachem
                  oslsachem
                  2008-02-06

                  You could try doing an " ant clean " before building again.

                   
                  • oslsachem
                    oslsachem
                    2008-02-06

                    "from the stendhal dir started ant (before that I issued ant clean command to remove possible files from prev. build)" -> ok, I'm run out of ideas :)

                     
                • Ok, thanks.

                  I will give a try myself this afternoon and post here the results.

                   
                  • v00d00
                    v00d00
                    2008-02-08

                    Hi,

                    I've set up NetBeans 6.0 IDE. Then I checkout the latest source from CVS and built everything with no errors.

                    However I have few questions and issues.

                    First thing that bother me, everything is built into single JAR file, stendhal.jar. I would like to have it separated like in your distribution version: stendhal-server.jar, stendhal-maps.jar, stendhal-xmlconf.jar. Should I create separate projects from each of these sections and how to do that?

                    Anyway I tried to start server using batch file:
                    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                    #!/bin/bash

                    export LOCALCLASSPATH=.:stendhal.jar:libs/marauroa-2.4.jar:libs/jython.jar:libs/mysql-connector.jar:libs/log4j.jar:simple.jar:groovy.jar:commons-lang.jar
                    java -Xmx128m -cp "${LOCALCLASSPATH}" marauroa.server.marauroad -c server.ini
                    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                    I'm getting a lot of errors like this:
                    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                    ERROR [marauroad ] StendhalRPWorld          (287 ) - Error on Init the server.
                    java.io.FileNotFoundException: Cannot find resource: /data/conf/zones.xml
                            at games.stendhal.server.core.config.GroupsXMLLoader.load(GroupsXMLLoader.java:60)
                            at games.stendhal.server.core.config.ZoneGroupsXMLLoader.load(ZoneGroupsXMLLoader.java:48)
                            at games.stendhal.server.core.engine.StendhalRPWorld.onInit(StendhalRPWorld.java:266)
                            at marauroa.server.game.rp.RPServerManager.initializeExtensions(RPServerManager.java:161)
                            at marauroa.server.game.rp.RPServerManager.<init>(RPServerManager.java:127)
                            at marauroa.server.marauroad.init(marauroad.java:338)
                            at marauroa.server.marauroad.run(marauroad.java:274)
                    ERROR [marauroad ] QuestsXMLLoader          (101 ) - java.io.FileNotFoundException: cannot find resource 'data/conf/quests.xml' in classpath
                    ERROR [marauroad ] QuestsXMLLoader          (66  ) - java.io.FileNotFoundException: cannot find resource 'data/conf/quests.xml' in classpath
                    java.io.FileNotFoundException: cannot find resource 'data/conf/quests.xml' in classpath
                            at games.stendhal.server.core.config.QuestsXMLLoader.load(QuestsXMLLoader.java:102)
                            at games.stendhal.server.core.config.QuestsXMLLoader.get(QuestsXMLLoader.java:64)
                            at games.stendhal.server.core.engine.SingletonRepository.getQuestsXMLLoader(SingletonRepository.java:77)
                            at games.stendhal.server.core.rp.StendhalQuestSystem.init(StendhalQuestSystem.java:48)
                            at games.stendhal.server.core.engine.StendhalRPRuleProcessor.setContext(StendhalRPRuleProcessor.java:164)
                            at marauroa.server.game.rp.RPServerManager.initializeExtensions(RPServerManager.java:167)
                            at marauroa.server.game.rp.RPServerManager.<init>(RPServerManager.java:127)
                            at marauroa.server.marauroad.init(marauroad.java:338)
                            at marauroa.server.marauroad.run(marauroad.java:274)
                    INFO  [marauroad ] StendhalQuestSystem      (136 ) - Loading Quest: AdosDeathmatch
                    INFO  [marauroad ] StendhalQuestSystem      (136 ) - Loading Quest: AmazonPrincess
                    WARN  [marauroad ] StendhalQuestSystem      (147 ) - Quest(AmazonPrincess) loading failed.
                    java.lang.NullPointerException
                            at games.stendhal.server.maps.quests.AmazonPrincess.offerQuestStep(AmazonPrincess.java:66)
                            at games.stendhal.server.maps.quests.AmazonPrincess.addToWorld(AmazonPrincess.java:178)
                            at games.stendhal.server.core.rp.StendhalQuestSystem.loadQuest(StendhalQuestSystem.java:142)
                            at games.stendhal.server.core.rp.StendhalQuestSystem.init(StendhalQuestSystem.java:50)
                            at games.stendhal.server.core.engine.StendhalRPRuleProcessor.setContext(StendhalRPRuleProcessor.java:164)
                            at marauroa.server.game.rp.RPServerManager.initializeExtensions(RPServerManager.java:167)
                            at marauroa.server.game.rp.RPServerManager.<init>(RPServerManager.java:127)
                            at marauroa.server.marauroad.init(marauroad.java:338)
                            at marauroa.server.marauroad.run(marauroad.java:274)
                    INFO  [marauroad ] StendhalQuestSystem      (136 ) - Loading Quest: ArmorForDagobert
                    WARN  [marauroad ] StendhalQuestSystem      (147 ) - Quest(ArmorForDagobert) loading failed.
                    java.lang.NullPointerException

                    ...
                    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                    I guess this might have something with this all-in-one JAR or maybe something else. However server seems to be working after these bunch of errors.
                    But when I try to access the server using fresh compiled client I'm getting this error (on server):
                    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                    WARN  [verManager] Attributes               (196 ) - Message has incorrect protocol version(54) expected (30)
                    WARN  [verManager] NIONetworkServerManager  (191 ) - Invalid version message
                    marauroa.common.net.InvalidVersionException
                            at marauroa.common.net.MessageFactory.getMessage(MessageFactory.java:215)
                            at marauroa.common.net.Decoder.decode(Decoder.java:209)
                            at marauroa.server.net.nio.NIONetworkServerManager.run(NIONetworkServerManager.java:319)
                    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                    The pre-compiled client (downloaded from sourceforge) can connect to the server, but the screen is black. I believe it's because maps and quests weren't loaded.

                    Do you have any idea how to resolve these issues?

                    I promise if you help me to sort this out, I'll write a tutorial with complete procedure how to build latest client/server and how to set up everything as a server.

                    Thanks!

                     
                    • Hi,

                      I am right now testing build on released source code.

                      About Netbeans, no idea, we use Eclipse ( btw there is an IRC channel at irc.freenode.net #arianne ) and it compile code just to class files. In order to get several jars use the ant script.

                      About the error you obtain, you MUST copy the data folder to where the server is being run from. I think that in our wiki ( http://arianne.sf.net/wiki ) there is a guide to configure and run stendhal using Eclipse, most of the steps should be valid too for Netbeans.

                      Stendhal CVS uses Marauroa CVS that is now protocol version 31 due to a important fix that we had to add, so the released client won't work against CVS.

                      Give a try to copy the data folder.
                      That's should fix all the problems.

                      Regards,
                      Miguel

                      PS: As soon as I have more info on released source I will post it here.

                       
    • Well, definitively there are missing files on the released source code, so if you plan to "play" with the code you would better get CVS. On the other hand, I have been able to compile successfully the released code, just you need to look for the files, copy the jar to build.ant.properties and run ant.

      I only have had problems looking for simple http ( simple.jar )
      http://mesh.dl.sourceforge.net/sourceforge/simpleweb/simple-3.1.3.tar.gz

      The rest are simple to find googling them.

      Here is the output:

      D:\sandbox\stendhal-0.66>ant
      Buildfile: build.xml

      init:
          [mkdir] Created dir: D:\sandbox\stendhal-0.66\build\lib
      [replaceregexp] The following file is missing: 'D:\sandbox\stendhal-0.66\web\html\stendhal.version'
      [replaceregexp] The following file is missing: 'D:\sandbox\stendhal-0.66\stendhal.jnlp'

      checkxml:
      [xmlvalidate] 43 file(s) have been successfully validated.

      server_build:
          [mkdir] Created dir: D:\sandbox\stendhal-0.66\build\build_server
           [copy] Copying 1 file to D:\sandbox\stendhal-0.66\build\build_server\data\conf
           [copy] Copying 1 file to D:\sandbox\stendhal-0.66\build\build_server\games\stendhal\server
           [copy] Copying 1 file to D:\sandbox\stendhal-0.66\build\build_server\games\stendhal\server
          [javac] Compiling 397 source files to D:\sandbox\stendhal-0.66\build\build_server
          [javac] D:\sandbox\stendhal-0.66\src\games\stendhal\server\core\scripting\ScriptingSandbox.java:60: warning: [deprecation] add
      Area(java.lang.String,java.lang.String) in games.stendhal.server.core.engine.StendhalRPWorld has been deprecated
          [javac]                     zone = StendhalRPWorld.get().addArea(name, content);
          [javac]                                                   ^
          [javac] D:\sandbox\stendhal-0.66\src\games\stendhal\server\entity\npc\ConversationParser.java:230: warning: [deprecation] isPr
      eposition(java.lang.String) in games.stendhal.common.Grammar has been deprecated
          [javac]                     if (Grammar.isPreposition(nextWord) && !nextWord.equals("of")) {
          [javac]                                    ^
          [javac] 2 warnings
            [jar] Building jar: D:\sandbox\stendhal-0.66\build\lib\stendhal-server-0.66.jar
          [mkdir] Created dir: D:\sandbox\stendhal-0.66\build\build_server_maps
          [javac] Compiling 239 source files to D:\sandbox\stendhal-0.66\build\build_server_maps
           [copy] Copying 493 files to D:\sandbox\stendhal-0.66\build\build_server_maps\data\maps
            [jar] Building jar: D:\sandbox\stendhal-0.66\build\lib\stendhal-maps-0.66.jar
          [mkdir] Created dir: D:\sandbox\stendhal-0.66\build\build_server_xmlconf
           [copy] Copying 42 files to D:\sandbox\stendhal-0.66\build\build_server_xmlconf\data\conf
            [jar] Building jar: D:\sandbox\stendhal-0.66\build\lib\stendhal-xmlconf-0.66.jar
          [mkdir] Created dir: D:\sandbox\stendhal-0.66\build\build_server_script
          [javac] Compiling 32 source files to D:\sandbox\stendhal-0.66\build\build_server_script

      client_build:
          [mkdir] Created dir: D:\sandbox\stendhal-0.66\build\build_client
           [copy] Copying 1 file to D:\sandbox\stendhal-0.66\build\build_client\games\stendhal\client\gui
          [javac] Compiling 261 source files to D:\sandbox\stendhal-0.66\build\build_client
          [javac] Compiling 1 source file to D:\sandbox\stendhal-0.66\build\build_client
           [copy] Copying 1 file to D:\sandbox\stendhal-0.66\build\build_client\games\stendhal\client\update
            [jar] Building jar: D:\sandbox\stendhal-0.66\build\lib\stendhal-starter-0.66.jar
            [jar] Building jar: D:\sandbox\stendhal-0.66\build\lib\stendhal-0.66.jar
          [mkdir] Created dir: D:\sandbox\stendhal-0.66\build\build_client_data
           [copy] Copying 1249 files to D:\sandbox\stendhal-0.66\build\build_client_data\data\sprites
           [copy] Copying 36 files to D:\sandbox\stendhal-0.66\build\build_client_data\data\docu
           [copy] Copying 1 file to D:\sandbox\stendhal-0.66\build\build_client_data\layers
           [copy] Copying 909 files to D:\sandbox\stendhal-0.66\build\build_client_data\data\tileset
           [copy] Copying 18 files to D:\sandbox\stendhal-0.66\build\build_client_data\data\gui
           [copy] Copying 1 file to D:\sandbox\stendhal-0.66\build\build_client_data\data\conf
            [jar] Building jar: D:\sandbox\stendhal-0.66\build\lib\stendhal-data-0.66.jar
            [jar] Building jar: D:\sandbox\stendhal-0.66\build\lib\stendhal-sound-data-0.66.jar

      compile:

      BUILD SUCCESSFUL
      Total time: 1 minute 36 seconds

      And here are the files that I used:

      D:\sandbox\stendhal-0.66>cd libs

      D:\sandbox\stendhal-0.66\libs>dir
      El volumen de la unidad D es DiscoGrande
      El número de serie del volumen es: B02B-8BAE

      Directorio de D:\sandbox\stendhal-0.66\libs

      10/02/2008  17:46    <DIR>          .
      10/02/2008  17:46    <DIR>          ..
      09/02/2007  20:05           245.274 commons-lang-2.3.jar
      01/02/2008  18:53         2.282.731 groovy-1.5.4.jar
      19/07/2007  17:13           161.477 junit-4.4.jar
      07/01/2008  19:44           719.950 jython.jar
      07/01/2008  19:44           199.140 log4j.jar
      07/01/2008  19:44           241.638 marauroa-2.4.jar
      07/01/2008  19:44           446.464 mysql-connector.jar
      17/05/2006  22:34           250.173 simple-3.1.3.jar
      15/07/2006  19:44           261.447 tiled.jar
                     9 archivos      4.808.294 bytes
                     2 dirs  13.269.823.488 bytes libres

      D:\sandbox\stendhal-0.66\libs>

      Hope it helps.

      Regards,
      Miguel

       


Anonymous


Cancel   Add attachments