Forum Stats

  • 3,770,605 Users
  • 2,253,140 Discussions
  • 7,875,506 Comments

Discussions

Java class not found.

Zainul Abedin Shamim
Zainul Abedin Shamim Member Posts: 5 Red Ribbon
edited Jul 26, 2017 9:41AM in Java User Groups Discussions

Dear All,

We are facing and error when execute below command. Please help

> java -classpath f:\Oracle\Middleware\modules;f:\oracle\middleware\oracle_common\modules;C:\JDeveloper\mywork\Application2\Project1\classes\com\oracle\xmlns\apps\financials\commonmodules\shared\model\erpintegrationservice -jar C:\JDeveloper\mywork\Application2\Project1\deploy\ErpIntegrationService-Client.jar

Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/security/SecurityLogger

at weblogic.security.utils.SecurityUtils.turnOffCryptoJDefaultJCEVerification(SecurityUtils.java:78)

at weblogic.Server.main(Server.java:67)

Caused by: java.lang.ClassNotFoundException: weblogic.security.SecurityLogger

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

... 2 more

Process java exited with code 1

Thanks..

Zainul Abedin ShamimCarlos Mendez-Hernandez-Oracle

Answers

  • eudriscabrera-JavaNet
    eudriscabrera-JavaNet Member Posts: 214 Bronze Badge
    edited Jul 21, 2017 9:32AM

    Some jars are missing in the classpath.

    Try changing f:\Oracle\Middleware\modules for f:\Oracle\Middleware in your classpath, or simply f:\Oracle.

    Take a look a this solution Weblogic1034 correct path of the modules jars

    Good Luck!.

    Zainul Abedin Shamim
  • Zainul Abedin Shamim
    Zainul Abedin Shamim Member Posts: 5 Red Ribbon
    edited Jul 25, 2017 2:18AM

    Thanks for replay, i followed above your plan but a new exception is appearing. Places help.

    java -classpath f:\Oracle\Middleware;C:\JDeveloper\mywork\Application2\Project1\classes\com\oracle\xmlns\apps\financials\commonmodules\shared\model\erpintegrationservice -jar C:\JDeveloper\mywork\Application2\Project1\deploy\ErpIntegrationService-Client.jar

    java.lang.NoClassDefFoundError: weblogic/wsee/jws/jaxws/owsm/SecurityPolicyFeature

    at java.lang.Class.getDeclaredMethods0(Native Method)

    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

    at java.lang.Class.privateGetMethodRecursive(Unknown Source)

    at java.lang.Class.getMethod0(Unknown Source)

    at java.lang.Class.getMethod(Unknown Source)

    at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)

    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

    Caused by: java.lang.ClassNotFoundException: weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature

    at java.net.URLClassLoader.findClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    ... 7 more

    Error: A JNI error has occurred, please check your installation and try again

    Exception in thread "main" Process java exited with code 1

    Thanks.

  • eudriscabrera-JavaNet
    eudriscabrera-JavaNet Member Posts: 214 Bronze Badge
    edited Jul 25, 2017 9:40AM

    Try again including the modules directory in the classpath too.

    java -classpath f:\Oracle\Middleware;f:\Oracle\Middleware\modules;f:\oracle\middleware\oracle_common\modules;C:\JDeveloper\mywork\Application2\Project1\classes\com\oracle\xmlns\apps\financials\commonmodules\shared\model\erpintegrationservice -jar C:\JDeveloper\mywork\Application2\Project1\deploy\ErpIntegrationService-Client.jar

    Carlos Mendez-Hernandez-OracleZainul Abedin Shamim
  • Zainul Abedin Shamim
    Zainul Abedin Shamim Member Posts: 5 Red Ribbon
    edited Jul 26, 2017 7:47AM

    Thanks for your replay, i am also check above command but same issue exist. Please help.

    java -classpath f:\Oracle\Middleware;f:\Oracle\Middleware\modules;f:\oracle\middleware\oracle_common\modules;C:\JDeveloper\mywork\Application2\Project1\classes\com\oracle\xmlns\apps\financials\commonmodules\shared\model\erpintegrationservice -jar C:\JDeveloper\mywork\Application2\Project1\deploy\ErpIntegrationService-Client.jar

    java.lang.NoClassDefFoundError: weblogic/wsee/jws/jaxws/owsm/SecurityPolicyFeature

    Caused by: java.lang.ClassNotFoundException: weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature

    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

    Could not find the main class: com.oracle.xmlns.apps.financials.commonmodules.shared.model.erpintegrationservice.ErpIntegrationServiceSoapHttpPortClient. Program will exit.

    Exception in thread "main" Process java exited with code 1

    Thanks

  • eudriscabrera-JavaNet
    eudriscabrera-JavaNet Member Posts: 214 Bronze Badge
    edited Jul 26, 2017 9:41AM

    Take a look at this post jms plus jax-ws deployed standalone fails with nullpointerexception .

    Also, move your question to the space for quick response.

    Good Luck !