wsgen 명령을 실행하여 웹 서비스를 만들려고합니다. 내 명령 줄은 다음과 같습니다wsgen 및 App Engine
PATH=%path%;C:\Program Files\Java\jdk1.6.0_24\bin
wsgen -cp ".\war\WEB-INF\classes" -wsdl -keep -r ".\war" -d ".\war\WEB-INF\classes" - s ".\war" "com.example.prototipo21.Greeting"
그리고이 오류가 나타납니다 경고 : javax.jdo.annotations에 대한 클래스 파일 : 'javax.jdo.annotations.Persisten'유형의 주석 방법 'valueStrategy을()'찾을 수 없습니다. 지속적이지 않음. 오류 : com.example.prototipo21.Greeting 에 대한 클래스 파일을 찾을 수 없습니다 1 오류 1 경고 오류 : 컴파일 오류가 나는 문제가 나는 데이터 저장소 응용 프로그램을 통합하고있어 될 수 있다고 생각
을보고 했어야 실패 내 웹 서비스 응용 프로그램에서 내 수업에 다른 주석이 있습니다. 예를 들어 :@WebService
public class Greeting {
@PrimaryKey
@Persistent (valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private User author;
은 ...
@WebMethod
public Key getKey() {
return key;
}
@WebMethod
public User getAuthor(){
return author;
....
당신은 내가 무슨 뜻인지 알아? 어떤 아이디어라도 매우 유용 할 것입니다 !! 감사!c:\Users\...\Desktop\....\Eclipse\Prototipo_21>PATH=%pa
th%;C:\Program Files\Java\jdk1.7.0_03\bin
c:\Users\...\Desktop\....\Eclipse\Prototipo_21>wsgen -c
p ".\war\WEB-INF\classes" -wsdl -keep -r ".\war" -d ".\war\WEB-INF\classes" -s "
.\war" "com.example.prototipo21.Greeting"
warning: The apt tool and its associated API are planned to be
removed in the next major JDK release. These features have been
superseded by javac and the standardized annotation processing API,
javax.annotation.processing and javax.lang.model. Users are
recommended to migrate to the annotation processing features of
javac; see the javac man page for more information.
.\war\WEB-INF\classes\com\example\prototipo21\Greeting.class: warning: Cannot fi
nd annotation method 'valueStrategy()' in type 'Persistent': class file for java
x.jdo.annotations.Persistent not found
warning: unknown enum constant IdGeneratorStrategy.IDENTITY
reason: class file for javax.jdo.annotations.IdGeneratorStrategy not found
error: Could not create declaration for annotation type javax.jdo.annotations.Pr
imaryKey
error: Could not create declaration for annotation type javax.jdo.annotations.Pe
rsistent
Problem encountered during annotation processing;
see stacktrace below for more information.
com.sun.tools.internal.ws.processor.modeler.ModelerException: modeler error: Cla
sses annotated with @javax.jws.WebService must have a public default constructor
. Class: com.example.prototipo21.Greeting
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.o
nError(WebServiceAP.java:229)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.isLegalImplementation(WebServiceVisitor.java:515)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.shouldProcessWebService(WebServiceVisitor.java:322)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.visitClassDeclaration(WebServiceVisitor.java:113)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(Clas
sDeclarationImpl.java:113)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.b
uildModel(WebServiceAP.java:319)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.p
rocess(WebServiceAP.java:260)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.
process(AnnotationProcessors.java:84)
at com.sun.tools.apt.comp.Apt.main(Apt.java:480)
at com.sun.tools.apt.main.AptJavaCompiler.compile(AptJavaCompiler.java:2
70)
at com.sun.tools.apt.main.Main.compile(Main.java:1127)
at com.sun.tools.apt.main.Main.compile(Main.java:989)
at com.sun.tools.apt.Main.processing(Main.java:113)
at com.sun.tools.apt.Main.process(Main.java:103)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.ja
va:207)
at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:120)
at com.sun.tools.internal.ws.WsGen.main(WsGen.java:42)
error: compilation failed, errors should have been reported
(그냥 따라 디렉토리 경로 변경) : 경고 : apt 툴 및 관련 API 것이 예정이다 다음 주요 JDK 릴리스에서 제거 [.... more warnings ...] 오류 : 주석 유형 javax.jdo.annotations에 대한 선언을 만들 수 없습니다. PrimaryKey. 오류 : annontation 형식 javax.jdo.annotation.Persistent [...]에 대한 선언을 만들 수 없습니다. 어떤 생각 ?? 감사!! =) –
전체 오류를 게시 할 수 있습니까? 세부 사항만으로는 아무 말도하지 못합니다. –
예, 내 주 질문을 편집하여 경고문과 오류를 추가하십시오. 저기 봐주세요! 고맙습니다!! –