This discussion is archived
6 Replies Latest reply: Jun 30, 2013 10:47 PM by CrgF RSS

Classpath question

CrgF Newbie
Currently Being Moderated

Hi,

 

Posted this originally in Webcenter Sites but perhaps this is a more appropriate space.

 

 

I am facing an exception while running the silent installer for Webcenter Sites Analytics. which is based on Ant. I'm on Win 7 Professional.

 

-prepareConfig:

[xmleditor] Source File=./configuration/global.xml-dist

[xmleditor] Element=param

 

 

BUILD FAILED

D:\analytics\analytics11.1.1.6.0\analytics-build.xml:174: java.lang.NoClassDefFoundError: org/apache/xerces/dom/NamedNodeMapImpl

  at org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown Source)

  at org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(Unknown Source)

  at org.apache.xerces.dom.ParentNode.hasChildNodes(Unknown Source)

  at org.apache.xerces.dom.DeepNodeListImpl.nextMatchingElementAfter(Unknown Source)

  at org.apache.xerces.dom.DeepNodeListImpl.item(Unknown Source)

  at org.apache.xerces.dom.DeepNodeListImpl.getLength(Unknown Source)

  at com.fatwire.analytics.silentInstall.ant.XMLContentEditorTask.modify(XMLContentEditorTask.java:157)

  at com.fatwire.analytics.silentInstall.ant.XMLContentEditorTask.execute(XMLContentEditorTask.java:121)

  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)

  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:597)

  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

  at org.apache.tools.ant.Task.perform(Task.java:348)

  at org.apache.tools.ant.Target.execute(Target.java:435)

  at org.apache.tools.ant.Target.performTasks(Target.java:456)

  at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)

  at org.apache.tools.ant.Project.executeTarget(Project.java:1364)

  at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

  at org.apache.tools.ant.Project.executeTargets(Project.java:1248)

  at org.apache.tools.ant.Main.runBuild(Main.java:851)

  at org.apache.tools.ant.Main.startAnt(Main.java:235)

  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)

  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Caused by: java.lang.ClassNotFoundException: org.apache.xerces.dom.NamedNodeMapImpl

  at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

  at java.security.AccessController.doPrivileged(Native Method)

  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

  at java.lang.ClassLoader.loadClass(ClassLoader.java:305)

  at java.lang.ClassLoader.loadClass(ClassLoader.java:246)

  ... 24 more

 

 

Total time: 1 second

 

 

I've located this class in (XercesImpl.jar) and modified the install file analytics_install.bat to point to it using

set CLASSPATH=D:\analytics\xerces\xerces-2_11_0

 

or

:runInstaller

%_EXECJAVA% -Djava.class.path=D:\analytics\xerces\xerces-2_11_0 -jar analytics-silent-install.jar ant.bat analytics-install.log %_TARGET%

 

But none of that works...

Can anybody help...

 

thanks

  • 1. Re: Classpath question
    jwenting Journeyer
    Currently Being Moderated

    only ones who can help you there are the vendors/distributors of that system. It LOOKS like there's something missing or misplaced in the distribution, but that's all anyone here can tell you.

  • 2. Re: Classpath question
    Deven Newbie
    Currently Being Moderated

    Try if you have more than one "xercesImpl"*.jar files in your classpath. If same class appears in more than one jar files in your classpath, Classloader simply throws this exception.

  • 3. Re: Classpath question
    jtahlborn Expert
    Currently Being Moderated

    Deven wrote:

     

    Try if you have more than one "xercesImpl"*.jar files in your classpath. If same class appears in more than one jar files in your classpath, Classloader simply throws this exception.

    um, no, that's completely incorrect.  the classloader does not care if you have 100 copies of the same class in the classpath.  it will just load the first one it finds.

  • 4. Re: Classpath question
    rp0428 Guru
    Currently Being Moderated

     

    I've located this class in (XercesImpl.jar) and modified the install file analytics_install.bat to point to it using

    set CLASSPATH=D:\analytics\xerces\xerces-2_11_0

     

    or

    :runInstaller

    %_EXECJAVA% -Djava.class.path=D:\analytics\xerces\xerces-2_11_0 -jar analytics-silent-install.jar ant.bat analytics-install.log %_TARGET%

    How is that pointing to that specific jar file? That classpath just specifies a folder. Specify the 'XercesImpl.jar' file like you specified the 'analytics-silent-install.jar' file.

  • 5. Re: Classpath question
    CrgF Newbie
    Currently Being Moderated

    Thanks, but here are the errors I get:

     

    For

    :runInstaller

    %_EXECJAVA% -jar  analytics-silent-install.jar xercesImpl.jar  ant.bat analytics-install.log %_TARGET%

    (where xercesImpl.jar is in the same folder)

     

    java.io.IOException: Cannot run program "xercesImpl.jar": CreateProcess error=193, %1 is not a valid Win32 application

      at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)

      at java.lang.Runtime.exec(Runtime.java:593)

      at java.lang.Runtime.exec(Runtime.java:466)

      at com.fatwire.analytics.silentInstall.ant.InstallShell.runInstall(InstallShell.java:92)

      at com.fatwire.analytics.silentInstall.ant.InstallShell.main(InstallShell.java:144)

    Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application

      at java.lang.ProcessImpl.create(Native Method)

      at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)

      at java.lang.ProcessImpl.start(ProcessImpl.java:30)

      at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)

      ... 4 more

     

    For

    :runInstaller

    %_EXECJAVA% -jar  xercesImpl.jar analytics-silent-install.jar ant.bat analytics-install.log %_TARGET%

     

    Failed to load Main-Class manifest attribute from

    xercesImpl.jar ... which is expected.

     

    Any suggestions would be helpful..

  • 6. Re: Classpath question
    CrgF Newbie
    Currently Being Moderated

    As it turned out the default jar shipped with the kit did not contain the class files. So I replaced it with my own in lib dir. This solved the problem.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points