DeploymentException & Class Not Found on WebLogic Admin Server 11g

前端 未结 2 1558
醉酒成梦
醉酒成梦 2021-01-27 10:58

Related: Load external properties files into EJB 3 app running on WebLogic 11

Using Oracle Enterprise Pack for Ecl

2条回答
  •  有刺的猬
    2021-01-27 11:39

    Got it working... The issue was that I had it set up as Web Project rather than a Java EE Utility Project in Oracle Enterprise Edition for Eclipse.

    As a web project, it was putting .class files inside WEB-INF/classes instead of APP-INF.

    Also, needed to put error.properties inside my actual domain.

    C:\Oracle\Middleware\user_projects\domains\MyDomain

    In regards to my own question:

    Is there a default directory or just simple configuration area that WebLogic loads properties files which are accessible to any application that runs in WebLogic?

    If -Dweblogic.ext.dirs is not set, it defaults to $DOMAIN/lib;$WL_HOME/common/lib/ext;$WL_HOME/server/lib/ext

    So if you store error.properties in $DOMAIN/lib it will be on the CLASSPATH and you should be able to load it using getResourceAsStream("error.properties")

提交回复
热议问题