WB Fails to render custom component with NoDefClassFoundException [message #1698979] |
Fri, 19 June 2015 09:30  |
Eclipse User |
|
|
|
hello,
I'm currently running into a big issue with WB.
I'm running Eclipse Kepler SR2 ( 20140224-0627) under Java 1.6 (jdk1.6.0_45) and compiling my project with maven 3.2.5 under Java 1.6 as well.
The problem is that WB fails to render my components. It only renders a pink box with an error icon.
I'm having trouble finding the issue. The only thing i can see is that WB fails with a NoDefClassFound Exception on one of my messages class (containing my resources Bundle)
Full context stack trace:
org.eclipse.wb.internal.core.utils.exception.DesignerException: 308 (Exception during method invocation evaluation). InventoryMessages.getString("ScanPanel.progress.selection.title") public static java.lang.String [package-name].inventory.common.InventoryMessages.getString(java.lang.String) {ScanPanel.progress.selection.title}
at org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.invokeMethod(InvocationEvaluator.java:458)
at org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.evaluate(InvocationEvaluator.java:101)
at org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.evaluate(InvocationEvaluator.java:73)
at org.eclipse.wb.core.eval.AstEvaluationEngine.evaluate0(AstEvaluationEngine.java:177)
at org.eclipse.wb.core.eval.AstEvaluationEngine.evaluate(AstEvaluationEngine.java:61)
at org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.getArgumentValues(InvocationEvaluator.java:560)
at org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.evaluate(InvocationEvaluator.java:242)
at org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.evaluate(InvocationEvaluator.java:81)
at org.eclipse.wb.core.eval.AstEvaluationEngine.evaluate0(AstEvaluationEngine.java:177)
at org.eclipse.wb.core.eval.AstEvaluationEngine.evaluate(AstEvaluationEngine.java:61)
at org.eclipse.wb.internal.core.model.JavaInfoEvaluationHelper.evaluateExpression(JavaInfoEvaluationHelper.java:630)
at org.eclipse.wb.internal.core.model.JavaInfoEvaluationHelper.evaluate(JavaInfoEvaluationHelper.java:502)
at org.eclipse.wb.core.model.JavaInfo$8.postVisit(JavaInfo.java:1143)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.wb.core.eval.ExecutionFlowUtils$1.intercept(ExecutionFlowUtils.java:399)
at org.eclipse.jdt.core.dom.ASTVisitor$$EnhancerByCGLIB$$ed52f93b.postVisit(<generated>)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2517)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.Assignment.accept0(Assignment.java:312)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:144)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement0(ExecutionFlowUtils.java:354)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement(ExecutionFlowUtils.java:315)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement0(ExecutionFlowUtils.java:336)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement(ExecutionFlowUtils.java:315)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visit(ExecutionFlowUtils.java:247)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.access$1(ExecutionFlowUtils.java:235)
at org.eclipse.wb.core.eval.ExecutionFlowUtils$1.endVisit(ExecutionFlowUtils.java:442)
at org.eclipse.wb.core.eval.ExecutionFlowUtils$1.intercept(ExecutionFlowUtils.java:391)
at org.eclipse.jdt.core.dom.ASTVisitor$$EnhancerByCGLIB$$ed52f93b.endVisit(<generated>)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:247)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:144)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement0(ExecutionFlowUtils.java:354)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement(ExecutionFlowUtils.java:315)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement0(ExecutionFlowUtils.java:336)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visitStatement(ExecutionFlowUtils.java:315)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visit(ExecutionFlowUtils.java:247)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visit(ExecutionFlowUtils.java:228)
at org.eclipse.wb.core.eval.ExecutionFlowUtils.visit(ExecutionFlowUtils.java:191)
at org.eclipse.wb.core.model.JavaInfo.refresh_create(JavaInfo.java:1199)
at org.eclipse.wb.core.model.ObjectInfo.refreshCreate0(ObjectInfo.java:550)
at org.eclipse.wb.core.model.ObjectInfo.access$0(ObjectInfo.java:546)
at org.eclipse.wb.core.model.ObjectInfo$5$1.run(ObjectInfo.java:486)
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:145)
at org.eclipse.wb.core.model.ObjectInfo$5.run(ObjectInfo.java:484)
at org.eclipse.wb.internal.swing.utils.SwingUtils$2.run(SwingUtils.java:76)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:672)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:633)
at java.awt.EventQueue$2.run(EventQueue.java:631)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:642)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class [package-name].inventory.common.InventoryMessages
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.invokeMethod(InvocationEvaluator.java:456)
... 66 more
The program launches just fine in both eclipse or intelliJ so it seems to be a WB classpath related issue.
I've tried to upgrade Eclipse to Luna, uninstall and reinstall WB...
I'm kind of stuck here, can anyone help me?
Cheers,
Clément
ps: i've volountarly removed my company's name package from the captures and stacktrace
|
|
|
Re: WB Fails to render custom component with NoDefClassFoundException [message #1699320 is a reply to message #1698979] |
Tue, 23 June 2015 11:17  |
Eclipse User |
|
|
|
The pink box with the error icon means that there is a problem rendering your custom component at design time. I would recommend reading the WIndowBuilder FAQ (in the docs) on custom components. All custom components need to be valid Java Beans in order to use them in WB. Asside from classpath issues, the most likely issue is trying to use a private class as a component, or relying on some internal behavior that is only valid at runtime (leaving some important state null at design time).
|
|
|
Powered by
FUDForum. Page generated in 0.02902 seconds