Four Stars

It is not possibile to load main class

Hi, i've read a lot of post about this theme but i can't find the solution.

 

Configuration:

OS: Windows 10 with a just buyed PC

Talend Version: 6.4.1

JDK: jdk1.8.0_152

Path of Talend: C:\Talend\TOS

My profile: Administrator

 

Problem:

I've just installed Talend on the path and i can read the directory PATH\workspace\.Java\target\classes\routines\system\api

I create a simple AS400 metadata

I create a Job and a connection to the AS400 source and i still read the directory.

When i compile the Job, Talend makes this directory unreadable!

I can read till PATH\workspace\.Java\target\classes\routines\system but not the "api" subdirectory and Talend give me the error "Could not load the main class". (It was hard find the real problem with the log file....)

 

I'm the Administrator, so i can't understand this problem and if i try to change permission of the directory, Windows blocks me..

Can you help me to understand? 

Is there any flag into Talend that i can use?

Thanks in advance

 

PS: Sorry for my bad english...

3 REPLIES
Moderator

Re: It is not possibile to load main class

Hello,

If we understand your issue very well, do you want to call the API(jars) in your job?Install external modules?

Could you please have a look at this online document about:TalendHelpCenter:Installing external modules to see if it is what you are looking for?

Feel free to let us know your issue.

 

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: It is not possibile to load main class

I went to Window > Show View... > Talend and then select Modules
There are no Error Log but i've installed the not required Modules to using the Modules view even if there are not required and there were no errors.
Now all the modules are installed and with no errors.

Unfortunately the problem is into the file system...
It seems that Talend locks some diretory (for example PATH\workspace\.Java\target\classes\routines\system\api or PATH\workspace\.Java\target\classes\routines\system\xml) just in the moment in which i run for the first time even a simple job... And they remain locked and unreadable and i can't access into them.
I can't set properties of "api" or "xml" directory even if i'm the Administrator of the PC.
Are there any flags into Talend to solve this iusse?

 

 

PS: a sample of the log is:
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
at org.eclipse.core.internal.localstore.FileSystemResourceManager.delete(FileSystemResourceManager.java:351)
at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFolder(ResourceTree.java:352)
at org.eclipse.core.internal.resources.ResourceTree.standardDeleteFolder(ResourceTree.java:798)
at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1983)
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:803)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.cleanOutputFolders(BatchImageBuilder.java:116)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:48)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:175)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:401)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
at org.eclipse.core.internal.resources.Project.build(Project.java:114)
at org.talend.designer.runprocess.java.TalendProcessJavaProject.buildWholeCodeProject(TalendProcessJavaProject.java:322)
at org.talend.designer.runprocess.java.TalendProcessJavaProject.mavenBuildCodeProjectPom(TalendProcessJavaProject.java:300)
at org.talend.designer.runprocess.java.TalendProcessJavaProject.buildModules(TalendProcessJavaProject.java:258)
at org.talend.designer.runprocess.maven.MavenJavaProcessor.build(MavenJavaProcessor.java:340)
at org.talend.designer.runprocess.ProcessorUtilities.generateBuildInfo(ProcessorUtilities.java:626)
at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:523)
at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1413)
at org.talend.designer.runprocess.RunProcessContext$1.run(RunProcessContext.java:576)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:527)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:284)
at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1190)
at org.talend.designer.runprocess.RunProcessContext.exec(RunProcessContext.java:531)
at org.talend.designer.runprocess.ui.ProcessComposite.exec(ProcessComposite.java:1450)
at org.talend.designer.runprocess.ui.views.ProcessView$RunAction.run(ProcessView.java:691)
at org.talend.designer.runprocess.ui.actions.RunProcessAction.run(RunProcessAction.java:58)
at org.talend.designer.core.debug.JobLaunchConfigurationDelegate$1.run(JobLaunchConfigurationDelegate.java:84)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.talend.rcp.intro.Application.start(Application.java:255)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Contains: Problems encountered while deleting files.
Contains: Could not delete: C:\Talend\TOS\workspace\.Java\target\classes\routines\system\xml.
Contains: Could not delete: C:\Talend\TOS\workspace\.Java\target\classes\routines\system.
Contains: Could not delete: C:\Talend\TOS\workspace\.Java\target\classes\routines.

Moderator

Re: It is not possibile to load main class

Hello,

This exception "Could not find or load main class" is usually caused the blank space in the installation path. Could you please re-install your studio to see if it works?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.