Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / August 2003

Tip: Looking for answers? Try searching our database.

Problem with cactus and jboss: noSuchMethodError

Thread view: 
Ruben Stranders - 31 Jul 2003 16:39 GMT
Hi,

I'm working on some EJB's, and I chose Cactus to test them. However,
when I tried to run the Cactus example
(http://jakarta.apache.org/cactus/integration/howto_tomcat.html), but
it didn't work because of the Jboss' security. I then decided to
package all needed jars and Servlets into one web-archive and deploy
it.

Now I get the following error when I call
http://localhost:8080/testcactus/ServletTestRunner?suite=TestSampleServlet&xsl=cactus-report.xsl:

org.apache.commons.httpclient.HttpMethod.setRequestHeader(Ljava/lang/String;Ljava/lang/String;)V

java.lang.NoSuchMethodError:
org.apache.commons.httpclient.HttpMethod.setRequestHeader(Ljava/lang/String;Ljava/lang/String;)V
at org.apache.cactus.client.connector.http.HttpClientConnectionHelper.dispatch50_connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1k]:152)
at org.apache.cactus.client.connector.http.HttpClientConnectionHelper.around50_connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1222)
at org.apache.cactus.client.connector.http.HttpClientConnectionHelper.connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1k]:114)
.... and it goes on like this....

Especially the first line fascinates me. Where does the package
Ljava.lang.etc come from? I've never seen this before.

I'm really desparate here, I've tried everything. Perhaps someone
recognizes this problem and knows how to solve this?

thanks in advance,

Ruben
John C. Bollinger - 04 Aug 2003 18:11 GMT
> Hi,
>
[quoted text clipped - 19 lines]
> Especially the first line fascinates me. Where does the package
> Ljava.lang.etc come from? I've never seen this before.

That appears to be a mangled form of the fully-qualified name of the
class that represents a one-dimensional array of java.lang.String. (The
real name would be "[Ljava.lang.String;".)  That may be the mangled form
that is used in the class file format, but I haven't looked it up to verify.

> I'm really desparate here, I've tried everything. Perhaps someone
> recognizes this problem and knows how to solve this?

I'm afraid not, but I'd bet on a classpath / jar location problem.  The
Cactus documentation should describe how to install Cactus -- you may
need to put the support libraries somewhere like server/default/lib in
your JBoss installation (assuming you are using the "default" server
configuration).

You should not need to package the Cactus servlet with the EJBs, but you
will need to include the EJB interface classes in the test WAR along
with the actual test classes and any necessary support classes not in
the appropriate JBoss lib directory.  It is rather likely that you will
need to configure the web.xml and jboss-web.xml at least partly by hand.

Good luck,

John Bollinger
jobollin@indiana.edu


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.