[EJB/JBoss] - standardjboss.xml configuration issue
by 1javaloverS
Hello all,
I have an enterprise archive deployed in my JBoss. This "ear" is having two "jar" files inside with individual "ejb-jar.xml" files for each of them. And I have configured an EJB reference in my "standardjboss.xml" to refer one of my EJBs to an enternal EJB running on a different JBoss server, as follows.
<enterprise-beans>
| <session>
| <ejb-name>MyLocalEJB</ejb-name>
| <ejb-ref>
| <ejb-ref-name>ejb/MyRemoteEJB</ejb-ref-name>
| <jndi-name>jnp://192.118.18.4:1099/ejb/MyRemoteEJB</jndi-name>
| </ejb-ref>
| </session>
| </enterprise-beans>
But this is showing the following error while starting the Jboss and not deploying my EJB.
| 2007-11-11 12:12:21,734 ERROR [org.jboss.metadata.XmlFileLoader] failed to load standardjboss.xml. There could be a syntax error.
| org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean MyLocalEJB: found in jboss.xml but not in ejb-jar.xml
| at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMetaData.java:764)
| at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:158)
| at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:462)
I doesn't have any "jboss.xml" file present anywhere in my enterprise archive file at all.
Is there any requirement for JBoss that an EJB configured in "standardjboss.xml" should have an entry in all "ejb-jar.xml" files of the deploying enterprise archive ?
My JBoss version is 3.2.7.
I will be so thankful to you all for any type of help regarding this.
With regards,
Manoj.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105972#4105972
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105972
18 years, 8 months
[JBoss Seam] - Re: MDB initialized too early?
by svadu
Thanks for the quick response! Here are the sources (I had to 'censor' it for obvious reasons):
MDB:
@MessageDriven(name = "Processor", activationConfig = {
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "myqueue"),
| @ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue="java:/TIBCOJMSProvider")
| })
| public class Receiver implements MessageListener {
|
| @Resource
| private MessageDrivenContext context;
|
| /**
| * Controller does the actual processing
| * of the incoming message
| */
| @EJB
| private Creator creator;
|
| /**
| * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
| */
| public void onMessage(Message msg) {
| try {
| TextMessage txtMsg = (TextMessage)msg;
| String text = txtMsg.getText();
| creator.process(text);
| } catch (JMSException e) {
| e.printStackTrace();
| context.setRollbackOnly();
| } catch (ValidationException e) {
| e.printStackTrace();
| context.setRollbackOnly();
| }
| }
|
| /**
| * @param creator the controller to set
| */
| public void setCreator(Creator creator) {
| this.creator = creator;
| }
|
| /**
| * @param context the context to set
| */
| public void setContext(MessageDrivenContext context) {
| this.context = context;
| }
|
| }
|
SLSB Local interface:
| @Local
| public interface Creator {
|
| /**
| * Processed an incoming message bus from a message bus
| * and stores it in database.
| *
| * @param text
| * @throws ValidationException
| * @return an instance of saved entity
| */
| public Entiteit process(String text) throws ValidationException;
|
| /**
| * Sets entity manager
| * @param em
| */
| public void setDatabase(EntityManager em);
|
| /**
| * Retrieves entity manager
| * @return entity manager instance
| */
| public EntityManager getDatabase();
|
| }
SLSB itself:
| /**
| * Processes entities
| *
| */
| @Stateless
| @Name("Creator")
| public class CreatorBean implements Creator {
|
| private EntityManager em;
|
| /**
| * Sets entity manager
| * @param em
| */
| @PersistenceContext
| public void setDatabase(EntityManager em){
| this.em = em;
| }
|
| /**
| * Retrieves entity manager
| * @return entity manager instance
| */
| public EntityManager getDatabase() {
| return this.em;
| }
|
| /**
| * Processes the entities from xml and stores it in database.
| * It also performs checking on existing records end replaces them if found.
| * @throws ValidationException
| */
| public Entiteit process(String xmlText) throws ValidationException {
| Entiteit en = null;
|
| try {
| IBindingFactory bfact = BindingDirectory.getFactory(Entiteit.class);
| IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
|
| StringReader sr = new StringReader(xmlText);
|
| en = (Entiteit) uctx.unmarshalDocument( sr, null);
|
| em.persist(en);
|
|
| } catch (JiBXException e) {
| throw new ValidationException("Error processing incoming entity", e);
| }
|
| return en;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105970#4105970
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105970
18 years, 8 months
[JBoss Seam] - CLUSTER wide EJBException: Invalid (i.e. remote) invocation
by fguerzoni
Seam 2.0.0.GA
JBoss 4.2.2.GA
Win xp
Hi,
I managed to run a cluster with 2 nodes using:
- Apache (mod_jk) as load balancer
- Tomcat and JBoss in bundle.
All goes very well if I use session context Java beans which replicate their state in cluster. By the way: GREAT WORK!
The problems arise when I try to use session EJB3 (both stateful and stateless) instead of Java beans.
I got the following exception
anonymous wrote : javax.ejb.EJBException: Invalid (i.e. remote) invocation of local interface (null container)
because the proxy uses the remote interface to call the bean.
I've declared bean interfaces as local in components.xml. So the exception.
I think that the problem is load balancing.
If an Ejb client uses its proxy to do balancing it obviously needs to call remote interfaces.
But when I delegate load balancing to external, when the Tomcat instance is called then next jboss bean calls should always be local, as declared in components.xml and for performance reasons.
I'm no able to manage the whole system to do that.
Is it possible? I think so.
I'd like to use Ejb3 for performance reason. I read that that they are more optimized than pojo bean. Is this still true?
What about the passivation of Java beans? Do they scale well when server load increase? Passivation is an Ejb feature. I don't know if java beans have passivation too.
Here is my stack trace
anonymous wrote : type Exception report
|
| message
|
| description The server encountered an internal error () that prevented it from fulfilling this request.
|
| exception
|
| javax.servlet.ServletException: /workspace.xhtml: Error reading 'progr' on type org.javassist.tmp.java.lang.Object_$$_javassist_0
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| cbi.filters.compression.GZIPFilter.doFilter(GZIPFilter.java:19)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| root cause
|
| javax.el.ELException: /workspace.xhtml: Error reading 'progr' on type org.javassist.tmp.java.lang.Object_$$_javassist_0
| com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
| com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
| com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
| javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
| com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| cbi.filters.compression.GZIPFilter.doFilter(GZIPFilter.java:19)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| root cause
|
| javax.ejb.EJBException: Invalid (i.e. remote) invocation of local interface (null container) for jboss.j2ee:ear=CBI_FE.ear,jar=CBI_FE.jar,name=WorkspaceActionBean,service=EJB3,VMID=f0ed2a6d7fb07688:7df1788e:1164e177b30:-7ffc
| org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:116)
| $Proxy347.getProgr(Unknown Source)
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:40)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
| org.javassist.tmp.java.lang.Object_$$_javassist_0.getProgr(Object_$$_javassist_0.java)
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
| javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
| org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
| org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| com.sun.facelets.el.ELText$ELTextVariable.writeText(ELText.java:184)
| com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
| com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
| com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
| com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
| javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
| com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| cbi.filters.compression.GZIPFilter.doFilter(GZIPFilter.java:19)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105969#4105969
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105969
18 years, 8 months