[JBoss Seam] - RuntimeException when deploying
by codest
Hi Folks!
I'm new to Seam/EJB/JBoss, but pretty enthuasiastic for what I've seen so far. Please forgive if this might be an easy question, but I've searched around and found nothing on the web or in the forums. Additionally, I'm not sure that I understood everything (components and their dependencies) correctly.
I'm getting this error message on the console while I'm trying to deploy my project:
| 12:53:33,015 INFO [EARDeployer] Init J2EE application: file:/home/joerg/jboss-4.0.4.GA/server/default/deploy/easyCV.ear
| 12:53:34,590 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.logic.InterviewAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@a594e1
| 12:53:34,705 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.logic.WelcomeAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@7a6c34
| 12:53:34,718 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.logic.profile.KurzprofilAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@5292e6
| 12:53:34,731 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.model.profile.CVProfile org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@75d65c
| 12:53:34,841 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.model.profile.categories.KurzprofilItem org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@14174f9
| 12:53:34,968 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=easyCV.jar
| java.lang.RuntimeException: bean class has no local, webservice, or remote interfaces defined and does not implement at least one business interface
| at org.jboss.ejb3.ProxyFactoryHelper.getLocalInterfaces(ProxyFactoryHelper.java:105)
| at org.jboss.ejb3.ProxyDeployer.initializeLocalBindingMetadata(ProxyDeployer.java:117)
| at org.jboss.ejb3.SessionContainer.instantiated(SessionContainer.java:71)
| at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:573)
| at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:555)
| at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:536)
| at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:508)
| at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:463)
| at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:125)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.create(Unknown Source)
| ...
|
My question: Is there a way to find out to which bean class the message is refering to? This would make it a lot easier to dig deeper.
The last thing I did (as far as I remember) was introducing a SFSB:
| @Stateful
| @Name("CVProfile")
| public class CVProfile implements Serializable, CVProfileInterface {
|
with the following interface:
| @Local
| public interface CVProfileInterface {
|
| public abstract int getCurrentRevision();
| public abstract void addCategory(Category cat);
| public abstract Category getCategory(String name);
| public abstract void destroy();
|
| }
|
But I'm not sure if this is somehow connected to the error. Fact is: The application gets deployed, but it cannot build the first view. Trying to access it from a browser brings:
13:11:12,323 ERROR [STDERR] 03.12.2006 13:11:12 com.sun.facelets.FaceletViewHandler handleRenderException
| SCHWERWIEGEND: Error Rendering View[/home.xhtml]
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: interview
| at org.jboss.seam.Component.newInstance(Component.java:735)
| at org.jboss.seam.Component.newInstance(Component.java:1308)
| at org.jboss.seam.Component.getInstance(Component.java:1263)
| at org.jboss.seam.Component.getInstance(Component.java:1246)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
| at org.apache.myfaces.renderkit.RendererUtils.getObjectValue(RendererUtils.java:195)
| at org.apache.myfaces.renderkit.RendererUtils.getBooleanValue(RendererUtils.java:152)
| at org.apache.myfaces.renderkit.html.HtmlCheckboxRendererBase.encodeEnd(HtmlCheckboxRendererBase.java:60)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
| at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
| at org.apache.myfaces.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:62)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderHeaderOrFooter(HtmlGridRendererBase.java:127)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:83)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:554)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.naming.NameNotFoundException: easyCV not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.seam.Component.instantiate(Component.java:774)
| at org.jboss.seam.Component.newInstance(Component.java:731)
| ... 54 more
|
But I didn't change the interview component since it ran fine, so I think this is a consequence from the first error...
Another question that arose: When I'm using own classes (let's say MyClass) as type for attributes in CVProfile (the implementation), does MyClass have to be a component (having a @Name tag, interface...)? This is where I'm a bit confused about which things need to have Seam tags or interfaces.
Thanks a lot in advance for you help!
Regards,
Jörg
PS: If you need further information, please tell me. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990792#3990792
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990792
18 years, 1 month
[JBoss Portal] - Re: Problem with HelloWorld IPC sample
by joe_the_quick
hi there,
I have faced the same issue as you do.
The quick solution:
Look into the Jboss Portal Reference Guide 2.6 (http://docs.jboss.com/jbportal/v2.6/reference-guide/en/html_single/#ipc). There you find the correct link to the HelloWorldIPC sample:
http://anonsvn.jboss.org/repos/portletswap/portlets/2_4/bundles/HelloWorl...
I've tested the included SAR-File helloworldipcportlet.sar with Jboss-Portal-2.4.0 and it works immediately, no exceptions show up in the log file. In fact, this is really a nice feature to have.
Issues I've found:
Regarding Jboss Portal 2.2.1:
The provided HelloWorldIPC sample mentioned in the Reference Doc (http://labs.jboss.com/file-access/default/members/portletswap/downloads/p...) does not work with Jboss Portal 2.2.1 SP3.
You get the following exception:
java.lang.NoSuchMethodError: org.jboss.portlet.event.node.WindowActionEvent.getParameters()Lorg/jboss/portal/server/util/Parameters;
org.jboss.portlet.hello.HelloWorldPortletB$Listener.onEvent(Unknown Source)
It seems that the sample requires a method which has not been implemented in Jboss-Portal-2.2.1.
I've inspected the source and found that WindowActionEvent derives from WindowEvent, which supports HashMap getParameters(), but not Parameters getParameter(). This is probably the reason, but I don't know how to fix.
Regarding Jboss Portal 2.4-documentation:
However, the IPC chapter has been (apparently accidentally) completely removed from the Jboss Portal 2.4-documentation (http://docs.jboss.com/jbportal/v2.4/reference-guide/en/html_single/#ipc), althougth IPC is mentioned in the feature list at the beginning.
Regarding Jboss Portal 2.6DR:
The sample of HelloWorldIPC for 2.4 works, but only after deployed HOT. If you deploy it before startup, there are definitely lots of classloading-related exceptions.
best regards,
johannes
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990790#3990790
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990790
18 years, 1 month
[JBoss Seam] - Re: Oracle ADF
by lowecg2004
khaliq/Nusa,
I am also getting the cast exception. I was able to create a regular JSF managed bean and bind/cast to it just fine however, binding to a Seam component caused the cast exception:
Caused by: java.lang.ClassCastException: org.apache.myfaces.trinidad.component.core.data.CoreTable cannot be cast to org.apache.myfaces.trinidad.component.core.data.CoreTable
I can only speculate at this point, but I assume it's something to do with AOP mechanisms changing something about the class during the binding process. Generally in Seam one would be injecting classes based on interfaces or entity beans rather than 'raw' object instance. I would appreciate it if someone could explain what's going on here or direct me to some further reading.
The reason I was binding the table to the Seam component was to get a handle on the component before render response so that I could initialise row selection for the <tr:table ... rowSelection="single"> mode. This requires direct access to the component instance after it has been bound to its data. From what I can tell, my efforts were in vein due to the life cycle of Facelets:
* BEFORE_RENDER_RESPONSE event fired;
* facelets build process starts, binding to my seam component occurs;
* getter is called for the component;
* data model factory is called;
* AFTER_RENDER_RESPONSE event fired;
Basically, the last possible hook into this process (that I could find) was with the getter for the component or even the data model factory (yuk!). Since the actual data model binding occurs after this, there is nothing that I can use to set the selected row keys.
As a general comment, I have been able to do this sort of processing easily under the Java Studio Creator 2 application model using the prerender() method on my backing beans. This is essentially a hook invoked during the BEFORE_RENDER_RESPONSE phase. With this in mind, I tried experimenting with Seam "org.jboss.seam.beforePhase" event but this is fired before facelets even starts building its tree. I understand that the JSC2 approach and the facelets approach are very different, but it does seem odd that there is no way to get at the underlying JSF components before they are rendered. I assume that facelets tree is built during this phase? Or perhaps (probably) I'm missing something, but I have searched for the best part of a day on this and not come across anything.
C.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990788#3990788
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990788
18 years, 1 month