aspose file tools*
The moose likes Web Services and the fly likes Exception while doing servicegen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Exception while doing servicegen" Watch "Exception while doing servicegen" New topic
Author

Exception while doing servicegen

Pam Theod
Greenhorn

Joined: Apr 19, 2006
Posts: 14
All,
I am trying to expose EJB to wsdl. I am using weblogics(8.1 sp4) servicegen to generate the wsdl. My EJB methods return hashtable and custom pojo's. I have generated the jar file off of my EJB and have that in my classpath. I have also included weblogic.jar and webservices.jar in my classpath. When I do the build I get this exception. I searched on manu places and none of the solutions resolved my problem. I am pointing to weblogic's ant and not to apache ant.

If anybody has resolved this can you please help me with example.
I am newbie to webservices.

Any help is greatly appreciated.

Here is my build target

<target name="build">
<delete dir="${build}" />
<mkdir dir="${build}"/>
<copy todir="${build}" file="${ejbc_jar_file}"/>
<servicegen destEar="${build}/${ear_file}"
warName="${war_file}"
contextURI="combo"
classpathref="classpath">
<service ejbJar="${build}/etsCombo.jar"
targetNamespace="http://12.83.96.120:7020/combo/services"
serviceName="ComboService"
serviceURI="/ComboService"
generateTypes="True"
expandMethods="True"
style="document">
</service>
</servicegen>
</target>

Here is the exception I am getting when I do the build.

file:C:/eclipse/projects/webservices/build.xml:134: java.lang.SecurityException: Prohibited package name: java.util
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:218)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: java.lang.SecurityException: Prohibited package name: java.util
at java.lang.ClassLoader.defineClass(ClassLoader.java:524)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:480
)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at weblogic.xml.schema.binding.internal.codegen.Compiler.loadClass(Compiler.java:641)
at weblogic.xml.schema.binding.internal.codegen.Compiler.addToMapping(Compiler.java:450)
at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:175)
at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:89)
at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:187)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createDocStyleOperations(ComponentAutoTyper.java:294)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createExpandedOperations(ComponentAutoTyper.java:181)
at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.getWebServiceDescriptor(EJBAutoTyper.java:207)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.createDD(ServiceGenTask.java:378)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:314)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:1
81)
... 8 more
--- Nested Exception ---
java.lang.SecurityException: Prohibited package name: java.util
at java.lang.ClassLoader.defineClass(ClassLoader.java:524)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:480)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at weblogic.xml.schema.binding.internal.codegen.Compiler.loadClass(Compiler.java:641)
at weblogic.xml.schema.binding.internal.codegen.Compiler.addToMapping(Compiler.java:450)
at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:175)
at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:89)
at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:187)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createDocStyleOperations(ComponentAutoTyper.java:294)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createExpandedOperations(ComponentAutoTyper.java:181)
at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.getWebServiceDescriptor(EJBAutoTyper.java:207)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.createDD(ServiceGenTask.java:378)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:314)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:181)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Karthik Rajendiran
Ranch Hand

Joined: Aug 13, 2004
Posts: 211
Can you post your JDK VERSION
with class path and path entries here.
1. First try removing the classpath entries in system where you are doing build
2. Give an another try


Similar THing
http://forums.bea.com/bea/message.jspa?messageID=600017934&tstart=0


SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception while doing servicegen