since Eclipse update to 2018-12 I can't build any Acceleo project with Query.
I use Acceleo 3.7.7
and update EMF to nigthly version to solves this issue :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=543103
for example i get error like this :
An error has occurred during the loading of 'platform:/resource/myProject/bin/com/xxxx/z/acceleo/module/program/utils/ServiceUtils.emtl'.
Message: Unresolved reference '/0/isProgram/%/%.2'. (platform:/resource/myProject/bin/com/xxxx/z/acceleo/module/program/utils/ServiceUtils.emtl, 4421, 74)
Location: platform:/resource/myProject/bin/com/xxxx/z/acceleo/module/program/utils/ServiceUtils.emtl at line 4 421 and column 74
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '/0/isProgram/%/%.2'. (file:/D:/Appsdev/irdz/workspaces/generators/myProject/bin/com/xxxx/z/acceleo/module/program/utils/ServiceUtils.emtl, 4421, 74)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:391)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:356)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:233)
at org.eclipse.acceleo.internal.parser.compiler.AcceleoParser.doBuild(AcceleoParser.java:640)
at org.eclipse.acceleo.internal.parser.compiler.AcceleoParser.build(AcceleoParser.java:441)
at org.eclipse.acceleo.internal.parser.compiler.AcceleoParser.buildAll(AcceleoParser.java:272)
at org.eclipse.acceleo.internal.ide.ui.builders.AcceleoBuilder.buildAll(AcceleoBuilder.java:308)
at org.eclipse.acceleo.internal.ide.ui.builders.AcceleoBuilder.build(AcceleoBuilder.java:172)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '/0/isProgram/%/%.2'. (file:/D:/Appsdev/irdz/workspaces/generators/myProject/bin/com/xxxx/z/acceleo/module/program/utils/ServiceUtils.emtl, 4421, 74)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1197)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1282)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
at org.eclipse.acceleo.model.mtl.resource.EMtlResourceImpl.doLoad(EMtlResourceImpl.java:93)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 21 more
my mtl file is like this :
[query public isProgram(arg0 : ProgramModel) : Boolean
= invoke('com.xxxx.z.acceleo.module.program.utils.ServiceUtils', 'isProgram(z.ProgramModel)', Sequence{arg0})
/]
have you an idea to solve my problem?
before Eclipse & Acceleo update i can build the project.
i tried -clean eclipse parameter, clean project , reinstall eclipse , create new workspace with no problem change
Related
I am trying to run the Machine Learning and Anylogic Simulation example workflow provided here. - https://www.anylogic.com/features/artificial-intelligence/h2o-ai/
I can run the second workflow, but the first workflow (Hospital Planning) keeps giving errors. I have tried it running on different systems as well.
Any help will be highly appreciated.
Below is the error code :
Loading Mojo: pipeline.mojo
Loading Mojo: pipeline.mojo
Error during model creation:
Unable to make protected final java.lang.Class
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to
unnamed module #44f69442
java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to
unnamed module #44f69442
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
at javassist.util.proxy.SecurityActions.setAccessible(SourceFile:159)
at javassist.util.proxy.DefineClassHelper$JavaOther.defineClass(SourceFile:213)
at javassist.util.proxy.DefineClassHelper$Java11.defineClass(SourceFile:52)
at javassist.util.proxy.DefineClassHelper.toClass(SourceFile:260)
at javassist.ClassPool.toClass(SourceFile:1232)
at javassist.ClassPool.toClass(SourceFile:1090)
at javassist.ClassPool.toClass(SourceFile:1048)
at javassist.CtClass.toClass(SourceFile:1290)
at ai.h2o.mojos.runtime.c.G.d(SourceFile:118)
at ai.h2o.mojos.runtime.c.G.a(SourceFile:60)
at ai.h2o.mojos.runtime.c.n.a(SourceFile:64)
at ai.h2o.mojos.runtime.readers.b.b.a(SourceFile:135)
at ai.h2o.mojos.runtime.MojoPipelineFactoryImpl.loadFrom(SourceFile:144)
at ai.h2o.mojos.runtime.MojoPipelineFactoryImpl.loadFrom(SourceFile:101)
at ai.h2o.mojos.runtime.MojoPipeline.loadFrom(SourceFile:41)
at hospital_capacity_planning_ml.Main.loadModel(Main.java:690)
at hospital_capacity_planning_ml.Main.setupPlainVariables_Main_xjal(Main.java:1498)
at hospital_capacity_planning_ml.Main.doCreate(Main.java:1421)
at com.anylogic.engine.Agent.createAsEmbedded(Unknown Source)
at com.anylogic.engine.Agent.create(Unknown Source)
at com.anylogic.engine.Engine.start(Unknown Source)
at com.anylogic.engine.ExperimentSimulation.a(Unknown Source)
at com.anylogic.engine.ExperimentSimulation.run(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost.f(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost.executeCommand(Unknown Source)
at com.anylogic.engine.internal.webserver.e.onCommand(Unknown Source)
at com.anylogic.executor.basic.rest.BasicAnimationSessionController.
lambda$null$9(BasicAnimationSessionController.java:112)
at com.anylogic.engine.internal.webserver.i.acceptToAnimationSvgSession(Unknown Source)
at com.anylogic.executor.basic.rest.BasicAnimationSessionController.
lambda$startController$10(BasicAni mationSessionController.java:112)
at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
at spark.http.matching.Routes.execute(Routes.java:61)
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130)
at com.anylogic.engine.internal.webserver.config.ALServerFactory$1.lambda$0(Unknown Source)
at org.eclipse.jetty.servlets.QoSFilter.doFilter(QoSFilter.java:201)
at com.anylogic.engine.internal.webserver.config.ALServerFactory$1.doHandle(Unknown Source)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:530)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
atorg.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java
:382)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
at java.base/java.lang.Thread.run(Thread.java:834)
Error during drawing animation frame:
java.lang.NullPointerException
at com.anylogic.engine.gui.SVGFrameProducer.n(Unknown Source)
at com.anylogic.engine.gui.SVGFrameProducer.n(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost$1.l(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost$1.n(Unknown Source)
at com.anylogic.engine.gui.SVGFrameCollector.l(Unknown Source)
at com.anylogic.engine.gui.SVGFrameCollector.c(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:834)
The problem is that AnyLogic 8.7 switched to newer Java (from 9 to 11).
Add the following line to Java machine arguments in the experiment properties to make the model work in the recent updates 8.7.x:
--add-opens java.base/java.lang=ALL-UNNAMED
Here is my code I am trying to run:
import scala.swing._
object MyApp extends SimpleSwingApplication{
def top = new MainFrame{
contents = new Label("GUI stuff")
}
}
I am running the code through command line. In my directory, I have the code above (app2.scala), a scala swing jar file (scala-swing_2.13-2.1.1.jar).
I am compiling the scala file like:
scalac -cp "scala-swing_2.13-2.1.1.jar" app2.scala
then trying to run it through
scala MyApp
But I get an error:
Exception in thread "main" java.lang.NoClassDefFoundError: scala/swing/MainFrame
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at scala.reflect.internal.util.ScalaClassLoader.run(ScalaClassLoader.scala:101)
at scala.reflect.internal.util.ScalaClassLoader.run$(ScalaClassLoader.scala:97)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:130)
at scala.tools.nsc.CommonRunner.run(ObjectRunner.scala:29)
at scala.tools.nsc.CommonRunner.run$(ObjectRunner.scala:28)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:43)
at scala.tools.nsc.CommonRunner.runAndCatch(ObjectRunner.scala:35)
at scala.tools.nsc.CommonRunner.runAndCatch$(ObjectRunner.scala:34)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:70)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:91)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:108)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
Caused by: java.lang.ClassNotFoundException: scala.swing.MainFrame
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 18 more
How can I fix this?
I checked that my scala version is the same as the version for swing. I am running 2.13.2
After fresh Eclipse install (Windows 10, 64bit, JRE 1.8.0_181-b13) I installed Acceleo 3.7.7.201812041426. But after creating new project (2002/ecore with "Generate file" and "Main template") it fails creating sceleton mtl and java files with error
An internal error occurred during: "Acceleo".
with exception
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.eclipse.emf.ecore.impl.EPackageImpl.eObjectForURIFragmentNameSegment(EPackageImpl.java:1970)
at org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFragmentSegment(EModelElementImpl.java:473)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:811)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:787)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setValueFromId(XMLHandler.java:2868)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2773)
at org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAttribs(SAXXMIHandler.java:79)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:2247)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:2150)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2085)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:151)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1868)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1048)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:82)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1026)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:720)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:190)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
at org.eclipse.acceleo.model.mtl.resource.EMtlResourceImpl.doLoad(EMtlResourceImpl.java:93)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:391)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:356)
at org.eclipse.acceleo.ide.ui.resources.AcceleoProject.loadAllPlatformOutputFiles(AcceleoProject.java:737)
at org.eclipse.acceleo.ide.ui.resources.AcceleoProject.loadNotAccessibleOutputFiles(AcceleoProject.java:680)
at org.eclipse.acceleo.internal.ide.ui.views.overrides.OverridesBrowser.updateViewTemplates(OverridesBrowser.java:340)
at org.eclipse.acceleo.internal.ide.ui.views.overrides.OverridesBrowser$3.run(OverridesBrowser.java:315)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
I have tried several times with new eclipse setups but failed every time. Is this Acceleo bug?
I have installed Drools 7.7.0.Final war file in JBoss EAP 7.0.0.GA and trying to build a sample application. During build it is always throwing below exception. I am not able to proceed further. Please help to resolve this error.
13:39:37,501 ERROR [org.kie.workbench.common.services.refactoring.backend.server.indexing.AbstractFileIndexer] (Thread-529) Unable to index 'default://master#myteam/Mortgages/src/test/resources/mortgages/mortgages/Pricing%20low%20end.scenario'.: org.guvnor.common.services.shared.exceptions.GenericPortableException: An error occurred while executing the Local Build Config stage.
at org.guvnor.common.services.backend.exceptions.ExceptionUtilities.handleException(ExceptionUtilities.java:46)
at org.kie.workbench.common.services.datamodel.backend.server.DataModelServiceImpl.getModuleDataModel(DataModelServiceImpl.java:95)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
at org.kie.workbench.common.services.datamodel.backend.server.service.DataModelService$1079160182$Proxy$_$$_WeldClientProxy.getModuleDataModel(Unknown Source)
at org.drools.workbench.screens.testscenario.backend.server.indexing.TestScenarioFileIndexer.getModuleDataModelOracle(TestScenarioFileIndexer.java:77)
at org.drools.workbench.screens.testscenario.backend.server.indexing.TestScenarioFileIndexer.fillIndexBuilder(TestScenarioFileIndexer.java:52)
at org.kie.workbench.common.services.refactoring.backend.server.indexing.AbstractFileIndexer.toKObject(AbstractFileIndexer.java:78)
at org.drools.workbench.screens.testscenario.backend.server.indexing.TestScenarioFileIndexer$Proxy$_$$_WeldClientProxy.toKObject(Unknown Source)
at org.uberfire.ext.metadata.io.BatchIndex$3.visitFile(BatchIndex.java:186)
at org.uberfire.ext.metadata.io.BatchIndex$3.visitFile(BatchIndex.java:152)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:71)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:48)
at org.uberfire.java.nio.file.Files.walkFileTree(Files.java:1031)
at org.uberfire.java.nio.file.Files.walkFileTree(Files.java:1052)
Caused by: java.lang.RuntimeException: An error occurred while executing the Local Build Config stage.
at org.guvnor.ala.pipeline.execution.PipelineExecutor.continuePipeline(PipelineExecutor.java:126)
at org.guvnor.ala.pipeline.execution.PipelineExecutor.execute(PipelineExecutor.java:76)
at org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInvoker.invokeLocalBuildPipeLine(BuildPipelineInvoker.java:88)
at org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInvoker$Proxy$_$$_WeldClientProxy.invokeLocalBuildPipeLine(Unknown Source)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper.invokeLocalBuildPipeLine(BuildServiceHelper.java:152)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper.localBuild(BuildServiceHelper.java:82)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper$Proxy$_$$_WeldClientProxy.localBuild(Unknown Source)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceImpl.build(BuildServiceImpl.java:69)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(Unknown Source)
at org.kie.workbench.common.services.backend.builder.service.BuildInfoService.getBuildInfo(BuildInfoService.java:59)
at org.kie.workbench.common.services.backend.builder.service.BuildInfoService$Proxy$_$$_WeldClientProxy.getBuildInfo(Unknown Source)
at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUModuleDataModelOracleCache.makeModuleOracle(LRUModuleDataModelOracleCache.java:81)
at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUModuleDataModelOracleCache.assertModuleDataModelOracle(LRUModuleDataModelOracleCache.java:72)
at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUModuleDataModelOracleCache$Proxy$_$$_WeldClientProxy.assertModuleDataModelOracle(Unknown Source)
at org.kie.workbench.common.services.datamodel.backend.server.DataModelServiceImpl.getModuleDataModel(DataModelServiceImpl.java:91)
... 28 more
Caused by: java.lang.IllegalArgumentException: No enum constant org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfig.BuildType.${input.build-type}
at java.lang.Enum.valueOf(Unknown Source)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfig$BuildType.valueOf(LocalBuildConfig.java:41)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor.decodeBuildType(LocalBuildConfigExecutor.java:90)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor.apply(LocalBuildConfigExecutor.java:56)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor.apply(LocalBuildConfigExecutor.java:38)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor$Proxy$_$$_WeldClientProxy.apply(Unknown Source)
at org.guvnor.ala.pipeline.execution.PipelineExecutor.lambda$continuePipeline$0(PipelineExecutor.java:109)
at org.guvnor.ala.pipeline.execution.PipelineExecutor$$Lambda$288/221017006.accept(Unknown Source)
at org.guvnor.ala.pipeline.StageUtil$1.execute(StageUtil.java:38)
at org.guvnor.ala.pipeline.StageUtil$1.execute(StageUtil.java:33)
at org.guvnor.ala.pipeline.execution.PipelineExecutor.continuePipeline(PipelineExecutor.java:94)
... 42 more
How to build an OSGi bundle that use Scala (2.9.1.RC3) with PDE (Eclipse Helios). I'm using Scala IDE (2.0.0-beta) to build the project and converting this to PDE project.
My MANIFEST.MF is like that:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ScalaTest1
Bundle-SymbolicName: ScalaTest1
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: scalatest1.Activator
Import-Package: org.osgi.framework;version="1.3.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
The project build without errors, but when start the bundle this exception appears (using Apache Felix 3.2.2):
org.osgi.framework.BundleException: Not found: scalatest1.Activator
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3812)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1899)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1822)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)
at org.apache.felix.gogo.command.Basic.start(Basic.java:758)
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.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Console.run(Console.java:62)
at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
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.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: scalatest1.Activator not found by ScalaTest1 [27]
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:670)
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3808)
... 33 more
And the code:
package scalatest1
import org.osgi.framework._
class Activator extends BundleActivator {
def start(context: BundleContext) {
println("Hello, World!");
val bundleNames = context.getBundles()
.map(b => b.getSymbolicName())
.filter(b => b != context.getBundle());
println("Installed bundles: " + bundleNames.mkString(", "));
}
def stop(context: BundleContext) {
println("Goodbye, World!");
}
}
What is wrong with the process? How to map correctly the class Activator?
Thanks in advance
See http://www.michel-kraemer.com/scala-projects-with-eclipse-pde-build-2 for a way to do this without exporting .scala files in JAR.
I found the silly problem. When was exporting the field "Use class files compiled in the workspace" was unmarked. Works, but there is another problem, that the .scala files are in the .jar file exported.