This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

can't generate web service with jwsc in weblogic 9.2

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, when trying to use the jwsc webservice generator task, I get the following exception:

build-service:
[jwsc] JWS: processing module /path/to/my/service/Class
[jwsc] Parsing source files
[jwsc] Parsing source files
[jwsc] java.lang.NoSuchMethodException: com.bea.util.jam.internal.javadoc.JavadocResults._setRoot(com.sun.javadoc.RootDoc)
[jwsc] at java.lang.Class.getMethod(Class.java:1605)
[jwsc] at com.bea.util.jam.internal.javadoc.JavadocResults.getRoot(JavadocResults.java:71)
[jwsc] at com.bea.util.jam.internal.javadoc.JavadocRunner.run(JavadocRunner.java:148)
[jwsc] at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.initJavadoc(JavadocClassBuilder.java:238)
[jwsc] at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.init(JavadocClassBuilder.java:88)
[jwsc] at com.bea.util.jam.provider.CompositeJamClassBuilder.init(CompositeJamClassBuilder.java:45)
[jwsc] at com.bea.util.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:178)
[jwsc] at com.bea.util.jam.provider.JamServiceFactoryImpl.createClassLoader(JamServiceFactoryImpl.java:137)
[jwsc] at com.bea.util.jam.provider.JamServiceFactoryImpl.createService(JamServiceFactoryImpl.java:78)
[jwsc] at weblogic.wsee.util.JamUtil.parseSource(JamUtil.java:149)
[jwsc] at weblogic.wsee.tools.anttasks.JwsLoader.loadJClasses(JwsLoader.java:185)
[jwsc] at weblogic.wsee.tools.anttasks.JwsLoader.load(JwsLoader.java:72)
[jwsc] at weblogic.wsee.tools.anttasks.JwsModule.loadWebServices(JwsModule.java:425)
[jwsc] at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:279)
[jwsc] at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:219)
[jwsc] at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:182)
[jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[jwsc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[jwsc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[jwsc] at java.lang.reflect.Method.invoke(Method.java:597)
[jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[jwsc] at org.apache.tools.ant.Task.perform(Task.java:348)
[jwsc] at org.apache.tools.ant.Target.execute(Target.java:357)
[jwsc] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[jwsc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[jwsc] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[jwsc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[jwsc] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[jwsc] at org.apache.tools.ant.Main.runBuild(Main.java:698)
[jwsc] at org.apache.tools.ant.Main.startAnt(Main.java:199)
[jwsc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[jwsc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


I don't understand this. I checked in weblogic.jar the class com.bea.util.jam.internal.javadoc.JavadocResults indeed does have a method with signature _setRoot(com.sun.javadoc.RootDoc)

please advise
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just wondering if you solved this one. I am having the same problem.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved my instance of this problem by following the procedure outlined by Carlo de Rossi ("cdrcdr") at http://forums.bea.com/thread.jspa?threadID=570000856 (a BEA forum). Basically, this procedure involves changing the Ant startup script so that your JDK's tools.jar is included in Ant's classpath.

Apparently what causes this problem (at least in my case and Mr. Rossi's) is that Ant can load the class com.sun.javadoc.RootDoc from one location and the BEA JavadocResults class can load it from another. This results in a method mismatch in _setRoot(com.sun.javadoc.RootDoc), because even though the JVM finds a _setRoot method that takes com.sun.javadoc.RootDoc as an argument, it's not the same com.sun.javadoc.RootDoc, but one that was loaded with a different class loader.

It seems the problem goes away if Ant is given a classpath that includes the Rootdoc class that the BEA class will later load. This seems to make the classloader conclude that RootDoc is already loaded and so avoid loading an incompatible version.

In my case, I suspect this was all due to my use of JDK 1.6 instead of the JDKs that are delivered with WebLogic (I'm using version 10.0 of WLS).
 
Bob Pollack
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Later, I had a "pure" jwsc problem, in which I got a message that begins

com.bea.util.jam.internal.javadoc.JavadocClassloadingException: An error has occurred while invoking javadoc ...

I won't quote the message in its entirety; see http://forums.bea.com/thread.jspa?threadID=570001084 for the complete text.

I was able to solve this by running Ant with an explicit class path. I simply put the following script, under the name "ant.bat" into my working directory, and it seems to work fine. I am a Windows user, so this is a Windows .bat script. To use it, even if you're a Windows user, you'll have to change the value of "realAnt" to point to where Ant is installed on your system. If you're a Unix user, you'll also have to convert this to a shell script.

@echo OFF
setlocal
echo Running Ant with modified class path

set realAnt=C:\java\ant\bin\ant
set bea=D:/bea
set beaJDK=%bea%/jdk150_11
set toolsJar=%beaJDK%/lib/tools.jar

set CLASSPATH=%CLASSPATH%;%toolsJar%

%realAnt% %*

[ September 15, 2008: Message edited by: Bob Pollack ]
[ September 15, 2008: Message edited by: Bob Pollack ]
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic