I know there are a lot of threads to this topic, but after searching for ~10 hours without a solution I will ask in a new thread.
I got two projects not working (properly).
I use Windows 8.1 64 bit with a clean jre/jdk 8 and javaee7. I have a glassfish 4 server and netbeans 8.
When I say my server log is empty than I mean the server domain log file found in "%glassgish4%\glassfish\domains\domain1\log".
My projects are simple enterprise-applications with JavaBeans.
My first problem is a multiexception in a simple remote method invocation via session-beans.
I created the enterprise-application-project and a normal client (java) project to hold the remote interface. The client calls a simple method to add two numbers.
The project-structure can be seen here:
Project-Structure
The interface in the client-application can bee seen here:
NeueSessionBeanRemote
The interface implementation in the enterprise-application is this one:
Interface-Implementation
And here is the main-method from client-application:
main-method
The netbeans error output is here:
netbeans errror output
The server log is empty (just a succes notification from deploying the enterprise application project).
Well this was the first problem. Now I will tell you about the second.
It is a project allowing to enter customer information in a jsp form and inserting them into a database (travel agency).
This is the structure:
second project structure
I copied the class "Kunde" to the client-application because the RemoteInterface did not know "Kunde".
Well this is my RemoteInterface "Reisebuero2Remote":
Reisebuero2Interface
I won't show the client main method, because it is empty ;)
The interface-implementation looks like this:
interface-implementation
The "Kunde" looks like that:
Kunde
Because the web implementation is simple html I will only show you the jsp file:
jsp file
And here is my probelm I can't even build the enterprise-application:
error at building
My server log is empty again.
If you need further information I will try to provide them.
Thank you very much for your support.
Edit:
Content of pom.xml from folder: C:\Program Files\glassfish-4\glassfish\lib\install\applications__admingui\META-INF\maven\org.glassfish.main.admingui\war
//Removed
POM.XML
Search Result for pom.xml in Project-Folder:
Search-Result
Context-Menu on project in Netbeans:
Context
The main problem:
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/resource/ResourceException
seems to be caused by the order in which the Java EE 6 API Library
and the gf-client.jar
are added to the classpath.
It seems to be important that the gf-client.jar
is the first library in the classpath.
To fix the issue, change the order of the libraries by removing Java EE 6 API Library
and adding it again, so that gf-client.jar
is on the first position.
Make sure to Clean & Build
your project before you run it again.
See also: