---
title: "Jboss AS 5/6升级时遇到的问题"
author: "sunjing"
date: "2016-07-02T16:36:33Z"
tags: []
categories: ["企业架构"]
slug: "jboss-as-5-6"
draft: false
lastmod: "2017-12-01T14:19:34Z"
id: 2308306
url: "https://billben.iteye.com/blog/2308306"
---

**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/&lt;node&gt;/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

\----------------------------------------

 

  &lt;!-- deployers --&gt;

  &lt;bean name="WSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.WSDescriptorDeployer"&gt;

    &lt;!-- &lt;incallback method="setProcessor"/&gt; --&gt;

    &lt;property name="processor"&gt;&lt;inject bean="WSDescriptorProcessor"/&gt;&lt;/property&gt;

    &lt;incallback method="setParser"/&gt;

  &lt;/bean&gt;

 

 

  &lt;bean name="JMSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.JMSDescriptorDeployer"&gt;

    &lt;!-- &lt;incallback method="setProcessor"/&gt; --&gt;

    &lt;property name="processor"&gt;&lt;inject bean="CXFJMSDescriptorProcessor"/&gt;&lt;/property&gt;

    &lt;incallback method="setParser"/&gt;

  &lt;/bean&gt;

 

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

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

 

&lt;constructor&gt;&lt;parameter&gt;&lt;inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /&gt;&lt;/parameter&gt;&lt;/constructor&gt;

 

改为：

 

&lt;constructor&gt;&lt;parameter class="java.io.File"&gt;&lt;inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /&gt;&lt;/parameter&gt;&lt;/constructor&gt;

 

**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

 

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

 

**war-deployers-jboss-beans.xml**

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

 

     &lt;!-- 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.  
      --&gt;  
      &lt;attribute name="Java2ClassLoadingCompliance"&gt;false&lt;/attribute&gt;

 

     &lt;!-- 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.  
      --&gt;  
      &lt;attribute name="UseJBossWebLoader"&gt;true&lt;/attribute&gt;

 

**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]**

将&lt;property name="jta.UserTransaction"&gt;java:comp/UserTransaction&lt;/property&gt;改为：

&lt;property name="jta.UserTransaction"&gt;java:jboss/UserTransaction&lt;/property&gt;

 

**11. Secure the JMX Console and the Web Console**

删除jmx-console.war 和 management web.xml中的  
&lt;http-method&gt;GET&lt;/http-method&gt;  
&lt;http-method&gt;POST&lt;/http-method&gt;

 

**12. 删除X-Powered-By**

删除jbossweb web.xml中的

&lt;init-param&gt;  
    &lt;param-name&gt;X-Powered-By&lt;/param-name&gt;  
    &lt;param-value&gt;Servlet 2.4; JBoss-4.0.2 (build: CVSTag=JBoss\_4\_0\_2 date=200505022023)/Tomcat-5.5&lt;/param-value&gt;  
&lt;/init-param&gt;

 

[Class Loading Configuration](https://developer.jboss.org/wiki/ClassLoadingConfiguration)

[SOA ESB JBPM Integration Guide](https://access.redhat.com/documentation/en-US/JBoss_Enterprise_SOA_Platform/4.2/html-single/SOA_ESB_JBPM_Integration_Guide/index.html)

[JBoss Enterprise SOA Platform Supported Configurations](https://access.redhat.com/articles/111863)