-
1. Re: Incompatible object argument for function call
wdfink Nov 5, 2012 2:43 AM (in response to ohmygod)Do you pack this 3rd party libraries in your application?
This might be the reason for this.
-
2. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 2:45 AM (in response to wdfink)Yes, I included the jar xalan.1.2.2.jar which has the
org.apache.xalan.xslt related
classes for the code. The code worked in older JBoss and not working after uprading to JBoss 7.I looked for the same classes in JBoss 7 but did not find any conflict jars.
-
3. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 3:26 AM (in response to ohmygod)Could this problem related to this module modules\org\apache\xalan\main?
But I did not find any same classes between these two jars. If anyone needs, I can attach my xalan.1.2.2.jar.
-
4. Re: Incompatible object argument for function call
wdfink Nov 5, 2012 4:54 AM (in response to ohmygod)Maybe you need to exclude xalan dependency from the application, use jboss-deployment-structure for that
-
5. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 5:22 AM (in response to wdfink)Thanks, but I am not exactly sure how to do this "exclude xalan dependency from the application and use jboss-deployment-structure for that".
Can you please explain it a little more clearly?
-
6. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 5:24 AM (in response to ohmygod)Do you mean remove it from my application lib folder and put the xalan.1.2.2.jar in jboss' module and then add it in jboss-deployment-structure ?
-
7. Re: Incompatible object argument for function call
wdfink Nov 5, 2012 6:23 AM (in response to ohmygod)I'm not 100% sure whether it is a incomatibility of xalan
I would check both.
You might remove xalan from your app and use the provided by adding it to jboss-deployment-structure or use the MANIFEST entry 'Dependency'.
Im not sure whether an exclude of the module 'org.apache.xalan' is a solution, but the jboss-deployment-structure.xml can be:
<jboss-deployment-structure>
<deployment> <!-- maybe you need 'sub-deployment name="myapp.war"' here -->
<exclusions>
<module name="org.apache.xalan" />
</exclusions>
</deployment>
</jboss-deployment-structure> -
8. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 8:30 PM (in response to wdfink)Add this exclusion to jboss-deployment-structure.xml but still the same error..
-
9. Re: Incompatible object argument for function call
sfcoy Nov 5, 2012 9:35 PM (in response to ohmygod)What happens if you just remove the copy of xalan from your application?
-
10. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 9:35 PM (in response to sfcoy)That will be no class found error.
-
11. Re: Incompatible object argument for function call
sfcoy Nov 5, 2012 9:40 PM (in response to ohmygod)OK, then you need to add the following to your application:
{code:xml}<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.apache.xalan" />
</dependencies>
</deployment>
</jboss-deployment-structure>{code}
This file must be placed either in the META-INF directory of your EAR file or the WEB-INF directory of your WAR file.
-
12. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 9:42 PM (in response to sfcoy)But I donot think it will work, because the module org.apache.xalan acutally does not have the same classes I imported in the code. (only xalan.1.2.2.jar has them).
-
13. Re: Incompatible object argument for function call
sfcoy Nov 5, 2012 9:46 PM (in response to ohmygod)Which xalan classes are you using?
-
14. Re: Incompatible object argument for function call
ohmygod Nov 5, 2012 9:46 PM (in response to ohmygod)Just tried and thrown classnotfound error as expected
Caused by: java.lang.ClassNotFoundException: org.apache.xalan.xpath.xml.XMLParserLiaison from [Module "deployment.myapp.ear.myapp.jar:main" from Service Module Loader]
The class only exists in xalan.1.2.2.jar. I have checked that.