function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jcherian2008jcherian2008 

Unable to create a New Apex Class in the IDE

Going through the Force.com Workbook and on pg 31, trying to create an Apex Trigger by Right clicking on my project folder and trying to select New Apex Trigger, but I don't have that option. Rather I get the option to create a new Project, Folder, File, Example or Other.

Same thing when I tried to Create a New Application. Also, when I right click on my project and select Properties, I don't have an option to download the latest metadata changes on the server. I went and updated by force.com ide to the latest by going to Help and Software Updates and following the directions on this website for upgrading the ide.

Thanks for your help in advance.

Johns
werewolfwerewolf
Did you see what options are available to you in Other?  Sometimes Eclipse sticks all the Force.com stuff there.
jcherian2008jcherian2008
Thanks! That totally helps. I found the Apex Class under Other, however, I am getting the following message on selecting the Apex Class. Any insights will be greatly appreciated!

Eclipse throws the message, "Unable to get Apex Class Permissions" and here is the log file entries.

!ENTRY com.salesforce.ide.core 2 0 2008-11-26 10:44:48.348
!MESSAGE  WARN [2008-11-26 10:44:48,348] (ProjectService.java:getForceProject:1575) - Unable to get authorization info - endpoint is null or empty


!ENTRY com.salesforce.ide.core 2 0 2008-11-26 10:44:48.364
!MESSAGE  WARN [2008-11-26 10:44:48,364] (BaseRetryAspect.java:isLoginExceptionRetryable:93) - Login evaluation deemed exception not retry-able:
 MalformedURLException: An unexpected error has occurred. Please try again, or check the log file for details.


!ENTRY com.salesforce.ide.core 2 0 2008-11-26 10:44:48.380
!MESSAGE  WARN [2008-11-26 10:44:48,364] (BaseRetryAspect.java:isConnectionExceptionRetryable:129) - Connection evaluation deemed exception not retry-able:
 MalformedURLException: An unexpected error has occurred. Please try again, or check the log file for details.


!ENTRY com.salesforce.ide.core 2 0 2008-11-26 10:44:48.380
!MESSAGE  WARN [2008-11-26 10:44:48,380] (ApexCodeWizardPage.java:additionalInitialize:31) - Unable to check Apex Class permissions

!STACK 0
com.salesforce.ide.core.remote.ForceConnectionException: An unexpected error has occurred. Please try again, or check the log file for details.
    at com.salesforce.ide.core.internal.utils.ForceExceptionUtils.handleConnectionException(ForceExceptionUtils.java:74)
    at com.salesforce.ide.core.remote.Connection.login(Connection.java:270)
    at com.salesforce.ide.core.remote.Connection$$FastClassByCGLIB$$8e61a81d.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
    at com.salesforce.ide.core.internal.aspects.LoginRetryAspect.loginRetry(LoginRetryAspect.java:24)
    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.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at com.salesforce.ide.core.remote.Connection$$EnhancerByCGLIB$$25fc1b7a.login(<generated>)
    at com.salesforce.ide.core.factories.ConnectionFactory.getNewConnection(ConnectionFactory.java:73)
    at com.salesforce.ide.core.factories.ConnectionFactory.storeConnection(ConnectionFactory.java:159)
    at com.salesforce.ide.core.factories.ConnectionFactory.getConnection(ConnectionFactory.java:126)
    at com.salesforce.ide.core.internal.components.ComponentController.isComponentEnabled(ComponentController.java:107)
    at com.salesforce.ide.ui.wizards.components.apex.ApexCodeWizardPage.additionalInitialize(ApexCodeWizardPage.java:27)
    at com.salesforce.ide.ui.wizards.components.ComponentWizardPage.initialize(ComponentWizardPage.java:103)
    at com.salesforce.ide.ui.wizards.components.ComponentWizardPage.createControl(ComponentWizardPage.java:89)
    at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)
    at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1083)
    at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1142)
    at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1139)
    at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1128)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
    at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1126)
    at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:820)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:618)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
    at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    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:508)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: com.sforce.ws.ConnectionException: Failed to send request to null
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:95)
    at com.sforce.soap.partner.wsc.PartnerConnection.login(PartnerConnection.java:1269)
    at com.salesforce.ide.core.remote.Connection.login(Connection.java:232)
    ... 74 more
Caused by: java.net.MalformedURLException
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:66)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:88)
    ... 76 more

sidbsidb

Were you able to resolve this issue? I am having the same issue.

S.Mac-IntoshS.Mac-Intosh

I got the same issue!

Anyone got the solution?

 

Gr,

Sergio

Bing MaletzBing Maletz

This is the path that I used to create Apex Trigger, which is working fine

 

Eclipse IDE => File=> New => Force.com Project => You will then be prompted to log into Salesforce => Once you logged in, you will provided with the options to download VF/Apex components or  Meta data

 

After your project folder is created , right mouse click Project Folder => New Apex Trigger or New Apex Class

 

If you don't see "Force.com Project" under "New" menu, then your Eclipse might be missing Force.com add-on. I guess that this is what your issue is.

 

Please follow the instruction below to install IDE with Force.com add-on

 

http://boards.developerforce.com/t5/General-Development/Successful-Eclipse-and-Force-com-IDE-installation-share-your/m-p/502367

 

 

You could also get this error message if the password or token used by your project is no longer valid

 

To update your project connection, please goto

Right mouse click project folder => Force.com => Project properties => Force.com

 

Bing Maletz

 

 

 

 

 

Mithun TodakarMithun Todakar

I refreshed the connection using above suggetion and it is working fine for me.
To update your project connection, please goto

Right mouse click project folder => Force.com => Project properties => Force.com
Once again enter your credentials :)

Thanks,
Mithun