Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 6.0.5 GA
    • Fix Version/s: 6.1.0 CE RC1
    • Component/s: WCM
    • Labels:
      None
    • Environment:
      Resin 3.1.10; may be other as well
    • Branch Version/s:
      6.0.x, 5.2.x, 5.1.x
    • Backported to Branch:
      Committed
    • Similar Issues:
      Show 5 results 

      Description

      GlobalStartupAction during intialization invokes Environment.setValue(Environment.PROP_BASE_FILE_DIR, tmpDir); this also initializes JAMWikis Environment class. Static block of this class fails with the:

      Caused by: java.lang.NullPointerException
      at org.jamwiki.Environment.retrieveDefaultRelativeUploadDirectory(Environment.java:368)
      at org.jamwiki.Environment.initDefaultProperties(Environment.java:213)
      at org.jamwiki.Environment.<init>(Environment.java:123)
      at org.jamwiki.Environment.<clinit>(Environment.java:116)

      This happens on Resin 3.1.10 during portal startup - the consequence of this behavior is that Resin starts the web application twice and second time portal fails because of closed Hibernate session (getCurrentSession() will not work).

      Similar exception may happens on other servers.

        Issue Links

          Activity

          Show
          Igor Spasic added a comment - see also: http://jamwiki.org/wiki/en/Bug_Reports#Error_at_deploying_on_JBoss
          Hide
          Igor Spasic added a comment -

          committed #62344, note that we can catch only Throwable and not the Exception because error comes from static block.

          Show
          Igor Spasic added a comment - committed #62344, note that we can catch only Throwable and not the Exception because error comes from static block.
          Hide
          Igor Spasic added a comment -

          Depending on VM, some might not be able to catch exception at all (like websphere)

          I've filed a bug, the fix is simple:
          http://jamwiki.org/wiki/en/Bug_Reports#Null_Pointer_Exception_on_retrieveDefaultRelativeUploadDirectory%28%29

          Show
          Igor Spasic added a comment - Depending on VM, some might not be able to catch exception at all (like websphere) I've filed a bug, the fix is simple: http://jamwiki.org/wiki/en/Bug_Reports#Null_Pointer_Exception_on_retrieveDefaultRelativeUploadDirectory%28%29
          Hide
          Juan M. Gomez added a comment -

          We have experimented this behavior too using jboss 5.1.0, both in Liferay bundled version and installed as a Jboss module. We have been able to fix it by specifying a tmpdir to the JVM using the "-Djava.io.tmpdir=/somedirectory" option. Now Liferay isn't throwing the exception and is working as expected.

          Link to the related forum post: http://www.liferay.com/community/forums/-/message_boards/message/5931667

          Show
          Juan M. Gomez added a comment - We have experimented this behavior too using jboss 5.1.0, both in Liferay bundled version and installed as a Jboss module. We have been able to fix it by specifying a tmpdir to the JVM using the "-Djava.io.tmpdir=/somedirectory" option. Now Liferay isn't throwing the exception and is working as expected. Link to the related forum post: http://www.liferay.com/community/forums/-/message_boards/message/5931667
          Hide
          Igor Spasic added a comment -

          Thank you! This is good to know and have this solution while waiting for a fix in JamWiki 0.9.3

          Show
          Igor Spasic added a comment - Thank you! This is good to know and have this solution while waiting for a fix in JamWiki 0.9.3
          Hide
          Igor Spasic added a comment -

          Since exception is thrown from static init block, various VM behaves differently. On Sun VM we have to catch Throwable, but on IBMs VM (WebSphere) we can't catch anything... and so on. it seems that all major app servers (resin, jboss, weblogic, websphere....) suffer from this issue.

          this will be fixed in v0.9.3 but since then i will create a patched version.

          Show
          Igor Spasic added a comment - Since exception is thrown from static init block, various VM behaves differently. On Sun VM we have to catch Throwable, but on IBMs VM (WebSphere) we can't catch anything... and so on. it seems that all major app servers (resin, jboss, weblogic, websphere....) suffer from this issue. this will be fixed in v0.9.3 but since then i will create a patched version.
          Hide
          Ryan Holliday added a comment -

          I've updated the JAMWiki code as suggested by Igor (http://jamwiki.svn.sourceforge.net/viewvc/jamwiki?revision=3247&view=revision) but would be very grateful for any confirmation that this actually fixes the problem as I haven't been able to reproduce the issue. Please let me know if there's a way to facilitate that testing, whether it's creating a beta release, sending you a compiled JAR, etc. Alternately, you can simply build the latest JAMWiki 0.9.x branch code. Once there is some confirmation that the problem is fixed I'll put out a new JAMWiki release.

          Show
          Ryan Holliday added a comment - I've updated the JAMWiki code as suggested by Igor ( http://jamwiki.svn.sourceforge.net/viewvc/jamwiki?revision=3247&view=revision ) but would be very grateful for any confirmation that this actually fixes the problem as I haven't been able to reproduce the issue. Please let me know if there's a way to facilitate that testing, whether it's creating a beta release, sending you a compiled JAR, etc. Alternately, you can simply build the latest JAMWiki 0.9.x branch code. Once there is some confirmation that the problem is fixed I'll put out a new JAMWiki release.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 33 weeks, 4 days ago

                Development

                  Structure Helper Panel