Unable to use Infinispan embedded cachemanager on JBoss EAP 7.2 - infinispan

I need to use cache system on my web application under JBoss EAP 7.2
My purpose is to configure cache at application level, therefore no server configuration should be required.
The cache provider is Infinispan
This is my pom.xml:
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-hibernate-cache-v53</artifactId>
<version>${version.infinispan}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<version>${version.infinispan}</version>
<scope>provided</scope>
</dependency>
${version.infinispan} is 9.3.3.Final, the version shipped by JBoss EAP 7.2 (see also https://access.redhat.com/articles/112673)
When I try to start the AS, i have got this error:
[...] a class it references was not found: org.infinispan.manager.EmbeddedCacheManager
Guess I have to configure it on manifest or something else,
however I haven't found how.
Any help would be appreciated
EDIT
On RedHat page is reported the following sentence:
Infinispan is delivered as a private module in EAP to provide the caching capabilities of EAP. Infinispan is not supported for direct use by application
Does it mean that I can't use infinispan cache directly ?

If you want to add caching to EAP for your own data, you should use JBoss Datagrid (downstream) or Infinispan (upstream) modules, so that you have full control over the version and capabilities of the caching layer. See this quickstart to do just that.
The version that ships with EAP is fixed and does not contain all the Infinispan modules, so we recommend against directly using this.

Related

Installing Vaadin Charts Trial License in Intellij Idea, Windows platform

As the Book of Vaadin explains I added the maven repository;
<dependencies>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
But the resolving becomes unsuccessful for 2.0.0 so I used 1.0.0 which was successful.
I got the TRIAL license key from vaadin but I cannot find a way to install it. My IDE is intellij Idea and im using windows 8. When i deploy the tutorial in the book of vaadin without the license i get the following error.
HTTP Status 500 - com.vaadin.server.ServiceException: java.lang.NoClassDefFoundError: com/vaadin/addon/charts/model/Series
Any help regarding this is greatly appreciated.
I worked out the issue by starting the vaading project using Maven in intellij idea. I didnt go for the Vaadin application but went for a new project using vaadin maven repo.
It downloaded the needed resources through the repo. And I ran the package maven goal to get my widget set compiled.
as to the licensing problem I had, It was solved by placing the licence key in a file named .vaadin.chartsdeveloper.license inside my home
that is in windows, : C:\Users\username
Now all is working fine.

How to install a connector on Mule Standalone?

I'm using Mule Standalone. From Mule Studio I'm using a connector I've installed, but since the standalone doesn't have it, it throws an error saying that it can't find the connector amqp:connector etc...
How can I install components in the Mule Standalone?
It should be brought in your application /lib directory by Maven, as a dependency, when you build its package.
For the latest version of the AMQP transport, use:
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-amqp</artifactId>
<version>3.4.0</version>
</dependency>
Check to see that your connector is in your projects class path before you export to standalone. You can do this automatically if you drag and drop your connector in a flow and save it.

Using different eclipselink than bundled in glassfish-embedded-web

I use glassfish-embedded-web for integration tests inside a maven project:
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-web</artifactId>
<version>3.2-b06</version>
<scope>test</scope>
</dependency>
glassfish-embedded-web comes with Eclipselink 2.2.0, but the project requires features of 2.4. For regular deployment, this is solved by adding je required jars to glassfish's modules directory and this dependency:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core</artifactId>
<version>2.4.1</version>
<scope>provided</scope>
</dependency>
I tried also compile scope, still the embedded EL 2.2.0 is used. Adding a test scope dependency on EL 2.4.1 doesn't help. Is there any way to solve this?
Did you try to specify the maven scope test? Otherwise it will not be available while testing! To only provide this version for testing you could use maven profiles.
I see two possible solutions to this problem: either you build your own glassfish-embedded or you just use a brute force approach and modify the jar.
On the 1st approach:
After spending some time building GF I figured that even with my dilettante shell scripting skills its easier to just use the second approach instead of figuring GF code. However, if you're up for this one I'd suggest to start at oracle wiki.
On the 2nd approach: As I've mentioned above, automating this task is the best approach in my opinion (at least if you're dealing with numerous libs and continuous changes), so I wrote this script with all the necessary instructions on how to use it. After you get the new jar just install it in your local repo. I'm using Nexus so for me it was a matter of couple buttons getting pressed.
P.S.: Any comments/advices/improvements on the script are welcome.

How to deploy maven artifacts if they are not present in the central repository

What would be the mechanism to deploy rar artifacts if they are not present in the repository. (e.g. I would like to deploy jackrabbit to my j2ee application, but it is not available as part of the maven repositories. Should I have to store the binary locally in SVN and use the antrun plugin to copy it?
A more specific answer to your question however is that Jackrabbit is available in the central repository:
http://repo2.maven.org/maven2/org/apache/jackrabbit/jackrabbit-jca/2.0.0/
You can include it with:
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jca</artifactId>
<version>2.0.0</version>
<type>rar</type>
</dependency>
One would typically use an enterprise repository (like Nexus) for this. If this is not an option, have a look at this previous answer for a way to store dependencies in your version control system.

In what maven2 repository can Google Guice be found?

As far as I understand Google Guice 2.0 is out not so long ago. But I see that central repo still has outdated 1.0 version. Please, tell where can I find maven2 repository with Google Guice 2.0.
Guice 3.0 is now available on central. You'll need the following to depend on it.
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
Sadly, they haven't uploaded source jars, and the class files have been compiled with Java 6. This may be a show-stopper for you…
Guice 2.0 is now available in the official google-maven-repository. To use it, add the following to your pom.xml inside of the <dependencies> tag (you'll need to add one if there isn't one):
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>2.0</version>
</dependency>
You shouldn't need to, but you can add a reference to the official google-maven-repository in your pom.xml by following the instructions here.
Since I don't see Guice 2.0 in central I thought I'd include a stable repo where I found it:
https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/
The Grails OpenID plugin references http://guice-maven.googlecode.com/svn/trunk/ but that doesn't have it (currently).
They will put it to the central repository soon, as they promised here: http://groups.google.com/group/google-guice/browse_thread/thread/6707a887ed5ef2e3
Never mind. Guice-maven is intended to provide this.
Until it reaches the central repository, I've been getting it from here: http://guice-maven.googlecode.com/svn/trunk