2016-05-23 144 views
0

我已经有log4j2在weblogic上工作,我唯一的标志是启动日志,而weblogic加载所有的hibernate查询那里没有配置。log4j2配置为weblogic加载休眠

下面是从日志的例子:

Listening for transport dt_socket at address: 5005 
<May 23, 2016 2:49:49 PM IDT> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. 
To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.> 
<May 23, 2016 2:49:49 PM IDT> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRN 
G. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.> 
<May 23, 2016 2:49:50 PM IDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 24.79-b02 
from Oracle Corporation.> 
<May 23, 2016 2:49:50 PM IDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.3.0.0 Wed May 21 18:53:34 PDT 2014 1604337 > 
<May 23, 2016 2:49:52 PM IDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing C:\work\srv\wls-core.13.5\config\config.xml<47 
:1> - Expected elements '[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain 
[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracl 
e.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain migratable-rmi 
[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.orac 
le.com/weblogic/domain auto-deploy-[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domai 
n [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected] 
http://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected] 
http://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/w 
eblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain server-migration-his 
[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected] 
http://xmlns.oracle.com/weblogic/domain' instead of '[email protected]://xmlns.oracle.com/weblogic/domain' here in element [email protected]://xmlns.oracl 
e.com/weblogic/domain.> 
<May 23, 2016 2:49:52 PM IDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing C:\work\srv\wls-core.13.5\config\config.xml<57 
:1> - Expected elements '[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain 
[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracl 
e.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain migratable-rmi 
[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.orac 
le.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domai 
n [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected] 
http://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected] 
http://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/w 
eblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain server-migration-his 
[email protected]://xmlns.oracle.com/weblogic/domain [email protected]://xmlns.oracle.com/weblogic/domain [email protected] 
http://xmlns.oracle.com/weblogic/domain' instead of '[email protected]://xmlns.oracle.com/weblogic/domain' here in element [email protected]://xmlns.or 
acle.com/weblogic/domain.> 
<May 23, 2016 2:49:52 PM IDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
<May 23, 2016 2:49:52 PM IDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.> 
<May 23, 2016 2:49:52 PM IDT> <Info> <WorkManager> <BEA-002942> <CMM memory level becomes 0. Setting standby thread pool size to 256.> 
<May 23, 2016 2:49:54 PM IDT> <Notice> <Log Management> <BEA-170019> <The server log file C:\work\srv\wls-core.13.5\servers\AdminServer\logs\AdminServ 
er.log is opened. All server side log events will be written to this file.> 
<May 23, 2016 2:49:56 PM IDT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.> 
<May 23, 2016 2:49:56 PM IDT> <Warning> <Management> <BEA-141277> <The JMX MBean PlatformMBeanServerUsed attribute is true, but the Platform MBeanServ 
er was created without the hooks for the WebLogic Server security infrastructure. The Platform MBeanServer will not be used and Platform MBeans will n 
ot be available using the WebLogic Server Runtime or Domain Runtime MBeanServers. This can occur if Platform MBeanServer system properties or JVM opti 
ons (-Dcom.sun.management.jmxremote or JRockit -XManagement) were defined. 
To allow the Platform MBeanServer to be used, either remove the system properties and JVM options or start WebLogic Server with the following system 
property: 
-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder 
To eliminate this log error if Platform MBeans do not need to be available when using WebLogic Server, set the PlatformMBeanUsed attribute in the JMX 
MBean to false.> 
<May 23, 2016 2:49:56 PM IDT> <Warning> <Store> <BEA-280109> <The JVM was unable to load the native wlfileio library for the store "_WLS_AdminServer". 
File and paging stores will continue to function correctly. Specifically, file stores that are configured with a transactionally safe synchronous wri 
te policy will continue to operate safely and transactionally but may open with a different write-policy. Other store types may not be able to open.> 

<May 23, 2016 2:49:58 PM IDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.> 
<May 23, 2016 2:49:58 PM IDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
May 23, 2016 2:49:58 PM weblogic.wsee.WseeCoreMessages logWseeServiceStarting 
INFO: The Wsee Service is starting 
May 23, 2016 2:50:05 PM org.hibernate.annotations.common.Version <clinit> 
INFO: Hibernate Commons Annotations 3.2.0.Final 
May 23, 2016 2:50:05 PM org.hibernate.cfg.Environment <clinit> 
INFO: Hibernate 3.6.10.Final 
May 23, 2016 2:50:05 PM org.hibernate.cfg.Environment <clinit> 
INFO: hibernate.properties not found 
May 23, 2016 2:50:05 PM org.hibernate.cfg.Environment buildBytecodeProvider 
INFO: Bytecode provider name : javassist 
May 23, 2016 2:50:05 PM org.hibernate.cfg.Environment <clinit> 
INFO: using JDK 1.4 java.sql.Timestamp handling 
May 23, 2016 2:50:05 PM org.hibernate.ejb.Version <clinit> 

而且只有当服务器到达该点的应用程序正在启动它查找log4j2.xml和格式更改的我们:

The loading of the configuration: 
INFO: JNDI InitialContext properties:{} 
May 23, 2016 2:51:52 PM org.hibernate.cache.UpdateTimestampsCache <init> 
INFO: starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache 
May 23, 2016 2:51:52 PM org.hibernate.cache.StandardQueryCache <init> 
INFO: starting query cache at region: org.hibernate.cache.StandardQueryCache 
<May 23, 2016 2:52:35 PM IDT> <Warning> <EJB> <BEA-010230> <EJB PolicySessionBean : method name performAllUnderwritingChecks and method name performAl 
lUnderWritingChecks are equal under case-insensitive comparison but both methods have declarative security settings. Declarative security checks are c 
ase-insensitive.> 
<May 23, 2016 2:52:36 PM IDT> <Warning> <Connector> <BEA-190155> <Compliance checking and validation of the resource adapter C:\work\srv\wls-core.13.5 
\.\applications\idit-Core-ear\idit-ra.mq-1.0.0.rar resulted in the following warnings: 
The class 'org.apache.activemq.ra.ActiveMQResourceAdapter', which is defined as [<resourceadapter-class>] from [META-INF/ra.xml], should implement jav 
a.io.Serializable but does not.> 
May 23, 2016 2:52:39 PM com.idit.framework.rar.mq.server.impl.ActiveMQManagedConnectionFactoryIDIT <init> 
INFO: ActiveMQManagedConnectionFactoryIDIT::Constructor() 
May 23, 2016 2:52:40 PM com.idit.framework.rar.mq.server.impl.ActiveMQConnectionFactoryIDIT <init> 
INFO: ActiveMQConnectionFactoryIDIT::Constructor(factory=com.idit.fr[email protected]375f645f, manager= 
[email protected]:/idit/ConnectionFactory/general, requestInfo=ActiveMQConnectionRequestInfo{ userName = 
'defaultUser' , serverUrl = 'tcp://DO_NOT_EXIST:6666' , clientid = 'null' , userName = 'defaultUser' , useInboundSession = 'false' }) 
<May 23, 2016 2:52:40 PM IDT> <Warning> <Weblogic-Validation> <BEA-2156400> <The validation.xml file, located at file:/C:/work/srv/wls-core.13.5/appli 
cations/idit-Core-ear/idit-Core/WEB-INF/validation.xml, does not conform to the JSR 303 specifications.> 
2016-05-23 14:52:40,661 [STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)' ERROR Unable to access file:/c:/work/srv/wls-c 
ore.13.5/file:/$%7Bproject.build.directory%7D/classes/log4j-embedded.xml 
2016-05-23 14:52:40,663 [STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)' ERROR Unable to access file:/c:/work/srv/wls-c 
ore.13.5/file:/$%7Bproject.build.directory%7D/classes/log4j-embedded.xml 
[[23-05-16 14:52:40.955] INFO StrutsInformationEntry - Project properties set to: com.idit.noc.common.NOCProjectProperties 
[[23-05-16 14:52:40.955] INFO StrutsInformationEntry - Project properties set to: com.idit.noc.common.NOCProjectProperties 
[[23-05-16 14:52:40.977] INFO IditStartupController - Entering servlet for the first time. 
[[23-05-16 14:52:40.977] INFO IditStartupController - Start printing system properties: 
[[23-05-16 14:52:40.978] INFO IditStartupController -   java.vendor = Oracle Corporation 
[[23-05-16 14:52:40.978] INFO IditStartupController -   sun.java.launcher = SUN_STANDARD 

我已经尝试使用“log4j.configurationFile”,尝试了所有从log4j2官方网站:log4j2 JEE Application,但仍然没有。

我最大的问题是加载时间,我们有很多的hibernate查询和它们的加载需要几分钟时间为每个服务器启动。

如何让weblogic在启动时加载配置?

回答

1

您需要设置-Dlog4j.configuration属性在参数窗格中,服务器配置菜单的服务器开始标签。然后WebLogic将读取属性文件就好了。

就像这样:

enter image description here