java.lang.NoClassDefFoundError when creating proxy
When i try to create web service proxy in java i always get. I look to web service but it works, i can invoke it. Why i can not create proxy?
java.lang.NoClassDefFoundError: xxx/GetBibliografijeXml (wrong name: xxx/GetBibliografijeXML) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at oracle.j2ee.ws.common.processor.modeler.wsdl.SchemaAnalyzer.getValueClassBeanInfo(SchemaAnalyzer.java:465) at oracle.j2ee.ws.common.processor.modeler.wsdl.ComplexTypeBindingModeler.structuredTyp开发者_运维知识库e(ComplexTypeBindingModeler.java:142) at oracle.j2ee.ws.common.processor.modeler.wsdl.ComplexTypeBindingModeler.complexType(ComplexTypeBindingModeler.java:442) at oracle.j2ee.ws.common.processor.modeler.wsdl.LiteralSchemaTypeModeler.complexType(LiteralSchemaTypeModeler.java:495) at oracle.j2ee.ws.common.processor.modeler.wsdl.LiteralSchemaTypeModeler.schemaType(LiteralSchemaTypeModeler.java:373) at oracle.j2ee.ws.common.processor.modeler.wsdl.LiteralSchemaTypeModeler.globalElement(LiteralSchemaTypeModeler.java:446) at oracle.j2ee.ws.common.processor.modeler.wsdl.SchemaAnalyzer.schemaElementTypeToLiteralType(SchemaAnalyzer.java:403) at oracle.j2ee.ws.common.processor.modeler.wsdl.OperationModeler.getElementTypeToLiteralType(OperationModeler.java:588) at oracle.j2ee.ws.common.processor.modeler.wsdl.DocLiteralOperationModeler.buildInput(DocLiteralOperationModeler.java:527) at oracle.j2ee.ws.common.processor.modeler.wsdl.DocLiteralOperationModeler.buildOperation(DocLiteralOperationModeler.java:256) at oracle.j2ee.ws.common.processor.modeler.wsdl.OperationModeler.process(OperationModeler.java:93) at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.processSOAPOperation(WSDLModeler.java:1086) at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.processBindingOperation(WSDLModeler.java:1020) at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.createNewPort(WSDLModeler.java:884) at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.processPort(WSDLModeler.java:757) at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.processService(WSDLModeler.java:671) at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:396) at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:215) at oracle.j2ee.ws.common.processor.config.ModelInfo.buildModel(ModelInfo.java:173) at oracle.j2ee.ws.common.processor.Processor.runModeler(Processor.java:72) at oracle.j2ee.ws.tools.wsa.AssemblerTool.run(AssemblerTool.java:95) at oracle.j2ee.ws.tools.wsa.WsdlToJavaTool.createProxy(WsdlToJavaTool.java:356) at oracle.j2ee.ws.tools.wsa.Util.createProxy(Util.java:838) at oracle.jdeveloper.webservices.model.proxy.ProxyGenerator.doGeneration(ProxyGenerator.java:553) at oracle.jdeveloper.webservices.model.proxy.ProxyGenerator.generateImpl(ProxyGenerator.java:365) at oracle.jdeveloper.webservices.model.proxy.ProxyGenerator.mav$generateImpl(ProxyGenerator.java:77) at oracle.jdeveloper.webservices.model.proxy.ProxyGenerator$1ThrowingRunnable.run(ProxyGenerator.java:206) at oracle.jdeveloper.webservices.model.GeneratorUI$GeneratorAction.run(GeneratorUI.java:446) at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:551) at java.lang.Thread.run(Thread.java:595)
Well, it looks like something is using the wrong case:
java.lang.NoClassDefFoundError: xxx/GetBibliografijeXml
(wrong name: xxx/GetBibliografijeXML)
Note the casing of "XML".
Check everywhere that the name is used, and make sure the case is consistent everywhere. Is the class an autogenerated one, or one you've written yourself?
Also bear in mind that if you're on a case-insensitive operating system and the classes are being loaded straight from disk (without coming from a jar file etc), it could be finding an old class file - you won't be able to have two classes whose names differ only in case on such a file system, as the class files will clash. If your WSDL uses both cases, it may have generated two classes, but then you only end up with one file on disk :(
精彩评论