[EJB/JBoss] - deployment of a ejb having bmp in jboss
by rajatbh
Greetings
I am trying to deploy a entity bean having bean managed persistence in jboss. After proper compilation and packaging of the entity bean into a jar file, I am copying it to the default\deploy directory. The bean fails at the deployment stage and I get the following error :
:56:57,046 ERROR [MainDeployer] could not create deployment: file:/C:/jboss/jb
s-4.0.1sp1/server/default/deploy/sample2_bmp.jar
g.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed
see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at
My ejb-jar.xml file is
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<display-name>bmpapp</display-name>
An EJB app containing only one Bean Managed Persistence Entity Bean
<enterprise-beans>
bmpdemo
<display-name>TemplateBean</display-name>
<ejb-name>TemplateBean</ejb-name>
apps.TemplateHome
apps.Template
<ejb-class>apps.TemplateBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>apps.TemplatePK</prim-key-class>
False
<resource-ref>
<res-ref-name>jdbc/DefaultDS</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</enterprise-beans>
</ejb-jar>
My jboss.xml file is
<?xml version="1.0" encoding="UTF-8"?>
<enterprise-beans>
<ejb-name>TemplateBean</ejb-name>
<jndi-name>apps/TemplateBean</jndi-name>
<resource-ref>
<res-ref-name>jdbc/DefaultDS</res-ref-name>
<jndi-name>java:jdbc/DefaultDS</jndi-name>
</resource-ref>
</enterprise-beans>
Please let me know what mistake I am making.
Thanks for your help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172526#4172526
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172526
17 years, 8 months
[JBoss AOP] - Exception while loadtime weaving
by guericke
Hi all,
I installed Jboss Server with jems-installer-1.2.0.GA.jar.
I have developed a small test application that tries to intercept call to ejbs.
My xml snippet of jboss-aop.xml is
| <interceptor name="MyEjbInterceptor"
| class="interceptors.interceptors.EjbInterceptor"
| scope="PER_VM" />
|
| <bind pointcut="execution(* $instanceof{javax.ejb.EjbHome}->*(..))
| OR execution(* $instanceof{javax.ejb.EJBObject}->*(..))">
| <interceptor-ref name="MyEjbInterceptor" />
| </bind>
|
I put this jboss-aop.xml in META-INF folder of my jar file.
When i tried to run my client application using VM arguments
| -javaagent:C:\eclipse-3.1.2\plugins\org.jboss.ide.eclipse.jdt.aop.core_1.1.1.GA\jboss-aop-jdk50.jar
i got the following exception:
| java.lang.reflect.InvocationTargetException
| 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 sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:141)
| Caused by: java.lang.NoSuchFieldError: classPoolFactory
| at org.jboss.aop.standalone.Agent.premain(Agent.java:26)
| ... 5 moreFATAL ERROR in native method: processing of -javaagent failed
|
| Exception in thread "main"
|
I have placed all of jar files from AOP on my classpath.
I tried it with other different AOP versions with eclipse 3.1, 3.3 but always get exceptions.
Can anybody tell me what is missing? and why i am getting this exception
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172516#4172516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172516
17 years, 8 months