my dog learned polymorphism*
The moose likes Beginning Java and the fly likes i can't create servlet in eclipse. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "i can Watch "i can New topic
Author

i can't create servlet in eclipse.

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
i can't create servlet in eclipse.

i got these error. i already tried googling but the result isn't very good. can someone help me out? how to solve thsi?

java.lang.Error: Unresolved compilation problems:
The import org.eclipse.jst.j2ee.internal cannot be resolved
The import org.eclipse.jst.j2ee.internal cannot be resolved
CreateServletTemplateModel cannot be resolved to a type
CreateServletTemplateModel cannot be resolved to a type
CreateJavaEEArtifactTemplateModel cannot be resolved
CreateServletTemplateModel cannot be resolved
CreateServletTemplateModel cannot be resolved
CreateServletTemplateModel cannot be resolved
Constructor cannot be resolved to a type
Constructor cannot be resolved to a type
Method cannot be resolved to a type


at org.eclipse.jst.j2ee.web.ServletTemplate.<init>(ServletTemplate.java:4)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.eclipse.emf.codegen.jet.JETEmitter.setMethod(JETEmitter.java:291)

at org.eclipse.jst.j2ee.internal.project.WTPJETEmitter.loadClass(WTPJETEmitter.java:368)

at org.eclipse.jst.j2ee.internal.project.WTPJETEmitter.initialize(WTPJETEmitter.java:233)

at org.eclipse.jst.j2ee.internal.project.WTPJETEmitter.<init>(WTPJETEmitter.java:113)

at org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation.generateTemplateSource(NewJavaEEArtifactClassOperation.java:159)

at org.eclipse.jst.j2ee.internal.web.operations.NewWebClassOperation.generateUsingTemplates(NewWebClassOperation.java:129)

at org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation.doExecute(NewJavaEEArtifactClassOperation.java:93)

at org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation.execute(NewJavaEEArtifactClassOperation.java:63)

at org.eclipse.jst.j2ee.internal.common.operations.AddJavaEEArtifactOperation.createClass(AddJavaEEArtifactOperation.java:70)

at org.eclipse.jst.j2ee.internal.web.operations.AddWebClassOperation.doExecute(AddWebClassOperation.java:63)

at org.eclipse.jst.j2ee.internal.common.operations.AddJavaEEArtifactOperation$1.run(AddJavaEEArtifactOperation.java:47)

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.modify(JEE5ModelProvider.java:237)

at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.modify(Web25MergedModelProvider.java:81)

at org.eclipse.jst.j2ee.internal.common.operations.AddJavaEEArtifactOperation.execute(AddJavaEEArtifactOperation.java:53)

at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:376)

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

at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:401)

at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:352)

at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:242)

at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:214)

at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89)

at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:202)

at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard$1$CatchThrowableRunnableWithProgress.run(DataModelWizard.java:219)

at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:458)

at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:366)

at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)

at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard.runOperations(DataModelWizard.java:228)

at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard.performFinish(DataModelWizard.java:186)

at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)

at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)

at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)

at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)

at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

at org.eclipse.jface.window.Window.open(Window.java:801)

at org.eclipse.ui.internal.navigator.wizards.WizardShortcutAction.run(WizardShortcutAction.java:94)

at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)

at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)

at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)

at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)

at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)

at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)

at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)

at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38081
    
  22
That means you have a compiler error somewhere and have forced Eclipse to try to execute the code regardless. Then you get an unresolved compilation exception. Go back to the source and correct all the errors, marked with red circles with X in on the left.
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
but i haven't even write any code.

i merely created a dynamic web project and want to add a servlet into the project.

and it gave me this error. But thank for your tips and i discover some error on the left side. But i can't open that "error page" and it's quite amazing that i didn't even write any code and eclipse is already giving error.

can you give me some suggestion on what to do next|?


[Thumbnail for Untitled.jpg]

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

You might want to consider the sysdeo plugin. I use it regularly and found it very user friendly and flexible.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
but how can sysdeo help in this ?

anybody knows what's wrong with my code or eclipse? thank you
 
Consider Paul's rocket mass heater.
 
subject: i can't create servlet in eclipse.
 
Similar Threads
Error generating client stubs using eclipse
FileNotFoundException in Eclipse when creating a webservice
Error while generatting webservice client
The server does not support version 2.0 of the Unknown module specification
Cannot open editor in php eclipse