Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Weld Users Forum ListTopic List
27. May 2009, 16:15 America/New_York | Link

I can't tell if this belongs in the JBoss As 5 forum or not. But let's throw it here and see what happens.

I get the following exception during deployment. I do have webbeans in my archive (the ejb jar) but no beans.xml. I don't particularly see a reason why it would be failing. Maybe I should update the webbeans impl? Any ideas how? Thanks!

09:58:55,864 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying: vfszip:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear/
	at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:136)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployerWithInput.deploy(AbstractRealDeployerWithInput.java:125)
	at org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.deployComponents(AbstractComponentDeployer.java:102)
	at org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.internalDeploy(AbstractComponentDeployer.java:82)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.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.java:117)
	at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
	at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
	at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
	at org.jboss.Main.boot(Main.java:221)
	at org.jboss.Main$1.run(Main.java:556)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: Exception loading class for ScopeKey addition.
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:67)
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
	... 34 more
Caused by: java.lang.ClassNotFoundException: org.jboss.webbeans.bootstrap.WebBeansBootstrap from BaseClassLoader@54012da5{VFSClassLoaderPolicy@195bd6b9{name=vfszip:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear/ domain=ClassLoaderDomain@34883357{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@761a626f} roots=[MemoryContextHandler@1550719152[path= context=vfsmemory://4sg3s5y-fpl3q6-fv83pc2k-1-fv83pwcl-2n real=vfsmemory://4sg3s5y-fpl3q6-fv83pc2k-1-fv83pwcl-2n], DelegatingHandler@1075247672[path=ImageServer.ear context=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ real=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear], DelegatingHandler@612733799[path=ImageServer.ear/imageserver-ejb.jar context=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ real=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear/imageserver-ejb.jar]]  delegates=null exported=[web.images.server.web, web.images.db, web.images.utils, web.images.server.utils, web.images.db.dao, META-INF] <IMPORT-ALL>NON_EMPTY}}
	at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:63)
	... 35 more
09:58:56,157 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS IN ERROR:
  Deployment "vfszip:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear/" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.webbeans.bootstrap.WebBeansBootstrap from BaseClassLoader@54012da5{VFSClassLoaderPolicy@195bd6b9{name=vfszip:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear/ domain=ClassLoaderDomain@34883357{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@761a626f} roots=[MemoryContextHandler@1550719152[path= context=vfsmemory://4sg3s5y-fpl3q6-fv83pc2k-1-fv83pwcl-2n real=vfsmemory://4sg3s5y-fpl3q6-fv83pc2k-1-fv83pwcl-2n], DelegatingHandler@1075247672[path=ImageServer.ear context=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ real=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear], DelegatingHandler@612733799[path=ImageServer.ear/imageserver-ejb.jar context=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ real=file:/opt/jboss/jboss-5.1.0.GA/server/all/deploy/ImageServer.ear/imageserver-ejb.jar]]  delegates=null exported=[web.images.server.web, web.images.db, web.images.utils, web.images.server.utils, web.images.db.dao, META-INF] <IMPORT-ALL>NON_EMPTY}}

19 Replies:
28. May 2009, 12:12 America/New_York | Link

We'll have to check with Pete if he has updated the deployers for 5.1

 

If a man speaks in the forest and there is no woman around to hear him, is he still wrong?

28. May 2009, 13:16 America/New_York | Link

It was working fine in CR1 as a pure WAR deployment (without a webbeans rebuild). Let me try to make it a WAR file instead of an EAR and see what happens. Also, would it be getting confused because my single jar file has persistence in it as well?

01. Jun 2009, 13:57 America/New_York | Link

so apparently the issue was that I was missing commons-digester. I only got that error once I converted to war deployment and tried to deploy. weird that ear deployment didn't give that error.

01. Jun 2009, 14:05 America/New_York | Link

apparently, I get to eat my words. Still not deploying as an ear. grrr.

01. Jun 2009, 16:05 America/New_York | Link

It looks like there's some discrepancies in where to put beans.xml depending on your deployment type.

For war file, it has to be WEB-INF. It cannot be in a JAR file. That seems annoying, especially if I'm trying to make something that can run on multiple containers.

For EJB, it seems like it has to be in the ejb module. I guess you can only have 1 ejb module in this case?

01. Jun 2009, 16:53 America/New_York | Link
John Ament wrote on Jun 01, 2009 16:05:
It looks like there's some discrepancies in where to put beans.xml depending on your deployment type. For war file, it has to be WEB-INF. It cannot be in a JAR file. That seems annoying, especially if I'm trying to make something that can run on multiple containers. For EJB, it seems like it has to be in the ejb module. I guess you can only have 1 ejb module in this case?

You can put beans.xml in any jar or war that you want 299-enabled. If this isn't the case, please file an issue in JIRA.

You saying I do have webbeans in my archive (the ejb jar) but no beans.xml. concerns me somewhat. Do you mean you have the Web Beans jars in the archive? This doesn't work.

 

Read about how to report a bug.

01. Jun 2009, 17:23 America/New_York | Link

Pete,

I haven't fully tested it, as I've got a few oddities I'm seeing. So far, I haven't gotten an ear deployment to work, and looking at the examples it appears that the examples show it in META-INF for the JAR file. If I can confirm I'll file a JIRA.

As for what I have, no I'm not including the jar files. Sorry it wasn't clear, just meant that I have classes that are decorated.

02. Jun 2009, 13:36 America/New_York | Link

Just reading this line over again. and looking at my other issue(s)...

You can put beans.xml in any jar or war that you want 299-enabled. If this isn't the case, please file an issue in JIRA.

But then, what about ear files? Where should the beans.xml file go? or does it have to go into each JAR file i create and each war file i create?

02. Jun 2009, 18:06 America/New_York | Link

So, i guess that was the issue, at some level or another.

I added beans.xml to both WEB-INF in my war and META-INF in my jar. I have a feeling only the JAR one is required.

That still didn't work 100%. I got back to my other error about improper dependencies. I converted by DAOs to stateful EWB's and that allowed everyting to run correctly. Very, very weird. Is that the expected behavior?

02. Jun 2009, 18:51 America/New_York | Link
But then, what about ear files? Where should the beans.xml file go? or does it have to go into each JAR file i create and each war file i create?

Into every one that has beans you want to inject using 299.

 

Learn more about Weld...

02. Jun 2009, 18:58 America/New_York | Link
Do you mean you have the Web Beans jars in the archive? This doesn't work.

Yeah, you can't package jars inside of other jars, not even EJB jars.

You can only package them in the lib dir of an ear or the WEB-INF/lib dir of a war.

 

Learn more about Weld...

03. Jun 2009, 03:51 America/New_York | Link

like I said, i was by no means trying to introduce some kind of odd packaging strategy.

anyways, is the behavior i got expected? why do my DAOs need to be EWB if they're being injected into other beans, instead of into a JSF view?

05. Jun 2009, 17:15 America/New_York | Link

Right, but you can't put Web Beans itself in the WAR or the EAR if you are using something like JBoss AS, which has Web Beans built in.

 

Read about how to report a bug.

05. Jun 2009, 17:18 America/New_York | Link

But, I'm not attempting to do that at all. I think we need to come up with a good name for the individual Beans that get managed by the JCDI container.

06. Jun 2009, 23:52 America/New_York | Link

What about beans? ;-)

 

Read about how to report a bug.

08. Jun 2009, 01:20 America/New_York | Link

beans or components. Every JavaBean or EJB is a bean or component, no? or how bout module (which may consist of one or more components or beans)?

Modular programming is a software design technique that increases the extent to which software is composed from separate parts, called modules. Conceptually, modules represent a separation of concerns, and improve maintainability by enforcing logical boundaries between components. Modules are typically incorporated into the program through interfaces. A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are visible to other modules. The implementation contains the working code that corresponds to the elements declared in the interface.

source

 

required reading: Scala and more Scala... www.artima.com

08. Jun 2009, 02:42 America/New_York | Link

modules don't fit, a module's generally bigger than 1 class.

beans seem awkward; and over used, since there's lots of beans in the various java editions. plus, it confused our WSA's when i said it.

i'm inclined to say an Injectable Bean (iBean) or Contextual Bean (CB) might describe them better.

08. Jun 2009, 14:18 America/New_York | Link

My vote goes to COCO - Contextual Component. In JCDI4EE, every POJO is a COCO ;-)

 

If a man speaks in the forest and there is no woman around to hear him, is he still wrong?

08. Jun 2009, 16:02 America/New_York | Link
Nicklas Karlsson wrote on Jun 08, 2009 14:18:
My vote goes to COCO - Contextual Component. In JCDI4EE, every POJO is a COCO ;-)

+1

 
Clint Popetz
http://42lines.net
Scalable Web Application Development