Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 245770 - jax-ws XmlElementRef cannot find symbol symbol : method required()
jax-ws XmlElementRef cannot find symbol symbol : method required()
Status: RESOLVED WORKSFORME
Product: webservices
Classification: Unclassified
Component: JAX-WS
8.0
Macintosh Mac OS X
: P3 (vote)
: TBD
Assigned To: Milan Kuchtiak
issues@webservices
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-17 19:57 UTC by rcacheira
Modified: 2014-07-18 16:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rcacheira 2014-07-17 19:57:02 UTC
After restart netbeans all my projects using JAX-WS is returning the same errors on build.

/(...)/jax-ws/(...).java:48: cannot find symbol
symbol  : method required()
location: @interface javax.xml.bind.annotation.XmlElementRef
    @XmlElementRef(name = "x", type = JAXBElement.class, required = false)

Cleaning and refreshing web service client don't solve this problem.

To solve it i need to delete the web service client and add a new one again.

After a restart to netbeans the problem occurs again.

(Sorry, english isn't my mother language)
Comment 1 Milan Kuchtiak 2014-07-18 09:39:03 UTC
I cannot reproduce the issue. The information you sent isn't sufficient.

What jdk version Netbeans in running on ?
What Java Platform is set-up in your project ?
What project type you use for your JAX-WS client ?
Do you have some library (JAX-WS or JAXB) on the project classpath ?

The problem like this usually occurs when your jax-ws artifacts are generated in a newer version of JAX-WS than JAX-WS version, used by the project.

You may try to set up the "target" wsimport option to 2.1 or to 2.0.
(Web Service References -> Edit WS Attributes -> Wsimport Options tab)

Or remove the JAXB (JAX-WS) librery, if there is any, from the project classpath. (Project -> Libraries node). 

It looks similar to bug 174557.
Comment 2 rcacheira 2014-07-18 16:01:03 UTC
Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 2
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b12
System: Mac OS X version 10.9.4 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/rcacheira/Library/Application Support/NetBeans/8.0
Cache directory: /Users/rcacheira/Library/Caches/NetBeans/8.0

I think that setting target option to 2.1 on wsimport, solved the problem, although the problem should not occur since I created the web service client with the same version of java and netbeans and on the same computer.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo