[Design of EJB 3.0] - Deploying EJB 3.0 on Jbos 4.0.4GA
by carthiq
I am trying to deploy EJB 3.o on Jboss 4.0.4 after upgrading with jboss-EJB-3.0_RC9_Patch_1 (Windows), I followed the steps mentioned in the installation guide. After that when I try to deploy my application with following ejb-jar.xml file it throws error
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
</ejb-jar>
Error
2007-11-03 11:41:19,687 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
2007-11-03 11:41:19,687 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2007-11-03 11:41:19,687 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2007-11-03 11:41:19,687 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/D:/Jboss/jboss-4.0.4.GA/server/default/deploy/first-ejb3-tutorial.jar/
org.jboss.deployment.DeploymentException: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!
at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:339)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:166)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:99)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
Can anybody help to solve this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110083#4110083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110083
17 years
[Design of EJB 3.0] - Re: Empty @Remote on bean class
by ALRubinger
I've taken the related JIRA issue, JBCTS-719, and will make a corresponding issue to address the same problem in the EJB3 Testsuite.
"EJB3 Core Specification 4.6.6 Bullet 5.6" wrote : If bean class implements a single interface, that interface is assumed to be the business interface of the bean. This business interface will be a local interface unless the interface is designated as a remote business interface by use of the Remote annotation on the bean class or interface or by means of the deployment descriptor.
I believe the code's in place in EJB3 Core to handle this case; we recently had a problem where the default business interface could not be determined due to duplicate occurances of the same interface ( http://jira.jboss.com/jira/browse/EJBTHREE-1124 ). Error there was:
java.lang.RuntimeException: Use of empty @Remote on bean test-bean-for-stateful with more than one default interface [interface com.whatever.Interface1, interface com.whatever.Interface1] at org.jboss.ejb3.ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(ProxyFactoryHelper.java:591)
I've not yet seen this error from the annotation processor. Will post back if I can duplicate in EJB3 Unit Tests.
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110069#4110069
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110069
17 years
[Design of EJB 3.0] - Empty @Remote on bean class
by scott.stark@jboss.org
The following exception is showing up in cts tests. How should this be resolved?
| Caused by: java.lang.IllegalArgumentException: Empty @Remote on bean class com.sun.ts.tests.ejb30.common.equals.TestBean is not allowed
| at org.jboss.metadata.annotation.creator.ejb.RemoteProcessor.process(RemoteProcessor.java:72)
| at org.jboss.metadata.annotation.creator.ejb.RemoteProcessor.process(RemoteProcessor.java:40)
| at org.jboss.metadata.annotation.creator.AbstractComponentProcessor.processClass(AbstractComponentProcessor.java:240)
| at org.jboss.metadata.annotation.creator.AbstractComponentProcessor.processClass(AbstractComponentProcessor.java:208)
| at org.jboss.metadata.annotation.creator.ejb.AbstractEnterpriseBeanProcessor.process(AbstractEnterpriseBeanProcessor.java:98)
| at org.jboss.metadata.annotation.creator.ejb.AbstractEnterpriseBeanProcessor.process(AbstractEnterpriseBeanProcessor.java:50)
| at org.jboss.metadata.annotation.creator.ejb.EjbJar30Creator.create(EjbJar30Creator.java:68)
| at org.jboss.deployment.AnnotationMetaDataDeployer.processJBossMetaData(AnnotationMetaDataDeployer.java:182)
| at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:153)
| at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:78)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| ... 64 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110060#4110060
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110060
17 years
[Design of EJB 3.0] - Jndi bindings
by scott.stark@jboss.org
Related to JBCTS-718, what bindings are supposed to exist for a bean with an ejb-jar.xml entry like:
| <session>
| <ejb-name>RemoveBean</ejb-name>
| <home>com.sun.ts.tests.ejb30.common.migration.twothree.TwoRemoteHome</home>
| <remote>com.sun.ts.tests.ejb30.common.migration.twothree.TwoRemoteIF</remote>
| <local-home>com.sun.ts.tests.ejb30.common.migration.twothree.TwoLocalHome</local-home>
| <local>com.sun.ts.tests.ejb30.common.migration.twothree.TwoLocalIF</local>
| <business-local>com.sun.ts.tests.ejb30.bb.session.stateful.remove.common.RemoveLocalIF</business-local>
| <business-local>com.sun.ts.tests.ejb30.bb.session.stateful.remove.common.RemoveLocal2IF</business-local>
| <business-remote>com.sun.ts.tests.ejb30.bb.session.stateful.remove.common.Remove2IF</business-remote>
| <business-remote>com.sun.ts.tests.ejb30.bb.session.stateful.remove.common.RemoveIF</business-remote>
| <ejb-class>com.sun.ts.tests.ejb30.bb.session.stateful.remove.descriptor.RemoveBean</ejb-class>
| <session-type>Stateful</session-type>
| <remove-method>
| <bean-method>
| <method-name>retain</method-name>
| </bean-method>
| <retain-if-exception>true</retain-if-exception>
| </remove-method>
| <remove-method>
| <bean-method>
| <method-name>retain2</method-name>
| </bean-method>
| <retain-if-exception>true</retain-if-exception>
| </remove-method>
| <remove-method>
| <bean-method>
| <method-name>remove</method-name>
| </bean-method>
| <!-- optional, default is false
| <retain-if-exception>false</retain-if-exception>
| -->
| </remove-method>
| <remove-method>
| <bean-method>
| <method-name>remove2</method-name>
| </bean-method>
| <retain-if-exception>false</retain-if-exception>
| </remove-method>
| <transaction-type>Container</transaction-type>
| </session>
|
and jboss.xml entry like:
| <session>
| <ejb-name>RemoveBean</ejb-name>
| <jndi-name>stateful_remove_descriptor_RemoveBean</jndi-name>
| <home-jndi-name>stateful_remove_descriptor_RemoveBeanHome</home-jndi-name>
| <call-by-value>true</call-by-value>
| </session>
|
I'm only seeing a global binding for stateful_remove_descriptor_RemoveBeanHome. A related client deployment has references to business interfaces on this bean that have been resolved to the stateful_remove_descriptor_RemoveBean jndi name, but this does not exist.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110056#4110056
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110056
17 years