CMS Snapshot Analysis - Run Analyzer - Warnings - JEE with extension - JEE Analyzer - Spring bean has an empty name in

Problem

This page describes the solution to the following warnings that you may encounter when analyzing java source.

Information    MODULMSG ; Job execution    JEE028: Analyzing configuration file ‘S:\Sources\Test_app\Analyzed\test\src\main\webapp\WEB-INF\applicationContext-ibatis.xml’ …
Information    MODULMSG ; Job execution    [com.castsoftware.struts] File S:\Sources\Test_app\Analyzed\test\src\main\webapp\WEB-INF\applicationContext-ibatis.xml received.  
Information    MODULMSG ; Job execution    [com.castsoftware.labs.spring.integration] Scanning XML test file :  
Information    MODULMSG ; Job execution    running extension SPRING3  
Information    MODULMSG ; Job execution    Parsing Java file (phase 2) : [S:\ProgramData\CAST\CAST\Extensions\com.castsoftware.mqe.1.0.0-funcrel\jars\RabbitMQ_jars\spring-context-5.0.3.RELEASE.jar]\org\springframework\jndi\JndiObjectFactoryBean.class  
Information    MODULMSG ; Job execution    Parsing Java file (phase 2) : [S:\ProgramData\CAST\CAST\Extensions\com.castsoftware.mqe.1.0.0-funcrel\jars\RabbitMQ_jars\spring-context-5.0.3.RELEASE.jar]\org\springframework\jndi\JndiObjectLocator.class  
Information    MODULMSG ; Job execution    Parsing Java file (phase 2) : [S:\ProgramData\CAST\CAST\Extensions\com.castsoftware.mqe.1.0.0-funcrel\jars\RabbitMQ_jars\spring-context-5.0.3.RELEASE.jar]\org\springframework\jndi\JndiLocatorSupport.class  
Information    MODULMSG ; Job execution    Parsing Java file (phase 1) : [S:\ProgramData\CAST\CAST\Extensions\com.castsoftware.mqe.1.0.0-funcrel\jars\RabbitMQ_jars\spring-context-5.0.3.RELEASE.jar]\org\springframework\jndi\JndiAccessor.class  
Information    MODULMSG ; Job execution    Parsing Java file (phase 2) : [S:\ProgramData\CAST\CAST\Extensions\com.castsoftware.mqe.1.0.0-funcrel\jars\RabbitMQ_jars\spring-beans-5.0.4.RELEASE.jar]\org\springframework\beans\factory\BeanClassLoaderAware.class  
Warning    MODULMSG ; Job execution    JEE070: ** has an empty name in ’ ‘.**There are maybe other cases, like <%NAME2 %> will be ignored

Observed in CAST Extension

ReleaseYes/No
JEE 1.1.x
JEE 1.0.x

Observed on RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS3
CSS2

Step by Step Scenario

  1. Package the Java source code.
  2. Deliver and accept the delivery.
  3. Run the analysis, check in the analysis log.

Impact on Analysis Results and Dashboard

There is no impact of this warnings as the warning is coming due to ibatis configuration file which is not managed by JEE analyzer.

Action Plan

According to the Warnings in the log file follow the below steps

  1. Open the Analysis log.

  2. Check for the warning message in the analysis log.

  3. Check when this warning is coming, if the warning is coming while analyzing ibatis configuration file (for example applicationContext-ibatis.xml ) then there will be no impact as ibatis is not handled by JEE analyzer.

  4. If the warning is coming due to any other xml file then check if the file is a valid xml file by opening it in the browser, if the file is invalid you will get the below error on the browser:

  5. If it is invalid and you see the above error when you opened it on the browser then ask for valid source code from the user.

  6. If the xml file is valid and still we are getting warning then open the xml file and check for each bean tag where you do not have nameattribute. You need to add nameattribute and same value where ever we have in id attribute 

    For example Consider file root-context.xml file. A bean tag extract is shown below:


   The file is changed as follows (added name attribute with same value as id attribute)

   ```java
<bean id="dataManagerFactory" name="dataManagerFactory" 
class="org.springframework.orm.jpa.DataManagerFactoryBean">

Save the file and run the analysis. Note that this issue has been fixed in JEE 1.0.13. 7. If the above solution do not fix the issue then contact CAST Technical Support with the following Relevant Input to reproduce the issue.

Relevant Input

  1. Sherlock (CAST Support Tool (CST) - alias Sherlock) : Export Cast Database (Management Base and Local Base only), Export logs, Export Configuration Files, Export source code.
  2. Explanation about the problem and supporting screenshots

Impact of the Solution

No Impact on the analysis and the dashboard.

Notes/comments

Ticket #13942