Announcement Announcement Module
Collapse
No announcement yet.
RSA JUnit Exception with ApectJ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RSA JUnit Exception with ApectJ?

    With RSA (Rational Software Architect) 7.5.4, we use the WAS 7 JDK set at the compliance level of 1.5 and everything runs fine on WAS 7. To run our JUnit tests, we have to set the JRE runtime to WebSphere v6.1 JRE. If we use the same Java runtime (not WAS 6.1) as our project, the exception is thrown listed below. Switch the runtime back to WAS 6.1, the unit tests run fine.

    JUnit Exception:
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'fooProperties' defined in class path resource [context/coreContextTest.spring.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error the @within pointcut expression is only supported at Java 5 compliance level or above

    The annotation is from a ApectJ package. There are old threads that updating ApjectJ to a different version fixes this. The stated versions are fairly old.

    Supposedly, there was a bug in RSA that was supposed to be fixed on the next release. Running the JUnit tests in RSA 8.0.3, we are receiving the exception again. I've tried all the different JREs (all are either WAS 7 or WAS 8) and tried updating related dependency versions. We are trying to migrate to RSA 8 and this is causing an impediment.

    IBM Support is blaming Spring, but that is their tag line if you use third party frameworks.

    If I use Maven to run the JUnit test inside or outside of RSA (7.5.4 on my local workstation), everything seems to run okay. Window's environmental variable java_home points to IBM's JDK, so at least IBM's JDK is used.

    Any ideas? Has anyone else received this?

    I've also tried the most recent versions of the following frameworks.

    Spring:
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>2.5.6.SEC02</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-orm</artifactId>
    <version>2.5.6.SEC02</version>
    <type>jar</type>
    <scope>compile</scope>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>2.5.6.SEC02</version>
    <type>jar</type>
    <scope>compile</scope>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aop</artifactId>
    <version>2.5.6.SEC02</version>
    <type>jar</type>
    <scope>compile</scope>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>2.5.6.SEC02</version>
    <type>jar</type>
    <scope>compile</scope>
    </dependency>

    AspectJ
    <dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.6.2</version>
    </dependency>
    <dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjtools</artifactId>
    <version>1.6.2</version>
    </dependency>

    JUnit:
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.8.2</version>
    <type>jar</type>
    <scope>test</scope>
    </dependency>


    Attachment
    Attached Files
Working...
X