why annotated enity is not loaded in exploded jar?

why annotated enity is not loaded in exploded jar?

while the same works in non-exploded jar?? why ?


finally it’s solved.

LocalEntityManagerFatcoryBean, invokes its persistent provider (HibernatePersistence here), which in turn invokes EjB3Config, which invokes ZippedJarVisitor (dependent on the URL protocol, vzsfile). The ZippedJarVisistor would scan and add the Entity annotated entities. However, it would skip, if it’s a directory.

Solution is, within persistent.xml, specifiically tell persistent-unit, that to scan and add com.abc.UserClass which is the entity.

<persistent-unit ..> < include-class > com.abc.UserClass </include-class > </persistent-unit >

Another conclusion is, follow the exception, follow the trace, trace from top to bottom following stack trace.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s