Forum Stats

  • 3,750,406 Users
  • 2,250,174 Discussions
  • 7,866,970 Comments

Discussions

How to resolve java.lang.NoSuchMethodError

ChristianM0147
ChristianM0147 Member Posts: 18 Red Ribbon

Hello Community.

Im currently using JDeveloper Version 12.2.1.4.0.

My Problem is that after the successful deployment of the app to my weblogic 12c server i face following error if i try to access the website:

Error 500--Internal Server Error

java.lang.NoSuchMethodError: oracle.adf.share.mds.ADFSessionOptions.addChangeListener(Loracle/adf/share/mds/ADFSessOptsChangeListener;)Z
	at oracle.jbo.mom.DefinitionManager.registerDefMgrWithSessOpts(DefinitionManager.java:3342)
	at oracle.jbo.mom.DefinitionManager.getCurrentDefinitionContext(DefinitionManager.java:5465)
	at oracle.jbo.mom.DefinitionManager.getObjectManagerDef(DefinitionManager.java:1074)
	at oracle.jbo.uicli.mom.JUMetaObjectManager.isStatelessApplication(JUMetaObjectManager.java:569)
	at oracle.adf.model.servlet.HttpBindingRequestHandler.initADFContext(HttpBindingRequestHandler.java:71)
	at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:98)
	at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:196)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
	at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
	at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)
	at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
	at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
	at java.security.AccessController.doPrivileged(Native Method)
	at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
	at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
	at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
	at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
	at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
	at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
	at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
	at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
	at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
	at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

Just for clarification, if i run the application locally on my integrated server it works fine.

So what i found out is that im missing the method addChangeListener in the class ADFSessionOptions on the Server. How can that be?

I already checked the libraries selected for Deployment (rightclick on ViewController -> Project properties-> Deployment -> edit Deployment Profile -> Contributors / Library Dependencies) the library BC4J Runtime which includes ADFSessionOptions is checked in both tabs so it should be used on the server, right? Could it be that the library needs to be updated? if so, how?

«1

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,459 Red Diamond

    Did you migrate the application from an earlier JDev version?

    What kind of application is it?

    Do you actively use MDS?


    Timo


  • ChristianM0147
    ChristianM0147 Member Posts: 18 Red Ribbon

    Dear Timo,

    that might be a good shot, the application was indeed migrated from 12.2.1.3.0. to 12.2.1.4.0.

    It is a ADF Fusion Web Application.

    What is MDS? I dont think so.

    Given that, can we just update the library and how do we do that?

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,459 Red Diamond

    MDS is Meta Data Service. It's used to store user's changes to the UI like the order of columns of a table.

    You can't update this library. The question is which WLS version do you deploy the application to?

    Is it a WLS version 12.2.1.4?

    Create a new fresh ADF Fusion Web App in 12.2.1.4 (just a simple UI e.g. showing one table from the DB) and deploy this app to your server. Once this runs OK, you can compare the libraries and other meta data of the projects.


    Timo


  • ChristianM0147
    ChristianM0147 Member Posts: 18 Red Ribbon

    I checked the WLS version and indeed it is the old version 12.2.1.3. So i decided to install the old JDeveloper fitting the WLS version. Version 12.2.1.3.

    While importing the project from git i get a prompt to migrate the application to 12.2.1.3 (from 12.2.1.4.) and so i did.

    I tried to deply but i still get the same exception.

    Any other ideas?

  • innocent
    innocent Member Posts: 2 Green Ribbon

    Hello Timo,

    i work together with ChristianM0147 on the same project.

    The WLS version of the server is 12.1.3.0.0. So a decent bit older than our JDev.

    The confusing point was, that another colleague stated, he had no major problems at deploying applications on the same server from a JDev 12.2.1.3.0. and indeed another application migrated to JDev 12.2.1.3.0 had been deployed successfully.

    The only difference is, the current project requires the "BC4J Runtime" library to be implemented in the deployment profile, otherwise we already get an exception in the JDev and the deployment gets cancelled. Plus the class that throws the exception shown above is in that library. So that's why we accused this particular one to be the curlprit.

    Is there any chance to check if this library got changed within 12.1.3.0.0 and 12.2.1.3.0 without having to update the WLS? There are several other applications running on that server and we don't know all their dependencies.

    Thank you in advance.

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,459 Red Diamond

    So, the application in git already was opened with 12.2.1.4 and a push to git after that was done?

    In this case, the project files are already in version 12.2.1.4 state. It won't help to checkout this version and compile/run it in 12.2.1.3 as the metadata files are optimized for 12.2.1.4. You have to go back in history to the last true 12.2.1.3 version.

    Again, my advice is to create a fresh smal sample app and deploy and run it on the target server. This will show you which libraries to use.


    Timo


  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,459 Red Diamond

    The "BC4JRuntime" is not deployed as a project library to the server. Instead the library is installed to the server once and all ADF apps running on the server can use ths library. You deploy a reference to the library.

    I don't understand what you mean by '...the library has changed...'. This lib is part of the installation of JDEV and the runtime installed to the WLS. After that it will not change as long as you don't patch the WLS.

    As you can't install a new runtime to a WLS once you have it installed, the lib will not change.

    You can't update a WLS 12.2.1.3 to ADF 12.2.1.4. You need to install a WLS 12.2.1.4 and install ADF runtime 12.2.1.4 to it.


    Timo


  • ChristianM0147
    ChristianM0147 Member Posts: 18 Red Ribbon

    You are right, the library hasnt changed. I guess the problem is that the project uses or needs 12.2.1.4 libraries to run properly because it is developed in 12.2.1.4 but the WLS version is 12.2.1.3 so the application tries to run a method that does not exist in the version that is currently installed on the server (12.2.1.3)

    So i guess i have to compare the meta files that existed in the 12.2.1.3 version of the application and compare them with the current files. Can you please tell me which files /settings i need to check and where i can find them?

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,459 Red Diamond

    You have to look at all property files, all XML files, the JSF files, and the JSFF files you find in the workspace.

    Timo


  • innocent
    innocent Member Posts: 2 Green Ribbon
    edited Sep 17, 2021 6:44AM

    Hello Timo,

    we got it solved, deployment successful and site accessible. The issue was not a library dependency or a version incompatibility but a sketchy mess with the depolyment profiles in the JDeveloper.

    The project got derived from another project and so somehow were the deployment profiles. Somewhere in there must have been a reference to method that doesnt exist in this "derivate" project anymore. The whole structure is a bit uncanny, so i decided to backup all the .jar, .war and .ear files and removed them from project and application.

    After i created new deployment profiles from scratch for Model, ViewController and the entire application, the deployment took a while but succeeded and the service was accessible. Nevertheless thank you for all efforts and time invested.

    ChristianM0147 and innocent