欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Jboss AS 5/6升级时遇到的问题

程序员文章站 2022-07-13 09:56:14
...

1. Jboss AS 6使用jdk7时的异常处理

异常信息为:

org.jboss.wsf.stack.cxf.deployment.jms.JMSDescriptorProcessorImpl cannot be cast to org.jboss.wsf.spi.metadata.webservices.WebservicesDescriptorProcessor

 

解决方法:

made a change in  JBOSS_HOME/server/<node>/deployers/jbossws.deployer/META-INF/stack-agnostic-jboss-beans.xml.

 

For the beans WSDescriptorDeployer and JMSDescriptorDeployer, commented the setProcessor incallback and putted the exact bean directly

----------------------------------------

 

  <!-- deployers -->

  <bean name="WSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.WSDescriptorDeployer">

    <!-- <incallback method="setProcessor"/> -->

    <property name="processor"><inject bean="WSDescriptorProcessor"/></property>

    <incallback method="setParser"/>

  </bean>

 

 

  <bean name="JMSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.JMSDescriptorDeployer">

    <!-- <incallback method="setProcessor"/> -->

    <property name="processor"><inject bean="CXFJMSDescriptorProcessor"/></property>

    <incallback method="setParser"/>

  </bean>

 

2. Jbos AS 5.1 异常Error installing to Instantiated: name=AttachmentStore

编辑conf\bootstrap\profile.xml,搜索AttachmentStore,将

 

<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>

 

改为:

 

<constructor><parameter class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>

 

3. Jbos AS 5.1 异常ClassLoader has not been set(logging.xml, vfs.xml)

It's a DEBUG level log and you can ignore it.

 

4. Jboss AS 5.1配置

ear-deployer-jboss-beans.xml

 $ {JBOSS_HOME}/server/default/deployers/ear-deployer-jboss-beans.xml

 

     <!-- A flag indicating if ear deployments should have their own scoped
      class loader to isolate their classes from other deployments.
      -->
      <attribute name="Isolated">false</attribute>

 

war-deployers-jboss-beans.xml

$ {JBOSS_HOME}/server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml

 

     <!-- Get the flag indicating if the normal Java2 parent first class
           loading model should be used over the servlet 2.3 web container first
           model.
      -->
      <attribute name="Java2ClassLoadingCompliance">false</attribute>

 

     <!-- A flag indicating if the JBoss Loader should be used. This loader
           uses a unified class loader as the class loader rather than the tomcat
           specific class loader.
           The default is false to ensure that wars have isolated class loading
           for duplicate jars and jsp files.
      -->
      <attribute name="UseJBossWebLoader">true</attribute>

 

5. ESB client 依赖的Jar(Jboss SOA 4.3)

jbossesb-jbpm

jbossesb-rosetta

jbossesb-config-model

jbpm-jpdl

jbossts-common

jboss-messaging-client

jboss-remoting

jboss-serialization

oswego-concurrent

jnp-client

jboss-aop-jdk50

scout

juddi-client

axis

javassist

trove

wstx-asl

xmlbeans
stax-api

commons-codec

 

6. jbossesb-properties.xml文件的查找顺序

jbossts-common(com.arjuna.common.util.FileLocator)

1) absolute path - 可这样设定: -Dorg.jboss.soa.esb.propertyFile=abs:///jboss/bin/jbossesb-properties.xml

2) user.dir - JBOSS_HOME/bin

3) user.home

4) java.home - jdk/jre

5) ClassLoader.getResource() - 在jboss EAP 6 以上使用时,如果发布的包未解压,不能正确的加载文件

 

7. Couldn't retrieve job because the BLOB couldn't be deserialized: null

清空QRTZ_JOB_DETAILS表

 

8. send email error: javax.mail.NoSuchProviderException: No provider for smtp

 jboss-seam-mail使用的mail版本与EAP不一致,不要使用EAP自身的。

 

9. javax.ejb.EJBTransactionRolledbackException: JBAS014360: EJB 3.1 FR 4.3.14.1 concurrent access timeout on org.jboss.invocation.InterceptorContext@34ce5083 - could not obtain lock within 5000 MILLISECONDS

这个错误是因@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) 引起。

 

10. org.jbpm.graph.def.DelegationException: Could not find UserTransaction in JNDI [java:comp/UserTransaction]

将<property name="jta.UserTransaction">java:comp/UserTransaction</property>改为:

<property name="jta.UserTransaction">java:jboss/UserTransaction</property>

 

11. Secure the JMX Console and the Web Console

删除jmx-console.war 和 management web.xml中的
<http-method>GET</http-method>
<http-method>POST</http-method>

 

12. 删除X-Powered-By

删除jbossweb web.xml中的

<init-param>
    <param-name>X-Powered-By</param-name>
    <param-value>Servlet 2.4; JBoss-4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)/Tomcat-5.5</param-value>
</init-param>

 

Class Loading Configuration

SOA ESB JBPM Integration Guide

JBoss Enterprise SOA Platform Supported Configurations