关于Jboss应用ear文件的发布问题,帮忙看看:)

02-12-12 zhengzhiyong
我打包后的ear文件发布到jboss中能够正常访问,但是我修改EJB,重新发布的时候,出现

以下错误,重启jboss后正常。单独发布jar文件是,也是遇到同样的问题。听说jboss是支持"热发布"的。

16:28:09,186 INFO [MainDeployer] Undeploying file:/C:/jboss/server/resin/deploy

/interest.ear

16:28:09,186 INFO [EjbModule] Stopping

16:28:09,186 INFO [EjbModule] Stopped

16:28:09,186 INFO [EjbModule] Stopping

16:28:09,202 INFO [EjbModule] Stopped

16:28:09,202 INFO [ResinService] undeploy, warUrl=njar:file:/C:/jboss/server/re

sin/tmp/deploy/server/resin/deploy/interest.ear/76.interest.ear^/interest.war

16:28:09,202 INFO [ResinService] performUndeploy ctx=/interest

16:28:09,202 ERROR [STDERR] [2002-12-01 16:28:09.202] closing application http:/

/localhost:8080/interest

16:28:09,218 INFO [ResinService] Deleting expanded war directory C:\Documents and Settings\lili\LocalSettings\Temp\nested-37689.

16:28:09,218 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss/server/resin/deploy/interest.ear

16:28:09,218 INFO [EjbModule] Destroying

16:28:09,233 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single

:J2EEApplication=interest.ear,J2EEServer=Single,j2eeType=EJBModule,name=Region.j

ar

16:28:09,233 INFO [EjbModule] Destroyed

16:28:09,233 INFO [MainDeployer] not deleting localUrl, it is null or not a copy:njar:file:/C:/jboss/server/resin/tmp/deploy/server/resin/deploy/interest.ear/

76.interest.ear^/Region.jar

16:28:09,233 INFO [MainDeployer] Undeployed njar:file:/C:/jboss/server/resin/tm

p/deploy/server/resin/deploy/interest.ear/76.interest.ear^/Region.jar

16:28:09,233 INFO [EjbModule] Destroying

16:28:09,249 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single

:J2EEApplication=interest.ear,J2EEServer=Single,j2eeType=EJBModule,name=interest

.jar

16:28:09,249 INFO [EjbModule] Destroyed

16:28:09,265 INFO [MainDeployer] not deleting localUrl, it is null or not a cop

y: njar:file:/C:/jboss/server/resin/tmp/deploy/server/resin/deploy/interest.ear/

76.interest.ear^/interest.jar

16:28:09,265 INFO [MainDeployer] Undeployed njar:file:/C:/jboss/server/resin/tm

p/deploy/server/resin/deploy/interest.ear/76.interest.ear^/interest.jar

16:28:09,265 INFO [MainDeployer] not deleting localUrl, it is null or not a cop

y: njar:file:/C:/jboss/server/resin/tmp/deploy/server/resin/deploy/interest.ear/

76.interest.ear^/interest.war

16:28:09,265 INFO [MainDeployer] Undeployed njar:file:/C:/jboss/server/resin/tm

p/deploy/server/resin/deploy/interest.ear/76.interest.ear^/interest.war

16:28:09,265 INFO [MainDeployer] could not delete directory file:/C:/jboss/serv

er/resin/tmp/deploy/server/resin/deploy/interest.ear/76.interest.ear restart wil

l delete it

16:28:09,265 INFO [MainDeployer] Undeployed file:/C:/jboss/server/resin/deploy/

interest.ear

16:28:09,265 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss

/server/resin/deploy/interest.ear

16:28:09,265 INFO [EARDeployer] Init J2EE application: file:/C:/jboss/server/re

sin/deploy/interest.ear

16:28:09,280 ERROR [MBeanServerImpl] Unhandled exception instantiating class: or

g.jboss.management.j2ee.J2EEApplication

java.lang.NullPointerException

at org.jboss.mx.loading.UnifiedLoaderRepository.unsynchronize(UnifiedLoa

derRepository.java:254)

at org.jboss.mx.loading.UnifiedLoaderRepository.loadClass(UnifiedLoaderR

epository.java:157)

at org.jboss.mx.loading.UnifiedLoaderRepository.loadClass(UnifiedLoaderR

epository.java:595)

at javax.management.loading.DefaultLoaderRepository.loadClass(DefaultLoa

derRepository.java:48)

at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:

767)

at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:

212)

at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:

253)

at org.jboss.management.j2ee.J2EEApplication.create(J2EEApplication.java

:84)

at org.jboss.deployment.EARDeployer.init(EARDeployer.java:197)

at org.jboss.deployment.MainDeployer.init(MainDeployer.java:556)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:501)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)

at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)

at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

at $Proxy4.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen

tScanner.java:405)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS

canner.java:515)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

loop(AbstractDeploymentScanner.java:202)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

run(AbstractDeploymentScanner.java:191)

16:28:09,358 ERROR [MainDeployer] could not create deployment: njar:file:/C:/jbo

ss/server/resin/tmp/deploy/server/resin/deploy/interest.ear/77.interest.ear^/Reg

ion.jar

org.jboss.deployment.DeploymentException: Failed to load metadata; - nested thro

wable: (java.lang.NullPointerException)

at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:331)

at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)

at org.jboss.deployment.MainDeployer.create(MainDeployer.java:631)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)

at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)

at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

at $Proxy4.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen

tScanner.java:405)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS

canner.java:515)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

loop(AbstractDeploymentScanner.java:202)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

run(AbstractDeploymentScanner.java:191)

Caused by: java.lang.NullPointerException

at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:157)

at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:326)

... 15 more

16:28:09,374 ERROR [MainDeployer] could not create deployment: file:/C:/jboss/se

rver/resin/deploy/interest.ear

org.jboss.deployment.DeploymentException: Failed to load metadata; - nested thro

wable: (java.lang.NullPointerException)

at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:331)

at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)

at org.jboss.deployment.MainDeployer.create(MainDeployer.java:631)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)

at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)

at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

at $Proxy4.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen

tScanner.java:405)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS

canner.java:515)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

loop(AbstractDeploymentScanner.java:202)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

run(AbstractDeploymentScanner.java:191)

Caused by: java.lang.NullPointerException

at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:157)

at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:326)

... 15 more

16:28:09,999 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment

.scanner.URLDeploymentScanner$DeployedURL@435d0ec0{ url=file:/C:/jboss/server/re

sin/deploy/interest.ear, deployedLastModified=1038731095921 }

org.jboss.deployment.DeploymentException: Failed to load metadata; - nested thro

wable: (java.lang.NullPointerException)

at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:331)

at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)

at org.jboss.deployment.MainDeployer.create(MainDeployer.java:631)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)

at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)

at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

at $Proxy4.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen

tScanner.java:405)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS

canner.java:515)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

loop(AbstractDeploymentScanner.java:202)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

run(AbstractDeploymentScanner.java:191)

Caused by: java.lang.NullPointerException

at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:157)

at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:326)

... 15 more

zhengzhiyong
2002-12-12 11:40
banq兄,能不能看一下我的问题,谢了:)

zhengzhiyong
2002-12-12 11:40
说明一下,我的jboss和resin2.1.2集成的。

pigger
2002-12-12 17:46
老兄能不能看一看我的发布有啥毛病

server 是:jboss3.04,编了一个ejb(三个必要文件,一个ejb-jar.xml打包成一个jar文件)和一个测试客户端,把jar文件 发布到jboss的deploy目录下,并把client目录下的jar文件加到

classpath中,客户端如下:

package finCalc.stateless;

import java.util.Properties;

import javax.naming.Context;

import javax.naming.InitialContext;

import finCalc.stateless.*;

public class TestClient

{

// Test data

public static void main(String[] args)

{

try

{

Properties prop = new Properties();

prop.put(Context.INITIAL_CONTEXT_FACTORY,

"org.jnp.interfaces.NamingContextFactory");

prop.put(Context.PROVIDER_URL, "localhost:1099");

Context ctx = new InitialContext(prop);

Object objref = ctx.lookup("StatelessFinancialNeedCalculator");

FinancialNeedCalculatorHome home =

(FinancialNeedCalculatorHome)javax.rmi.

PortableRemoteObject.narrow(objref,

FinancialNeedCalculatorHome.class);

FinancialNeedCalculator calculator = home.create();

运行客户端,提示以下错误:

Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Log

ger

at org.jnp.interfaces.NamingContext.(NamingContext.java:92)

at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingConte

xtFactory.java:42)

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6

62)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243

)

at javax.naming.InitialContext.init(InitialContext.java:219)

at javax.naming.InitialContext.(InitialContext.java:195)

at finCalc.stateless.TestClient.main(TestClient.java:21)

我实在是没办法了,好几天了,大家帮个忙

banq
2002-12-12 22:41
回:前面一个兄弟

这个问题我也碰到过,但是一般重新启动就没有问题,我认为是自己的程序中有些问题。我没深入研究,sorry

回 后面一个兄弟:

你的问题已经提过,我给你回了,你查询一下

猜你喜欢