Note that there are some explanatory texts on larger screens.

plurals
  1. POMissing Java EE implementation
    primarykey
    data
    text
    <p>I'm still unable to make my unit tests work. When I'm executing the test, I get <code>ClassFormatException</code>: <em>Absent Code attribute in method that is not native or abstract in class file <code>javax/ejb/EJBAccessException</code></em>. This I've written in my <code>pom.xml</code>:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.glassfish&lt;/groupId&gt; &lt;artifactId&gt;javaee&lt;/artifactId&gt; &lt;version&gt;6.0&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;javax&lt;/groupId&gt; &lt;artifactId&gt;javaee-api&lt;/artifactId&gt; &lt;version&gt;6.0&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; </code></pre> <p>But it does not work. If I open the file <code>repo/org/glassfish/javaee/6.0/javaee-6.0.jar</code> in text editor, it contains some HTML text only. Have you any idea what's wrong? Where can I find the proper <code>javaee-6.0.jar</code>? If I open the one in <code>glassfish3/glassfish/lib</code>, it contains only some <code>pom.xml</code>, nothing more.</p> <p>I have data layer consisting of entities accessed via session beans. This layer is packaged and deployed as JAR. The error is matter of presentation layer. There is no EJB. But I'm using Spring MVC. It loads controllers at the beginning. And several controllers are EJB clients. That shouldn't do matter, but one of them contains line <code>import javax.ejb.EJBAccessException</code>. When the (let say) Spring loader is loading this class, loading process fails with above mentioned exception. Thus I need the Java EE implementation to proceed the test.</p> <p>But this question is actually more general. That's not first time, what I have encountered this error: dependency JAR was not valid and when I was looking inside, I saw regular HTML code.</p> <p>Btw: I'm astonished, that I still haven't found the proper answer to this fundamental question overall the Internet.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload