无法部署到独立的oc4j

时间:2012-07-24 14:55:09

标签: jdeveloper oc4j

我正在尝试将一个耳朵部署到oc4j独立服务器。我认为我已经成功部署了它,因为操作成功完成而没有任何警告。 现在测试我想我必须将这个Web应用程序绑定到某个网站。当我尝试绑定时,我收到以下错误:

C:\oracle\JDEV2\j2ee\home>java -jar admin.jar ormi://127.0.0.1:22667 oc4jadmin w
elcome -bindWebApp appr_ear appr default-web-site appr
Jul 24, 2012 10:45:31 AM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_T
HE_REMOTE_SERVER
WARNING: Exception returned by remote server: {0}
java.lang.ExceptionInInitializerError
        at org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(T
ilesContainerFactory.java:197)
        at org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesC
ontainerFactory.java:163)
        at org.apache.tiles.web.startup.TilesListener.createContainer(TilesListe
ner.java:90)
        at org.apache.struts2.tiles.StrutsTilesListener.createContainer(StrutsTi
lesListener.java:66)
        at org.apache.tiles.web.startup.TilesListener.contextInitialized(TilesLi
stener.java:57)
        at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.
java:1140)
        at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:
741)
        at com.evermind.server.ApplicationStateRunning.getHttpApplication(Applic
ationStateRunning.java:431)
        at com.evermind.server.Application.getHttpApplication(Application.java:5
86)
        at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.cre
ateHttpApplicationFromReference(HttpSite.java:1987)
        at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<in
it>(HttpSite.java:1906)
        at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:16
03)
        at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplica
tionBinder.java:302)
        at com.evermind.server.administration.DefaultApplicationServerAdministra
tor.bindWebApp(DefaultApplicationServerAdministrator.java:424)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
        at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:303)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.comm
ons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.C
lass;@72e694 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lan
g.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons
.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Clas
s;@72e694 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.N
oClassDefFoundError: org/apache/log4j/Category))
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:543)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:235)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:209)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
        at org.apache.tiles.impl.BasicTilesContainer.<clinit>(BasicTilesContaine
r.java:78)
        ... 21 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log
 constructor [Ljava.lang.Class;@72e694 for org.apache.commons.logging.impl.Log4J
Logger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:413)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:529)
        ... 25 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
        at java.lang.Class.getConstructor0(Class.java:2640)
        at java.lang.Class.getConstructor(Class.java:1629)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:410)
        ... 26 more
Error: null

在执行此命令之前,我尝试按如下方式进行部署: C:\ oracle \ JDEV2 \ j2ee \ home&gt; java -jar admin.jar ormi://127.0.0.1:22667 oc4jadmin w elcome -deploy -file C:\ RTTTLea \ dist \ appr.ear -deploymentName appr_ear

看起来部署成功了。

[ 2012-07-24 10:49:40.170 EDT ] Application Deployer for appr_ear STARTS.
[ 2012-07-24 10:49:40.170 EDT ] Stopping application : appr_ear
[ 2012-07-24 10:49:40.201 EDT ] Stopped application : appr_ear
[ 2012-07-24 10:49:40.201 EDT ] Undeploy previous deployment
[ 2012-07-24 10:49:40.935 EDT ] Initialize C:\oracle\JDEV2\jdev\extensions\oracl
e.adfp.seededoc4j.10.1.3\j2ee\home\applications\appr_ear.ear begins...
[ 2012-07-24 10:49:44.326 EDT ] Initialize C:\oracle\JDEV2\jdev\extensions\oracl
e.adfp.seededoc4j.10.1.3\j2ee\home\applications\appr_ear.ear ends...
[ 2012-07-24 10:49:44.326 EDT ] Starting application : appr_ear
[ 2012-07-24 10:49:44.326 EDT ] Initializing ClassLoader(s)
[ 2012-07-24 10:49:44.326 EDT ] Initializing EJB container
[ 2012-07-24 10:49:44.326 EDT ] Loading connector(s)
[ 2012-07-24 10:49:44.342 EDT ] Starting up resource adapters
[ 2012-07-24 10:49:44.342 EDT ] Initializing EJB sessions
[ 2012-07-24 10:49:44.342 EDT ] Committing ClassLoader(s)
[ 2012-07-24 10:49:44.342 EDT ] Initialize appr begins...
[ 2012-07-24 10:49:44.357 EDT ] Initialize appr ends...
[ 2012-07-24 10:49:44.357 EDT ] Started application : appr_ear
[ 2012-07-24 10:49:44.357 EDT ] Application Deployer for appr_ear COMPLETES. Ope
ration time: 4187 msecs

在部署之后,我可以在View中看到我的应用程序列表 - &gt;连接 - &gt; Application Server,这意味着部署成功。现在我想打开主页进行验证。

1 个答案:

答案 0 :(得分:0)

java.lang.NoClassDefFoundError:org / apache / log4j / Category似乎表明您的EAR文件缺少log4j的jar文件或者您的服务器中存在错误版本的log4j。