Full StackTrace:
javax.naming.CommunicationException [Root exception is java.io.InvalidClassException:
org.jboss.invocation.InvokerInterceptor; unable to create instance]
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:780)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(Unknown Source)
| at teste.BeanClient.main(BeanClient.java:22)
| Caused by: java.io.InvalidClassException: org.jboss.invocation.InvokerInterceptor;
unable to create instance
| at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
| at java.io.ObjectInputStream.readObject0(Unknown Source)
| at java.io.ObjectInputStream.readObject(Unknown Source)
| at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
| at java.io.ObjectInputStream.readExternalData(Unknown Source)
| at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
| at java.io.ObjectInputStream.readObject0(Unknown Source)
| at java.io.ObjectInputStream.readObject(Unknown Source)
| at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
| at java.io.ObjectInputStream.readExternalData(Unknown Source)
| at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
| at java.io.ObjectInputStream.readObject0(Unknown Source)
| at java.io.ObjectInputStream.readObject(Unknown Source)
| at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
| at java.io.ObjectInputStream.readExternalData(Unknown Source)
| at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
| at java.io.ObjectInputStream.readObject0(Unknown Source)
| at java.io.ObjectInputStream.readObject(Unknown Source)
| at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:156)
| at java.io.ObjectInputStream.readExternalData(Unknown Source)
| at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
| at java.io.ObjectInputStream.readObject0(Unknown Source)
| at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
| at java.io.ObjectInputStream.readSerialData(Unknown Source)
| at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
| at java.io.ObjectInputStream.readObject0(Unknown Source)
| at java.io.ObjectInputStream.readObject(Unknown Source)
| at java.rmi.MarshalledObject.get(Unknown Source)
| at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
| ... 3 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at java.io.ObjectStreamClass.newInstance(Unknown Source)
| ... 33 more
| Caused by: java.lang.NoClassDefFoundError:
EDU/oswego/cs/dl/util/concurrent/SynchronizedLong
| at org.jboss.util.id.UID.<clinit>(UID.java:56)
| at org.jboss.util.id.VMID.create(VMID.java:259)
| at org.jboss.util.id.VMID.getInstance(VMID.java:223)
| at org.jboss.util.id.GUID.<init>(GUID.java:65)
| at org.jboss.invocation.Invoker.<clinit>(Invoker.java:55)
| at org.jboss.invocation.InvokerInterceptor.<init>(InvokerInterceptor.java:61)
| ... 38 more
| Caused by: java.lang.ClassNotFoundException:
EDU.oswego.cs.dl.util.concurrent.SynchronizedLong
| at java.net.URLClassLoader$1.run(Unknown Source)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(Unknown Source)
| at java.lang.ClassLoader.loadClass(Unknown Source)
| at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
| at java.lang.ClassLoader.loadClass(Unknown Source)
| at java.lang.ClassLoader.loadClassInternal(Unknown Source)
| ... 44 more
This error happens when i run a ejb client to test the deploy
Class Client:
import java.util.Properties;
| import javax.naming.Context;
| import javax.naming.InitialContext;
|
| public class BeanClient {
|
| public static void main(String[] args) {
| Properties prop = new Properties();
| prop.put(Context.INITIAL_CONTEXT_FACTORY,
| "org.jnp.interfaces.NamingContextFactory");
| prop.put(Context.PROVIDER_URL, "localhost:1099");
|
| try {
| InitialContext ic = new InitialContext(prop);
|
| Object refLocal = ic.lookup("SitesLocal");
|
| Object refRemote = ic.lookup("SitesSB");
|
|
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
| }
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
|
| <ejb-jar >
|
| <description><![CDATA[No Description.]]></description>
| <display-name>Generated by XDoclet</display-name>
|
| <enterprise-beans>
|
| <!-- Session Beans -->
| <session >
| <description><![CDATA[Bean implementation class for Enterprise Bean:
SitesSB]]></description>
| <display-name>SitesSB</display-name>
|
| <ejb-name>SitesSB</ejb-name>
|
| <home>br.com.gcm.ejb.sb.SitesSBHome</home>
| <remote>br.com.gcm.ejb.sb.SitesSB</remote>
| <ejb-class>br.com.gcm.ejb.sb.SitesSBBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
|
| <resource-ref >
| <res-ref-name>jdbc/APAESP</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| <res-sharing-scope>Shareable</res-sharing-scope>
| </resource-ref>
| <resource-ref >
| <res-ref-name>jdbc/MARLIN</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| <res-sharing-scope>Shareable</res-sharing-scope>
| </resource-ref>
| <resource-ref >
| <res-ref-name>jdbc/GCM2</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| <res-sharing-scope>Shareable</res-sharing-scope>
| </resource-ref>
|
| </session>
|
| <!--
| To add session beans that you have deployment descriptor info for, add
| a file to your XDoclet merge directory called session-beans.xml that contains
| the <session></session> markup for those beans.
| -->
|
| <!-- Entity Beans -->
| <entity >
| <description><![CDATA[Bean implementation class for Enterprise Bean:
Sites]]></description>
|
| <ejb-name>Sites</ejb-name>
|
| <local-home>br.com.gcm.ejb.cmp.SitesLocalHome</local-home>
| <local>br.com.gcm.ejb.cmp.SitesLocal</local>
|
| <ejb-class>br.com.gcm.ejb.cmp.SitesBean</ejb-class>
| <persistence-type>Container</persistence-type>
| <prim-key-class>br.com.gcm.ejb.cmp.SitesKey</prim-key-class>
| <reentrant>False</reentrant>
| <cmp-version>2.x</cmp-version>
| <abstract-schema-name>Sites</abstract-schema-name>
| <cmp-field >
| <description><![CDATA[Get accessor for persistent attribute:
siteid]]></description>
| <field-name>siteid</field-name>
| </cmp-field>
| <cmp-field >
| <description><![CDATA[Get accessor for persistent attribute:
sitename]]></description>
| <field-name>sitename</field-name>
| </cmp-field>
| <cmp-field >
| <description><![CDATA[Get accessor for persistent attribute:
siteimage]]></description>
| <field-name>siteimage</field-name>
| </cmp-field>
| <cmp-field >
| <description><![CDATA[Get accessor for persistent attribute:
siteacronym]]></description>
| <field-name>siteacronym</field-name>
| </cmp-field>
| <cmp-field >
| <description><![CDATA[Get accessor for persistent attribute:
siteprodurl]]></description>
| <field-name>siteprodurl</field-name>
| </cmp-field>
| <cmp-field >
| <description><![CDATA[Get accessor for persistent attribute:
sitehomologurl]]></description>
| <field-name>sitehomologurl</field-name>
| </cmp-field>
|
| <!-- Write a file named ejb-finders-SitesBean.xml if you want to define extra
finders. -->
|
| </entity>
|
| <!--
| To add entity beans that you have deployment descriptor info for, add
| a file to your XDoclet merge directory called entity-beans.xml that contains
| the <entity></entity> markup for those beans.
| -->
|
| <!-- Message Driven Beans -->
| <!--
| To add message driven beans that you have deployment descriptor info for, add
| a file to your XDoclet merge directory called message-driven-beans.xml that
contains
| the <message-driven></message-driven> markup for those beans.
| -->
|
| </enterprise-beans>
|
| <!-- Relationships -->
|
| <!-- Assembly Descriptor -->
| <!--
| To specify your own assembly descriptor info here, add a file to your
| XDoclet merge directory called assembly-descriptor.xml that contains
| the <assembly-descriptor></assembly-descriptor> markup.
| -->
|
| <assembly-descriptor >
| <!--
| To specify additional security-role elements, add a file in the merge
| directory called ejb-security-roles.xml that contains them.
| -->
|
| <!-- method permissions -->
| <!--
| To specify additional method-permission elements, add a file in the merge
| directory called ejb-method-permissions.ent that contains them.
| -->
|
| <!-- transactions -->
| <!--
| To specify additional container-transaction elements, add a file in the merge
| directory called ejb-container-transactions.ent that contains them.
| -->
|
| <!-- finder transactions -->
|
| <!-- message destinations -->
| <!--
| To specify additional message-destination elements, add a file in the merge
| directory called ejb-message-destinations.ent that contains them.
| -->
|
| <!-- exclude list -->
| <!--
| To specify an exclude-list element, add a file in the merge directory
| called ejb-exclude-list.xml that contains it.
| -->
| </assembly-descriptor>
|
| </ejb-jar>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131813#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...