We help IT Professionals succeed at work.

Workshop will not recognize QName in lib folder

Sar975
Sar975 asked
on
383 Views
Last Modified: 2013-12-10
If I use weblogic workshop and create a new project and put the QName contained in the jar file from an xmlbeans download which has the 3 String constructor if I create a new java class in the file and put something like the following  public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://host/",
                "GetUserUserID", "prefix1"); it does not recognize qname as having a 3 argument constructor.  I think the compiler is picking up the one in weblogic.jar or somewhere else so I tried putting this jar at the beggining of the setdomainenv.cmd file and also tried putting
<container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
   
  </container-descriptor>
in weblogic.jar and neither solved the issue.  If someone was able to overcome this I would appreciate what the resolution was.
Comment
Watch Question

Author

Commented:
As a workaround I just created an ant script outside of workshop which compiles the code and it runs without any issue.
CERTIFIED EXPERT
Top Expert 2004
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
The solution you provided is needed for the runtime so if I put the jar that has the QName object I want to use in the setdomainenv.cmd file it will use it but for the build I was only able to get an error free build if I use my own ant script.  Even if you export ant through workshop export it will still look at the QName in weblogic.jar and fail.
CERTIFIED EXPERT
Top Expert 2004

Commented:
Hi,

If you want to build with error free in weblogic workship.
You need to have source code of your downloaded jar.
If you have, go to project you want it to use this jar by right click on project then go to this menu
Paths -->  Source path --> (select directory)

Regrdgs,
Sompol
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.