[Design of POJO Server] - Scoping of war/jar file embedded in sar service archives
by adinn
I just identified an 'interesting' change in processing of sar files between AS 4.X/5.0.BetaX and As 5.0.CR1. Here's the setup:
I have a sar which embeds 8 different wars. The listeners configured in the respective web.xml files are implemented in 8 different jars also embedded in the sar. All of the listeners refer to a class Sequencer which is supplied in one of the 8 embedded jars. This class is used to sequence callbacks registered by the lsiteners (I know, I could probably do this using a jboss web.xml but that's another story and besides ...)
In the old AS versions the listeners all saw the same copy of class Sequencer. Ok, specifically, modifications to static data defined by this class were visible to all listeners so I guess that means they are using the same class. In 5.0.CR1 they all get their own copy of the class -- well at least I assume that is what is happening. What I have observed is that they are all seeing their own version of the static fields of Sequencer.
So that kind of snookers my sequencing code. Rather a drastic change to the semantics I feel. Any comments on whether this was intended or accidental? Can we go back to the previous behaviour?
.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162143#4162143
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162143
15 years, 10 months
[Design of Security on JBoss] - NullPointerException in JavaEEComponentHelper with JBoss-5.0
by jimmycallaghan
Well it's official. I've now posted more to the forum in two days than I have in the last 2 years. Sorry to bug you guys again but there's not too much help out there yet on JBoss.CR1. Hope my posts, and your fine solutions, help people in the future.
Anyway, I'm still having problems deploying. My EARs all deploy fine to JBoss5 Beta4 but I'm getting the following stack trace when deploying to JBoss5 CR1.
15:06:22,674 DEBUG [Ejb3Deployer] Error during deploy: vfszip:/home/jim/messaging-platform/jboss-5.0.0.CR1/server/custom1/deploy/webs/10.mpee.local.20080702.1514.ear
| org.jboss.deployers.spi.DeploymentException: Error deploying 10.mpee.local.20080702.1514.ear: null
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:192)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:95)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:257)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:135)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:544)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NullPointerException
| at org.jboss.ejb3.javaee.JavaEEComponentHelper.createObjectName(JavaEEComponentHelper.java:46)
| at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:167)
| at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:384)
| at org.jboss.ejb3.EJBContainer.resolveEjbContainer(EJBContainer.java:1324)
| at org.jboss.injection.AbstractHandler.addDependency(AbstractHandler.java:50)
| at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandler.java:143)
| at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemoteHandler.java:371)
| at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:162)
| at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:199)
| at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:563)
| at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:392)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:505)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:185)
| ... 21 more
I don't really have much more than I can add to this because I'm not really told much more in the log. I've set logging so that "org.jboss" is at DEBUG and I do have a lot of other logging but nothing that seems to relate to this issue.
I've checked out the source of the JavaEEComponentHelper class:
public static String createObjectName(JavaEEModule module, String unitName, String ejbName)
| {
| // TODO: currently it's only for EJB3 service
| StringBuilder sb = new StringBuilder(Ejb3Module.BASE_EJB3_JMX_NAME + ",");
| JavaEEApplication ear = module.getApplication();
| if (ear != null)
| {
| sb.append("ear=");
| sb.append(ear.getName());
| sb.append(",");
| }
| sb.append("jar=");
| sb.append(unitName);
| sb.append(",name=");
| sb.append(ejbName);
| try
| {
| ObjectName on = new ObjectName(sb.toString());
| return on.getCanonicalName();
| }
| catch (MalformedObjectNameException e)
| {
| throw new RuntimeException(e);
| }
| }
So I believe that the JavaEEModule object that is being passed in must be null. Unfortunately I can't see where this module name is set. Is it part of the WAR or maybe an entry in application.xml?
Again, any insight is very much appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162101#4162101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162101
15 years, 10 months