[wildfly-dev] Deploying JSR 352 job as a module

Jan Martiška jmartisk at redhat.com
Thu Aug 18 07:05:56 EDT 2016


Does the dependency on the module include a dependency on its META-INF
directory? AFAIK, META-INF contents are by default not visible to
applications' classloaders. I think you need a "meta-inf=import" attribute
or so in jboss-deployment-structure.xml, or the "meta-inf" flag if you are
declaring the dependency in MANIFEST.MF.

Jan

On Thu, Aug 18, 2016 at 9:59 AM, Gunnar Morling <gunnar at hibernate.org>
wrote:

> Hi,
>
> Is there any example which shows how to deploy a JSR 352 batch job via a
> module added to WildFly rather than through a deployed application? This
> batch job should then be usable from applications which declare a
> dependency to that module.
>
> Trying this, I'm getting an error saying that the batch job's XML
> descriptor cannot be found [1]. I.e. the module with the batch job is
> visible to the deployed application (as the MassIndexer class can be
> accessed), but then JBeret cannot "see" the job XML descriptor within that
> module.
>
> Is there anything I can configure in the module.xml of the batch job's
> module for exposing its contents to JBeret?
>
> The use case is Hibernate Search where a GSoC student is working on a JSR
> 352 batch job for re-indexing entities. This job eventually should be part
> of Hibernate Search's modules, allowing users to run it if Hibernate Search
> is enabled for their application.
>
> Thanks for any pointers,
>
> --Gunnar
>
> [1] Exception: javax.batch.operations.JobStartException: JBERET000601:
> Failed to get job xml file for job mass-index.xml
>     at org.jberet.creation.ArchiveXmlLoader.getJobXml(
> ArchiveXmlLoader.java:129)
>     at org.jberet.creation.ArchiveXmlLoader.loadJobXml(
> ArchiveXmlLoader.java:91)
>     at org.jberet.operations.JobOperatorImpl.start(
> JobOperatorImpl.java:102)
>     at org.hibernate.search.jsr352.MassIndexer.start(MassIndexer.java:90)
>     at org.hibernate.search.jsr352.PerformanceIT.testNewMassIndexer(
> PerformanceIT.java:167)
>     ...
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160818/83ad154d/attachment.html 


More information about the wildfly-dev mailing list