cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NoClassDefFoundError exeption on webdynpro startup.

Former Member
0 Kudos

Hi, I encounter very strange problem developing Web Dynpro application, hope somebody can help me.

I am developing application with 2 views embedded in the GridLayout viewset. When I run my application I get java.lang.NoClassDefFoundError exception, after wdDoInit of all controllers were ended.

When I try not to embed views in viewset but just run one of the view without vewset it works fine.

Is somebody have an idea what can cause this strange problem?

Any help would be appreciated.

Best Regards,

Victor.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Here the stack:

java.lang.NoClassDefFoundError: com/ness/examples/bookingwithsuggestion/comp/wdp/IPrivate_Campus_StudentBookingWithSuggestionComp_StudentBookingWithSuggestionComp$WDActionEventHandler

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)

at java.lang.Class.getConstructor0(Class.java:1922)

at java.lang.Class.getConstructor(Class.java:1019)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.<init>(DelegatingView.java:41)

at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:486)

at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:523)

at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)

at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:129)

at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)

at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)

at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:136)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)

at com.sap.tc.webdynpro.clientserver.task.Task.createApplication(Task.java:190)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:494)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:49)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:240)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:130)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:92)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:35)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:373)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:250)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:321)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:299)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:698)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:223)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:146)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:140)

detlev_beutner
Active Contributor
0 Kudos

Hi Victor,

as far as I can realize,

"Campus" is the name of the viewset,

"StudentBookingWithSuggestionComp" is the component and ...

"StudentBookingWithSuggestionComp" is the window name?

The question is if you are able to find the class the stack trace complains about on the file system?

If not, than you can try to delete the gen_wdp directory, close the studio and reopen. The classes should be built again, maybe now you are more lucky.

Hope it helps

Detlev

Former Member
0 Kudos

I already tried to delete all the gen directories and this didn't help. The file, exception is talked about, exist but it is an interface not a class so there is no reason to explore it manually.

Former Member
0 Kudos

Hi Victor,

this might be a problem with very long class, respective file- and/or directorynames (i'm not sure yet, what very long means). AFAIK, there's a 255 characters restriction on windows machines, maybe you are running quite out of this, if you use a ViewSet, because of the long class names generated for ViewSet-Views. Please check, if the .class file for the ViewSet view, which is described in the exception, exists.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Hi again,

yes, the problem exists and is easy to reproduce. Creating a WD project containing a component with a long name, a window with a long name which contains a view set with a long name, again containing views with long names lead to the following error in the log:

!MESSAGE JavaBuilder handling ImageBuilderInternalException

!STACK 1

org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.

at org.eclipse.core.internal.resources.Resource.delete(Resource.java:656)

at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.cleanOutputFolders(BatchImageBuilder.java:110)

at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:37)

at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:194)

at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:117)

at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:427)

at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)

at org.eclipse.core.runtime.Platform.run(Platform.java:413)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:181)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191)

at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151)

at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)

at org.eclipse.core.runtime.Platform.run(Platform.java:413)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:165)

at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:265)

at org.eclipse.core.internal.resources.Project.build(Project.java:85)

at com.sap.ide.webdynpro.generation.eclipse.GenerationAction.run(GenerationAction.java:83)

at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:45)

at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:71)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)

at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)

!ENTRY org.eclipse.core.resources 4 4 Mai 05, 2004 09:37:28.873

!MESSAGE Problems encountered while deleting resources.

!SUBENTRY 1 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.873

!MESSAGE Could not delete: /nametest/bin/com.

!STACK 1

org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.

at org.eclipse.core.internal.localstore.FileSystemResourceManager.delete(FileSystemResourceManager.java:169)

at org.eclipse.core.internal.resources.ResourceTree.standardDeleteFolder(ResourceTree.java:552)

at org.eclipse.core.internal.resources.Resource.delete(Resource.java:633)

at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.cleanOutputFolders(BatchImageBuilder.java:110)

at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:37)

at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:194)

at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:117)

at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:427)

at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)

at org.eclipse.core.runtime.Platform.run(Platform.java:413)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:181)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191)

at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151)

at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)

at org.eclipse.core.runtime.Platform.run(Platform.java:413)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:165)

at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:265)

at org.eclipse.core.internal.resources.Project.build(Project.java:85)

at com.sap.ide.webdynpro.generation.eclipse.GenerationAction.run(GenerationAction.java:83)

at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:45)

at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:71)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)

at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)

!ENTRY org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.873

!MESSAGE Problems encountered while deleting resources.

!SUBENTRY 1 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness\examples\bookingwithsuggestion\wdp.

!SUBENTRY 1 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness\examples\bookingwithsuggestion.

!SUBENTRY 1 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness\examples.

!SUBENTRY 1 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness.

!SUBENTRY 1 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com.

!SUBENTRY 2 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness\examples\bookingwithsuggestion\wdp.

!SUBENTRY 2 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness\examples\bookingwithsuggestion.

!SUBENTRY 2 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness\examples.

!SUBENTRY 2 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com\ness.

!SUBENTRY 2 org.eclipse.core.resources 4 273 Mai 05, 2004 09:37:28.883

!MESSAGE Could not delete: C:\Dokumente und Einstellungen\admin\Documents\SAP\workspace\nametest\bin\com.

!ENTRY org.eclipse.jdt.core 4 4 Mai 05, 2004 09:40:37.284

!MESSAGE JavaBuilder handling ImageBuilderInternalException

!STACK 1

org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.

at org.eclipse.core.internal.resources.Resource.delete(Resource.java:656)

at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.cleanOutputFolders(BatchImageBuilder.java:110)

at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:37)

at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:194)

at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:117)

at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:427)

at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)

at org.eclipse.core.runtime.Platform.run(Platform.java:413)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:181)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191)

at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151)

at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)

at org.eclipse.core.runtime.Platform.run(Platform.java:413)

at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:165)

at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:265)

at org.eclipse.core.internal.resources.Project.build(Project.java:85)

at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:156)

at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:122)

at org.eclipse.ui.actions.WorkspaceAction$1.execute(WorkspaceAction.java:279)

at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:71)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)

at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)

!ENTRY org.eclipse.core.resources 4 4 Mai 05, 2004 09:40:37.284

!MESSAGE Problems encountered while deleting resources.

!SUBENTRY 1 org.eclipse.core.resources 4 273 Mai 05, 2004 09:40:37.284

...

The project is getting inconsistent then. But i wasn't able to create an archive without being told about the possible inconsistency. Victor, didn't you get a message like that?

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Although I didn't get a message about project inconsistence It seems that you are right about the length of names. When I create a different project with a really shorter names and it start to work.

The problem is how to handle this path length problem. If structure of my application is complicated enough what should I do? Is there any ways to pass around of this problem on Windows machine?

Former Member
0 Kudos

Hi Victor,

that's really not something you or anyone else should have to take care of. It's just a matter of the file resource handling (in this case deletion) of the Eclipse core itself (or may depend on the fact how the SAP toolset uses the Eclipse core functionality) and has to be fixed somehow (if possible).

Best regards

Stefan

Message was edited by: Stefan Klensch

Former Member
0 Kudos

Hi Stefan

I am not talking about you deletion problem but about the way to avoid the problem with the 256 char limit for the name and path. The limit is to close and if you application is complicated enough you easily reach this limit.

Is there any way to bypass this problem?

Former Member
0 Kudos

Hi Victor,

that's what i've tried to say in my last post. You can't bypass this. It might be a bug in the Eclipse file resource handling and should be fixed.

Former Member
0 Kudos

Hi Victor, Hi Stefan,

This is a Windows problem. The Windows file system does not accept more then 256 characters. I am afraid there is no solution.

Best regards,

Karin

detlev_beutner
Active Contributor
0 Kudos

Hi there again,

maybe one should try to offer a solution. If the class names are set in the way there are, and if this may lead more or less fast to this problem, then it maybe would be possible to abbreviate the names used in there, maybe with some algorithm windows used to be DOS-compatible, so if a name is "namenamenamenamename", abbreviate it to "namena~1", or so. This would abbreviate

com/ness/examples/bookingwithsuggestion/comp/wdp/IPrivate_Campus_StudentBookingWithSuggestionComp_StudentBookingWithSuggestionComp$WDActionEventHandler

to

com/ness/examples/bookingwithsuggestion/comp/wdp/IPrivate_Campus_Studen1_Studen1$WDActionEventHandler

Could this be an idea?

Best regards

Detlev

PS: On users side, one could move the workspace dir back to the well-know very short directory "C:\SAP" (that was the standard of the portal eclipse plugins) instead of the DS desfault "C:\Documents and Settings\<USER>\Documents\SAP\workspace". Thats about 50(!) chars less...

Former Member
0 Kudos

Hi Detlev,

i agree, except the fact that IPrivate_Campus_Studen1_Studen1$WDActionEventHandler is no valid Java identifier part or start, since '~' is not allowed.

Best regards

Stefan

Former Member
0 Kudos

Hi All,

I talked to the developer regarding this issue and Detlevs idea seems to be a possible mitigation, but it needs to be consequent otherwise we would knock against this issue again very soon.

For the design time we changed the default for the Eclipse Workspace (the path is definitly shorter now), but this was not the problem here.

I have put it on the requirement list.

Thanks again for your great feedback!

Karin

detlev_beutner
Active Contributor
0 Kudos

Hi Victor,

maybe it would help if you send in the complete strack trace?!

Best regards

Detlev