Tech

20160331

ODI 12c install Bug: Cyclic dependency detected among featureset libraries oracle.odi.sdk.clientLib.jar


I am currently installing WLS 12.2.1 Enterprise with multiple products on multiple environments; During the installation on ODI over FMW  Infrastructure, and I faced the following Exception printed out on the installation log located at the tmp directory:

Caused by: oracle.sysman.oii.oiif.oiifb.OiifbEndIterateException: com.oracle.cie.gdr.libraries.LibraryHandlerException: Cyclic dependency detected among featureset libraries: [/u01/oracle/products/fmw/modules/clients/oracle.odi.sdk.clientLib.jar]

What I know about the problem:


  1. The issue happen only during the ODI 12c install, and any other product such as SOA and OSB the installation was successfully. By investigating I heard that a college could run the installation without a problem; 
  2. I looked into the Oracle Support and found that is a bug on description phase, which means it would take a long time for a final solution: Bug 22262514 : ERROR WHEN INSTALLING ODI 12.2.1 ON HP UX 11.31; 
  3. The ODI installation is the only installation with the double jars to install: 
  4. The Oracles documentation provided me with the following step to install the ODI: 
  •  /home/Oracle/jdk1.8.0_60/bin/java -jar fmw_12.2.1.0.0_odi.jar

What I was doing:

Since I had to install the application on silent mode, I had something similar to the script bellow:

#!/bin/bash 
export JAVA_HOME=/home/Oracle/jdk1.8.0_60 
export PATH=$JAVA_HOME/bin:$PATH 
java -version 
java -d64 -Xms4g -Xmx4g -jar fmw_12.2.1.0.0_odi.jar -silent etc...

As you can see, the steps were done correctly and running similar scripts worked on the SOA and OSB installation; After some long hours looking and trying to install a successful ODI install, I remember something about how the JVM actually loads classes. By following the instruction from Oracle in providing a full path of the JDK, the JVM seems to load the second fmw_12.2.1.0.0_odi2.jar, therefore the issue was on my script and how I am calling the fmw_12.2.1.0.0_odi.jar; By setting the global PATH variable, I was not allowing the java command to load all needed classes and jars. 

Therefore the solution is simple, was just changing how I was calling the java command or use the -cp to set the classpath: 

java -d64 -Xms4g -Xmx4g -cp /fmw_12.2.1.0.0_odi2.jar -jar /fmw_12.2.1.0.0_odi.jar -silent etc...

If you do the above command and still get an error like bellow, its a good change the you had an failed installation on the FMW Infrastructure previously and you need to delete and reinstall the whole environment again. 

oracle.sysman.nextgen.NextGenInstallerException: oracle.sysman.oii.oiif.oiifb.OiifbEndIterateException: com.oracle.cie.gdr.maven.PomException: Errors were found during
POM generation. Please check the logs for more informatio



20150218

WHY Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy


I have been working on some some J2EE 7 fun projects, and suddenly I run into some problems during deployments on my project with NetBeans 8.0.2 and glassfish 4. As you can see below, the server writes some reflect output stack trace:


Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.reflect.Executable.declaredAnnotations(Executable.java:546)
at java.lang.reflect.Executable.getAnnotation(Executable.java:520)
at java.lang.reflect.Method.getAnnotation(Method.java:607)



This ArrayStoreException came wrapped in another exceptions, by reading the stack and taking consideration the moment in which the Exception actually happens we can get some thoughts of what might be going on:


  1. The server does not deploy the application, could be due to missing libs or bad configuration.
  2. The ArrayStoreException with the TypeNotPresentExceptionProxy, tells me that something is missing, but since there is no java.lang.NoClassDefFoundError, it means is not a classpath's path.
  3. The java.lang.reflect.Method.getAnnotation() method, it tells is something to do with annotations.

Its time to look at the Exception wrapper. So it may give some clues where to look for more information:

Severe:   sun.reflect.annotation.TypeNotPresentExceptionProxy
Severe:   Exception while deploying the app [ProjectEulerAnswers]
Severe:   Exception during lifecycle processing
java.lang.IllegalStateException: sun.reflect.annotation.TypeNotPresentExceptionProxy. Related annotation information: annotation [@javax.ejb.Stateless(name=, description=, mappedName=)] on annotated element [class com.euler._25Beans.q11UPBean] of type [TYPE]

The log provided by GlassFish is very clear and confirms all I have learned so far ,and actually prints the name  project ProjectEulerAnswer, the culprit for  failing deployment and provides the name of a bad Bean (q11UPBean). 

On the bean q11UPBean, has the following annotations: 

/**
+ This EJBeuler.jar module is being locally injected from my PorjectEulerAnswers.war Web module
**/
@Stateless
@LocalBean
public class q11UPBean extends prop11Gen{

@javax.interceptor.Interceptors(LoggingInterceptor.class) //this annotation is from a external module EJBintercept.jar**
    private Map<String, String[]> walkingleft(String[] lineArray) {
//some code here
}

//some code here
}

As we can notice, it's the usual Stateless local EJB declaration, which we could call EJBeuler, in which should not give any trouble. Then there is an interceptor's annotation, and in this case this Interceptor is living on a different EJB module, we could call EJBintercept. Checking the Libraries on NetBeans and as expected my my EJBeuler does have reference to my EJBintercept, if there weren't it would give me a compile exception.

But accordingly is the  ProjectEulerAnswers the one failing, which means the Web Project possible needs the library reference to EJBintercept. Which proven to be true and the solution to my ArrayStoreExcpeiton; Which means that at compile time the container is not capable to check all the second hand annotations references, and throws some Exceptions which is very hard to identify the real issue. 

Therefore, when programing with annotation from different modules, we must check if the following example is true: 

EJBeuler ---- uses compiles Libraries ----> EJBintercep; 
ProjectEulerAnswers ---- uses compiles Libraries ----> EJBintercep; 
ProjectEulerAnswers ---- uses compiles Libraries ----> EJBeuler;