|Subject:||RE: Rome at servlet|
|Date:||Jul 20, 2005 6:32:31 am|
Are you on a hosted environment?
I'm sure it has to be a problem with the libraries since it works as stand-alone app, but cannot find anything.
If i remove jdom.jar from web-inf/lib folder then i've got a ClassNotFoundException: org/jdom/Content.
I don't know if my server environment is hacking in some way rome functionality, wich may need to init something in the backstage. I mean the error is thrown calling RSS090Generator while trying to get rss2.0... Is that correct?
I'm just trying to get some light.
On 7/19/05, Robert kebernet Cooper <kebe...@gmail.com> wrote:
Double check and make sure you don't have rome in, say, common/lib AND web-inf/lib while not having jdom in common/lib or shared/lib, etc...
This looks like you have a ROME in the classloader somewhere where JDOM isn't or vice versa, so you are getting classes with instances from different jars.
While I am not an expert at WSAD, if you are trying to run it from within the IDE using the little "mini-WebSphere", check the "ServerPage -> Environment Tab -> Classpath Box". WSAD also does some strange stuff with your project when it runs. Try making sure JDOM and ROME are both in the .classpath (as I think that is where the mini-websphere is going to start the web-inf/lib for the debug/test context).
On 7/19/05, jorge <jorg...@gmail.com> wrote:
Hi, I am using rome 0.6 within a servlet sample but i cannot make it run. The IDE is Websphere Studio AppDev 5.1.2
it throws an exception while trying to write the feed thru the HttpServletRequest:
arguments are not type compatible (class: com/sun/syndication/io/impl/RSS090Generator method: addChannel(Lcom/sun/syndication/feed/rss/Channel;Lorg/jdom/Element&# 59;)V) at pc: 36]: java.lang.VerifyError: arguments are not type compatible (class: com/sun/syndication/io/impl/RSS090Generator method: addChannel(Lcom/sun/syndication/feed/rss/Channel;Lorg/jdom/Element;)V) at pc: 36 at java.lang.Throwable .<init>(Throwable.java:59) at java.lang.Throwable.<init>(Throwable.java:73) at java.lang.VerifyError.<init>(VerifyError.java:48) at java.lang.Class.verifyImpl(Native Method) at java.lang.Class.verify (Class.java:253) at java.lang.Class.initialize(Class.java:315) at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1451) at com.sun.syndication.io.impl.PluginManager.loadPlugins (PluginManager.java:75) at com.sun.syndication.io.impl.PluginManager.<init>(PluginManager.java:41) at com.sun.syndication.io.impl.FeedGenerators.<init>(FeedGenerators.java:47) at com.sun.syndication.io.WireFeedOutput .<clinit>(WireFeedOutput.java:44) at java.lang.Class.initializeImpl(Native Method) at java.lang.Class.initialize(Class.java) at com.sun.syndication.io.SyndFeedOutput.<init>(SyndFeedOutput.java:44)
The code and config is as follows:
SyndFeed feed = getFeed(); //same as sample code with no parameters feed.setFeedType("rss_2.0");
SyndFeedOutput sfo = new SyndFeedOutput(); // the exception is thrown here
What is going on? I've tried the same code as stand alone app and it works fine. I've also checked back the jars and jdom.jar and rome-0.6.jar are located at web-inf/lib folder.
Do you know how to get it work?
-- :Robert "kebernet" Cooper :: kebe...@gmail.com <mailto:kebe...@gmail.com> "To me programming is more than an important practical art. It is also a gigantic undertaking in the foundations of knowledge." --Rear Admiral Grace Hopper http://pgp.mit.edu:11371/pks/lookup?op=get <http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8> &search=0x9E8759F8