[Logo] JForum - Powering Communities
  [Search] 搜尋   [Recent Topics] 最新主題   [Hottest Topics] 熱門主題   [Top Downloads] 熱門下載   [Groups] 回首頁 
[Register] 會員註冊 /  [Login] 登入 


JForum 2.8.3 is out with various fixes and improvements. Read all about it here

Deployment in Weblogic exception log4j template not found and jersey servlet due to ApplicationPath no being set RSS feed
討論區首頁 » User Forum
發表人 內容
doingit


註冊時間: 2019/9/30
文章: 4
離線
Dear All,

I am trying to deploy jforum-2.6.2.war in Weblogic 12.2.1 but I bump into following exception. I have also attached a file with the full stack trace.

Many thanks in advance for any help.


<29-Sep-2019 18:08:02,872 o'clock CEST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet$ApplicationImpl because ApplicationPath annotation is not set on it.>
<29-Sep-2019 18:08:22,727 o'clock CEST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet$ApplicationImpl because ApplicationPath annotation is not set on it.>
JForum: problems initializing the logger: template not found: "null/WEB-INF/log4j_template.xml"
java.lang.Exception: template not found: "null/WEB-INF/log4j_template.xml"
at net.jforum.util.log.LoggerHelper.checkTemplate(LoggerHelper.java:161)
at net.jforum.util.log.LoggerHelper.provideJForumLogConfig(LoggerHelper.java:119)
at net.jforum.util.log.LoggerHelper.checkLoggerInitialization(LoggerHelper.java:94)
at net.jforum.ContextListener.contextInitialized(ContextListener.java:77)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:719)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)

 檔案名稱 deployment error.txt [Disk] 下載
 描述 Full deployment error
 檔案大小 15 Kbytes
 下載次數:  41721 次

udittmer


註冊時間: 2013/2/21
文章: 424
離線
Is the war being extracted to a directory? Or is the app run directly form the war file? If the latter, that may lead to various issues. If possible, try having the war file exploded to a real directory.

Ping & Net - my free Android app for TCP/IP network diagnostics
[Email] [WWW]
doingit


註冊時間: 2019/9/30
文章: 4
離線
Hi udittmer,

I was actually deploying the war file. But I did as you recommended, thanks. I unzipped the war and deployed the container folder. There was following issue

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

I changed the driver to com.mysql.cj.jdbc.Driver in jforum-2.6.2/WEB-INF/config/database/mysql/mysql.properties

However I am facing following issue now after last deployment. See full stack trace attached. I don't know how to tackle this one, thanks.

<30-Sep-2019 22:21:32,094 o'clock CEST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet$ApplicationImpl because ApplicationPath annotation is not set on it.>
<30-Sep-2019 22:21:37,637 o'clock CEST> <Error> <HTTP> <BEA-101216> <Servlet: "JAX-RS/Jersey#1" failed to preload on startup in Web application: "jforum-2.6.2".
A MultiException has 1 exceptions. They are:
1. java.lang.NoClassDefFoundError: javax/cache/configuration/Configuration

at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:89)
at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1068)
at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:978)
at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1082)
at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1074)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: javax/cache/configuration/Configuration
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getDeclaredConstructors(Class.java:2020)
at org.jvnet.hk2.internal.Utilities$3.run(Utilities.java:1378)
at org.jvnet.hk2.internal.Utilities$3.run(Utilities.java:1374)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: javax.cache.configuration.Configuration
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
Truncated. see log file for complete stacktrace
 檔案名稱 deployment error.txt [Disk] 下載
 描述 沒有檔案註解存在
 檔案大小 14 Kbytes
 下載次數:  42259 次

udittmer


註冊時間: 2013/2/21
文章: 424
離線
As to the first issue, that's just a warning. It should work fine as is. But I'll address it for the next release.

As to the second issue, that seems to have nothing to do with JForum - which doesn't use JAX-RS or Jersey. Is that something you added to the web app? If so, it apparently needs whatever library javax.cache.configuration.Configuration is in.

Ping & Net - my free Android app for TCP/IP network diagnostics
[Email] [WWW]
doingit


註冊時間: 2019/9/30
文章: 4
離線
I just downloaded the jforum-2.6.2.war, unzipped it and changed the driver to com.mysql.cj.jdbc.Driver in jforum-2.6.2/WEB-INF/config/database/mysql/mysql.properties.
I am just deploying jforum, no other application code was added.
I realized that there was no weblogic-application.xml so I added a simple one at the META-INF folder (see below).

<?xml version="1.0" encoding="ISO-8859-1"?>
<weblogic-application
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.bea.com/ns/weblogic/weblogic-application"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application
http://www.bea.com/ns/weblogic/weblogic-application/1.1/weblogic-application.xsd">
<application-param>
<param-name>webapp.encoding.default</param-name>
<param-value>UTF-8</param-value>
</application-param>
</weblogic-application>

The deployment is still throwing an exception.

<02-Oct-2019 00:21:15,639 o'clock CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "5345721252939" for task "8" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.ClassNotFoundException: "
weblogic.application.ModuleException: java.lang.ClassNotFoundException:
at weblogic.j2eeclient.AppClientModule.loadDescriptors(AppClientModule.java:300)
at weblogic.j2eeclient.AppClientModule.init(AppClientModule.java:244)
at weblogic.j2eeclient.AppClientModule.init(AppClientModule.java:128)
at weblogic.application.internal.ExtensibleModuleWrapper.init(ExtensibleModuleWrapper.java:98)
at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:84)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException:
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
Truncated. see log file for complete stacktrace
>
<02-Oct-2019 00:21:15,644 o'clock CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application "jforum".>
<02-Oct-2019 00:21:15,644 o'clock CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: java.lang.ClassNotFoundException:
at weblogic.j2eeclient.AppClientModule.loadDescriptors(AppClientModule.java:300)
at weblogic.j2eeclient.AppClientModule.init(AppClientModule.java:244)
at weblogic.j2eeclient.AppClientModule.init(AppClientModule.java:128)
at weblogic.application.internal.ExtensibleModuleWrapper.init(ExtensibleModuleWrapper.java:98)
at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:84)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException:
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
udittmer


註冊時間: 2013/2/21
文章: 424
離線
I see. I'm not familiar with Weblogic, but it seems the stack trace is rather unhelpful because now it doesn't even mention which class is missing. But since it mentions "Truncated. see log file for complete stacktrace" - is there any other log file where there might be more information?

Ping & Net - my free Android app for TCP/IP network diagnostics
[Email] [WWW]
doingit


註冊時間: 2019/9/30
文章: 4
離線
Please find attached the stack trace. That's all I could find. I tried to increase the logging to debug level.
 檔案名稱 deployment error.txt [Disk] 下載
 描述 沒有檔案註解存在
 檔案大小 15 Kbytes
 下載次數:  41722 次

udittmer


註冊時間: 2013/2/21
文章: 424
離線
A ClassNotFoundException without mention of what class can not be found is singularly unhelpful. Or maybe it's trying to load a class named "" for some reason. But it doesn't say what it's trying to do at that point -except that it's trying to load JForum-, so there isn't much to go by on.

Ping & Net - my free Android app for TCP/IP network diagnostics
[Email] [WWW]
 
討論區首頁 » User Forum
前往:   
行動版
Powered by JForum 2.8.3 © 2023 JForum Team • Maintained by Andowson Chang and Ulf Dittmer