Announcement Announcement Module
Collapse
No announcement yet.
Issue with Struts 2 XML Validation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with Struts 2 XML Validation

    I wrote a Struts 2 web app that has validations defined in an XML file. I got the following jars and converted them to bundles using BND.

    xwork-2.0.7.jar
    ognl-2.6.11.jar
    struts2-core-2.0.14.jar

    I am getting the following error -

    Code:
    java.lang.NullPointerException: name
    	java.util.zip.ZipFile.getEntry(Unknown Source)
    	java.util.jar.JarFile.getEntry(Unknown Source)
    	sun.net.www.protocol.jar.URLJarFile.getEntry(Unknown Source)
    	com.springsource.osgi.extensions.equinox.hooks.ExtendedBundleFileWrapperFactoryHook$FileResourceEnforcingBundleFile.doesJarEntryReallyExist(ExtendedBundleFileWrapperFactoryHook.java:195)
    	com.springsource.osgi.extensions.equinox.hooks.ExtendedBundleFileWrapperFactoryHook$FileResourceEnforcingBundleFile.getLocalURLForEntry(ExtendedBundleFileWrapperFactoryHook.java:180)
    	com.springsource.osgi.extensions.equinox.hooks.ExtendedBundleFileWrapperFactoryHook$FileResourceEnforcingBundleFile.doGetResourceURL(ExtendedBundleFileWrapperFactoryHook.java:166)
    	com.springsource.osgi.extensions.equinox.hooks.ExtendedBundleFileWrapperFactoryHook$FileResourceEnforcingBundleFile.getResourceURL(ExtendedBundleFileWrapperFactoryHook.java:160)
    	org.eclipse.osgi.baseadaptor.bundlefile.BundleFileWrapperChain.getResourceURL(BundleFileWrapperChain.java:64)
    	com.springsource.kernel.userregion.internal.equinox.TransformedManifestProvidingBundleFileWrapper$TransformedManifestProvidingBundleFile.getResourceURL(TransformedManifestProvidingBundleFileWrapper.java:241)
    	org.eclipse.osgi.baseadaptor.bundlefile.BundleFileWrapperChain.getResourceURL(BundleFileWrapperChain.java:64)
    	org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findResourceImpl(ClasspathManager.java:347)
    	org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalResources(ClasspathManager.java:325)
    	org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalResources(DefaultClassLoader.java:207)
    	org.eclipse.osgi.internal.loader.BundleLoader.findLocalResources(BundleLoader.java:757)
    	org.eclipse.osgi.internal.loader.BundleLoader.findResources(BundleLoader.java:680)
    	org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findResources(DefaultClassLoader.java:160)
    	java.lang.ClassLoader.getResources(Unknown Source)
    	com.springsource.osgi.webcontainer.tomcat.internal.loading.ChainedClassLoader.doGetResources(ChainedClassLoader.java:105)
    	com.springsource.osgi.webcontainer.tomcat.internal.loading.ChainedClassLoader.getResources(ChainedClassLoader.java:97)
    	com.springsource.osgi.webcontainer.tomcat.internal.loading.BundleWebappClassLoader.getResources(BundleWebappClassLoader.java:202)
    	com.opensymphony.xwork2.util.ClassLoaderUtil.getResources(ClassLoaderUtil.java:48)
    	com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:324)
    	com.opensymphony.xwork2.validator.ValidatorFactory.<clinit>(ValidatorFactory.java:234)
    	com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.java:205)
    	com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFileParser.java:85)
    	com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:361)
    If I remove the validation XML file. The application works fine. I am attaching the XML validation file that I am using and is placed under com/test/controller along with the Action class in the web bundle.
Working...
X