|
#1
|
|||
|
|||
|
Hi All,
When I use context scanning and deploy it on Jboss5. Spring somehow seem to have issue of finding the beans in the classpath. If the same war is dropped on Jboss 4.X it seems to Work just fine. I tried using the newer Spring3 - m3 as well with no luck. Any suggestions is appreciated. -Sundar Last edited by fatboysuns; May 7th, 2009 at 06:35 PM. |
|
#2
|
|||
|
|||
|
Quote:
Solution is to get the knowledge about jboss5 web app class loaders management and perform necessary configuration changes. For more details about components scanning implementation you can check org.springframework.context.annotation.ClassPathBe anDefinitionScanner.doScan()
__________________
http://denis-zhdanov.blogspot.com |
|
#3
|
|||
|
|||
|
This could lead to unexpected issues when migrating to jboss 5. Could you also register a JIRA issue so that the spring guys can look into it for Spring 3.
__________________
Marten Deinum
Blog Use the [ code ] tags, young padawan |
|
#4
|
|||
|
|||
|
Hi Denis,
I did look into the doScan method. Whats happened with the new microkernel of jboss is that, instead of the classloader pointing to tmp/deploy/***war folder, it now points to server default deploy folder because of which the classLoader.get*** dont find anything and the "beanCountAtScanStart" seems to be zero. Marten , There might already be a Jira for this I guess from this article. http://daniel.gredler.net/2009/01/10...ring-256-boom/ Could you lemme know where i can post a Jira if there isnt one already. I am definitely looking forward to this being fixed in Spring 3. Thanks for your support. Appreciate your work Sundar |
|
#5
|
|||
|
|||
|
This is the jira mentioned in the article
http://jira.springframework.org/brow...l#action_41972 It is related to EJB3 though. Could you lemme know if I should create another one please? |
|
#6
|
|||
|
|||
|
Quote:
Hi sundar, I am also getting the exactly same problem , I am using spring3.0 and JBOSS5.1.0 , but it's not working, it works fien on tomcat, please could you help me ASAP. Bhavesh |
|
#7
|
|||
|
|||
|
Any news on this problem?
I'm also having problems deploying a war to JBoss 5.1.0.GA that contains Spring for component scanning. I've read this blog http://daniel.gredler.net/2009/01/10...ring-256-boom/ and also this issue http://jira.springframework.org/browse/SPR-5120 and also tried to use Spring 3.0.0.RELEASE, but I still get the same error: 09:23:33,003 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@3095915...y/test-web.war/} 09:23:33,004 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@3095915...y/test-web.war/} 09:23:33,004 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@3095915...y/test-web.war/} 09:23:33,048 INFO [EjbDeployer] installing bean: ejb/#SequenceGenerator,uid8888655 09:23:33,048 INFO [EjbDeployer] with dependencies: 09:23:33,048 INFO [EjbDeployer] and supplies: 09:23:33,049 INFO [EjbDeployer] jndi:SequenceGenerator 09:23:33,049 INFO [EjbDeployer] installing bean: ejb/#Sequence,uid17064588 09:23:33,049 INFO [EjbDeployer] with dependencies: 09:23:33,049 INFO [EjbDeployer] and supplies: 09:23:33,049 INFO [EjbDeployer] jndi:Sequence 09:23:34,067 ERROR [AbstractKernelController] Error installing to Configured: name=jboss.j2ee:module="test-web.war",service=EjbModule state=Instantiated mode=Manual requiredState=Configured java.lang.RuntimeException: Exception setting attribute WebServiceName on mbean jboss.j2ee:service=EjbModule,module="test-web.war" at org.jboss.system.ServiceConfigurator.configure(Ser viceConfigurator.java:170) at org.jboss.system.ServiceConfigurator.configure(Ser viceConfigurator.java:114) at org.jboss.system.microcontainer.ConfigureAction.in stallAction(ConfigureAction.java:58) at org.jboss.system.microcontainer.ConfigureAction.in stallAction(ConfigureAction.java:42) at org.jboss.dependency.plugins.action.SimpleControll erContextAction.simpleInstallAction(SimpleControll erContextAction.java:62) at org.jboss.dependency.plugins.action.AccessControll erContextAction.install(AccessControllerContextAct ion.java:71) at org.jboss.dependency.plugins.AbstractControllerCon textActions.install(AbstractControllerContextActio ns.java:51) at org.jboss.dependency.plugins.AbstractControllerCon text.install(AbstractControllerContext.java:348) at org.jboss.system.microcontainer.ServiceControllerC ontext.install(ServiceControllerContext.java:286) at org.jboss.dependency.plugins.AbstractController.in stall(AbstractController.java:1631) at org.jboss.dependency.plugins.AbstractController.in crementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.re solveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.re solveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.ch ange(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.ch ange(AbstractController.java:553) at org.jboss.system.ServiceController.doChange(Servic eController.java:688) at org.jboss.system.ServiceController.install(Service Controller.java:274) at org.jboss.system.deployers.ServiceDeployer.deploy( ServiceDeployer.java:90) at org.jboss.system.deployers.ServiceDeployer.deploy( ServiceDeployer.java:46) at org.jboss.deployers.spi.deployer.helpers.AbstractS impleRealDeployer.internalDeploy(AbstractSimpleRea lDeployer.java:62) at org.jboss.deployers.spi.deployer.helpers.AbstractR ealDeployer.deploy(AbstractRealDeployer.java:50) at org.jboss.deployers.plugins.deployers.DeployerWrap per.deploy(DeployerWrapper.java:171) at org.jboss.deployers.plugins.deployers.DeployersImp l.doDeploy(DeployersImpl.java:1439) at org.jboss.deployers.plugins.deployers.DeployersImp l.doInstallParentFirst(DeployersImpl.java:1157) at org.jboss.deployers.plugins.deployers.DeployersImp l.doInstallParentFirst(DeployersImpl.java:1178) at org.jboss.deployers.plugins.deployers.DeployersImp l.install(DeployersImpl.java:1098) at org.jboss.dependency.plugins.AbstractControllerCon text.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.in stall(AbstractController.java:1631) at org.jboss.dependency.plugins.AbstractController.in crementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.re solveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.re solveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.ch ange(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.ch ange(AbstractController.java:553) at org.jboss.deployers.plugins.deployers.DeployersImp l.process(DeployersImpl.java:781) at org.jboss.deployers.plugins.main.MainDeployerImpl. process(MainDeployerImpl.java:702) at org.jboss.system.server.profileservice.repository. MainDeployerAdapter.process(MainDeployerAdapter.ja va:117) at org.jboss.system.server.profileservice.hotdeploy.H DScanner.scan(HDScanner.java:362) at org.jboss.system.server.profileservice.hotdeploy.H DScanner.run(HDScanner.java:255) at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndRe set(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(Future Task.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$101(ScheduledThreadPoolE xecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.runPeriodic(ScheduledThreadPool Executor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(ScheduledThreadPoolExecutor .java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: javax.management.InvalidAttributeValueException: Set attribute has class class javax.management.ObjectName loaded from null that is not assignable to attribute class class javax.management.ObjectName loaded from BaseClassLoader@178069d{vfszip:/opt/...y/test-web.war/} This is really a blocker for me, any workaround that could help me? I have tried to depend on the jboss-as-sprint-int, as it's told to solve the problems, but by just adding it as a dependency sure didn't work: http://anonsvn.jboss.org/repos/repos...t-5.0.1.GA.pom Any help would be appreciated
|
![]() |
| Tags |
| component-scan, context scan, context:component-scan |
| Thread Tools | |
| Display Modes | |
|
|