Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358346 - Can NOT generate project when call service
Summary: Can NOT generate project when call service
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 358330 358477 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-21 02:36 EDT by Yu Hao CLA
Modified: 2017-02-23 14:14 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Hao CLA 2011-09-21 02:36:57 EDT
Build Identifier: 

Call service in a EGL program will introduce a compiler error, then the project was not generated.

Reproducible: Always

Steps to Reproduce:
1.Create a egl project
2.Create a service:
package server;

// service
service mysrv implements Imysrv
	
	function helloworld( name string in) returns (string)
		return("Hi: " + name + "You are calling a service");
	end

end

3.create a program to call the service:
package client;

import server.mysrv;

// basic program
//
program mypgm type BasicProgram {}
	
	srv mysrv{@DedicatedService {}};
		
	function main()
		call srv.helloworld("EDT") returning to handleservice;
	end
	
	function handleservice(ret string in)
		syslib.writeStdout(ret);
	end
	
end
4. There will be two errors:

Description	Resource	Path	Location	Type
Problems occurred during build. Please see log for details.	A		Unknown	EDT Build Problem
The project was not generated because an unexpected error was reported by the EDT builder.	A		Unknown	EDT Generation Problem


The error log is:

org.eclipse.edt.compiler.internal.core.builder.BuildException: java.lang.RuntimeException: org.eclipse.edt.mof.serialization.TypeNotFoundException: org.eclipse.edt.mof.serialization.MofObjectNotFoundException: MofObject not found: org.eclipse.edt.mof.eglx.services.ServicesCallStatement
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:187)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:152)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.processParts(AbstractBuilder.java:99)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.build(AbstractBuilder.java:136)
	at org.eclipse.edt.ide.core.internal.builder.Builder.cleanBuild(Builder.java:167)
	at org.eclipse.edt.ide.core.internal.builder.Builder.build(Builder.java:91)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.RuntimeException: org.eclipse.edt.mof.serialization.TypeNotFoundException: org.eclipse.edt.mof.serialization.MofObjectNotFoundException: MofObject not found: org.eclipse.edt.mof.eglx.services.ServicesCallStatement
	at org.eclipse.edt.mof.impl.EFactoryImpl.getTypeNamed(EFactoryImpl.java:66)
	at org.eclipse.edt.mof.eglx.services.impl.ServicesFactoryImpl.getServicesCallStatementEClass(ServicesFactoryImpl.java:27)
	at org.eclipse.edt.mof.eglx.services.impl.ServicesFactoryImpl.createServicesCallStatement(ServicesFactoryImpl.java:48)
	at org.eclipse.edt.compiler.internal.egl2mof.eglx.services.ServicesActionStatementGenerator.visit(ServicesActionStatementGenerator.java:39)
	at org.eclipse.edt.compiler.core.ast.CallStatement.accept(CallStatement.java:123)
	at org.eclipse.edt.compiler.internal.egl2mof.AbstractIOStatementGenerator.genCallStatement(AbstractIOStatementGenerator.java:54)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:162)
	at org.eclipse.edt.compiler.core.ast.CallStatement.accept(CallStatement.java:123)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.handleEndVisitPart(Egl2MofPart.java:521)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.defaultHandleVisitPart(Egl2MofPart.java:386)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.visit(Egl2MofPart.java:169)
	at org.eclipse.edt.compiler.core.ast.Program.accept(Program.java:69)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.convert(Egl2Mof.java:160)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.createIRFromBoundAST(AbstractProcessingQueue.java:245)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.processCompiledPart(AbstractProcessingQueue.java:221)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.level03Compile(AbstractProcessingQueue.java:164)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:169)
	... 17 more
Caused by: org.eclipse.edt.mof.serialization.TypeNotFoundException: org.eclipse.edt.mof.serialization.MofObjectNotFoundException: MofObject not found: org.eclipse.edt.mof.eglx.services.ServicesCallStatement
	at org.eclipse.edt.mof.serialization.Environment.findType(Environment.java:58)
	at org.eclipse.edt.mof.impl.EFactoryImpl.getTypeNamed(EFactoryImpl.java:64)
	... 33 more
Caused by: org.eclipse.edt.mof.serialization.MofObjectNotFoundException: MofObject not found: org.eclipse.edt.mof.eglx.services.ServicesCallStatement
	at org.eclipse.edt.mof.serialization.AbstractEnvironment.find(AbstractEnvironment.java:124)
	at org.eclipse.edt.mof.serialization.AbstractEnvironment.find(AbstractEnvironment.java:100)
	at org.eclipse.edt.mof.serialization.Environment.findType(Environment.java:56)
	... 34 more
Comment 1 Joseph Vincens CLA 2011-09-21 12:50:57 EDT
*** Bug 358330 has been marked as a duplicate of this bug. ***
Comment 2 Joseph Vincens CLA 2011-09-21 15:20:45 EDT
thanks you for the stack trace it was very helpful in determining the problem.
The code was in the build but in the wrong format. The compiler plugin loads
the egllib/services.mofar file from the org.eclipse.edt.mof.eglx.services plugin, but the plugin was installed as a jar, so the mofar could not be loaded
and that caused a TypeNotFoundException.
I have updated the project to unpack the plugin so it gets installed as a
folder structure not a jar. We ran a build and I verified the problem is fixed.
Comment 3 Joseph Vincens CLA 2011-09-23 14:57:23 EDT
*** Bug 358477 has been marked as a duplicate of this bug. ***
Comment 4 Yu Hao CLA 2011-09-30 01:42:12 EDT
verified