You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by ptie <pe...@nn.nl.INVALID> on 2019/12/16 08:22:23 UTC

Trouble loading custom resource within WAR embedded within EAR

Hi all,

We 're having trouble loading a custom resource within a WAR with TomEE
7.1.0

Basically, we have the following structure within our EAR:

EAR
--web-app.war
----WEB-INF
------classes
--------com
----------example
------------CustomResource.class
      resources.xml
	  
The resources.xml is as follows:

<resources>
  <Resource id="customResource" class-name="com.example.CustomResource">
    property value
  </Resource>
</resources>

We get the following message:

org.apache.openejb.OpenEJBException: Unable to load type
'com.example.CustomResource' for
comp/env/openejb/Resource/app/customResource

Why is this not working?

Thanks!
Peter



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Trouble loading custom resource within WAR embedded within EAR

Posted by ptie <pe...@nn.nl.INVALID>.
Hi Jon,

Thanks for the quick reply!

We are using @Resource.

But the error (that it cannot find com.example.CustomResource) is thrown
while TomEE is processing the resources.xml, it does not even get to
injecting the CustomResource.

Thanks,
Peter



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Trouble loading custom resource within WAR embedded within EAR

Posted by Jonathan Gallimore <jo...@gmail.com>.
How are you using that resource - are you using @Resource or a JNDI lookup
or similar?

Thanks

Jon

On Mon, Jan 6, 2020 at 2:32 PM ptie <pe...@nn.nl.invalid> wrote:

> Anybody?
>
> Regards,
> Peter
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>

Re: Trouble loading custom resource within WAR embedded within EAR

Posted by ptie <pe...@nn.nl.INVALID>.
Anybody?

Regards,
Peter



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html