Trouble Shooting

本文汇总了多种开发过程中常见的问题及其解决办法,包括log4j配置警告、Maven资源编码问题、Websphere应用程序服务器配置调整、JBoss JNDI命名问题等。
部署运行你感兴趣的模型镜像

1.

Problem: log4j:WARN Document root element "log4j:configuration", must match DOCTYPE root "null".

Solution: Add '<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">' to log4j.xml

    e.g.:

    <?xml version="1.0" encoding="UTF-8" ?>

    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    ...

    </log4j:configuration>

 

2.

Problem: [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

Solution: Specify encoding in pom.xml

    <plugin>

        <groupId>org.apache.maven.plugins</groupId>

        <artifactId>maven-resources-plugin</artifactId>

        <configuration>

            <encoding>UTF-8</encoding>

        </configuration>

    </plugin>

 

3.

Problem: [ERROR] Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log

Solution: 1.login into Websphere administrative console;

          2.Servers -> Server Types -> Websphere application servers -> server1 -> Generic Properties -> Server-specific;

          3.Change the 'Classloader policy' to 'Single';

          4.Change the 'Class loading model' to 'Classes loaded with parent class loader first';

          5.Restart Websphere.

 

4.

PCIS SSO:

    1.make sure the WAS administrator named - 'java';

    2.navigate to - Security -> Global security;

    3.make the 'Application security - Enable application security' is checked.

 

5.

Problem: JBoss can't found JNDI naming:

Solution: In JBoss, we should prefix 'java:/' in the normal jndi name when referencing.

 

6.

Problem: SQL Server + WAS: 

    If the Microsoft SQL Server JDBC Driver v1.2 or 2.0 is used instead of the jTDS driver, then the SQLServerDictionary will throw an exception while trying to parse the driverName "Microsoft SQL Server JDBC Driver" to determine the server version.

    Example stack :

    java.lang.NumberFormatException: For input string: "JDBC" 

    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

    at java.lang.Integer.parseInt(Integer.java:447)

    at java.lang.Integer.parseInt(Integer.java:497)

    at org.apache.openjpa.jdbc.sql.SQLServerDictionary.connectedConfiguration(SQLServerDictionary.java:92)

Solution: 

    The SQLServerDictionary was updated to properly handle the driverName that the Microsoft SQL Server JDBC Driver v1.2 and v2.0 reports when queried.

    The fix for this APAR is currently targeted for inclusion in fix pack 7.0.0.7.  Please refer to the Recommended Updates page for delivery information:

    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980

 

7.

Problem: log4j:ERROR Attempted to append to closed appender named [console].

Solution: specify each logger with different appander, let's say, do NOT make same appender type used in two loggers.

          We can define multiple [console] appenders with just different name.

 

8.

Problem: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.

                  sourceId=null[severity=(INFO 0), summary=(Welcome, trs), detail=(Welcome, trs)]

Solution:

    change FacesMessage.SEVERITY_* to StatusMessage.Severity.*

 

9.

Problem:

[HTTPThreadGroup-7] ERROR CS2SSOLogger  13 Sep 2010 01:24:08,682 - com.cargosmart.webapp.filter.CargosmartCentralHelper.isTokenValid(): ____ exception occurred when validate token via web service. exception: No Deserializer found to deserialize a &apos;http://com.oocl.cargosmart2.afw.ws/ICS2AuthenticationWebService.xsd:com_oocl_frm_afw_token_TokenImpl&apos; using encoding style &apos;http://schemas.xmlsoap.org/soap/encoding/&apos;. [java.lang.IllegalArgumentException]

Solution:

open url: http://dengas.corp.oocl.com:8888/admin/AFWWebService?WSDL

check whether the complexType(e.g.:'com_oocl_frm_afw_token_TokenImpl') had been truncated arbitrarily!!!!!!!!!

<complexType name="com_oocl_frm_afw_to_TokenImpl">  <------- 'token' had been truncated to 'to' here, so issue accured.

try to shorten oc4j home path to solve this problem. e.g.: install oc4j in 'c:\oc4j' folder.

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值