Forum Stats

  • 3,854,216 Users
  • 2,264,340 Discussions
  • 7,905,609 Comments

Discussions

Discoverer: Could not initialize class oracle.disco.model.xml.ModelElementT

Moh
Moh Member Posts: 131 Silver Badge
edited Sep 14, 2012 1:11PM in Discoverer
Hi All,

I want to log on to Dicoverer (11.1.1.6.0) and get the follwoing error:

The application encounters an invalid state. .
- Could not initialize class oracle.disco.model.xml.ModelElementToClassMapper - Nested exception: java.lang.NoClassDefFoundError: Could not initialize class oracle.disco.model.xml.ModelElementToClassMapper
- Could not initialize class oracle.disco.model.xml.ModelElementToClassMapper
Oracle BI Discoverer Viewer cannot find the data necessary to display the results of this event. Correct any errors, and try again.

What might cause this?

Regards,
Moh

Best Answer

  • Michael Armstrong-Smith
    Michael Armstrong-Smith Member Posts: 4,403
    edited Jun 14, 2012 8:14AM Answer ✓
    Hello Moh
    It sounds like you have installed the 1.7 version of JDK to work with WebLogic, which by the way must be 10.3.6 if you are using 11.1.1.6. There is a known bug around using Java 1.7 with WebLogic and you have to install JDK 1.6 and edit the WebLogic configuration to make it use 1.6 instead of 1.7. There is no need to deinstall 1.7. The reason I know this is that this just happened to me as I was preparing to write a chapter for the new Discoverer 11g Handbook.

    First of all you need to get JDK 1.6. I used JDK 1.6.0_32 which I found here: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html

    Next, make sure all of your services are stopped. You'll need to stop WebLogic and the Node Manager too.

    Then go and ahead and install the JDK 1.6. If you're working in Windows it will probably install to C:\Program Files\Java\jdk1.6.0_32 so make a note of the location because you need to edit the file called setDomainEnv. In Windows this carries a cmd extenstion whereas in Linux and Unix it will have an sh extenstion.

    You now edit the file mentioned to force WebLogic to use JDK 1.6 instead of JDK 1.7. You need to edit the section that begins with SUN_JAVA_HOME=. In there you will find 2 references to the JDK. To help you, here is what mine looked like before I made the change (lines to change are in bold):

    SUN_JAVA_HOME="*C:/Program Files/Java/jdk1.7.0_04*"
    export SUN_JAVA_HOME

    if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
    JAVA_HOME="${BEA_JAVA_HOME}"
    export JAVA_HOME
    else
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    JAVA_HOME="${SUN_JAVA_HOME}"
    export JAVA_HOME
    else
    JAVA_VENDOR="Sun"
    export JAVA_VENDOR
    JAVA_HOME="*C:/Program Files/Java/jdk1.7.0_04*"
    export JAVA_HOME
    fi
    fi

    With that done you should be able to restart everything.

    One more thing to note is that your client side Java must also be 1.6 and not 1.7. Once again there is no need to deintall 1.7 if you have 1.6. Simply go ahead and install the 1.6 JSE. You will need to edit the Java properties in Control Panel to tell Windows which one to use. Essentially you disable 1.7. Here's a quick workflow:

    1. Launch Control Panel
    2. Double click on Java
    3. On the Java tab click the View button
    4. If you see Java 1.7 enabled uncheck it then make sure you have 1.6 enabled
    5. Click the OK button to save - your local machine willl now use 1.6 even though 1.7 is installed as well

    Best wishes
    Michael
«1

Answers

  • Michael Armstrong-Smith
    Michael Armstrong-Smith Member Posts: 4,403
    edited Jun 14, 2012 8:14AM Answer ✓
    Hello Moh
    It sounds like you have installed the 1.7 version of JDK to work with WebLogic, which by the way must be 10.3.6 if you are using 11.1.1.6. There is a known bug around using Java 1.7 with WebLogic and you have to install JDK 1.6 and edit the WebLogic configuration to make it use 1.6 instead of 1.7. There is no need to deinstall 1.7. The reason I know this is that this just happened to me as I was preparing to write a chapter for the new Discoverer 11g Handbook.

    First of all you need to get JDK 1.6. I used JDK 1.6.0_32 which I found here: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html

    Next, make sure all of your services are stopped. You'll need to stop WebLogic and the Node Manager too.

    Then go and ahead and install the JDK 1.6. If you're working in Windows it will probably install to C:\Program Files\Java\jdk1.6.0_32 so make a note of the location because you need to edit the file called setDomainEnv. In Windows this carries a cmd extenstion whereas in Linux and Unix it will have an sh extenstion.

    You now edit the file mentioned to force WebLogic to use JDK 1.6 instead of JDK 1.7. You need to edit the section that begins with SUN_JAVA_HOME=. In there you will find 2 references to the JDK. To help you, here is what mine looked like before I made the change (lines to change are in bold):

    SUN_JAVA_HOME="*C:/Program Files/Java/jdk1.7.0_04*"
    export SUN_JAVA_HOME

    if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
    JAVA_HOME="${BEA_JAVA_HOME}"
    export JAVA_HOME
    else
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    JAVA_HOME="${SUN_JAVA_HOME}"
    export JAVA_HOME
    else
    JAVA_VENDOR="Sun"
    export JAVA_VENDOR
    JAVA_HOME="*C:/Program Files/Java/jdk1.7.0_04*"
    export JAVA_HOME
    fi
    fi

    With that done you should be able to restart everything.

    One more thing to note is that your client side Java must also be 1.6 and not 1.7. Once again there is no need to deintall 1.7 if you have 1.6. Simply go ahead and install the 1.6 JSE. You will need to edit the Java properties in Control Panel to tell Windows which one to use. Essentially you disable 1.7. Here's a quick workflow:

    1. Launch Control Panel
    2. Double click on Java
    3. On the Java tab click the View button
    4. If you see Java 1.7 enabled uncheck it then make sure you have 1.6 enabled
    5. Click the OK button to save - your local machine willl now use 1.6 even though 1.7 is installed as well

    Best wishes
    Michael
  • Rod West
    Rod West Member Posts: 4,025 Gold Trophy
    Hi,

    It could just be a problem with your Java cache. Try flushing the cache by:

    1.Clear the Java Plug-in (JAR) cache. Go to Start > Settings > Control Panel and double-click the Java Plug-in icon.
    2.Select the 'Cache' tab and click 'Clear JAR Cache' and click 'OK'.
    3.Disable/remove any third party toolbar from the browser.
    4.Close and re-open all browser windows.

    Rod West
  • Michael Armstrong-Smith
    Michael Armstrong-Smith Member Posts: 4,403
    edited Jun 14, 2012 10:43AM
    Hi Rod
    In this case it is unlikely to be the local cache because the problem occurred with Viewer and Viewer does not use the applet.

    I had the same problem and error message last week and it has been logged at Oracle as an internal Bug 14153321 - DISCOVERER 11.1.1.6 ON WINDOWS CANNOT CONNECT

    Here's my error message which as you can see is identical which is why I feel so confident that it is the JDK:

    The application encounters an invalid state. .
    - Could not initialize class oracle.disco.model.xml.ModelElementToClassMapper - Nested exception: java.lang.NoClassDefFoundError: Could not initialize class oracle.disco.model.xml.ModelElementToClassMapper
    - Could not initialize class oracle.disco.model.xml.ModelElementToClassMapper

    Oracle BI Discoverer Viewer cannot find the data necessary to display the results of this event. Correct any errors, and try again.

    As soon as I swopped out the 1.7 JDK and installed the 1.6 JDK Discoverer started working.

    By the way, it also works like a charm in Google Chrome and runs much faster than in IE.

    Hope this helps
    Best wishes
    Michael
  • Moh
    Moh Member Posts: 131 Silver Badge
    Hi Rod,

    I tried your solution, but got again same error.
    For more information:
    Environment>
    1- OS: Windows 2008 R2
    2- Java version "1.7.0_03"
    Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
    3-Discoverer 11.1.1.6.0

    Regards,
    Moh
  • Moh
    Moh Member Posts: 131 Silver Badge
    Hi Michael,

    It's a pitty. I checked before installation and in certifacation matrix
    http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html
    I found the following information:
    "JDK Vendor Version*
    11gR1 (11.1.1.6)"
    "Oracle
    JDK 1.7.0_02+"

    Exceptions and Additional Information:
    1. JDK 7 certification is available only with WLS 10.3.6+/FMW 11.1.1.6+. Oracle does not support use of JDK 7 with WLS 10.3.1-10.3.5/FMW 11.1.1.1.0 - 11.1.1.5.0.
    2. OAS4OS is not certified.
    3. Oracle Forms Builder and Oracle Reports Builder are not supported.

    and there is no information regarding Discoverer.

    ***
    I'm using Froms, Reports and Discoverer, and for Forms and Reports need to use 1.7.
    Do you have any idea to find a "mix" solution? That's mean
    1.6 for Discoverer
    1.7 for Froms and Reports

    Regards,
    Moh
  • Hi Moh
    Did you try my suggestion to replace the Java with 1.6?

    Since I posted that Oracle themselves have suggested people not use 1.7 for now. If you persist with it you will continue having issues. You need to replace it with 1.6 both on the WebLogic server and on the local client. WebLogic needs JDK 1.6 whereas your local machine needs JSE 1.6.

    Michael
    Michael Armstrong-Smith
  • Moh
    Moh Member Posts: 131 Silver Badge
    Hi Michael,

    we can not change the version in short time! Therefore, I try to find a way to avoid from conflict with this issue, otherwise JDK 1.6.

    Did you check with Froms, Reports and Discoverer or your OFM-environment was just Discoverer. I would like to know how is impact of Forms and Discoverer components (Other Bugs or issues?)

    Danke for your help,
    Moh
  • Michael Armstrong-Smith
    Michael Armstrong-Smith Member Posts: 4,403
    edited Jun 20, 2012 12:28PM
    Hi Moh
    You must not run 1.7 for Forms, Reports, E-Business Suite or Discoverer 11.1.1.6

    You have to use 1.6. There is no workaround. Take a look here: http://learndiscoverer.blogspot.com/ and also here: https://blogs.oracle.com/stevenChan/entry/bulletin_disable_jre_auto_update

    No matter what you have heard or been told about 1.7 being certified with Discoverer 11.1.1.6 or with Forms it has a very serious bug and needs to be replaced with 1.6

    Until you do this you will continue having issues.

    To replace 1.7 with 1.6 will take no more than 30 minutes on the server and 10 minutes on the client.

    Best wishes
    Michael
  • SteveF-Oracle
    SteveF-Oracle Member Posts: 460 Employee
    Hi Moh,

    There will be a patch very soon.

    Regards,

    Steve
    Oracle
  • Moh
    Moh Member Posts: 131 Silver Badge
    Hi Steve,

    Can you provide me a date? (approx.)
    Because, we can check with our deadlines in project.

    Thanks in advance,
    Moh
This discussion has been closed.