Failed to find the proxy to represent the java.class:
com.ibm.jms.JMSTextMessage. It implements the following interfaces:
javax.jms.TextMessage.
What puzzles me is that I have proxies for both classes in my PBL, in fact I
have a variable declared in the script of the corresponding proxy type.
I guess my question is there anything special about the way proxies are
located at runtime based on the underlying class and implemented interface.
From what I understand PB Proxy has no notion of interface all it knows is
the underlying class name and its ancestors.
I greately appreciate any help
Vlad
"Gökhan Demir" <gokhan...@igonline.biz> wrote in message
news:3FC77197...@igonline.biz...
> Hi,
>
> Your sample code successfully runs on my environment. I have PB9.0.1
> Build 6533, Sun JDK 1.4.2_02, w2k machine on a P3-800. Besides for your
> information, I have many other Java methods returning objects, I face
> the objects and wrap them into appropriate java classes within
> Powerbuilder code succesfully.
>
> You can contact me offline to give your e-mail address and I can send
> you the generated proxies for your java class and java.lang.StringBuffer
> in case you want to compare with yours.
>
> HTH,
> Gokhan
>
> jcsmonda wrote:
>
> > When I call a java method which the returned type in the
> > prototype is Object,
> > I have the following Error (in the case when the real type
> > of the returned object is StringBuffer) :
> > Failed to find the proxy to represent the java class:
> > java.lang.StringBuffer.
> > It implements the following interfaces:
> > java.io.Serializable;
> >
> > Have anybody the same problem ?
> > Or, can anyone successfully call such a method ?
> >
> > I use the EJBConnection method to access to java.
> > My version of PB is PB9.01 build 6533.
> >
> > Thanks for your help.
> >
> > Sample code:
> > Java class:
> > public class MyClass {
> > public Object getObject() {
> > return new StringBuffer("hello in getObject");
> > }
> >
> > public StringBuffer getStringBuffer() {
> > return new StringBuffer("hello in
> > getStringBuffer");
> > }
> > }
> >
> > Powerbuilder:
> > JavaVM l_JavaVM
> > EJBConnection l_EJBConn
> > String ls_classPath
> >
> > ls_classPath = "C:\HOMEWARE\JCS\ejbtest\bin"
> > l_JavaVM = CREATE JavaVM
> > l_JavaVM.CreateJavaVM(ls_classPath, True)
> > l_EJBConn = CREATE EJBConnection
> >
> > myclass l_myclass
> > l_EJBConn.CreateJavaInstance(l_myclass, "myclass")
> >
> > stringbuffer l_stringbuffer
> > Try
> > // No problem here
> > l_stringbuffer = l_myclass.getStringBuffer()
> > MessageBox("Success getStringBuffer",
> > l_stringbuffer.toString())
> > Catch (Exception e1)
> > MessageBox("Error getStringBuffer", e1.getMessage(),
> > Exclamation!)
> > End Try
> >
> > Any la_result
> > Try
> > // Error here
> > la_result = l_myclass.getObject()
> > MessageBox("Success getObject", "")
> > Catch (Exception e2)
> > MessageBox("Error getObject", e2.getMessage(),
> > Exclamation!)
> > End Try
> >
> > JC Smondack
>