• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant build - With weblogic 10

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I am trying to build an ejb jar for Weblogic 10, using Ant in Eclipse. I am getting the exception below:

java.lang.NoClassDefFoundError: weblogic/utils/NestedException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:147)
at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:294)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:221)
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128)
at org.apache.tools.ant.util.JAXPUtils.newParserFactory(JAXPUtils.java:114)
at org.apache.tools.ant.util.JAXPUtils.getNSParserFactory(JAXPUtils.java:100)
at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:163)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:193)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.parseBuildFile(InternalAntRunner.java:191)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:400)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

This seems to be becuase the older weblogic jar had an "weblogic/utils/NestedException", but the Weblogic10 jar has a class "weblogic/auddi/NestedException".

I tried using the Ant in the Weblogic 10 folder also, with no success.

Any suggestions would be very helpful.

Thanks.

Regards,
Karthika
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Karthika,

It means that it's still trying to look for that old class instead of the new one. Are you sure that the ANT task supports WL10 and that everything is correct on your CLASSPATH?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Karthika

I am also getting same build error with Weblogic 10. Were you able to solve your issue? Please let me know.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the same error, it's because i try to compile autotype with the weblogic 10 library.
But now with weblogic 10 i need to use JAX-WS and for the generation the tool XJC.
So there is some changes to do with the ant task ...
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting the below error while runing build.xml please suggest me , wht is error ?
i have weblogic.jar in classpath , i am using eclipse . Please tell me wht is class it is not finding

BUILD FAILED
java.lang.NoClassDefFoundError: weblogic/utils/NestedException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at javax.xml.parsers.FactoryFinder.newInstance(Unknown Source)
at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
at javax.xml.parsers.FactoryFinder.find(Unknown Source)
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at org.apache.tools.ant.util.JAXPUtils.newParserFactory(JAXPUtils.java:120)
at org.apache.tools.ant.util.JAXPUtils.getNSParserFactory(JAXPUtils.java:104)
at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:185)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.parseBuildFile(InternalAntRunner.java:191)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:400)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
Caused by: java.lang.ClassNotFoundException: weblogic.utils.NestedException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 29 more
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
rajabhayya, welcome to Java Ranch!

Please use real words. 'wht' is not a word.

The simple answer is: make sure the JAR file containing weblogic.utils.NestedException.class is in the classpath for your Ant task. But without the details of what your build.xml does, and what you have done to debug this issue (you did try running with the -v option, right?) it is hard to help you more than that.

http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
 
rajabhayya Sekharbhayya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please find the build.xml file




I am getting error at build-client target , and error is displayed as below

Buildfile: D:\Raja1\Demo4\build\build.xml
clean:
[echo] Raja Completed cleaning
build-client:

BUILD FAILED
D:\Raja1\Demo4\build\build.xml:17: java.lang.NoClassDefFoundError: weblogic/diagnostics/debug/DebugLogger

Total time: 471 milliseconds


From above error, i understood that clean is working fine , but build-client target is not working, and it is not finding ClientGenTask class, and I placed weblogic.jar in project class path and i added them too in windows->preferences->ant runtime libraries in eclipse , but still getting same error, any suggestions are really helpful
 
rajabhayya Sekharbhayya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am providing some more information

I am using weblogic server 10.3 and eclipse for Java EE IDE 1.2 version .
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's failing in the 'clientgen' task which is a task specific to weblogic. You need to find out how to set the classpath for that task and add the weblogic jar files there.
 
rajabhayya Sekharbhayya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter

, I got the clientGen error resolved and after that I got
NoClassDefFoundError : weblogic/diagnostics/debug/DebugLogger

Thats also resolved , After that I got stuck up by the below error

Buildfile: D:\Raja1\Demo1\build\build.xml
clean:
[echo] Raja Completed cleaning
[echo] ${weblogic.jar.classpath}
build-client:
[echo] ${weblogic.jar.classpath}
[clientgen] Ignoring JAX-WS options - building a JAX-RPC client

BUILD FAILED
D:\Raja1\Demo1\build\build.xml:18: java.lang.NoClassDefFoundError: com/bea/xml/XmlException

, and the error is shown is below target

<target name="build-client">
<echo>${weblogic.jar.classpath}</echo>
<clientgen wsdl="http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL" destDir="src/raja" />
<javac srcdir="${clientclass-dir}" destdir="${clientclass-dir}" includes="**/*.java" />
</target>

There are 3 concerns in this regard

1) I dont think , that weblogic.jar is not in classpath , since my previous 2 errors are resolved, now I opened my weblogic.jar and I found com\bea\xml contains only registry folder, there is no XMLException class, so why its referring to ?

2) I am much more not understood if that exception is related to weblogic.jar or any other jar.

3) when I use this statment [echo] ${weblogic.jar.classpath}
, it is not printing the classpath, it is printing {weblogic.jar.classpath}
Does it mean that , still weblogic.jar is not in classpath ?


please help me in this regards.

Regards
Raja

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1, 2) Apparently there is yet another JAR file you are missing. I have no idea which jar file contains the com/bea/xml/XmlException class (I don't use weblogic). Try this tool to lookup classes in jar files: http://www.isocra.com/2006/02/jarfinder/

3) You cannot echo out path references, only properties. Some tasks print out the classpath when you supply the -v option to ant.
 
rajabhayya Sekharbhayya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter,

I have done the following thing

In javacious site , i found that xmlexception is contained in totally 4 classes, so I added xmlbeans-1.0 jar in classpath
and that error is resolved, now i got one more error, when I run build.xml , i got new error


BUILD FAILED
D:\Raja1\Demo1\build\build.xml:16: java.lang.NoClassDefFoundError: com/bea/staxb/buildtime/internal/tylar/Tylar

I found the jar as com.bea.core.xml.staxb.buildtime_1.3.0.0 jar , but it does not contain tylar folder in internal folder

and when I run again, it does not again, since it doesnt contain tylar folder

Any idea to which jar it belongs to ?

Regards
Rajasekhar
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I gave you a link to the isocra jarfinder tool - download it and use it to locate the jar file for the missing class.
 
rajabhayya Sekharbhayya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter

I got resolved that error, i manually searched from c:\bea\modules folder and got the required jar files,

When I tried to build , i got the below error

BUILD FAILED
D:\Raja1\Demo1\build\build.xml:15: java.lang.NoSuchFieldError: METADATA_PACKAGE_GEN

This is occuring at same target ,

I did a lot of googling , but i could not find any one encountered with this problem, I am sure it is not a jar problem .

and ClientGen is recognized properly now, because when i click ctrl+enter it is showing clientGen attributes .

have you ever by chance , got this error message ?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error you posted, was that the entire error or was there a full stack trace? If there was a full stack trace then that should give some clue as to what is wrong. If there was no full stack trace, try running ant with the -v option - that should cause it to output the full stack trace.

Either way, I think that at this point it is an error noted by ClientGen, in which case you might want to bring it up in the WebLogic forum.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic