[esb-issues] [JBoss JIRA] Commented: (JBESB-3440) Smooks 1.2 JavaBean namespace with wise SoapClient causes ClassNotFoundException

Tom Fennelly (JIRA) jira-events at lists.jboss.org
Thu Sep 23 12:03:28 EDT 2010


    [ https://jira.jboss.org/browse/JBESB-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12552781#action_12552781 ] 

Tom Fennelly commented on JBESB-3440:
-------------------------------------

So the issue here is that WISE loads the Smooks configuration for populating the Java classes, before the classes actually exist on the classpath (it generates them later).  This is an issue with the namespaced config (javabean-1.1.xsd or javabean-1.2.xsd) because one of the things the config processor does is run some checks on the config against the configured class (e.g. does the specified property exist on the class?).  It needs to be able to load the class instance to do perform some of these checks.  If it can't, it throws an exception.

There's an easy Smooks fix for this (assuming WISE can't be changed to not load the Smooks config until after it has created the classes - will check into that) and that is to not run the checks if the class is not available on the classpath - just raise a warning perhaps.

> Smooks 1.2 JavaBean namespace with wise SoapClient causes ClassNotFoundException
> --------------------------------------------------------------------------------
>
>                 Key: JBESB-3440
>                 URL: https://jira.jboss.org/browse/JBESB-3440
>             Project: JBoss ESB
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Transformation Service, Web Services
>    Affects Versions: 4.7 CP2
>            Reporter: Toshiya Kobayashi
>            Assignee: Tom Fennelly
>             Fix For: 4.9 CP1
>
>
> I'm using the wise SoapClient to call an external SOAP web service. The ESB service itself is exposed as web service as well, but using a different XSD, and only OneWay.
> Smooks is used to transform the input XML SOAP message into the format that the external web service wants. Since wise wants it's message as JAXB-objects, the Smooks transformation is configured to instantiate the wise-generated JAXB classes.
> When writing this as resource-config tags (smooks-1.0.xsd namespace), it works correctly. However, when using the much shorter and preferred jb:bean tags (javabean-1.2.xsd namespace), ClassNotFoundException occurs while deploying the .ESB service: Smooks can't find the generated classes. This makes sense, since Wise won't create them until the first request. Apparently the behaviour is quite different between the 1.0 and the 1.2 notation, while using the same Smooks runtime.
> 1.0 Behaviour:
> - During .ESB deployment, the configuration is only parsed. No classes are loaded.
> - With the first request, Wise creates JAXB sources.
> - While transforming, Smooks classloads the JAXB classes.
> 1.2 Behaviour:
> - During .ESB deployment, classes in the configuration are already classloaded. Hence, ClassNotFoundException.
> ===========
> This is the older version of the WISE SOAPClient, released pre Smooks
> v1.1 (when the extended namespace configs were introduced).  So, it
> probably wouldn't have been tested against the newer features in the
> newer versions of Smooks i.e. may not be forward compatible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the esb-issues mailing list