Java.lang.NoSuchMethodException when invoke method dynamic
hi!
i have some trouble when i invoked hibernate PO class method dymaic by parameters, here is a piece of code, can someone help me? thanks in advance! please!
String fieldname = field.getName().toLowerCase();
String methodName = "get" + fieldname.replaceFirst(fieldname.substring(0, 1),fieldname.substring(0,1).toUpperCase());
Method methodFinal;
try {
methodFinal = value.getClass().getDeclaredMethod(methodName, new Class[] {PaymentPO.class});
return methodFinal.invoke(value, null);
} catch (SecurityException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
I don't know what your error is, but here are a few suggestions:
* print out the method name.
* print out the methods for the class on which you're trying to invoke the method
* rather than trying to use this means of invoking a property getter, look into some of the javabeans introspection classes:
http://java.sun.com/j2se/1.5.0/docs/api/java/beans/Introspector.html
http://java.sun.com/j2se/1.5.0/docs/api/java/beans/BeanInfo.html
http://java.sun.com/j2se/1.5.0/docs/api/java/beans/PropertyDescriptor.html
Similar Messages
-
Hello,
I hope someone can help me with this.
I have a stateless session bean, which is returning a
org.w3c.dom.Document object. The whole object is getting created
but at the client side I am getting the following exception:
java.rmi.RemoteException: ; nested exception is:
weblogic.rmi.ServerError: A RemoteException occurred in the server method
- with nested exception:
[java.lang.StackOverflowError:
Start server side stack trace:
java.lang.StackOverflowError
at java.lang.Exception.<init>(Compiled Code)
at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetEx
ception.java:58)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Compiled Code)
at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
at java.io.ObjectOutputStream.outputObject(Compiled Code)
at java.io.ObjectOutputStream.writeObject(Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(Compiled Code)
at java.io.ObjectOutputStream.defaultWriteObject(Compiled Code)
Then multiple occurences of the last few lines followed by
at org.apache.xerces.dom.ParentNode.writeObject(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Compiled Code)
at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
at java.io.ObjectOutputStream.outputObject(Compiled Code)
at java.io.ObjectOutputStream.writeObject(Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(Compiled Code)
at java.io.ObjectOutputStream.defaultWriteObject(Compiled Code)
at org.apache.xerces.dom.ParentNode.writeObject(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Compiled Code)
at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
at java.io.ObjectOutputStream.outputObject(Compiled Code)
at java.io.ObjectOutputStream.writeObject(Compiled Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeSpecial(Compiled
Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(Compiled
Code)
at weblogic.rmi.extensions.AbstractOutputStream2.writeObject(Compiled
Code)
at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLSkel.invoke(Compiled
Code)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(Compiled Code
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled
Code)
at weblogic.rmi.internal.BasicExecuteRequest.execute(Compiled Code)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
End server side stack trace
at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.j
ava:76)
at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLStub.getRegionAnalyst
Data(CMSInterestDataEJBEOImpl_WLStub.java:558)
at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_ServiceStub.getRegionAn
alystData(CMSInterestDataEJBEOImpl_ServiceStub.java, Compiled Code)
at CMSJavaScript.main(CMSJavaScript.java:87)
The structure of the XML document is
<Maillist>
<Region>
<RegionCode>7</RegionCode>
<RegionName>Asia Pacific</RegionName>
<Analyst>
<Id>11111</Id>
<Name>AAAAAAAAAAAAAAAAA</Name>
</Analyst>
<Analyst>
<Id>22222</Id>
<Name>BBBBBBBBBBBBBBBBBB</Name>
</Analyst>
</Region>
</Maillist>
If the no. of Anlayst elements are 219, I am getting this error ( the same thing
is working for less no. of analyst).
Surprisingly when I access this ejb, by deploying it on my local server instance
on Win-NT, it works fine. I am getting this
exception, when the server is running on Sun Solaris.
The weblogic version is 5.1.
It will be really helpful if someone can reply to mee ASAP
Thanks.
Suren.Thanks a lot guys for all that information.
Rajesh Mirchandani <[email protected]> wrote:
Suren,
More info at
http://edocs.bea.com/wls/docs60/faq/java.html#251197
Rob Woollen wrote:
The quick fix is probably to use the -Xss argument on the Solaris JVMto increase the
thread stack size.
-- Rob
Suren wrote:
Thanks for your quick response.
But how do we overcome with this?
I tried to look for some help with this, but if you have any idea,
can you suggest
something ?
Thanks
Suren.
Rob Woollen <[email protected]> wrote:
It looks like the stack is overflowing when your DOM Tree is being
serialized.
Perhaps the Solaris JVM has a lower stack size by default.
-- Rob
Suren wrote:
Hello,
I hope someone can help me with this.
I have a stateless session bean, which is returning a
org.w3c.dom.Document object. The whole object is getting created
but at the client side I am getting the following exception:
java.rmi.RemoteException: ; nested exception is:
weblogic.rmi.ServerError: A RemoteException occurred in
the
server method
- with nested exception:
[java.lang.StackOverflowError:
Start server side stack trace:
java.lang.StackOverflowError
at java.lang.Exception.<init>(Compiled Code)
at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetEx
ception.java:58)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Compiled Code)
at java.io.ObjectOutputStream.invokeObjectWriter(Compiled
Code)
at java.io.ObjectOutputStream.outputObject(Compiled Code)
at java.io.ObjectOutputStream.writeObject(Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(CompiledCode)
at java.io.ObjectOutputStream.defaultWriteObject(CompiledCode)
Then multiple occurences of the last few lines followed by
at org.apache.xerces.dom.ParentNode.writeObject(CompiledCode)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Compiled Code)
at java.io.ObjectOutputStream.invokeObjectWriter(CompiledCode)
at java.io.ObjectOutputStream.outputObject(Compiled Code)
at java.io.ObjectOutputStream.writeObject(Compiled Code)
at java.io.ObjectOutputStream.outputClassFields(CompiledCode)
at java.io.ObjectOutputStream.defaultWriteObject(CompiledCode)
at org.apache.xerces.dom.ParentNode.writeObject(CompiledCode)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Compiled Code)
at java.io.ObjectOutputStream.invokeObjectWriter(CompiledCode)
at java.io.ObjectOutputStream.outputObject(Compiled Code)
at java.io.ObjectOutputStream.writeObject(Compiled Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeSpecial(Compiled
Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
Code)
at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(Compiled
Code)
at weblogic.rmi.extensions.AbstractOutputStream2.writeObject(Compiled
Code)
at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLSkel.invoke(Compiled
Code)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(CompiledCode
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled
Code)
at weblogic.rmi.internal.BasicExecuteRequest.execute(CompiledCode)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
End server side stack trace
at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.j
ava:76)
at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLStub.getRegionAnalyst
Data(CMSInterestDataEJBEOImpl_WLStub.java:558)
at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_ServiceStub.getRegionAn
alystData(CMSInterestDataEJBEOImpl_ServiceStub.java, Compiled
Code)
at CMSJavaScript.main(CMSJavaScript.java:87)
The structure of the XML document is
<Maillist>
<Region>
<RegionCode>7</RegionCode>
<RegionName>Asia Pacific</RegionName>
<Analyst>
<Id>11111</Id>
<Name>AAAAAAAAAAAAAAAAA</Name>
</Analyst>
<Analyst>
<Id>22222</Id>
<Name>BBBBBBBBBBBBBBBBBB</Name>
</Analyst>
</Region>
</Maillist>
If the no. of Anlayst elements are 219, I am getting this error( the
same thing
is working for less no. of analyst).
Surprisingly when I access this ejb, by deploying it on my local
server
instance
on Win-NT, it works fine. I am getting this
exception, when the server is running on Sun Solaris.
The weblogic version is 5.1.
It will be really helpful if someone can reply to mee ASAP
Thanks.
Suren. -
Java.lang.ClassCastException when invoking EJB from BPEL
Hi,
We have a EJB deployed in one OC4J instance and the BPEL is deployed in another OC4J instance. ClassCastException occurs when the BPEL invokes the EJB. Any feedback would be appreciated.
Regards,
M.RajeshHi Rajesh,
I am facing the same issue.
Did this issue get resolved at your end?
Thanks,
Mahendra -
I try to use Method.invoke() to invoke a method from a class. The method
has parameters with type JTextArea and JMyFrame, but I got the error
messages java.lang.NoSuchMethodException . Any ideas???
If I remove parameter "JFrame mainFrame" in start() method and it is working fine. Not sure why JMyFrame will throw this exception, as JMyFrame is derived from JFrame class
public class MyFrame extends JFrame
try
ClassLoader loader
= new MyClassLoader(Integer.parseInt("3"));
Class c = loader.loadClass("NewMenuPackage.NewMenu");
Class[] params = { JTextArea.class, JMyFrame.class };
Method m = c.getMethod("start", params);
Object obj = c.newInstance();
m.invoke(obj,
new Object[] {
textArea,
JMyFrame.this
catch (Throwable e)
JOptionPane.showMessageDialog(this, e);
package NewMenuPackage;
import javax.swing.*;
public class NewMenu
private static JMenuItem menuItem = new JMenuItem("New Menu");
public static JMenuItem getJMenuItem()
return menuItem;
public static void start(JTextArea textArea, JFrame mainFrame)
System.out.println("NewMenu->start()...");
}Your "params" Class array has to specify the exact classes of the method, not subclasses. The line that is causing the NoSuchObjectException to be thrown is "c.getMethod("start", params);".
You have to write your own reflection utility methods to find a method that matches on parameter subclasses. -
Error while opening a dwg file :java.lang.NoSuchMethodException: Method
Hello Experts,
I tried to integrate WebCenter Content with Autovue ,the integration was good untill i get this error while trying to open a dwg file checked in Content Server using View in Autovue option in Actions :
java.lang.NoSuchMethodException: Method fileOpen(com.cimmetry.core.SessionID, com.cimmetry.core.DocID, com.cimmetry.core.Authorization, <null>, java.lang.Boolean, <null>) not found in class com.cimmetry.jvueserver.VCETConnection
at com.cimmetry.jvueserver.ar.a(Unknown Source)
at com.cimmetry.jvueserver.ar.a(Unknown Source)
at com.cimmetry.jvueserver.ar.a(Unknown Source)
at com.cimmetry.jvueserver.ar.d(Unknown Source)
at com.cimmetry.jvueserver.ar.a(Unknown Source)
at com.cimmetry.jvueserver.ah.run(Unknown Source)
Any suggestions would help me,
Thanks in Advance
RajHi Raj,
The solution to this problem is posted in My Oracle Support:
Error: "java.lang.NoSuchMethodException: Method fileOpen" when Trying to View Files Using AutoVue Integrated to Oracle Universal Content Management (UCM) (Doc ID 1341644.1).
It has all the details, step by step.
Jeff -
Java.lang.NoSuchMethodException encountered when using jar file
Hi Friends
I am getting this peculiar exception for some time now and not able to figure out why i get it.
I searched the net but seem to not find any proper solution.
Here is what i am trying to do. I am using Eclipse(Latest version) and jdk 1.6.
I have a Java project in my workspace which was previously using Java code to perform DAO look up.
Now i have got an executable .jar file which has this DAO look up code bundled in it and i just need to include it in my project ClassPath. I have done this now and my code compiles properly. Even Eclipse is able to recognize this code.
When i try to run the code i am getting this java.lang.NoSuchMethodException: DAOClass.getValue(java.lang.string)L
The getValue() is present in the DAOClass in the jar file but still i am getting this exception.
I am not able to figure out what the issue is here.
Can you please provide your suggestions about this issue. is there something i am missing out.
Thanks
vikeng21802944 wrote:
Hi Friends
I am getting this peculiar exception for some time now and not able to figure out why i get it.
I searched the net but seem to not find any proper solution.
Here is what i am trying to do. I am using Eclipse(Latest version) and jdk 1.6.
I have a Java project in my workspace which was previously using Java code to perform DAO look up.
Now i have got an executable .jar file which has this DAO look up code bundled in it and i just need to include it in my project ClassPath. Is the DAO code a jar, which you are attempting to put into another jar? Then there are very specific steps that you must take, outside of the code, to accomplish that.
If the DAO code is not a jar then the following possibilities exist
- You are not putting the code in the executable jar.
- You are putting it in the executable jar incorrectly due to a path problem. -
Java.lang.NoSuchMethodException in RPC style WS in WL6.1
Hi,
I am facing some veered exception in the RPC style WS. The SS-EJB that I used as the web service is working fine when I directly try to access the EJB.
When I wrote a client I get the following exception on the server side.
<Jan 30, 2002 11:41:54 AM IST> <Error> <HTTP> <[WebAppServletContext(2318716,w
-services,/web-services)] Root cause of ServletException
<Jan 30, 2002 11:41:54 AM IST> <Error> <HTTP> <[WebAppServletContext(2318716,w
-services,/web-services)] Root cause of ServletException
java.lang.NoSuchMethodException
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Class.java:888)
at weblogic.soap.server.servlet.StatelessBeanAdapter.init(StatelessBeadapter.java:78)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubpl.java:700)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStImpl.java:643)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStumpl.java:588)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpjava:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubpl.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebApprvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Following is the code that's written on the client side.
ProjectBrokerWSClient client = new ProjectBrokerWSClient();
// Obtaining the initial context.
Context context = new InitialContext();
// Making a lookup for the required servlet.
WebServiceProxy proxy = (WebServiceProxy)context.lookup(http://localhost:7001/PB/PBBeanSL.PBHomeSL/PBBeanSL.PBHomeSL.wsdl" );
SoapMethod method = proxy.getMethod("selfTest");
Object result = method.invoke(new Object[]{"# Test message #"});
The function in the bean is as follows.
public String selfTest(String ostrMessage){
log("inside selfTest()" + ostrMessage);
return "# M e s s a g e r e c e i v e d #";
Please let me know if some thing is wrong out here or I have missed out any conf.
cheers.
n a v i n.
[att1.html]yes i have done the ContextFactory settings.
cheers,
navin.
"Per Mengshoel" <[email protected]> wrote in message
news:[email protected]...
>
Hi,
Have you tried setting the ContextFactory before
creating it :
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.soap.http.SoapInitialContextFactory");
//you might want to add this too
h.put("weblogic.soap.verbose", "true" );
Context context = new InitialContext(h);
-Per
"Navin Sidhaye" <[email protected]> wrote:
Hi,
I am facing some veered exception in the RPC style WS. The SS-EJB that
I =
used as the web service is working fine when I directly try to access
=
the EJB.
When I wrote a client I get the following exception on the server side.
<Jan 30, 2002 11:41:54 AM IST> <Error> <HTTP> =
<[WebAppServletContext(2318716,w
-services,/web-services)] Root cause of ServletException
<Jan 30, 2002 11:41:54 AM IST> <Error> <HTTP> =
<[WebAppServletContext(2318716,w
-services,/web-services)] Root cause of ServletException
java.lang.NoSuchMethodException
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Class.java:888)
at =weblogic.soap.server.servlet.StatelessBeanAdapter.init(StatelessBeadapter=
..java:78)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at =weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubpl.jav=
a:700)
at =weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStImpl.j=
ava:643)
at =weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStumpl.ja=
va:588)
at =weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpjava:3=
68)
at =weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubpl.jav=
a:242)
at =weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubpl.jav=
a:200)
at =weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebApprvletC=
ontext.java:2456)
at =weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestpl.jav=
a:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Following is the code that's written on the client side.
ProjectBrokerWSClient client =3D new ProjectBrokerWSClient();
// Obtaining the initial context.
Context context =3D new InitialContext();
// Making a lookup for the required servlet.
WebServiceProxy proxy =3D =
(WebServiceProxy)context.lookup(http://localhost:7001/PB/PBBeanSL.PBHomeS=
L/PBBeanSL.PBHomeSL.wsdl" );
SoapMethod method =3D proxy.getMethod("selfTest");
Object result =3D method.invoke(new Object[]{"# Test message =
The function in the bean is as follows.
public String selfTest(String ostrMessage){
log("inside selfTest()" + ostrMessage);
return "# M e s s a g e r e c e i v e d #";
Please let me know if some thing is wrong out here or I have missed out
=
any conf.
cheers.
n a v i n.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DTahoma size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>I am facing some veered exception
=
in the RPC=20
style WS. The SS-EJB that I used as the web service is working fine when
=
I=20
directly try to access the EJB.</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>When I wrote a client I get the =
following=20
exception on the server side.</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><Jan 30, 2002 11:41:54 AM IST>
=
<Error>=20
<HTTP> =
<[WebAppServletContext(2318716,w<BR>-services,/web-services)]=20
Root cause of ServletException<BR><Jan 30, 2002 11:41:54 AM IST>=20
<Error> <HTTP>=20
<[WebAppServletContext(2318716,w<BR>-services,/web-services)] Root
=
cause of=20
ServletException<BR></FONT><FONT face=3DArial size=3D2><FONT=20
size=3D1>java.lang.NoSuchMethodException<BR> =
; =20
at java.lang.Class.getMethod0(Native=20
Method)<BR> at=20
java.lang.Class.getMethod(Class.java:888)<BR> &nbs=
p; =20
at=20weblogic.soap.server.servlet.StatelessBeanAdapter.init(StatelessBeadapter=
..java:78)<BR> =20
at=20
javax.servlet.GenericServlet.init(GenericServlet.java:258)<BR> =
; =20
at=20weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubpl.jav=
a:700)<BR> =20
at=20weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStImpl.j=
ava:643)<BR> =20
at=20weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStumpl.ja=
va:588)<BR> =20
at=20weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpjava:3=
68)<BR> =20
at=20weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubpl.jav=
a:242)<BR> =20
at=20weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubpl.jav=
a:200)<BR> =20
at=20weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebApprvletC=
ontext.java:2456)<BR> =20
at=20weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestpl.jav=
a:2039)<BR> =20
at=20
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)<BR> &n=
bsp; =20
at=20weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)<BR></FONT></FON=
T></DIV>
<DIV><FONT size=3D2><FONT size=3D1><FONT face=3DTahoma =
size=3D2>Following is the code=20
that's written on the client side.</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1> =20
ProjectBrokerWSClient client =3D new =
ProjectBrokerWSClient();</FONT></DIV>
<DIV><FONT face=3DArial size=3D1></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1>
=
// Obtaining=20
the initial context.<BR> Context
=
context =3D=20
new InitialContext();<BR></FONT><FONT face=3DArial =
size=3D1></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D1> =
//=20
Making a lookup for the required=20
servlet.<BR> WebServiceProxy proxy
=
=3D=20
(WebServiceProxy)context.lookup(</FONT><A =
href=3D"http://localhost:7001/PB/"><FONT=20
size=3D1><A=20
href=3D"http://localhost:7001/PB/PBBeanSL.PBHomeSL/PBBeanSL.PBHomeSL.wsdl=
">http://localhost:7001/PB/</FONT></A><FONT=20
size=3D1>PBBeanSL.PBHomeSL/PBBeanSL.PBHomeSL.wsdl</A>" =
);</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D1> =
SoapMethod=20
method =3D proxy.getMethod("selfTest");<BR></FONT><FONT face=3DArial
=
size=3D2><FONT=20
size=3D1> Object result =3D =
method.invoke(new=20
Object[]{"# Test message #"});</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT =
size=3D1></FONT></FONT> </DIV>
<DIV><FONT size=3D2><FONT size=3D1><FONT face=3DTahoma size=3D2>The =
function in the bean=20
is as follows.</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D1>
=
public String=20
selfTest(String ostrMessage){</FONT></DIV>
<DIV><FONT face=3DArial size=3D1></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1> =20
log("inside selfTest()" +=20
ostrMessage);<BR> &n=
bsp; return=20
"# M e s s a g e r e c e i v e d=20
#";<BR> }<BR></FONT></DIV>=
<DIV><FONT size=3D1><FONT face=3DTahoma size=3D2>Please let me know if
=
some thing is=20
wrong out here or I have missed out any conf.</FONT></FONT></DIV>
<DIV><FONT size=3D1><FONT face=3DTahoma =
size=3D2></FONT></FONT> </DIV>
<DIV><FONT size=3D1><FONT face=3DTahoma =
size=3D2>cheers.</FONT></FONT></DIV>
<DIV><FONT size=3D1><FONT face=3DTahoma size=3D2><STRONG>n a v i=20
n.</STRONG></FONT></DIV></FONT>
<DIV><FONT face=3DArial size=3D1> </DIV></FONT>
<DIV><FONT face=3DArial size=3D2><FONT size=3D1><FONT =
size=3D2></FONT> </DIV>
<DIV><BR></DIV></FONT></FONT></BODY></HTML> -
Dosen't generate Client stubs; java.lang.NoSuchMethodException
I'm trying to do the sameple web services at http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html
I got error in Client Configuration Page (step 25) , when I clicked Finish,
It show following error. Please help me to resolve. Thanks.
Exception occurred while code generation for WSDL org.apache.axis2.description.WSDL11ToAxisServiceBuilder.setCodegen(boolean)
Exception occurred while code generation for WSDL org.apache.axis2.description.WSDL11ToAxisServiceBuilder.setCodegen(boolean)
java.lang.NoSuchMethodException: org.apache.axis2.description.WSDL11ToAxisServiceBuilder.setCodegen(boolean)
at java.lang.Class.getMethod(Unknown Source)
at org.eclipse.jst.ws.axis2.consumption.core.utils.WSDL2JavaGenerator.getAxisService(WSDL2JavaGenerator.java:369)
at org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientCodegenCommand.execute(Axis2ClientCodegenCommand.java:89)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:418)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:358)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:253)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$5.run(SimpleCommandEngineManager.java:252)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:222)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:96)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:255)
at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:380)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)Edited by: Nidh on Dec 21, 2007 5:34 AMNorbert,
Bill has mentioned in the past that the JARs present in the SDK have to
match those JARs that live on the SLM server - there are some new
methods and whatnot that have been added.
So copy any JARs from SLM that match anything in
//content/dev/sdk/build over, and try again.
DCorlette
DCorlette's Profile: http://forums.novell.com/member.php?userid=4437
View this thread: http://forums.novell.com/showthread.php?t=441144 -
Hi everybody:
I created a Mobile service component and a Data Structure with 3 attributes. I created and instantiated the collection and showed all objects in a table but I´m getting the following error:java.lang.NoSuchMethodException: java.util.Vector.isX() where X is the name of the each attribute I defined. so I´m getting this error twice for each attribute.
Complete stack:
java.lang.NoSuchMethodException: java.util.Vector.isX()
at java.lang.Class.getMethod(Class.java:1581)
at com.sap.tc.mobile.wdlite.progmodel.core.context.JavaBeanCMIModel.invokeMethod(JavaBeanCMIModel.java:366)
at com.sap.tc.mobile.wdlite.progmodel.core.context.JavaBeanCMIModel.invokeGetMethod(JavaBeanCMIModel.java:279)
at com.sap.tc.mobile.wdlite.progmodel.core.context.JavaBeanCMIModel.getAttributeValue(JavaBeanCMIModel.java:81)
at com.sap.tc.mobile.wdlite.progmodel.core.context.NodeElement.getAttributeValue(NodeElement.java:104)
at com.sap.tc.mobile.wdlite.progmodel.core.context.NodeElement.getAttributeValue(NodeElement.java:85)
at com.sap.tc.mobile.wdlite.progmodel.core.context.NodeElementWrapper.getAttributeValue(NodeElementWrapper.java:26)
at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNode.getAttributeValue(ContextNode.java:578)
at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNode.getAttributeValue(ContextNode.java:569)
at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNodeMapped.getAttributeValue(ContextNodeMapped.java:134)
at com.sap.tc.mobile.wdlite.progmodel.core.viewelement.Property.listenContextNodeCursorChanged(Property.java:173)
at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNode.addContextNodeElementListener(ContextNode.java:616)
at com.sap.tc.mobile.wdlite.progmodel.core.viewelement.Property.setBinding(Property.java:73)
at com.sap.tc.mobile.wdlite.progmodel.core.viewelement.Property.setBinding(Property.java:57)
at com.xioma.demo.testeui0001.comp1.Comp1ViewView.(Comp1ViewView.java:615)
at com.xioma.demo.testeui0001.comp1.Comp1ViewView.getInstance0(Comp1ViewView.java:31)
at com.xioma.demo.testeui0001.comp1.Comp1ViewView.getInstance(Comp1ViewView.java:45)
at com.xioma.demo.testeui0001.comp1.Comp1WindowWindow.getDefaultView(Comp1WindowWindow.java:38)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:477)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:243)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.setCurrent(Application.java:119)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:143)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:175)
at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:387)
at com.sap.tc.mobile.wdlite.container.ContainerApp.startApp(ContainerApp.java:155)
at com.sap.tc.mobile.wdlite.container.AppMenuView.onActionLaunchApp(AppMenuView.java:327)
at com.sap.tc.mobile.wdlite.container.AppMenuView.invokeEventHandler(AppMenuView.java:370)
at com.sap.tc.mobile.wdlite.progmodel.core.AbstractViewElement.doHandleEvent(AbstractViewElement.java:207)
at com.sap.tc.mobile.wdlite.renderer.api.UIElement.doHandleEvent(UIElement.java:399)
at com.sap.tc.mobile.wdlite.renderer.api.UIImageButton.mouseReleased(UIImageButton.java:148)
at com.sap.tc.mobile.wdlite.renderer.api.UIElement.dispatchMouseReleasedWidgetEvent(UIElement.java:442)
at com.sap.tc.mobile.wdlite.renderer.api.UIElement$1.mouseReleased(UIElement.java:485)
at com.sap.tc.mobile.wdlite.renderer.swt.MouseEventDispatcher.mouseUp(SWTControl.java:362)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at com.sap.tc.mobile.wdlite.renderer.swt.container.WorkingArea.refresh(WorkingArea.java:175)
at com.sap.tc.mobile.wdlite.renderer.api.RenderingManager.refresh(RenderingManager.java:233)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.refresh(Application.java:250)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:503)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:243)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.setCurrent(Application.java:119)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:143)
at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:175)
at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:387)
at com.sap.tc.mobile.wdlite.framework.Start.runOnContext(Start.java:585)
at com.sap.tc.mobile.wdlite.framework.Start.startApplication(Start.java:609)
at com.sap.tc.mobile.wdlite.framework.Start.startContainer(Start.java:646)
at com.sap.tc.mobile.cfs.framework.spi.FrameworkManager.startContainer(FrameworkManager.java:259)
at com.sap.tc.mobile.cfs.init.FrameworkInitializer.init(FrameworkInitializer.java:230)
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 com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)
The errors are throw when the application starts, the custom code works ok.
Any idea?
Thanks a lot for your time on this thread.
Rocío.Ho Rocio,
The creme JVM is compatible with JDK 1.3.Please make sure that the API you are using is available in 1.3 API set.
Best Regards,
Amit -
Java.lang.NoSuchMethodException: unbound
Hi,
I have a class com.vo.EmpInfo with a funtion as below.
private int leaveCount;
public void setLeaveCount(int leaveCount) {
this.leaveCount = leaveCount;
And I'm accessing this function from a class com.emp.EmpMonitor.
((EmpInfo) empList.get(i)).setLeaveCount(leaveCount);
where empList is an ArrayList of EmpInfo objects.
When I run this peice of code, I'm getting the following exception
java.lang.NoSuchMethodException: <unbound>=EmpInfo.setLeaveCount(Integer);
Continuing ...
I'm using Jdk1.5.
Can anyone please help me understand what excatly this exception states ?
Thanks in Advance.
Jane AntonyTo get better help sooner, post a [_SSCCE_|http://mindprod.com/jgloss/sscce.html] that clearly demonstrates your problem.
Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
I'm using Jdk1.5.Are you sure you are compiling to Java 1.5 or to an earlier version? Autoboxing, or under-the-covers conversion between (for instance) int and Integer shouldn't give you a problem in 1.5 or later.
Oh, and the error means that your method accepts an int (primitive data type) parameter, whereas it is being invoked with an Integer (wrapper class object) parameter. What's the type of the variable leaveCount in this line?((EmpInfo) empList.get(i)).setLeaveCount(leaveCount);On an aside, you should be using Generics (ArrayList<EmpInfo> empList) )instead of casting the type of the value returned from empList.get(...).
db -
WebLogic Test Client, throws java.lang.NoSuchMethodException
In weblogic server 10.3, the WebLogic Test Client, throws java.lang.NoSuchMethodException for “any” soap fault message from the web service.
In Detail:
Our web services uses JAX-WS spec and are deployed in WebLogic server 10.3.The web service ear file is generated using standard ant utility. We are using “WebLogic Test Client” available through WebLogic server administration console .The issue is, for “any” soap fault message from the web service, the test client generates “java.lang.NoSuchMethodException:” . The key point is we are creating this class. We are not using our own client. WebLogic Test Client 's service response section has the following stack trace.
S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Server</faultcode>
<faultstring>java.lang.NoSuchMethodException: our.custom.package.name.jaxws.IllegalStateWSFaultExceptionBean.setErrorCode(java.lang.String)</faultstring>
<detail>
<ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/" class="com.sun.xml.ws.encoding.soap.SerializationException" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false">
<message>java.lang.NoSuchMethodException: our.custom.package.name.jaxws.IllegalStateWSFaultExceptionBean.setErrorCode(java.lang.String)</message>
<ns2:stackTrace>
<ns2:frame class="com.sun.xml.ws.fault.SOAPFaultBuilder" file="SOAPFaultBuilder.java" line="328" method="createDetailFromUserDefinedException" />
<ns2:frame class="com.sun.xml.ws.fault.SOAPFaultBuilder" file="SOAPFaultBuilder.java" line="306" method="getFaultDetail" />
<ns2:frame class="com.sun.xml.ws.fault.SOAPFaultBuilder" file="SOAPFaultBuilder.java" line="170" method="createSOAPFaultMessage" />
<ns2:frame class="com.sun.xml.ws.server.sei.EndpointMethodHandler" file="EndpointMethodHandler.java" line="265" method="invoke" />
<ns2:frame class="com.sun.xml.ws.server.sei.SEIInvokerTube" file="SEIInvokerTube.java" line="93" method="processRequest" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="598" method="__doRun" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="557" method="_doRun" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="542" method="doRun" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="439" method="runSync" />
<ns2:frame class="com.sun.xml.ws.server.WSEndpointImpl$2" file="WSEndpointImpl.java" line="243" method="process" />
<ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" file="HttpAdapter.java" line="444" method="handle" />
<ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter" file="HttpAdapter.java" line="244" method="handle" />
<ns2:frame class="com.sun.xml.ws.transport.http.servlet.ServletAdapter" file="ServletAdapter.java" line="134" method="handle" />
<ns2:frame class="weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke" file="HttpServletAdapter.java" line="272" method="run" />
<ns2:frame class="weblogic.wsee.jaxws.HttpServletAdapter" file="HttpServletAdapter.java" line="185" method="post" />
<ns2:frame class="weblogic.wsee.jaxws.JAXWSServlet" file="JAXWSServlet.java" line="180" method="doPost" />
<ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="727" method="service" />
<ns2:frame class="weblogic.wsee.jaxws.JAXWSServlet" file="JAXWSServlet.java" line="64" method="service" />
<ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="820" method="service" />
<ns2:frame class="weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction" file="StubSecurityHelper.java" line="227" method="run" />
<ns2:frame class="weblogic.servlet.internal.StubSecurityHelper" file="StubSecurityHelper.java" line="125" method="invokeServlet" />
<ns2:frame class="weblogic.servlet.internal.ServletStubImpl" file="ServletStubImpl.java" line="292" method="execute" />
<ns2:frame class="weblogic.servlet.internal.ServletStubImpl" file="ServletStubImpl.java" line="175" method="execute" />
<ns2:frame class="weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction" file="WebAppServletContext.java" line="3498" method="run" />
<ns2:frame class="weblogic.security.acl.internal.AuthenticatedSubject" file="AuthenticatedSubject.java" line="321" method="doAs" />
<ns2:frame class="weblogic.security.service.SecurityManager" line="unknown" method="runAs" />
<ns2:frame class="weblogic.servlet.internal.WebAppServletContext" file="WebAppServletContext.java" line="2180" method="securedExecute" />
<ns2:frame class="weblogic.servlet.internal.WebAppServletContext" file="WebAppServletContext.java" line="2086" method="execute" />
<ns2:frame class="weblogic.servlet.internal.ServletRequestImpl" file="ServletRequestImpl.java" line="1406" method="run" />
<ns2:frame class="weblogic.work.ExecuteThread" file="ExecuteThread.java" line="201" method="execute" />
<ns2:frame class="weblogic.work.ExecuteThread" file="ExecuteThread.java" line="173" method="run" />
</ns2:stackTrace>
<ns2:cause class="java.lang.NoSuchMethodException" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false">
<message>our.custom.package.name.jaxws.IllegalStateWSFaultExceptionBean.setErrorCode(java.lang.String)</message>
<ns2:stackTrace>
<ns2:frame class="java.lang.Class" file="Class.java" line="1605" method="getMethod" />
<ns2:frame class="com.sun.xml.ws.fault.SOAPFaultBuilder" file="SOAPFaultBuilder.java" line="323" method="createDetailFromUserDefinedException" />
<ns2:frame class="com.sun.xml.ws.fault.SOAPFaultBuilder" file="SOAPFaultBuilder.java" line="306" method="getFaultDetail" />
<ns2:frame class="com.sun.xml.ws.fault.SOAPFaultBuilder" file="SOAPFaultBuilder.java" line="170" method="createSOAPFaultMessage" />
<ns2:frame class="com.sun.xml.ws.server.sei.EndpointMethodHandler" file="EndpointMethodHandler.java" line="265" method="invoke" />
<ns2:frame class="com.sun.xml.ws.server.sei.SEIInvokerTube" file="SEIInvokerTube.java" line="93" method="processRequest" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="598" method="__doRun" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="557" method="_doRun" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="542" method="doRun" />
<ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="439" method="runSync" />
<ns2:frame class="com.sun.xml.ws.server.WSEndpointImpl$2" file="WSEndpointImpl.java" line="243" method="process" />
<ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" file="HttpAdapter.java" line="444" method="handle" />
<ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter" file="HttpAdapter.java" line="244" method="handle" />
<ns2:frame class="com.sun.xml.ws.transport.http.servlet.ServletAdapter" file="ServletAdapter.java" line="134" method="handle" />
<ns2:frame class="weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke" file="HttpServletAdapter.java" line="272" method="run" />
<ns2:frame class="weblogic.wsee.jaxws.HttpServletAdapter" file="HttpServletAdapter.java" line="185" method="post" />
<ns2:frame class="weblogic.wsee.jaxws.JAXWSServlet" file="JAXWSServlet.java" line="180" method="doPost" />
<ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="727" method="service" />
<ns2:frame class="weblogic.wsee.jaxws.JAXWSServlet" file="JAXWSServlet.java" line="64" method="service" />
<ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="820" method="service" />
<ns2:frame class="weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction" file="StubSecurityHelper.java" line="227" method="run" />
<ns2:frame class="weblogic.servlet.internal.StubSecurityHelper" file="StubSecurityHelper.java" line="125" method="invokeServlet" />
<ns2:frame class="weblogic.servlet.internal.ServletStubImpl" file="ServletStubImpl.java" line="292" method="execute" />
<ns2:frame class="weblogic.servlet.internal.ServletStubImpl" file="ServletStubImpl.java" line="175" method="execute" />
<ns2:frame class="weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction" file="WebAppServletContext.java" line="3498" method="run" />
<ns2:frame class="weblogic.security.acl.internal.AuthenticatedSubject" file="AuthenticatedSubject.java" line="321" method="doAs" />
<ns2:frame class="weblogic.security.service.SecurityManager" line="unknown" method="runAs" />
<ns2:frame class="weblogic.servlet.internal.WebAppServletContext" file="WebAppServletContext.java" line="2180" method="securedExecute" />
<ns2:frame class="weblogic.servlet.internal.WebAppServletContext" file="WebAppServletContext.java" line="2086" method="execute" />
<ns2:frame class="weblogic.servlet.internal.ServletRequestImpl" file="ServletRequestImpl.java" line="1406" method="run" />
<ns2:frame class="weblogic.work.ExecuteThread" file="ExecuteThread.java" line="201" method="execute" />
<ns2:frame class="weblogic.work.ExecuteThread" file="ExecuteThread.java" line="173" method="run" />
</ns2:stackTrace>
</ns2:cause>
</ns2:exception>
</detail>
</S:Fault>
</S:Body>
</S:Envelope>Thanks for your assistance. Here is the log from weblogic. You may find "xxx" and "yyy" terms. these are given to our specific project oriented names. If you need any further info please let me know. Again a brief about the issue. when the service returns a fault soap message, the server trying to set the error code in a class generated by it's own where the method is not avilable. this happens for all fault soap message. In case of right response from the service no issues. all are working fine.
Note: Max 3000 characters are allowed to post. so truncating initial stack trace.
Thanks, ganesh.
<xxx JDBC connection is xxx.jdbc.driver.LogicalConnection@2e0bd8e
Bound datums[Lxxx.sql.STRUCT;@1b2d059
xxx JDBC connection is xxx.jdbc.driver.LogicalConnection@1aa0f36
xxx JDBC connection is xxx.jdbc.driver.LogicalConnection@191d9ba
Bound datums[Lxxx.sql.STRUCT;@1dc70ec
xxx JDBC connection is xxx.jdbc.driver.LogicalConnection@1def11c
xxx JDBC connection is xxx.jdbc.driver.LogicalConnection@2683f76
Bound datums[Lxxx.sql.STRUCT;@197400e
Caused by: our.package.name.integration.services.exception.IllegalStateWSFaultException: Service Provider API did not return any object back.
at xxx.xxx.yyy.integration.services.xxxservice.xxxService.findxxxxxx(xxxService.java:576)
at sun.xxxlect.GeneratedMethodAccessor763.invoke(Unknown Source)
at sun.xxxlect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.xxxlect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingxxxlection(AopUtils.java:281)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.invokeJoinpoint(xxxlectiveMethodInvocation.java:187)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:154)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:15)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:30)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy188.findxxxxxx(Unknown Source)
at xxx.xxx.yyy.integration.services.xxxservice.xxxService_n3bi9u_WSOImpl.__WL_findxxxxxx_WS(xxxService_n3bi9u_WSOImpl.java:75)
at sun.xxxlect.GeneratedMethodAccessor762.invoke(Unknown Source)
at sun.xxxlect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.xxxlect.Method.invoke(Method.java:597)
at weblogic.wsee.server.ejb.WsEjb.invoke(WsEjb.java:50)
at weblogic.wsee.jaxws.WLSEjbInstanceResolver$WLSEjbInvoker.invoke(WLSEjbInstanceResolver.java:187)
... 30 more
Caused by: java.lang.IllegalStateException: Service Provider API did not return any object back.
at our.package.name.soa.enabler.service.provider.engine.ServiceInvoker.invoke(ServiceInvoker.java:156)
at xxx.xxx.yyy.integration.services.xxxservice.xxxService.findxxxxxx(xxxService.java:545)
... 56 more
Nov 21, 2008 9:38:27 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
INFO: Service Provider API did not return any object back.
our.package.name.integration.services.exception.IllegalStateWSFaultException: Service Provider API did not return any object back.
at xxx.xxx.yyy.integration.services.xxxservice.xxxService.findxxxxxx(xxxService.java:576)
at sun.xxxlect.GeneratedMethodAccessor763.invoke(Unknown Source)
at sun.xxxlect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.xxxlect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingxxxlection(AopUtils.java:281)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.invokeJoinpoint(xxxlectiveMethodInvocation.java:187)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:154)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:15)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:30)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.xxxlectiveMethodInvocation.proceed(xxxlectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy188.findxxxxxx(Unknown Source)
at xxx.xxx.yyy.integration.services.xxxservice.xxxService_n3bi9u_WSOImpl.__WL_findxxxxxx_WS(xxxService_n3bi9u_WSOImpl.java:75)
at sun.xxxlect.GeneratedMethodAccessor762.invoke(Unknown Source)
at sun.xxxlect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.xxxlect.Method.invoke(Method.java:597)
at weblogic.wsee.server.ejb.WsEjb.invoke(WsEjb.java:50)
at weblogic.wsee.jaxws.WLSEjbInstanceResolver$WLSEjbInvoker.invoke(WLSEjbInstanceResolver.java:187)
at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:71)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.IllegalStateException: Service Provider API did not return any object back.
at our.package.name.soa.enabler.service.provider.engine.ServiceInvoker.invoke(ServiceInvoker.java:156)
at xxx.xxx.yyy.integration.services.xxxservice.xxxService.findxxxxxx(xxxService.java:545)
... 56 more
com.sun.xml.ws.encoding.soap.SerializationException: java.lang.NoSuchMethodException: xxx.xxx.yyy.integration.services.xxxservice.jaxws.IllegalStateWSFaultExceptionBean.setErrorCode(java.lang.String)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createDetailFromUserDefinedException(SOAPFaultBuilder.java:328)
at com.sun.xml.ws.fault.SOAPFaultBuilder.getFaultDetail(SOAPFaultBuilder.java:306)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:170)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:265)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.NoSuchMethodException: xxx.xxx.yyy.integration.services.xxxservice.jaxws.IllegalStateWSFaultExceptionBean.setErrorCode(java.lang.String)
at java.lang.Class.getMethod(Class.java:1605)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createDetailFromUserDefinedException(SOAPFaultBuilder.java:323)
... 30 more -
All:
I have completed the following:
1. Downloaded the JavaMail 1.4.2 API.
2. From this downloaded API I had extracted the mail.jar file (timestamp 2009-02-26 13:28) to my C:\Program Files\Tomcat 6.0\lib directory
3. Downloaded the jaf-1_0_2-upd2 API
4. From this downloaded API I had extracted the activation.jar file (timestamped 2005-05-07 21:14) also to my C:\Program Files\Tomcat 6.0\lib directory.
In Eclipse I have created a simple JSP page that calls a POJO that is to read a particular email box using IMAP. In this POJO I have code to set up the Properties, Session and Store objects as such:
Line 1 Properties properties = System.getProperties();
Line 2 properties.put("mail.from", "[email protected]");
Line 3 properties.put("mail.debug","true");
Line 4 session = Session.getDefaultInstance(properties, null);
Line 5 session.setDebug(debug);
Line 6 printData("About to get store object...");
Line 7 store = session.getStore("imap");
In eclispe, I click "Debug on Server" and Tomcat starts, begins to display my JSP and then I am dropped on the line of code in my POJO where I set a breakpoint (Line 1). Now I single step through the code. The code throws the following execption when it executes line 7 of the above code :
(Line 6 ==>) About to get store object...
DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
java.lang.NoSuchMethodException: com.sun.mail.imap.IMAPStore.<init>(javax.mail.Session, javax.mail.URLName)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at javax.mail.Session.getService(Session.java:782)
at javax.mail.Session.getStore(Session.java:574)
at javax.mail.Session.getStore(Session.java:536)
at javax.mail.Session.getStore(Session.java:515)
at emailTest.readEmails.processMail(readEmails.java:62)
at emailTest.readEmails.<init>(readEmails.java:24)
at org.apache.jsp.emailTest_jsp._jspService(emailTest_jsp.java:94)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
There are no jar files defined in my project's classpath. The only jar file found in the project is in the WEB-INF\lib folder wherein I have a jndi.jar (timstamp 5/5/2009 8:10AM) file.
I put the activation.jar file and the mail.jar file in my Tomcat.6\lib folder according item 4 of the JavaMail Sessions section of the Apache Tomcat JNDI Resources HOW_TO found here: http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
Can anybody please tell me what I need to do to get around this error? Do I perhaps have the wrong versions of one or more jar files?
FYI: I have also put these same two jar files in my projects classpath and still recevied the same exception. Because I am invoking a POJO from a JSP should these jar files be in my projects classpath in addition to the tomcat\lib directory, or should they only be in the projects' classpath?
Thanks to all for your time in responding.
Garybshannon:
Thank you for your resonse. Your response got me to thinking that my instance of Ecliplse that I had had running yesterday was behaving a little strangely so this morning I closed everything I had running on my workstation and closed down the machine and rebooted. When I finally opend up Eclipse again and ran my JSP program calling my POJO, the code no longer threw the exception. Apparently Eclipse can have its tempermental moments.
Also, let it be known that while everything is working for me now, I performed a small experiment. I moved the activiation.jar and mail.jar from my project\WEB-INF\lib folder and put them in the the C:\Program Files\Tomcat 6.0\lib directory. Then, when I ran my program I once again recieved the java.lang.NoSuchMethodException error. When I moved these jar files back from the Tomcat diretory to my project\WEB-INF\lib directory, the program worked just fine.
Thanks again
Gary -
Java.lang.NoSuchMethodException
Hi,
I'm a beginner in learning CMP EJB. I've encountered the below error, when I tried to create a CMP EJB using a servlet.
I am using pointbase as my database.
INFO: CORE3276: Installing a new configuration
INFO: CORE3280: A new configuration was successfully installed
INFO: WEB4004: Closing web application environment for virtual server [server1]
INFO: LDR5010: All ejb(s) of [StorageDeviceApp] loaded successfully!
WARNING: CORE3229: Quality of service (QOS) is disabled in the HTTP service. Un
able to turn on QOS features.
INFO: CORE3276: Installing a new configuration
INFO: WEB0100: Loading web module [StorageDeviceApp:servlet.war] in virtual serv
er [server1] at [defaultContext]
INFO: WEB0116: Using alternate deployment descriptor [C:\Sun\AppServer7\domains\
domain1\server1\applications\j2ee-apps\StorageDeviceApp_1\servlet_war/../servlet
.xml] for web module [StorageDeviceApp:servlet.war]
INFO: CORE3282: stdout: looking up java:comp/env/ejb/jndiStorageDevice
INFO: CORE3282: stdout: lookup ok
INFO: CORE3282: stdout: creating stocker 88
INFO: CORE3282: stdout: setting entity context
INFO: CORE3282: stdout: finished setting context
WARNING: CORE3283: stderr: java.lang.NoSuchMethodException: setdataSourceName
WARNING: CORE3283: stderr: at com.sun.enterprise.util.Utility.invokeSetMeth
odCaseInsensitive(Utility.java:373)
WARNING: CORE3283: stderr: at com.sun.enterprise.repository.JdbcConnectionP
ool.createDataSource(JdbcConnectionPool.java:238)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.JdbcUrlAllocator.
createResource(JdbcUrlAllocator.java:80)
SEVERE: RAR5027:Unexpected exception in resource pooling
com.sun.enterprise.resource.PoolingException
at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAl
locator.java:100)
at com.sun.enterprise.resource.IASNonSharedResourcePool.createSteadyReso
urces(IASNonSharedResourcePool.java:856)
at com.sun.enterprise.resource.IASNonSharedResourcePool.initPool(IASNonS
haredResourcePool.java:416)
at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResou
rce(IASNonSharedResourcePool.java:625)
at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASN
onSharedResourcePool.java:520)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolM
anagerImpl.java:263)
at com.sun.enterprise.resource.JdbcXAConnection.<init>(JdbcXAConnection.
java:74)
at com.sun.enterprise.resource.SystemJdbc10XaAllocator.createResource(Sy
stemJdbc10XaAllocator.java:52)
at com.sun.enterprise.resource.IASNonSharedResourcePool.createSteadyReso
urces(IASNonSharedResourcePool.java:856)
at com.sun.enterprise.resource.IASNonSharedResourcePool.initPool(IASNonS
haredResourcePool.java:416)
at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResou
rce(IASNonSharedResourcePool.java:625)
at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASN
onSharedResourcePool.java:520)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolM
anagerImpl.java:263)
at com.sun.enterprise.resource.SystemJdbcDataSource.internalGetConnectio
n(SystemJdbcDataSource.java:226)
at com.sun.enterprise.resource.SystemJdbcDataSource.getConnection(System
JdbcDataSource.java:154)
at com.sun.jdo.spi.persistence.support.sqlstore.ejb.TransactionHelperImp
l.getConnection(TransactionHelperImpl.java:171)
at com.sun.jdo.spi.persistence.support.sqlstore.ejb.EJBHelper.getConnect
ion(EJBHelper.java:169)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getDBName(SQLPersistenceManagerFactory.java:781)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getFromPool(SQLPersistenceManagerFactory.java:709)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:598)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerF
actoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:770)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerF
actoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:660)
at device.StorageDeviceBean_826330090_ConcreteImpl.jdoGetPersistenceMana
ger(StorageDeviceBean_826330090_ConcreteImpl.java:539)
at device.StorageDeviceBean_826330090_ConcreteImpl.ejbCreate(StorageDevi
ceBean_826330090_ConcreteImpl.java:255)
at device.StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl.create
(StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl.java:27)
at device._StorageDeviceHome_Stub.create(Unknown Source)
at StorageDeviceServlet.init(StorageDeviceServlet.java:40)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:921)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
3)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3346)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
592)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345
at org.apache.catalina.startup.Embedded.start(Embedded.java:957)
at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426)
at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170)
com.sun.enterprise.repository.J2EEResourceException
java.lang.NoSuchMethodE
WARNING: Cannot get database metadata: database product name.
java.sql.SQLException: com.sun.enterprise.repository.J2EEResourceException
java.lang.NoSuchMethodException: setdataSourceName
at com.sun.enterprise.resource.SystemJdbcDataSource.internalGetConnectio
n(SystemJdbcDataSource.java:252)
at com.sun.enterprise.resource.SystemJdbcDataSource.getConnection(System
JdbcDataSource.java:154)
at com.sun.jdo.spi.persistence.support.sqlstore.ejb.TransactionHelperImp
l.getConnection(TransactionHelperImpl.java:171)
at com.sun.jdo.spi.persistence.support.sqlstore.ejb.EJBHelper.getConnect
ion(EJBHelper.java:169)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getDBName(SQLPersistenceManagerFactory.java:781)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getFromPool(SQLPersistenceManagerFactory.java:709)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:598)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerF
actoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:770)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerF
actoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:660)
at device.StorageDeviceBean_826330090_ConcreteImpl.jdoGetPersistenceMana
ger(StorageDeviceBean_826330090_ConcreteImpl.java:539)
at device.StorageDeviceBean_826330090_ConcreteImpl.ejbCreate(StorageDevi
ceBean_826330090_ConcreteImpl.java:255)
at device.StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl.create
(StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl.java:27)
at device._StorageDeviceHome_Stub.create(Unknown Source)
at StorageDeviceServlet.init(StorageDeviceServlet.java:40)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:921)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
3)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3346)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
592)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345
at org.apache.catalina.startup.Embedded.start(Embedded.java:957)
at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426)
at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170)
INFO: Bean StorageDevice method ejbCreate: problems during ejbCreate; parameters
: Stocker88, 88
com.sun.jdo.api.persistence.support.JDOFatalInternalException: Failed to get the
vendor type for the data store.
NestedException: java.sql.SQLException: com.sun.enterprise.repository.J2EEResour
ceException
java.lang.NoSuchMethodException: setdataSourceName
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getDBName(SQLPersistenceManagerFactory.java:802)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getFromPool(SQLPersistenceManagerFactory.java:709)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManag
erFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:598)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerF
actoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:770)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerF
actoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:660)
at device.StorageDeviceBean_826330090_ConcreteImpl.jdoGetPersistenceMana
ger(StorageDeviceBean_826330090_ConcreteImpl.java:539)
at device.StorageDeviceBean_826330090_ConcreteImpl.ejbCreate(StorageDevi
ceBean_826330090_ConcreteImpl.java:255)
at device.StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl.create
(StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl.java:27)
at device._StorageDeviceHome_Stub.create(Unknown Source)
at StorageDeviceServlet.init(StorageDeviceServlet.java:40)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:921)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
3)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3346)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
592)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345
at org.apache.catalina.startup.Embedded.start(Embedded.java:957)
at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426)
at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.createSteadyResources(IASNonSharedResourcePool.java:856)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.initPool(IASNonSharedResourcePool.java:416)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.internalGetResource(IASNonSharedResourcePool.java:625)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.getResource(IASNonSharedResourcePool.java:520)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.PoolManagerImpl.g
etResourceFromPool(PoolManagerImpl.java:263)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.JdbcXAConnection.
<init>(JdbcXAConnection.java:74)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.SystemJdbc10XaAll
ocator.createResource(SystemJdbc10XaAllocator.java:52)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.createSteadyResources(IASNonSharedResourcePool.java:856)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.initPool(IASNonSharedResourcePool.java:416)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.internalGetResource(IASNonSharedResourcePool.java:625)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResou
rcePool.getResource(IASNonSharedResourcePool.java:520)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.PoolManagerImpl.g
etResourceFromPool(PoolManagerImpl.java:263)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.SystemJdbcDataSou
rce.internalGetConnection(SystemJdbcDataSource.java:226)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.SystemJdbcDataSou
rce.getConnection(SystemJdbcDataSource.java:154)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
ejb.TransactionHelperImpl.getConnection(TransactionHelperImpl.java:171)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
ejb.EJBHelper.getConnection(EJBHelper.java:169)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.SQLPersistenceManagerFactory.getDBName(SQLPersistenceManagerFactory.java:78
1)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:
709)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFac
tory.java:598)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFacto
ryImpl.java:770)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFacto
ryImpl.java:660)
WARNING: CORE3283: stderr: at device.StorageDeviceBean_826330090_ConcreteIm
pl.jdoGetPersistenceManager(StorageDeviceBean_826330090_ConcreteImpl.java:539)
WARNING: CORE3283: stderr: at device.StorageDeviceBean_826330090_ConcreteIm
pl.ejbCreate(StorageDeviceBean_826330090_ConcreteImpl.java:255)
WARNING: CORE3283: stderr: at device.StorageDeviceBean_826330090_ConcreteIm
pl_RemoteHomeImpl.create(StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl
.java:27)
WARNING: CORE3283: stderr: at device._StorageDeviceHome_Stub.create(Unknown
Source)
WARNING: CORE3283: stderr: at StorageDeviceServlet.init(StorageDeviceServle
t.java:40)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapper.load
Servlet(StandardWrapper.java:921)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:813)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardContext.load
OnStartup(StandardContext.java:3346)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardContext.star
t(StandardContext.java:3592)
WARNING: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1123)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardHost.start(S
tandardHost.java:638)
WARNING: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1123)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:345)
WARNING: CORE3283: stderr: at org.apache.catalina.startup.Embedded.start(Em
bedded.java:957)
WARNING: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.start(WebCon
tainer.java:426)
WARNING: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.startInstanc
e(WebContainer.java:514)
WARNING: CORE3283: stderr: at com.iplanet.ias.server.J2EERunner.confPostIni
t(J2EERunner.java:170)
WARNING: CORE3283: stderr: Caught an exception.
WARNING: CORE3283: stderr: java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
WARNING: CORE3283: stderr: java.rmi.RemoteException: nested exception is: c
om.sun.jdo.api.persistence.support.JDOFatalInternalException: Failed to get the
vendor type for the data store.
WARNING: CORE3283: stderr: NestedException: java.sql.SQLException: com.sun.enter
prise.repository.J2EEResourceException
WARNING: CORE3283: stderr: java.lang.NoSuchMethodException: setdataSourceName; n
ested exception is:
WARNING: CORE3283: stderr: com.sun.jdo.api.persistence.support.JDOFatalInte
rnalException: Failed to get the vendor type for the data store.
WARNING: CORE3283: stderr: NestedException: java.sql.SQLException: com.sun.enter
prise.repository.J2EEResourceException
WARNING: CORE3283: stderr: java.lang.NoSuchMethodException: setdataSourceName
WARNING: CORE3283: stderr: at com.sun.corba.ee.internal.javax.rmi.CORBA.Uti
l.wrapException(Util.java:364)
WARNING: CORE3283: stderr: at javax.rmi.CORBA.Util.wrapException(Util.java:
277)
WARNING: CORE3283: stderr: at device._StorageDeviceHome_Stub.create(Unknown
Source)
WARNING: CORE3283: stderr: at StorageDeviceServlet.init(StorageDeviceServle
t.java:40)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapper.load
Servlet(StandardWrapper.java:921)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:813)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardContext.load
OnStartup(StandardContext.java:3346)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardContext.star
t(StandardContext.java:3592)
WARNING: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1123)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardHost.start(S
tandardHost.java:638)
WARNING: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1123)
WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:345)
WARNING: CORE3283: stderr: at org.apache.catalina.startup.Embedded.start(Em
bedded.java:957)
WARNING: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.start(WebCon
tainer.java:426)
WARNING: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.startInstanc
e(WebContainer.java:514)
WARNING: CORE3283: stderr: at com.iplanet.ias.server.J2EERunner.confPostIni
t(J2EERunner.java:170)
WARNING: CORE3283: stderr: Caused by: java.rmi.RemoteException: nested exception
is: com.sun.jdo.api.persistence.support.JDOFatalInternalException: Failed to ge
t the vendor type for the data store.
WARNING: CORE3283: stderr: NestedException: java.sql.SQLException: com.sun.enter
prise.repository.J2EEResourceException
WARNING: CORE3283: stderr: java.lang.NoSuchMethodException: setdataSourceName; n
ested exception is:
WARNING: CORE3283: stderr: com.sun.jdo.api.persistence.support.JDOFatalInte
rnalException: Failed to get the vendor type for the data store.
WARNING: CORE3283: stderr: NestedException: java.sql.SQLException: com.sun.enter
prise.repository.J2EEResourceException
WARNING: CORE3283: stderr: java.lang.NoSuchMethodException: setdataSourceName
WARNING: CORE3283: stderr: at com.sun.enterprise.iiop.POAProtocolMgr.mapExc
eption(POAProtocolMgr.java:451)
WARNING: CORE3283: stderr: at com.sun.ejb.containers.BaseContainer.postInvo
ke(BaseContainer.java:545)
INFO: CORE3280: A new configuration was successfully installed
INFO: WEB4004: Closing web application environment for virtual server [server1]
WARNING: CORE3283: stderr: at device.StorageDeviceBean_826330090_ConcreteIm
pl_RemoteHomeImpl.create(StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl
.java:33)
WARNING: CORE3283: stderr: at device._StorageDeviceHome_Stub.create(Unknown
Source)
WARNING: CORE3283: stderr: ... 13 more
WARNING: CORE3283: stderr: Caused by: com.sun.jdo.api.persistence.support.JDOFat
alInternalException: Failed to get the vendor type for the data store.
WARNING: CORE3283: stderr: NestedException: java.sql.SQLException: com.sun.enter
prise.repository.J2EEResourceException
WARNING: CORE3283: stderr: java.lang.NoSuchMethodException: setdataSourceName
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.SQLPersistenceManagerFactory.getDBName(SQLPersistenceManagerFactory.java:80
2)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:
709)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFac
tory.java:598)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFacto
ryImpl.java:770)
WARNING: CORE3283: stderr: at com.sun.jdo.spi.persistence.support.sqlstore.
impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFacto
ryImpl.java:660)
WARNING: CORE3283: stderr: at device.StorageDeviceBean_826330090_ConcreteIm
pl.jdoGetPersistenceManager(StorageDeviceBean_826330090_ConcreteImpl.java:539)
WARNING: CORE3283: stderr: at device.StorageDeviceBean_826330090_ConcreteIm
pl.ejbCreate(StorageDeviceBean_826330090_ConcreteImpl.java:255)
WARNING: CORE3283: stderr: at device.StorageDeviceBean_826330090_ConcreteIm
pl_RemoteHomeImpl.create(StorageDeviceBean_826330090_ConcreteImpl_RemoteHomeImpl
.java:27)
WARNING: CORE3283: stderr: ... 14 more
INFO: CORE5022: All ejb(s) of [StorageDeviceApp] were unloaded successfully!
WARNING: CORE3229: Quality of service (QOS) is disabled in the HTTP service. Un
able to turn on QOS features.
INFO: CORE3276: Installing a new configuration
INFO: CORE3280: A new configuration was successfully installed
INFO: WEB4004: Closing web application environment for virtual server [server1]Most probably you have an error in resources setup. Please check the <resources> section of the instance server.xml
or via the admin ui.
Regards,
Marina -
Java.lang.NullPointerException when trying to compile
Hi everybody!
I'm trying to compile a file using javax.tools.JavaCompiler but I get a java.lang.NullPointerException when running the program.
Here is my code:
public boolean CompExecFile(File filename){
boolean compRes = false;
try {
System.out.println(filename.getAbsolutePath());
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null); //line where I get the error
Iterable<? extends JavaFileObject> compilationUnits2 = fileManager.getJavaFileObjects(filename);
compRes = compiler.getTask(null, fileManager, null, null, null, compilationUnits2).call();
fileManager.close();
if (compRes) {
System.out.println ("Compilation was successful");
} else {
System.out.println ("Compilation failed");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return compRes;
}There error on the line "StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);":
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException+
I've seen several examples using the parameters "null,null,null" but I don't know if it's good :(
Many thanks for your help.I've found something which could maybe be what I need to do but I'm not sure:
// Build a new ClassLoader using the given URLs, replace current Classloader
ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
ClassLoader newCL = new URLClassLoader(myClasspathURLs, oldCL);
Thread.currentThread().setContextClassLoader(newCL);
System.out.println("Successfully replaced ClassLoader");
Class fooClass = newCL.loadClass(appClass); //which replaces the line "Class<?> tempFileClass = Class.forName("TempFile");" ?!Is that what I need to do?
EDIT: I've tried that but I still have the same problem:
File classFile = new File ("TempFile.class");
ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
ClassLoader newCL = new URLClassLoader(new URL[] {classFile.toURL()}, oldCL);
Thread.currentThread().setContextClassLoader(newCL);
System.out.println("Successfully replaced ClassLoader");
Class tempFileClass = newCL.loadClass("TempFile");
Method main = tempFileClass.getMethod("main", String[].class);
main.invoke(null,new String[0]); Edited by: Foobrother on Jul 28, 2008 8:18 AM -
I am trying to update 3.x to 4.0.1
Cloning of JDOConnectionFactory is throwing following exception
(JDOConnectionFactory)pmf1.clone();
I had this working with 3.x the only difference was that JDBCConnectionFactory was being used instead of JDOConnectionFactory, and I have to use JDOConnectionFactory in 4.0.1 to get PersistenceManagerFactory.
com.solarmetric.util.ParseException: java.lang.NoSuchMethodException: kodo.jdo.jdbc.JDOConnectionFactory.<init>(boolean)
at com.solarmetric.conf.ConfigurationImpl.clone(ConfigurationImpl.java:752)
at com.bea.rfid.login.console.ejb.CredentialMapperBean.setSessionContext(CredentialMapperBean.java:125)
at com.bea.rfid.login.console.ejb.CredentialMapperEJB_ckhjzn_Impl.setSessionContext(CredentialMapperEJB_ckhjzn_Impl.java:124)
at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:296)
at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:174)
at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:105)
at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:143)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:133)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:81)
at weblogic.ejb.container.internal.StatelessEJBLocalObject.preInvoke(StatelessEJBLocalObject.java:48)Thanks for the suggestion.
I updated to kodo-4.1.2 now, and still I am getting following exception
javax.ejb.EJBException: Error during setSessionContext: org.apache.openjpa.lib.util.ParseException: java.lang.NoSuchMethodException: kodo.jdo.jdbc.JDOConnectionFactory.<init>(boolean)
at org.apache.openjpa.lib.conf.ConfigurationImpl.clone(ConfigurationImpl.java:873)
at com.bea.rfid.login.console.ejb.CredentialMapperBean.setSessionContext(CredentialMapperBean.java:125)
at com.bea.rfid.login.console.ejb.CredentialMapperEJB_ckhjzn_Impl.setSessionContext(CredentialMapperEJB_ckhjzn_Impl.java:124)
at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:296)
at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:174)
at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:105)
at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:143)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:133)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:81)
at weblogic.ejb.container.internal.StatelessEJBLocalObject.preInvoke(StatelessEJBLocalObject.java:48)
at com.bea.rfid.login.console.ejb.CredentialMapperEJB_ckhjzn_ELOImpl.getPersistenceManager(CredentialMapperEJB_ckhjzn_ELOImpl.java:42)
at com.connecterra.epcis.server.ejb.EPCISBean.ejbCreate(EPCISBean.java:147)
at com.connecterra.epcis.server.ejb.EPCIS_9tvcog_Impl.ejbCreate(EPCIS_9tvcog_Impl.java:150)
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 weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:178)
at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:105)
at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:143)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:133)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:81)
at weblogic.ejb.container.internal.StatelessEJBLocalObject.preInvoke(StatelessEJBLocalObject.java:48)
at com.connecterra.epcis.server.ejb.EPCIS_9tvcog_ELOImpl.getAllSubscriptionInfo(EPCIS_9tvcog_ELOImpl.java:1304)
at com.connecterra.epcis.server.ejb.scheduler.SchedulerBean.refreshTimer(SchedulerBean.java:131)
at com.connecterra.epcis.server.ejb.scheduler.SchedulerBean.initializeTimer(SchedulerBean.java:98)
at com.connecterra.epcis.server.ejb.scheduler.SubscriptionScheduler_jm2ekz_ELOImpl.initializeTimer(SubscriptionScheduler_jm2ekz_ELOImpl.java:63)
at com.connecterra.epcis.server.schedulerservlet.SchedulerServlet.init(SchedulerServlet.java:32)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:276)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:68)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:504)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1698)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1675)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1595)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2734)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:892)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:229)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:352)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: java.lang.NoSuchMethodException: kodo.jdo.jdbc.JDOConnectionFactory.<init>(boolean)
at java.lang.Class.getConstructor0(Class.java:2647)
at java.lang.Class.getConstructor(Class.java:1629)
at org.apache.openjpa.lib.conf.ConfigurationImpl.clone(ConfigurationImpl.java:863)
... 68 more
; nested exception is: org.apache.openjpa.lib.util.ParseException: java.lang.NoSuchMethodException: kodo.jdo.jdbc.JDOConnectionFactory.<init>(boolean)
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:657)
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:141)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:81)
Truncated. see log file for complete stacktrace
>
<Dec 22, 2006 3:58:34 PM EST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'WLRFID-EPCIS'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "SchedulerServlet" failed to preload on startup in Web application: "schedulerservlet".
javax.ejb.EJBException: Error during setSessionContext: org.apache.openjpa.lib.util.ParseException: java.lang.NoSuchMethodException: kodo.jdo.jdbc.JDOConnectionFactory.<init>(boolean)
at org.apache.openjpa.lib.conf.ConfigurationImpl.clone(ConfigurationImpl.java:873)
at com.bea.rfid.login.console.ejb.CredentialMapperBean.setSessionContext(CredentialMapperBean.java:125)
at com.bea.rfid.login.console.ejb.CredentialMapperEJB_ckhjzn_Impl.setSessionContext(CredentialMapperEJB_ckhjzn_Impl.java:124)
at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:296)
at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:174)
at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:105)
at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:143)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:133)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:81)
at weblogic.ejb.container.internal.StatelessEJBLocalObject.preInvoke(StatelessEJBLocalObject.java:48)
at com.bea.rfid.login.console.ejb.CredentialMapperEJB_ckhjzn_ELOImpl.getPersistenceManager(CredentialMapperEJB_ckhjzn_ELOImpl.java:42)
at com.connecterra.epcis.server.ejb.EPCISBean.ejbCreate(EPCISBean.java:147)
at com.connecterra.epcis.server.ejb.EPCIS_9tvcog_Impl.ejbCreate(EPCIS_9tvcog_Impl.java:150)
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 weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:178)
at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:105)
at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:143)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:133)
at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:81)
at weblogic.ejb.container.internal.StatelessEJBLocalObject.preInvoke(StatelessEJBLocalObject.java:48)
at com.connecterra.epcis.server.ejb.EPCIS_9tvcog_ELOImpl.getAllSubscriptionInfo(EPCIS_9tvcog_ELOImpl.java:1304)
at com.connecterra.epcis.server.ejb.scheduler.SchedulerBean.refreshTimer(SchedulerBean.java:131)
at com.connecterra.epcis.server.ejb.scheduler.SchedulerBean.initializeTimer(SchedulerBean.java:98)
at com.connecterra.epcis.server.ejb.scheduler.SubscriptionScheduler_jm2ekz_ELOImpl.initializeTimer(SubscriptionScheduler_jm2ekz_ELOImpl.java:63)
at com.connecterra.epcis.server.schedulerservlet.SchedulerServlet.init(SchedulerServlet.java:32)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:276)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:68)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:504)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1698)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1675)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1595)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2734)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:892)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:229)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:352)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: java.lang.NoSuchMethodException: kodo.jdo.jdbc.JDOConnectionFactory.<init>(boolean)
at java.lang.Class.getConstructor0(Class.java:2647)
at java.lang.Class.getConstructor(Class.java:1629)
at org.apache.openjpa.lib.conf.ConfigurationImpl.clone(ConfigurationImpl.java:863)
... 68 more
Maybe you are looking for
-
How to get the value of payload?
Hi The null is returned when I use the following code to get the User_ID element in the payload, but there are values in the User_ID element of the payload Task task_test = wfSvcClient.getTaskQueryService().getTaskDetailsById(wfCtx, taskId); System.o
-
Need help on this - Expoting data
Can some one tell me the solutions to solve this I have data at child levels (State001,State002) Just trying to export the data for parent region , keeping that in the fix statement, but the child values are also coming in the exported file. This obs
-
How display more error messeges in BSP
Hi all, I want to diplay more error messeges in BSP. I'm working in the extention standar class CL_CRM_BSP_PM_GENERIC_1O in the method IF_CRM_BSP_PROCESS_IL~CHECK_BEFORE_SAVE with the following parameters: ls_message-msgid = 'ZGIVAUDAN' ls_messag
-
How do you export DVCPRO HD correctly?
Hey guys, we shot all our footage on HVX with P2 cards at 720p60 @ 23.98fps. I editing everything at that format. Now im done with the edit and the designers want an image sequence. I export out an image sequence and it exports as 960x720 (the codec
-
Using Airport Express to create a WDS with XP
I have a Dell laptop running XP Pro (SP 2) connected wirelessly to my Airport Extreme Base Station using a Netgear WGT511 wireless card. I am trying to create a WDS using 1 (or 2 if necessary) Airport Express stations to extend the wireless signal th