struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4542) FreemarkerManager class throws null pointer exception
Date Sun, 11 Oct 2015 19:26:05 GMT

    [ https://issues.apache.org/jira/browse/WW-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14736948#comment-14736948
] 

Lukasz Lenart edited comment on WW-4542 at 10/11/15 7:25 PM:
-------------------------------------------------------------

Are you sure that the new {{war}} package was correctly deployed without any exception in
the logs? Because you are using a lot of conflicting versions of jars which can block deployment.

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.3.24</version>
</dependency>
{code}

this is duplicated, it shouldn't be an issue though

{code:xml}
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.0-SP4</version>
</dependency>
{code}

do you need these?

{code:xml}
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>20030211.134440</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>
{code}

You don't have to define these, they are transitive dependencies already from other packages.

{code:xml}
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.1.20-04</version>
</dependency>
{code}

Do you use JSF?

{code:xml}
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.1.4</version>
</dependency>
{code}

What for? {{struts2-tiles-plugin}} will include correct versions of these (or you have to
exclude)

{code:xml}
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.0</version>
</dependency>
{code}

What for? WLS should already provide an implementation of servlet spec.

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Do you use Sitemesh and Tiles in one app?

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
<version>1.3.10</version>
</dependency>
{code}

Is it a Struts 1 or some mixed mode?

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Sitemesh and TIles?

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>2.3.24</version>
</dependency>
{code}

It should be in scope {{test}}

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Duplication

{code:xml}
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Not needed basically, it's a transitive dependency of {{struts2-core}}

{code:xml}
<dependency>
<groupId>com.jgeppert.struts2.jquery</groupId>
<artifactId>struts2-jquery-plugin</artifactId>
<version>3.7.1</version>
</dependency>
{code}

DOJO and JQuery plugin mixed together?

{code:xml}
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>2.0</version>
</dependency>
{code}

Do you use Velocity?

{code:xml}
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
</dependency>
{code}

Above you are using servlet spec 3.0 but here 2.4 and it isn't needed

{code:xml}
<dependency>
<groupId>com.caucho</groupId>
<artifactId>resin</artifactId>
<version>3.0.9</version>
</dependency>
{code}

Resin server? What for?

{code:xml}
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>2.2.2</version>
</dependency>
{code}

Another different version of Tiles

{code:xml}
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.14.0-GA</version>
</dependency>
{code}

XWork already defines Javassist as a transitive dependency, not needed



was (Author: lukaszlenart):
Are you sure that the new {{war}} package was correctly deployed without any exception in
the logs? Because you are using a lot of conflicting versions of jars which can block deployment.

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.3.24</version>
</dependency>
{code}

this is duplicated, it shouldn't be an issue though

{code:xml}
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.0-SP4</version>
</dependency>
{code}

do you need these?

{code:xml}
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>20030211.134440</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>
{code}

You don't have to define these, they are transitive dependencies already from other packages.

{code:xml}
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.1.20-04</version>
</dependency>
{code}

Do you use JSF?

{code:xml}
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.1.4</version>
</dependency>
{code}

What for? {{struts2-tiles-plugin}} will include correct versions of these (or you have to
exclude)

{code:xml}
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.0</version>
</dependency>
{code}

What for? WLS should already provide an implementation of servlet spec.

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Do you use Sitemesh and Tiles in one app?

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
<version>1.3.10</version>
</dependency>
{code}

Is it a Struts 1 or some mixed mode?

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Sitemesh and TIles?

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>2.3.24</version>
</dependency>
{code}

It should be in scope {{test}}

{code:xml}
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Duplication

{code:xml}
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>2.3.24</version>
</dependency>
{code}

Not needed basically, it's a transitive dependency of {{struts2-core}}

{code:xml}
<dependency>
<groupId>com.jgeppert.struts2.jquery</groupId>
<artifactId>struts2-jquery-plugin</artifactId>
<version>3.7.1</version>
</dependency>
{code}

DOJO and JQuery plugin mixed together?

{code:xml}
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>2.0</version>
</dependency>
{code:xml}

Do you use Velocity?

{code:xml}
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
</dependency>
{code}

Above you are using servlet spec 3.0 but here 2.4 and it isn't needed

{code:xml}
<dependency>
<groupId>com.caucho</groupId>
<artifactId>resin</artifactId>
<version>3.0.9</version>
</dependency>
{code}

Resin server? What for?

{code:xml}
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>2.2.2</version>
</dependency>
{code}

Another different version of Tiles

{code:xml}
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.14.0-GA</version>
</dependency>
{code}

XWork already defines Javassist as a transitive dependency, not needed


> FreemarkerManager class throws null pointer exception 
> ------------------------------------------------------
>
>                 Key: WW-4542
>                 URL: https://issues.apache.org/jira/browse/WW-4542
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tags
>    Affects Versions: 2.3.24
>         Environment: Win7
> WebLogic 12.1.3
> JDK 1.7
>            Reporter: Rin Saunders
>            Priority: Minor
>             Fix For: 2.3.x
>
>         Attachments: Part 0.png, Part 1.png, Part 2.png, jetty.png, screenshot.png, wls10.png,
wls12.png
>
>
> Am getting a null pointer error in the FreemarkerManager class. It occurs in the setContainer
method. The code below seems to assume that getInstanceNames returns an empty set if there
are no matches. In fact, it returns a null, which is legit according to the XWork doc. This
occurs in Freemarker 2.3.23 under WebLogic 12.1.3.
> {code:java}
>     Map<String, TagLibrary> oldMap = new HashMap<String, TagLibrary>();
>     Set<String> oldPrefixes = container.getInstanceNames(TagLibrary.class);
>     for (String prefix : oldPrefixes) {
>         oldMap.put(prefix, container.getInstance(TagLibrary.class, prefix));
> {code}
> Not sure if this affects the presentation of Struts2 views. Is there a workaround or
fix?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message