NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
evka85
Joined: 01 Dec 2010 Posts: 2 Location: Geneva, Switzerland
|
Posted: Fri Dec 03, 2010 1:54 pm Post subject: <error>.class is generated during deploy (deps-jar target)... hmmm |
|
|
Hello all,
First things first - this forum is a super nice source of information and is very helpful - I've been using it for years. This is my first post however, so please go easy
I've encountered a very strange problem that I can't find any info about. Here it goes: I have an EE application with several EJB and Web modules, I run it in Glassfish 2. I use NetBeans and glassfish which come with OpenESB / GlassfishESB v2.2 (NetBeans v6.7.1 & Glassfish v2.1.1). In one of the EJB modules I have a few packages with entity beans. Now when I compile the whole application, everything is fine, but when I try to deploy it, the strangest thing happens - "<error>.class" file appears in EJBModule/build/jar/my_entity_package/ directory which also appears to be somewhat crippled and so NetBeans immediately throws this error at me during "deps-jar" build target (i.e. before the actual deployment to glassfish):
| Code: | deps-jar:
Exception in thread "main" java.lang.VerifyError: (class: org/cern/cms/csc/exsys/re/model/<error>, method: <init> signature: ()V) Constructor must call super() or this()
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.cern.cms.csc.dw.util.ClassUtil.packageClassses(ClassUtil.java:281)
at org.cern.cms.csc.dw.util.ClassUtil.packageClassses(ClassUtil.java:287)
at org.cern.cms.csc.dw.util.ClassUtil.packageClassses(ClassUtil.java:287)
at org.cern.cms.csc.dw.util.ClassUtil.packageClassses(ClassUtil.java:287)
at org.cern.cms.csc.dw.metadata.MetadataManager.main(MetadataManager.java:81)
/home/evka/code/cscdw/Cdw/nbproject/build-impl.xml:177: The following error occurred while executing this line:
/home/evka/code/cscdw/CdwGui/nbproject/build-impl.xml:407: The following error occurred while executing this line:
/home/evka/code/cscdw/CdwModel/build.xml:76: Java returned: 1
BUILD FAILED (total time: 1 second) |
Now if I simply delete this <error>.class file and try to deploy again, the application deploys and runs perfectly fine... until I do clean / clean-build however - then I get into the same situation when deploying..
It seems that there must be something in my entities that NetBeans doesn't like, but what could it possibly be?? (especially given that glassfish is perfectly happy about them)
BTW, this great name "<error>.class" makes it nearly impossible to find anything in google which, no matter what you do, is smart enough to drop those special symbols (<,>,.) away.
Any ideas would be greatly appreciated! |
|
| Back to top |
|
 |
zent
Joined: 21 Jan 2011 Posts: 1
|
Posted: Fri Jan 21, 2011 9:44 am Post subject: |
|
|
Hi evka85
I've got almost the same problem here. Have you found a solution yet?
I have a SE application with JPA (eclipselink) and tomcat. To enable lazy loading in the entities I use static weaving. In my build.xml I added an ant task that does the weaving of the entities before packing the war file.
If I run the weaving ant task outside of netbeans it works fine, even if I run it several times. When I'm doing a clean build in Netbeans with my weaving task integreated in my build.xml everything works fine as well. As soon as I hit run, I got the same problem as you, when the build script comes to my ant task I get the following error
| Code: | BUILD FAILED
/home/project/NetBeansProjects/myProject/setup/weave.xml:14: java.lang.ClassFormatError: Duplicate field name&signature in class file class /path/to/my/class./<error>
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.process(StaticWeaveProcessor.java:278)
at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.performWeaving(StaticWeaveProcessor.java:174)
at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.start(StaticWeaveAntTask.java:211)
at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.execute(StaticWeaveAntTask.java:173)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 6 seconds |
In my build/web/WEB-INF/classes folder I find two of those <error>.class files. When I delete them, the application runs fine. I always got the same <error>.classes build from the same classes. The two classes that generate these errors are not entities, but beans that use the entities. Same as you I'm having trouble finding anything about these funny named classes in Google or any other search enging.
This is what I get when I run javap -c <error>
| Code: |
Compiled from "SedDBImpl.java"
2 class path.to.my.class.<error> extends java.lang.Object{
3 java.lang.Object <error>;
4
5 module <error>;
6
7 java.lang.Object[] result;
8
9 int clinicIx;
10
11 java.lang.Object <error>;
12
13 class path.to.my.class.Clinic clinic;
14
15 java.lang.Object <error>;
16
17 result <error>;
18
19 class path.to.my.class..<error>();
20
21 module.getClinic <error>();
22
23 static {};
24
25 } |
Thanks for your help
Patrick |
|
| Back to top |
|
 |
kruisea
Joined: 12 Apr 2011 Posts: 1
|
Posted: Tue Apr 12, 2011 4:13 pm Post subject: |
|
|
Hi,
Same problem here I think. Disabling "Deploy on save" on the project properties (for me on the Enterprise Application project) and no more <error>.class errors.
Kruisea |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|