OSGI-Karaf-REST API - apache-karaf

I am following the camunda guide on github and successfully able to start my Process_1 by using #PostDeploy method in my ExampleProcessApplication class.
Now I want to use a REST API in the karaf environment so that I can start a process when I get some external triggering.
I installed camunda-bpm-karaf-feature-minimal by following the github helper.
I am not able to call feature:install camunda-bpm-karaf-feature-full (I am using Apache karaf 3.0.7) error msg is as follows:
Missing requirements osgi.wiring.package=javax.transaction
I couldn't find how to install version 1.3.
Do I need to install any other bundle to use a REST API in karaf environment?

I have noticed that they changed their javax.transaction api from com.springsource.javax.transaction to javax.transaction-api when they changed from 1.3 to 2.0. I recommend you to use their 2.0 version feature.

Related

Lightweight Rendering Pipeline error

I downloaded the lightweight rendering pipeline using Unity's package manager, but I cannot create a lightweight pipeline asset. When I try to create the asset, the console throws me:
Invalid generated unique path 'ProjectSettings/LightweightAsset.asset'
(input path
'LightweightAsset.asset')UnityEngine.Experimental.Rendering.LightweightPipeline.LightweightPipelineAsset:CreateLightweightPipeline()
I had a similar issue but it went away after I did the following:
Using the new package manager: Remove all rendering-related packages from the Unity project and then only add the Lightweight
Rendering Pipeline package. All dependencies (like the Shader Graph) were
added automatically and correctly after I did that.
Be sure to get the newest preview release (1.1.5-preview or newer). The 0.1-releases are too old.
If all else fails, try to follow the instructions and clone it directly from the Github repository: https://github.com/Unity-Technologies/ScriptableRenderPipeline

What is __meteor_bootstrap__?

I am just starting with Meteor and working on an existing project. I am running into an issue with one of the packages(observatory-apollo) that's has the following line:
__meteor_bootstrap__.app.use Observatory.logger #TLog.useragent
It is complaining that __meteor_bootstrap__.app is undefined.
What is __meteor_boostrap__ exactly? I can't seem to find a description of what it is but from threads, people seem to know how to use it. I can only see it defined in boot.js, but it doesn't really tell me much...
Meteor uses connect npm module under the hood for various reasons, to serve static files, for example. __meteor_bootstrap__.app was the reference to connect app instance.
Before it was __meteor_bootstrap__.app but it changed couple of releases ago and became WebApp.connectHandlers object and is part of WebApp package.
WebApp is a standard package of Meteor, core package for building webapps. You don't usually need to add explicitly as it is a dependency of standard-app-packages.
Example of usage the connectHandlers is to inject connect middlewares in the same way as you would use any connect middleware (or some express middlewares, express is built on top of connect):
WebApp.connectHandlers
.use(connect.query())
.use(this._config.requestParser(bodyParser))
You can look at meteor-router Atmosphere package and take it as an example: https://github.com/tmeasday/meteor-router/blob/master/lib/router_server.js
More about connect: https://npmjs.org/package/connect

Where to put the normal PHP library (ex Google API library) in symphony2 system?

I am making application with symfony2
I want to use Google API library in this application.
Google API has
src/config.php
/Google_Client.php
/and so on..
I need to load this script from the DefaultController.php.
Where should I put the library,and how could I load the library from the DefaultController?
If it doesnt have framework like symfony2.
it is very simple though..
put library in the same directory and load
require_once 'src/config.php'
you simply can run
php composer.phar install google/api-client
in your projectfolder. It should install the api-client to your vendors.
As you mentioned, default the config resists in another file. A proper way around that would be to create a little bundle with a nice config, register the api as a client, and pass the config to your service.
I think, since you are using Symfony2, the best way is to use composer and that would install the library inside the vendors directory and be added to the autoloader.
Symfony2 and Google API integration

How to upgrade the hibernate-validator 4.3.0.Final to the Glassfish 3.1.2?

At the moment, the Hibernate Validator has released the latest version as 4.3.0.Final here. I have tried to upgrade it to my Glassfish 3.1.2 as the following step: -
1. Remove the GLASSFISH/glassfish/modules/bean-validator.jar
2. Copying the hibernate-validator-4.3.0.Final.jar to GLASSFISH/glassfish/modules
3. Restart the Glassfish
4. The Glassfish cannot start. It seems hang.
After searching via the Google, I've found that the file named "bean-validator.jar" was created by the Glassfish team as an OSGi version. Sadly, I cannot find how to create it. Could you please help to advise further? Thank you very much for your help in advance. I'm looking forward to hearing from you soon.
A (slightly outdated) description of how to build Glassfish's bean-validator.jar can be found here.
What's needed in general is an OSGi bundle which includes Hibernate Validator itself and the Bean Validation API. With this bundle you should be able to replace the original bean-validator.jar. Additionally you need the JBoss Logging bundle, which is used since release 4.3 by Hibernate Validator as logging API and already comes in form of an OSGi bundle.
If you're building a web application, you could also package HV 4.3 within your WAR and turn off class loader delegation by providing the file WEB-INF/glassfish-web.xml with the following contents:
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<class-loader delegate="false" />
</glassfish-web-app>
That way the HV classes will be loaded from your application instead of from the module provided by Glassfish.
You might also be interested in the issue GLASSFISH-15648 which aims to provide a dedicated Glassfish update package for HV.
As my case was ear, rather than war, based on suggestion of Gunnar, I did a patched version of the module, that is deployable to Glassfish (My version is 3.1.1 OSE).
Someone might find it still useful, see my blog for my solution (including step-by-step approach): http://peter-butkovic.blogspot.de/2012/11/glassfish-311-oss-with-hibernate.html

Where do I get servlet-api.jar from?

In order to write servlets code I need servlet-api.jar.
Where do i get servlet-api.jar from ?
Make sure that you're using the same Servlet API specification that your Web container supports. Refer to this chart if you're using Tomcat: http://tomcat.apache.org/whichversion.html
The Web container that you use will definitely have the API jars you require.
Tomcat 6 for example has it in apache-tomcat-6.0.26/lib/servlet-api.jar
Grab it from here
Just choose required version and click 'Binary'. e.g direct link to version 2.5
You may want to consider using Java EE, which includes the javax.servlet.* packages. If you require a specific version of the servlet api, for instance to target a specific web application server, you will probably want the Java EE version which matches, see this version table.
You can find a recent servlet-api.jar in Tomcat 6 or 7 lib directory. If you don't have Tomcat on your machine, download the binary distribution of version 6 or 7 from http://tomcat.apache.org/download-70.cgi

Resources