sandeepkumar
Posts: 2
Joined: Mon Jul 16, 2018 4:55 am
Contact: Website

Cannot load Schema Type System while calling Netsuite API

Sat Sep 08, 2018 6:50 am

Hi all, I am getting the following exception while calling the NetSuite API.

Code: Select all

Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sB331199381645ABE49A4496FD7D9E1F7.TypeSystemHolder. Make sure the generated binary files are on the classpath.
    at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
    at com.netsuite.webservices.platform.messages_2017_2.UpdateDocument.<clinit>(UpdateDocument.java:20)
    ... 3 more
Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.sB331199381645ABE49A4496FD7D9E1F7.TypeSystemHolder
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
    ... 4 more
PS:- i am using the following wsdl url https://webservices.netsuite.com/wsdl/v ... suite.wsdl to generate the java code.

Code: Select all

the plugin which is used in pom.xml is below.

    <plugin>
      <groupId>org.apache.axis2</groupId>
      <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
      <version>1.6.2</version>
      <executions>
        <execution>
            <goals>
                <goal>wsdl2code</goal>
            </goals>
            <configuration>
              <wsdlFile>${demo.wsdl.path}</wsdlFile>
              <databindingName>xmlbeans</databindingName>                        
              <packageName>com.demo</packageName>                        
              <outputDirectory>src/main/generated</outputDirectory>
              <flattenFiles>true</flattenFiles>
              <unpackClasses>true</unpackClasses>
              <generateAllClasses>true</generateAllClasses>
           </configuration>
         </execution>
      </executions>
   </plugin>
Thanks.

Return to “Java”