You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2015/01/20 13:38:35 UTC

[jira] [Resolved] (TOMEE-1497) NPE When deploy genericjmsra.rar

     [ https://issues.apache.org/jira/browse/TOMEE-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau resolved TOMEE-1497.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.7.2
                   2.0.0-Milestone-1

> NPE When deploy genericjmsra.rar 
> ---------------------------------
>
>                 Key: TOMEE-1497
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1497
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Roman Boykov
>            Priority: Minor
>              Labels: patch
>             Fix For: 2.0.0-Milestone-1, 1.7.2
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When deploy RAR from https://genericjmsra.java.net/ I see next error message in a log:
> {code}
> INFO  OpenEJB.startup.config - Dumping Generated ra.xml to: /home/rb4400/JEE/apache-tomee-plus-1.7.1/temp/ra-265140642613974127
> 2015-01-20T12:24:56.366 [main] INFO  OpenEJB.startup.config - Configuring Service(id=genericraRA, type=Resource, provider-id=genericraRA)
> 2015-01-20T12:24:56.369 [main] ERROR OpenEJB - FATAL ERROR: Unknown error in Assembler.  Please send the following stack trace and this message to users@opene
>  java.lang.NullPointerException
>         at org.apache.openejb.config.AppInfoBuilder.buildConnectorModules(AppInfoBuilder.java:507)
> ...
> {code}
> I think it is a bug there in AppInfoBuilder.java
> {code:java}
>           if (outbound != null) {
>                 String transactionSupport = "none";
>                 switch (outbound.getTransactionSupport()) {  // Line 507
>                     case LOCAL_TRANSACTION:
>                         transactionSupport = "local";
>                         break;
>                     case NO_TRANSACTION:
>                         transactionSupport = "none";
>                         break;
>                     case XA_TRANSACTION:
>                         transactionSupport = "xa";
>                         break;
>                 }
> {code}
> With this code transactionSupport newer be "none" . if outbound.getTransactionSupport() returns null, it breaks the switch. Will need to check for null before switch.
> h3. patch
> {code}
> # This patch file was generated by NetBeans IDE
> # It uses platform neutral UTF-8 encoding and \n newlines.
> --- <html>AppInfoBuilder.java (<b>d98242e</b>)</html>
> +++ <html><b>Current File</b></html>
> @@ -95,6 +95,7 @@
>  import java.util.Map;
>  import java.util.Properties;
>  import java.util.Set;
> +import org.apache.openejb.jee.TransactionSupportType;
>  
>  import static org.apache.openejb.util.URLs.toFile;
>  
> @@ -504,7 +505,9 @@
>              final OutboundResourceAdapter outbound = resourceAdapter.getOutboundResourceAdapter();
>              if (outbound != null) {
>                  String transactionSupport = "none";
> -                switch (outbound.getTransactionSupport()) {
> +	     TransactionSupportType transactionSupportType = outbound.getTransactionSupport();
> +	     if (transactionSupportType != null) {
> +		    switch (transactionSupportType) {
>                      case LOCAL_TRANSACTION:
>                          transactionSupport = "local";
>                          break;
> @@ -515,6 +518,7 @@
>                          transactionSupport = "xa";
>                          break;
>                  }
> +	     }
>                  for (final ConnectionDefinition connection : outbound.getConnectionDefinition()) {
>  
>                      final String id = this.getId(connection, outbound, connectorModule);
> {code}



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