[Beginners Corner] - Re: Proxy problem
by qler
Here you are:
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
| at $Proxy0.create(Unknown Source)
| at client.FooClient.main(FooClient.java:18)
| Caused by: java.lang.ClassNotFoundException: bean.FooRemote
| 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 org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
| at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
| at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
| at java.io.ObjectInputStream.readClassDesc(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.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
| 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 org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| ... 2 more
|
One thing that confuses me is that it outputs:
Caused by: java.lang.ClassNotFoundException: bean.FooRemote
That is why I thought that something's wrong with the proxy-stubs.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964591#3964591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964591
19 years, 9 months
[JBoss AOP] - unbound-bindings...
by AdequateSystems
Hello,
I'm trying to use aopc and nothing happens (I always get "unbound-binding" in aop-report.xml)...
My jboss-aop.xml is:
<?xml version="1.0" encoding="UTF-8"?>
| <aop>
| <bind pointcut="execution(* *->@com.adequate.entity.RemoteInvocation*(..))">
| <interceptor class="com.adequate.aop.EntityRemoteInvocationInterceptor" />
| </bind>
| </aop>
|
It should match all methods marked with the @com.adequate.entity.RemoteInvocation annotation.
I have a class Person.java (ejb 3.0 entitybean) with:
@Entity
| public class Person extends AbstractSEntity {
| ...
|
| @RemoteInvocation
| public void sendEMail() {
| ...
| }
| ...
| }
My build.xml (eclipse project) is:
<?xml version="1.0" encoding="UTF-8"?>
|
| <project name="ejb3" default="build">
|
| <property name="jboss.home" value="/home/franck/Applications/jboss-4.0.4.GA.ejb3"/>
| <property name="jboss.deploy.home" value="${jboss.home}/server/default/deploy"/>
|
| <target name="prepare">
| <property name="jboss.aop.root" value="/home/franck/Devs/jboss-aop_1.5.0.GA" />
| <property name="jboss.aop.lib" value="${jboss.aop.root}/lib-50" />
|
| <path id="classpath">
| <fileset dir="${jboss.aop.lib}">
| <include name="*.jar" />
| </fileset>
| <pathelement path="." />
| </path>
|
| <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="classpath" />
| </target>
|
| <target name="build" depends="prepare">
|
| <mkdir dir="build"/>
| <mkdir dir="build/classes"/>
|
| <copy todir="build/classes" overwrite="true">
| <fileset dir="classes">
| <include name="**" />
| </fileset>
| </copy>
|
| <aopc compilerclasspathref="classpath" verbose="true">
| <classpath path="build/classes"/>
| <include name="com/adequate/entity/*.class" />
| <src path="src"/>
| <aoppath path="jboss-aop.xml"/>
| </aopc>
|
| <aopc compilerclasspathref="classpath" verbose="true" report="true">
| <classpath path="build/classes"/>
| <include name="com/adequate/entity/*.class" />
| <src path="src"/>
| <aoppath path="jboss-aop.xml"/>
| </aopc>
|
| <jar destfile="build/service.jar">
| <fileset dir="build/classes">
| <include name="com/adequate/entity/**"/>
| <include name="com/adequate/service/**"/>
| <include name="META-INF/**"/>
| </fileset>
| </jar>
|
| </target>
|
| <target name="deploy" depends="build">
| <copy todir="${jboss.deploy.home}">
| <fileset dir="build">
| <include name="service.jar"/>
| </fileset>
| </copy>
| </target>
|
| </project>
When I run this build file (target "build"), I get absolutly nothing... Verbose traces are:
Buildfile: /home/franck/Applications/eclipse/workspace/ejb3/build.xml
| prepare:
| build:
| [copy] Copying 32 files to /home/franck/Applications/eclipse/workspace/ejb3/build/classes
| [aopc] [debug] Passed in instrumentor: null
| [aopc] [debug] Defaulting instrumentor to: org.jboss.aop.instrument.ClassicInstrumentor
| [aopc] [debug] jboss.aop.class.path is NULL
| [aopc] [debug] jboss.aop.search.classpath: 'null' true
| [aopc] [debug] jboss.aop.path: /home/franck/Applications/eclipse/workspace/ejb3/jboss-aop.xml
| [aopc] jboss.aop.path[0]: /home/franck/Applications/eclipse/workspace/ejb3/jboss-aop.xml
| [aopc] [deploying] file:/home/franck/Applications/eclipse/workspace/ejb3/jboss-aop.xml
| [aopc] AspectXMLLoader using managerorg.jboss.aop.AspectManager@54172f
| [aopc] Build Successful: 296 ms
| [aopc] [debug] Passed in instrumentor: null
| [aopc] [debug] Defaulting instrumentor to: org.jboss.aop.instrument.ClassicInstrumentor
| [aopc] [debug] jboss.aop.class.path is NULL
| [aopc] [debug] jboss.aop.search.classpath: 'null' true
| [aopc] [debug] jboss.aop.path: /home/franck/Applications/eclipse/workspace/ejb3/jboss-aop.xml
| [aopc] jboss.aop.path[0]: /home/franck/Applications/eclipse/workspace/ejb3/jboss-aop.xml
| [aopc] [deploying] file:/home/franck/Applications/eclipse/workspace/ejb3/jboss-aop.xml
| [aopc] AspectXMLLoader using managerorg.jboss.aop.AspectManager@54172f
| [aopc] Build Successful: 305 ms
| [jar] Building jar: /home/franck/Applications/eclipse/workspace/ejb3/build/service.jar
| deploy:
| [copy] Copying 1 file to /home/franck/Applications/jboss-4.0.4.GA.ejb3/server/default/deploy
| BUILD SUCCESSFUL
| Total time: 1 second
|
This is of course VERY frustating ;-(
I don't want to use JBoss-IDE (aop project) because I need to have a the possibility to build the entire project outside of Eclipse.
Any help ? Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964588#3964588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964588
19 years, 9 months
[Beginners Corner] - Re: Proxy problem
by qler
"jaikiran" wrote : anonymous wrote : It contains all the interfaces and implementations like the bean itself
|
| No. The client classpath just has to have the interfaces of the bean and NOT the bean implementation.
Yess... Sorry I misunderstood you :) Right, I've imported bean interfaces - but that doesn't work anyway. I've paid attention on one interesting thing. When we lookup our bean, we lookup our bean implementation class, but not it's interface:
Object ref = jndiContext.lookup("CreaterRemote/remote");
As I understand the clent class must not know about bean implementation classes at all, but here we lookup implementation class CreaterRemote. I've tried to write this example on the base of the book O'Reilly Enterprise JavaBeans, 3.0 There when they lookup bean, they lookup the implmentation class. Maybe the "/remote" statement tells that we are lookin up to the remote interface, but I haven't found any information concerning this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964584#3964584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964584
19 years, 9 months