error in a spray project - eclipse-kepler

I am a masters student, and as I am preparing my final project study which requires to have a graphical editor for a DSL named "VERISENSOR", I need to work with "SPRAY".
while following the tutorial that I found on eclipse, I found a problem in the file ( .spray )
once I add a class in this file, the following errors are displayed:
org.eclipse.emf.ecore.impl.DynamicEObjectImpl cannot be cast
to org.eclipselabs.spray.mm.spray.ShapeInSpray
org.eclipse.emf.ecore.impl.DynamicEObjectImpl

Related

Avro generated class: Cannot access class 'Builder'. Check your module classpath for missing or conflicting dependencies

Running
val myAvroObject = MyAvroObject.newBuilder()
results in a compilation error:
Cannot access class 'MyAvroObject.Builder'. Check your module classpath for missing or conflicting dependencies
I am able to access other MyAvroObject variables. More precisely, methods such as
val schema = MyAvroObject.getClassSchema()
val decoder = MyAvroObject.getDecoder()
compiles fine. What makes it even stranger is that I can access newBuilder() in my test/ folder, but not in my src/ folder.
Why do I get a compile error when using newBuilder()? Is the namespace of the avro-schema used to generate MyAvroObject of importance?
Check your module classpath generally means, that your dependencies (which you didn't provide) are messed up. One of them should read implementation instead of testImplementation, in order to have the method available in the main source-set, instead of only the test source-set - but this may well have to do with the input classes, the output location of generated classes, or annotations alike #VisibleForTesting (just see what it even generates). Command gradlew can also list the dependencies per configuration. The builder seems to be called org.apache.avro.SchemaBuilder... there's only avro-1.11.0.jar & avro-tools-1.11.0.jar. With the "builder" design pattern, .newBuilder() tries to return inner class Builder.
had the same problem today and was able to solve it by adding the following additional source folder
<sourceDir>${project.basedir}/target/generated-sources/avro</sourceDir>
to the kotlin-maven-plugin.

Kotlin BuildType 'XYZ': id 'XYZ' is already used in BuildType(uuid='', id='XYZ', name='Deploy to envr') error

I was trying to refactor my Kotlin file that contains the configuration for a TeamCity pipeline. However, I keep getting the following error:
BuildType 'KotlinExperiments_DeployToEnvironment': id 'KotlinExperiments_DeployToEnvironment' is already used in BuildType(uuid='', id='KotlinExperiments_DeployToEnvironment', name='Deploy to test')
I tried to dynamically assign an ID, but that doesn't seem to work. Here are the links to the relevant files:
.teamcity/settings.kts
.teamcity/KotlinExperiments.kt
.teamcity/_buildTypes/DeployToEnvironment.kt
What am I missing?
It appears that there was an extra } in this line which is an invalid character for an ID. TeamCity didn't really provide an accurate error. After deleting the whole and recreating it again, TeamCity provided a much better error which led me to this finding.

Is there an official Concourse pipeline grammar?

I couldn't find it online after a little bit of searching, so i'm asking it here. Is there a 'reference' bnf grammar file for yaml file of concourse's pipeline ? As a side project, I'm trying to create an IntelliJ plugin that could do syntax highlight and auto completion for CI/CD Concourse pipelines, and would try to avoid manually retyping all that grammar to minimize error risk and time.
I don't believe there's a "grammar file" - the types are defined in code. For example, the top level pipeline is defined here as:
type Config struct {
Groups GroupConfigs `yaml:"groups" json:"groups" mapstructure:"groups"`
Resources ResourceConfigs `yaml:"resources" json:"resources" mapstructure:"resources"`
ResourceTypes ResourceTypes `yaml:"resource_types" json:"resource_types" mapstructure:"resource_types"`
Jobs JobConfigs `yaml:"jobs" json:"jobs" mapstructure:"jobs"`
}
The atc.Config.Validate() command is also based on code - not an external grammar.
You could probably reason through those source files to determine the structure. It might be possible to generate a jsonschema from the go types and then use that.

ActiveX component can't create object: 'jsShell.Ops' - but works via Editor

I have following problem. I would like to use jsShell.dll (Link to dll and description) in my project. I use Win7 64 bit.
I downloaded dll and put it in C:\Windows\system\jsshell (files jsShell.dll and khook.dll)
I succesfully registered dll using c:\Windows\SysWOW64> regsvr32.exe c:\Windows\system\jsshell\jsShell.dll (it is not needed to register khook.dll)
Then I tried to run test file jsshell\jsShell DLL\demo scripts\window.vbs which is part of jsShell.zip by:
a) double click to window.vbs and getting following error:
SCRIPT: C:\Users\joe\Downloads\jsshell\jsShell DLL\demoscripts\windows.vbs
LINE: 6
CHAR: 3
ERROR: ActiveX component can't create object: 'jsShell.Ops'
CODE: 800A01AD
SOURCE: Microsoft VBScript runtime error
This is the line with error: Set jsS = CreateObject("jsShell.Ops")
b) loading in WEB-ED Editor (Link to WEB-EDD) and running script over via editor, which works perfectly.
Could somebody please explain me, where is the difference between (a) and (b)? And what have to be done in order to run my script using (a) variant?
Thx a lot

How to use a dependency of a module within a Play app

I am writing a Play Framework module in order to share some common logic among multiple Play apps. One of the things I would like my module to do is provide some frequently-used functionality by way of 3rd-party modules, for example the excellent Markdown module.
First of all, is it possible to do this? I want all the apps that include my module to be able to use the .markdown().raw() String extension without needing to explicitly declare the Markdown module as a dependency. The Play Framework Cookbook chapter 5 seems to imply that it is possible, unless I am reading it wrong.
Secondly, if it is possible, how does it work? I have created the following vanilla example case, but I'm still getting errors.
I created a new, empty application "myapp", and a new, empty module "mymod", both in the same parent directory. I then modified mymod/conf/dependencies.yml to:
self: mymod -> mymod 0.1
require:
- play
- play -> markdown [1.5,)
I ran play deps on mymod and it successfully downloaded and installed the Markdown module. Running play build-module also worked fine with no errors.
Then, I modified myapp/conf/dependencies.yml to:
# Application dependencies
require:
- play
- mymod -> mymod 0.1
repositories:
- Local Modules:
type: local
artifact: ${application.path}/../[module]
contains:
- mymod
I ran play deps on myapp and it successfully found mymod, and generated the myapp/modules/mymod file, containing the absolute path to mymod.
I ran myapp using play run and was able to see the welcome page on http://localhost:9000/. So far so good.
Next, I modified myapp/app/views/Application/index.html to:
#{extends 'main.html' /}
#{set title:'Home' /}
${"This is _MarkDown_, by [John Gruber](http://daringfireball.net/projects/markdown/).".markdown().raw()}
I restarted myapp, and now I get the following error.
09:03:23,425 ERROR ~
#6a6eppo46
Internal Server Error (500) for request GET /
Template execution error (In /app/views/Application/index.html around line 4)
Execution error occured in template /app/views/Application/index.html. Exception raised was MissingMethodException : No signature of method: java.lang.String.markdown() is applicable for argument types: () values: [].
play.exceptions.TemplateExecutionException: No signature of method: java.lang.String.markdown() is applicable for argument types: () values: []
at play.templates.BaseTemplate.throwException(BaseTemplate.java:86)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:257)
at play.templates.Template.render(Template.java:26)
at play.templates.GroovyTemplate.render(GroovyTemplate.java:187)
at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24)
at play.mvc.Controller.renderTemplate(Controller.java:660)
at play.mvc.Controller.renderTemplate(Controller.java:640)
at play.mvc.Controller.render(Controller.java:695)
at controllers.Application.index(Application.java:13)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:548)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
at Invocation.HTTP Request(Play!)
Caused by: groovy.lang.MissingMethodException: No signature of method: java.lang.String.markdown() is applicable for argument types: () values: []
at /app/views/Application/index.html.(line:4)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:232)
... 13 more
And just to confirm I'm not crazy, I tried adding the play -> markdown [1.5,) line to myapp/conf/dependencies.yml and restarted the app, and confirmed that it works.
I feel like I'm missing something obvious. Many thanks in advance to anyone who can help! :)
Yes I had the same problem, it seems that transitive dependencies through custom home made modules does not work