2010-03-24 5 views
1
java org.apache.axis2.wsdl.WSDL2Java -s -p studs.exchange -uri https://api.betfair.com/exchange/v5/BFExchangeService.wsdl 


Retrieving document at 'https://api.betfair.com/exchange/v5/BFExchangeService.wsdl'. 
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder). 
log4j:WARN Please initialize the log4j system properly. 
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271) 
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) 
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) 
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 
at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53) 
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224) 
... 2 more 
Caused by: java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50) 
... 3 more 
Caused by: java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchema.getTypeByName(Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchemaType; 
at org.apache.axis2.schema.SchemaCompiler.isComponetExists(SchemaCompiler.java:2728) 
at org.apache.axis2.schema.SchemaCompiler.getParentSchemaFromIncludes(SchemaCompiler.java:2670) 
at org.apache.axis2.schema.SchemaCompiler.getParentSchemaFromIncludes(SchemaCompiler.java:2704) 
at org.apache.axis2.schema.SchemaCompiler.getParentSchema(SchemaCompiler.java:2644) 
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:758) 
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:552) 
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1991) 
at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1874) 
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1081) 
at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:980) 
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:934) 
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592) 
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:563) 
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:370) 
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280) 
at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103) 
... 8 more 

Qu'est-ce qui se passe ici? Qu'en est-il de log4jwsdl2java exception

+0

Pouvez-vous partager ce qu'il y a sur votre chemin de classe? Les messages log4j sont juste des avertissements. La véritable erreur est Causée par: java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchema.getTypeByName (Ljava/lang/String;) Lorg/apache/ws/commons/schema/XmlSchemaType; – elduff

Répondre

2

Ne vous inquiétez pas pour le contenu de Log4j pour le moment. Cela vous indique simplement que le framework Log4j ne trouve pas sa configuration. Ça va fonctionner sans ça.

La ligne est importante

Caused by: java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchema.getTypeByName(Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchemaType; 

qui me dit que vous avez une inadéquation de la bibliothèque. Vous avez une bibliothèque dans votre classpath qui ne correspond pas aux exigences d'Axis (probablement une ancienne version de la bibliothèque). Vérifiez les dépendances d'Axis par rapport à ce que vous utilisez (votre version JVM et les bibliothèques de votre chemin de classe).

+0

ye, réparé avec une réinstallation des bibliothèques: D qu'en est-il log4j? comment puis-je réparer cet avertissement? – Daniel

+0

Vous devez fournir un fichier de propriétés log4j ou un fichier XML avec une configuration. Je voudrais vérifier le doc Log4j. –

Questions connexes