Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [jdt-apt-dev] Classpath problem?

Looks like a bug, probably in our classloader code. We'll take a look. 

Thanks for the info!

-Jess

-----Original Message-----
From: jdt-apt-dev-bounces@xxxxxxxxxxx
[mailto:jdt-apt-dev-bounces@xxxxxxxxxxx] On Behalf Of Ian Carr
Sent: Tuesday, August 09, 2005 11:07 AM
To: jdt-apt-dev@xxxxxxxxxxx
Subject: [jdt-apt-dev] Classpath problem?

I have been trying to use the APT builder to generate source using the
JAXWS_EA2 tooling from sun, and am getting a class finder problem:

java.lang.reflect.UndeclaredThrowableException
	at $Proxy1.style(Unknown Source)
	at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.pushSOAP
Binding(WebServiceVisitor.java:169)
	at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.preProce
ssWebService(WebServiceVisitor.java:161)
	at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitInt
erfaceDeclaration(WebServiceVisitor.java:102)
	at
org.eclipse.jdt.apt.core.internal.declaration.InterfaceDeclarationImpl.a
ccept(InterfaceDeclarationImpl.java:35)
	at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.inspectE
ndpointInterface(WebServiceVisitor.java:294)
	at
com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitCla
ssDeclaration(WebServiceVisitor.java:119)
	at
org.eclipse.jdt.apt.core.internal.declaration.ClassDeclarationImpl.accep
t(ClassDeclarationImpl.java:43)
	at
com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(We
bServiceAP.java:350)
	at
com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebSe
rviceAP.java:234)
	at
org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.runAPT(APTDispatch
Runnable.java:187)
	at
org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.run(APTDispatchRun
nable.java:138)
	at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719)
	at
org.eclipse.jdt.apt.core.internal.APTDispatch.runAPT(APTDispatch.java:79
)
	at
org.eclipse.jdt.apt.core.internal.APTDispatch.runAPTDuringReconcile(APTD
ispatch.java:55)
	at
org.eclipse.jdt.apt.core.internal.AptCompilationParticipant.postReconcil
eNotify(AptCompilationParticipant.java:182)
	at
org.eclipse.jdt.apt.core.internal.AptCompilationParticipant.notify(AptCo
mpilationParticipant.java:83)
	at
org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.notifyCompil
ationParticipants(ReconcileWorkingCopyOperation.java:144)
	at
org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOpera
tion(ReconcileWorkingCopyOperation.java:58)
	at
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.
java:718)
	at
org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelO
peration.java:777)
	at
org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.
java:1081)
	at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(Java
ReconcilingStrategy.java:104)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.
java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(
JavaReconcilingStrategy.java:82)
	at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(
JavaReconcilingStrategy.java:147)
	at
org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(
CompositeReconcilingStrategy.java:86)
	at
org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconc
ile(JavaCompositeReconcilingStrategy.java:94)
	at
org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.
java:75)
	at
org.eclipse.jdt.internal.ui.text.JavaReconciler.process(JavaReconciler.j
ava:339)
	at
org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.ru
n(AbstractReconciler.java:204)
Caused by: java.lang.ClassNotFoundException:
javax.jws.soap.SOAPBinding$Style
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:403)
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:350)
	at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(Ab
stractClassLoader.java:78)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at
org.eclipse.jdt.apt.core.internal.declaration.AnnotationMirrorImpl.getRe
flectionValue(AnnotationMirrorImpl.java:265)
	at
org.eclipse.jdt.apt.core.internal.declaration.AnnotationMirrorImpl.getRe
flectionValue(AnnotationMirrorImpl.java:242)
	at
org.eclipse.jdt.apt.core.internal.env.AnnotationInvocationHandler.invoke
(AnnotationInvocationHandler.java:92)
	... 32 more

When compiling this source:

/*
 * Copyright (c) 2005 Sun Microsystems, Inc.
 * All rights reserved. 
 */
package annotations.server;

import java.rmi.Remote;
import java.rmi.RemoteException;

import javax.jws.HandlerChain;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPMessageHandler;
import javax.jws.soap.SOAPMessageHandlers;
import javax.jws.WebResult;
import javax.jws.WebParam;

@WebService(targetNamespace = "http://duke.org";, name="AddNumbers")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL)
@HandlerChain(file="handlers.xml", name="Chain1")
public interface AddNumbersIF extends Remote {
    
    @WebMethod(operationName="add", action="urn:addNumbers")
    @WebResult(name="return")
	public int addNumbers(
            @WebParam(name="num1")int number1, 
            @WebParam(name="num2")int number2) throws RemoteException,
AddNumbersException;
}

I believe I have added all the relevant jars to the Factory path for
APT, The processor is in a jaxws-tools jar 
and the SOAPBinding and nested Style class are in a separate
jsr181-api.jar

The classes are also on the Java build path for the project as jar
library entries.

Is there somewhere else I need to register them?

The example using APTDemo works fine by the way, so I think the plugin
installation is OK.
I have tried this both by building the plugins myself (following your
"build it" instructions) and with the plugin set from the update site,
both have the same result.
The classes and code do generate if I use the sun APT tool from an ANT
script.

Many thanks in advance for any help.

Ian Carr
_______________________________________________
jdt-apt-dev mailing list
jdt-apt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-apt-dev



Back to the top