View Full Version : problem with SimpleRemoteStatelessSessionProxyFactoryBean
ElPapa
Aug 17th, 2004, 04:33 PM
I'm seeing this error in my servlet's applicationContext.xml when I try to initialize access to a remote EJB. I'm figuring I'm probably just not doing this correctly. Can someone point to an example on this? I'm using JBoss 3.2.3 - Thanks much.
org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'myComponent' defined in resource [/WEB-INF/applicationContext.xml] of ServletContext: Bean class [org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean
java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean
irbouho
Aug 17th, 2004, 04:55 PM
exception is java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean
What spring jar files are you using in your class path?
SimpleRemoteStatelessSessionProxyFactoryBean is included in both spring.jar and spring-context.jar.
ElPapa
Aug 17th, 2004, 04:58 PM
Oh that *IS* interesting. I have both of them in my classpath.... Sounds like the classloader is choking as a result... :-/
irbouho
Aug 17th, 2004, 05:04 PM
ElPapa,
If you use spring.jar in your classpath, there is no need to include the other jar from spring distribution as spring.jar contains all the Spring Framework classes.
ElPapa
Aug 17th, 2004, 05:09 PM
After rooting around in the JAR files I see that now. However I'm still having the same problem.
14:06:35,375 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'myComponent' defined in resource [/WEB-INF/applicationContext.xml] of ServletContext: Bean class [org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean
java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean
From my applicationContext.xml file...
<bean id="myComponent"
lazy-init="true"
class="org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean">
<property name="jndiName">
<value>java:comp/env/ejb/SimpleEJB</value>
</property>
<property name="businessInterface">
<value>com.my.package.MyComponent</value>
</property>
</bean>
ElPapa
Aug 19th, 2004, 01:19 PM
OK... I decided to take a step back from my project, create a new project, put an EJB in that, and then try again to see what happened.
I'm STILL getting java.lang.ClassNotFoundException. And the spring.jar file is deployed along with my EJB.
Here's the springconfig.xml file that I'm loading in a simple Java application, the applicationContext file from that sample, and the stacktrace.
If this matters at all, I'm using Framework 1.01. I could REALLY use some help here. This is making me a bit batty.
File: springconfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="myComponent"
lazy-init="true"
class="org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean">
<property name="jndiName">
<value>SimpleEJB</value>
</property>
<property name="jndiEnvironment">
<props>
<prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
<prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
<prop key="java.naming.provider.url">jnp://localhost:1099</prop>
</props>
</property>
<property name="businessInterface">
<value>com.codethought.springejb.services.MyComponent</value>
</property>
</bean>
</beans>
file : applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- ========================= GENERAL DEFINITIONS ========================= -->
<!-- ========================= RESOURCE DEFINITIONS ========================= -->
<!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
<!-- an EJB proxy with the cached home flag on, to test home lookup every time -->
<bean id="cachedHomeProxy" lazy-init="true" class="org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean">
<property name="jndiName">
<value>SimpleEJB</value>
</property>
<property name="cacheHome">
<value>true</value>
</property>
<property name="businessInterface">
<value>com.codethought.springejb.services.MyComponent</value>
</property>
</bean>
<!-- now another instance with the cached home flag off, to test home lookup every time -->
<bean id="noCachedHomeProxy" lazy-init="true" class="org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean">
<property name="jndiName">
<value>SimpleEJB</value>
</property>
<property name="cacheHome">
<value>false</value>
</property>
<property name="businessInterface">
<value>com.codethought.springejb.services.MyComponent</value>
</property>
</bean>
</beans>
Stacktrace:
FINE: main: outbound call received exception: [172.20.6.101:4444] exception:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: null; CausedByException is:
Error registering bean with name 'cachedHomeProxy' defined in class path resource [META-INF/servicelayer-applicationContext.xml]: Bean class [org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: Unexpected error during load of: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:292)
at sun.rmi.transport.Transport$1.run(Transport.java:1 48)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:1 33)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub. invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerPr oxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invoke(Inv okerInterceptor.java:96)
at org.jboss.proxy.TransactionInterceptor.invoke(Tran sactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(Securit yInterceptor.java:45)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.in voke(StatelessSessionInterceptor.java:100)
at org.jboss.proxy.ClientContainer.invoke(ClientConta iner.java:85)
at $Proxy2.myMethod(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.ejb.access.SimpleRemoteSlsbInv okerInterceptor.invoke(SimpleRemoteSlsbInvokerInte rceptor.java:104)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :138)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:148)
at $Proxy1.myMethod(Unknown Source)
at com.codethought.springejb.test.TestRemoteProxy.mai n(TestRemoteProxy.java:22)
Caused by: java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: null; CausedByException is:
Error registering bean with name 'cachedHomeProxy' defined in class path resource [META-INF/servicelayer-applicationContext.xml]: Bean class [org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: Unexpected error during load of: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
at org.jboss.ejb.plugins.LogInterceptor.handleExcepti on(LogInterceptor.java:347)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:195)
at org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalIn voke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.i nvoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:546)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invok e(JRMPInvoker.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:1 48)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: javax.ejb.EJBException: null; CausedByException is:
Error registering bean with name 'cachedHomeProxy' defined in class path resource [META-INF/servicelayer-applicationContext.xml]: Bean class [org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: Unexpected error during load of: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>(StatelessSessionEnterpriseContext.java:59)
at org.jboss.ejb.plugins.StatelessSessionInstancePool .create(StatelessSessionInstancePool.java:35)
at org.jboss.ejb.plugins.AbstractInstancePool.get(Abs tractInstancePool.java:168)
at org.jboss.ejb.plugins.StatelessSessionInstanceInte rceptor.invoke(StatelessSessionInstanceInterceptor .java:58)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invoke Next(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:267)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:128)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:191)
... 21 more
Aug 19, 2004 10:06:01 AM sun.rmi.server.UnicastRef invoke
FINE: main: free connection (reuse = false)
Aug 19, 2004 10:06:01 AM sun.rmi.transport.tcp.TCPChannel free
FINE: main: close connection
Aug 19, 2004 10:06:01 AM sun.rmi.transport.tcp.TCPConnection close
FINE: main: close connection
org.springframework.remoting.RemoteAccessException : Could not invoke remote EJB [SimpleEJB]; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: null; CausedByException is:
Error registering bean with name 'cachedHomeProxy' defined in class path resource [META-INF/servicelayer-applicationContext.xml]: Bean class [org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: Unexpected error during load of: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: null; CausedByException is:
Error registering bean with name 'cachedHomeProxy' defined in class path resource [META-INF/servicelayer-applicationContext.xml]: Bean class [org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: Unexpected error during load of: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:292)
at sun.rmi.transport.Transport$1.run(Transport.java:1 48)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:1 33)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub. invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerPr oxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invoke(Inv okerInterceptor.java:96)
at org.jboss.proxy.TransactionInterceptor.invoke(Tran sactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(Securit yInterceptor.java:45)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.in voke(StatelessSessionInterceptor.java:100)
at org.jboss.proxy.ClientContainer.invoke(ClientConta iner.java:85)
at $Proxy2.myMethod(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.ejb.access.SimpleRemoteSlsbInv okerInterceptor.invoke(SimpleRemoteSlsbInvokerInte rceptor.java:104)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :138)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:148)
at $Proxy1.myMethod(Unknown Source)
at com.codethought.springejb.test.TestRemoteProxy.mai n(TestRemoteProxy.java:22)
Caused by: java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: null; CausedByException is:
Error registering bean with name 'cachedHomeProxy' defined in class path resource [META-INF/servicelayer-applicationContext.xml]: Bean class [org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: Unexpected error during load of: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
at org.jboss.ejb.plugins.LogInterceptor.handleExcepti on(LogInterceptor.java:347)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:195)
at org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalIn voke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.i nvoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:546)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invok e(JRMPInvoker.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:1 48)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: javax.ejb.EJBException: null; CausedByException is:
Error registering bean with name 'cachedHomeProxy' defined in class path resource [META-INF/servicelayer-applicationContext.xml]: Bean class [org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: Unexpected error during load of: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>(StatelessSessionEnterpriseContext.java:59)
at org.jboss.ejb.plugins.StatelessSessionInstancePool .create(StatelessSessionInstancePool.java:35)
at org.jboss.ejb.plugins.AbstractInstancePool.get(Abs tractInstancePool.java:168)
at org.jboss.ejb.plugins.StatelessSessionInstanceInte rceptor.invoke(StatelessSessionInstanceInterceptor .java:58)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invoke Next(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:267)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:128)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:191)
... 21 more
Exception in thread "main"
Colin Sampaleanu
Aug 19th, 2004, 04:02 PM
Looks like you're basing this off the integration test ejbtest sample. Does _that_ work for you?
I don't think the ClassNotFoundException is actually referring to
SimpleRemoteStatelessSessionProxyFactoryBean
if you read the log carefully. The error occurs during the creation of it, but as far as I can tell the error is in the remote invocation.
Regards,
ElPapa
Aug 19th, 2004, 04:33 PM
Colin,
My code is based roughly on the sample code in CVS (seemed like a good place to start).
I'll dig around in the sample code a bit more and see what I can find.
I'll keep you posted.
ElPapa
Aug 19th, 2004, 10:46 PM
Colin,
So far I the best I've been able to do is narrow down *where* the ClassNotFoundException is happening...
From DefaultXmlBeanDefinitionParser.java starting at line 259
if (this.beanClassLoader != null) {
Class clazz = Class.forName(className, true, this.beanClassLoader);
rbd = new RootBeanDefinition(clazz, cargs, pvs);
} else {
rbd = new RootBeanDefinition(className, cargs, pvs);
}
The exception occurs when "className" is "org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean"
Help...?? :(
ElPapa
Aug 20th, 2004, 12:23 PM
I give up... :oops:
I've put the code on one of my servers in a ZIP file. The project is done in JBuilder, but should be easily sucked into eclipse. I've stared at this until my eyes are blurring. And I think I need one of the 'higher-powers' here to loan me a set of eyes.
http://mywebpages.comcast.net/daorriss/extras/springEJB.zip
So far understanding this part of Spring is really frustrating me. Other parts I've used fine, but this... eeeesh. :(
Anyway, I'd appreciate any help you can give. The springEJB.html file in the project as some notes on how to run the test client that's included with it.
pinglu
Aug 23rd, 2004, 04:48 PM
I give up... :oops:
I've put the code on one of my servers in a ZIP file. The project is done in JBuilder, but should be easily sucked into eclipse. I've stared at this until my eyes are blurring. And I think I need one of the 'higher-powers' here to loan me a set of eyes.
http://mywebpages.comcast.net/daorriss/extras/springEJB.zip
So far understanding this part of Spring is really frustrating me. Other parts I've used fine, but this... eeeesh. :(
Anyway, I'd appreciate any help you can give. The springEJB.html file in the project as some notes on how to run the test client that's included with it.
Hi, ElPapa:
I downloaded your code, and tested, finally I made it works, let me explain:
1. I deployed your code to weblogic 8.1,
in MANIFEST.MF add depended reference:
Class-Path: srping.jar log4j-1.2.8.jar commons-logging.jar commons-collections-2.1.1.jar, and put jars inside EJBModule.jar, and
weblogic-jar.xml:<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>SimpleEJB</ejb-name>
<jndi-name>SimpleEJB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
same as jboss.xml, and then no luck, can not find spring.jar ...., can not deploy,
2. I put spring.jar,log4j-1.2.8.jar,common-logging.jar in server classpathg, it deployed,
3. I test you TestRemoteProxy, get Exception......
4. finnally I figure out, add aopalliance.jar in server classpath. it works.
Would you mind fixing my problem: why following structure, weblogic can not find the depended jars?
EJBModule.jar
|_pring.jar
|_log4j-1.2.8.jar
|_commons-logging.jar
|_aopalliance.jar
|_com
_codethought
_springejb
_SimpleEJB.class
_Simple*
|- META-INF
|_ ejb-jar.xml
|_ vendor-ejb-jar.xml
|_ Manifest.mf
ping Lu
ElPapa
Aug 24th, 2004, 02:45 PM
pinglu,
THANKS!! That was perfect.
About your problem. I remember some odd 'quirks' about WebLogic's classloader. I'll have to do some reading and see what I can find. Have you tried putting everything in an EAR file? Have the EJB Jar contain NONE of the dependencies for the JAR file and instead include them in the EAR file along with the EJB JAR file.
That's what I do...
pinglu
Aug 24th, 2004, 04:25 PM
pinglu,
THANKS!! That was perfect.
About your problem. I remember some odd 'quirks' about WebLogic's classloader. I'll have to do some reading and see what I can find. Have you tried putting everything in an EAR file? Have the EJB Jar contain NONE of the dependencies for the JAR file and instead include them in the EAR file along with the EJB JAR file.
That's what I do...
As you suggested I have EJB.jar without depend jar and put in a ear file, all the third party jars in APP-INF/lib
Simple.ear
-EJBMOdular.jar
-META-INF\application.xml
-APP-INF
-lib
spring.jar
common-logging.jar
aopanliance.jar
Thanks!
Ping
ElPapa
Aug 24th, 2004, 04:56 PM
Yea I've found that EAR files make life a lot easier... :)
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.