activeMq rar autodeployed in glassfish embedded - resources

Is it possibile to autodeploy activeMq rar into glassfish embedded? I tried many ways using glassfish-embedded-all-3.1b11 upto 3.2b06 but had no luck. In particular, I'd like to use javax.ejb.embeddable.EJBContainer api instead of dynamically deploying to org.glassfish.embeddable.GlassFish.

Related

How do you import the log4j jar file into an NSF?

I wanted to use the Apache POI classes for Streaming Excel spreadsheets. If I import the log4j-1.2.17.jar file into my Jars in the nsf then no XPages will load.
If I don't I get an error:
java.lang.NoSuchMethodError:
javax/xml/stream/XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory;
at
org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller.<clinit>(PackagePropertiesMarshaller.java:45)
at
java.lang.J9VMInternals.initializeImpl(Native Method)
at
java.lang.J9VMInternals.initialize(J9VMInternals.java:201)
at
Since many third party Java apis seem to use the log4j is there a solution? I think this is the same issue that came up with the web services API in XPages?
Your best course of action is to deploy OpenNTF essentials. It contains the POI classes and quite some ready made wrappers to make your life easier.
Deploy into sever via update site nsf approach and deploy to your designer too
Maybe your error can be from the same reason than in that questions. It's a problem of standard jars which come along with the domino installation.
Using External jar causing Error
Axis 1.4 log4j-1.2.8.jar incompatible with XPages?
Howard, put the jar file on the server as well as your local notes client and open up Java security permissions, I think that should do it. Also check that the version you are importing is compatible with Java version on Domino.

JSF and cloudControl

I'm learning Java EE and it appear to me that One of the things to Know is JSF
I'm also sing cloudControl but I haven't found a Way to Deploy a JSF Applications there.
Is there a way of deploying a JSF Applications on cloudControl ?
As mentioned in the comment, you need to provide some implementation of JSF as a dependency together with embedded jetty or tomcat runner. Here you can find some example apps for tomcat and jetty. Maybe it would be also helpful for you to have a look on our existing java guides.

How to include sample helloworld jsp file in the virtual box linux in hadoop?

I need to include my sample jsp file in hadoop. And display the output in the localhost of hadoop in the webbrowser. I couldn't have the idea of where i need to include the jsp file and what is the command for the execution of the file becuase, I am new to this technology can any one help me , how to include and execute the jsp file.
Hadoop does have an in-built jetty to run jsp for its job status. Is not that you cannot run your own jsp but for that you need to explore Hadoop source code
ya, use Apache Tomcat to run jsp pages. because it has built in jsp/servlet parser...
Hadoop is not capable of running your jsp pages.
I recommend you install tomcat instead.
Update:
You are insistingly trying to put a screw into a wall with a hammer. If you want to serve a JSP page use jetty or tomcat, don't use hadoop. Hadoop does have jsp pages it can a serve, but these are ONLY for serving the hadoop specific pages. The hadoop toolset uses jetty for that purpose. As said repeatedly by many others:
Hadoop is not capable of running your jsp pages.
Sorry for late reply.
These tutorial will surely help out what you want.
Hortonworks Tutorial.
Also this one
You cannot run your own JSP files via Hadoop. Its explained as
Apache Hadoop is an open-source software framework for storage and large scale processing of data-sets on clusters of commodity hardware
To serve JSP files, you will need a JSP/Servlet container , most likely Apache Tomcat. Once you have that configured in your virtual machine, simple copy paste your project into the webapps folder of tomcat and it will serve the JSP.

run an external process from jsf / glassfish

This is a jsf 2.0 project on GlassFish 3.1.2, developed with Netbeans.
In my business logic, I need to launch a perl application which returns a png or svg. This file will be displayed or presented as a file download in the UI (for which I will use primefaces).
Question: How can an external process like this perl script be launched from my jsf app?
(I have found a thread on this issue here: http://www.java.net/node/676943 but the answer was too technical, I could not understand it)
Thx!
You can use Runtime.getRuntime().exec("perl script.pl") or you can use Process class.
Look at exitValue() and getInputStream().

Seam application RichFaces not loading components

I have a Seam application running on:
Linux CentOS
Tomcat 6.0.32
Java 6
JBoss Seam 2.2.1
RichFaces 3.3.3
When I run my application locally, everything works fine (Windows 7 here). But when I put the exactly same files on my server (VPS), the Tomcat starts with no errors, but the application do not load RichFaces components.
I've searching the solution for this problem for a few days, but didn't found nothing that can help me. I thought could be a permission problem (application's folder permission), so I've tried to change it too many ways, but RF components keep not loading.
Anyone can imagine what is happening?
Thanks in advance!
Fabricio Braga
I have solved the problem. The point is that in my case I have an Apache HTTP Server before Tomcat, and RichFaces add some JS files from JAR files. So, we need to map, editing apache config files to redirect also this JS files to Tomcat.
Then, I just edited this Apache mappings to point RichFaces JS files to Tomcat, for example:
"/my-domain-name/a4j/g/3_3_3.Final/org/ajax4jsf/framework.pack.js" mapped there: "/my-domain-name/a4j/*" for the Tomcat. And the same for the others files.
After that, the problem was over.
Regards,
Fabricio Braga

Resources