1
votes

While trying to deploy new ear file IN JBoss 7 and tring to access a service I'm getting the following error:

16:17:39,114 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-app-ejb-1.0-SNAPSHOT].[MyServicesBean]] (http--10.232.165.117-8080-1) Servlet.service() for servlet MyServicesBean threw exception: java.util.MissingResourceException: Could not instantiate factory delegate, got exception(s): java.lang.ClassNotFoundException: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl from [Module "deployment.my-app-ear-1.0-SNAPSHOT.ear:main" from Service Module Loader] java.lang.ClassNotFoundException: com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl from [Module "deployment.my-app-ear-1.0-SNAPSHOT.ear:main" from Service Module Loader] java.lang.ClassNotFoundException: org.apache.xalan.processor.TransformerFactoryImpl from [Module "deployment.my-app-ear-1.0-SNAPSHOT.ear:main" from Service Module Loader] at weblogic.xml.jaxp.Utils.getDelegate(Utils.java:28) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at weblogic.xml.jaxp.WebLogicTransformerFactory.(WebLogicTransformerFactory.java:79) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at weblogic.xml.jaxp.RegistryTransformerFactory.(RegistryTransformerFactory.java:62) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at weblogic.xml.jaxp.RegistrySAXTransformerFactory.(RegistrySAXTransformerFactory.java:12) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_65] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_65] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_65] at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_65] at __redirected.__TransformerFactory.(__TransformerFactory.java:111) [jboss-modules.jar:1.1.1.GA] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_65] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_65]

Can you please suggest how to solve this ?

1
Are you using Xalan? Does JBoss see this library?DmitryKanunnikoff
I am new for JBoss too. Read in the Internet how to add libs to JBoss. May be this will help: stackoverflow.com/questions/12581157/…DmitryKanunnikoff

1 Answers

3
votes

This problem is probably because you don't have a xalan library in your project.

So, either you can add it to the project from http://mvnrepository.com/artifact/xalan/xalan/2.7.2 or you can use the one which is included in the JBoss server by creating a jboss-deployment-structure.xml file:

<jboss-deployment-structure>
    <deployment>            
        <exclusions>            
            <module name="org.apache.xalan" />
        </dependencies>
    </deployment>
</jboss-deployment-structure>

In case you have any problems - add xerces library as well:

<jboss-deployment-structure>
    <deployment>            
        <exclusions>            
            <module name="org.apache.xalan" />
            <module name="org.apache.xerces" /> 
        </dependencies>
    </deployment>
</jboss-deployment-structure>

Hope this helps.

P.S. JBoss documentation about Class Loading in JBoss: https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7