Re: [jboss-user] [JBoss Tools] - Observations from two year of ping-backs from JBoss Tools users
by Antoine Herzog
Antoine Herzog [https://community.jboss.org/people/Antoine_h] commented on
"Observations from two year of ping-backs from JBoss Tools users"
To view all comments on this blog post, visit: https://community.jboss.org/community/tools/blog/2012/07/30/observations-...
--------------------------------------------------
Hi,
it is very interesting.
For the conclusion, I think it is important to say : "those are the figures of the people that accepted the pings.
These are "where are the users that explicitly say “Yes - please send pings” ".
These are "what OS is used by the users that explicitly say “Yes - please send pings” ".
**************
I think it is jumping a bit to fast to the conclusion : "that is the OS that is most used by the users", "that is where the users are in the world"...
two hypothesis :
- what if the Linux users are much more keen on refusing this kind of enquiries/pings... ?
If the prefer being confidential, not letting a system ping somewhere, to provide info about them, etc...?
What if the users with windows OS are much more letting the "system drive what's going on", and more keen on saying "yes" to any option asked during installation ?
- about the countries : what if the US and European countries are much more spoiled people countries, saying : no need to provide information to the community... others will do it...
what if the other countries, like india, china, brasil... are much more keen on providing information, to contribute and work hard to enhance the tools and community softwares.
These are only hypothésis.
They show it is worth being carefull when using these figure.
It is worth thinking of what can really be said with the figures, and what is some extension, even if with high confidence.
***********
When I see that so many users use eclipse with screen resolution of 1366 x 768, I wonder what they do.
May like me, during the week end, using the portable pc of my girl friend, when I change a few texts on my web site : http://www.sysemo.com/Sysemo-expertise-portails-jboss-portal.php Consultant JBoss AS7, J2EE, JBoss Portal and GateIn (JSR-286), JSF, Richfaces, Drools, BRMS.
It is only a few PHP pages.
I use eclipse because it is my main tool for consulting on JBoss.... and it is convenient to have a project, edit the file text (for php), and use ant to send this to the server hosting the pages.
Does this means this use is worth to be taken into account for the strategy of the development of the tool ?
***********
These are only comments, ...
globally, the idea of making this ping and retrieving some information is nice... and the figures are interesting.
Thanks,...
Antoine
--------------------------------------------------
12 years, 5 months
[JBoss Tools] - enable-openshift-ci: full example using openshift-java-client
by Andre Dietisheim
Andre Dietisheim [https://community.jboss.org/people/adietish] modified the document:
"enable-openshift-ci: full example using openshift-java-client"
To view the document, visit: https://community.jboss.org/docs/DOC-19828
--------------------------------------------------------------
This wiki entry will show you a complete example using the https://github.com/openshift/openshift-java-client openshift-java-client. The openshift-java-client is a java library that allows you talk to the OpenShift PaaS programmatically.
This article will develop a command line tool in java, that takes a project on your disk and sets up a http://jenkins-ci.org/ jenkins build for it on OpenShift.
The example is hosted on github at https://github.com/adietish/enable-openshift-ci https://github.com/adietish/enable-openshift-ci and you may freely reuse, redistribute or modify the code since it's licensed under the http://www.eclipse.org/legal/epl-v10.html Eclipse Public License.
h1. Requirements
* your project is required to build with maven and has to be committed to a git repository
* you need an account on https://openshift.redhat.com/app/ OpenShift. (If you have no account yet, you would have to https://openshift.redhat.com/app/account/new signup first)
* you need 3 free application slots (given that you have a default quota of 3 applications, you shall have no application in your account).
* you need to have git available on your command-line (enable-openshift-ci is using it to deploy)
h1. Usage
-p the project (folder) that we will enable CI for
-pw the OpenShift password
-u the OpenShift user
You have to tell enable-openshift-ci where it will find your project (*-p*), what's your OpenShift user (*-u*) and what password you are using (-*pw*).
An exemplary call using the jar would look the following:
java -jar target/enable-openshift-ci-0.0.1-SNAPSHOT-jar-with-dependencies.jar -p <PATH_TO_PROJECT> -a test -u <USER> -pw <PASSWORT>
Calling it using maven would look like this:
mvn test -Du=<USER> -Dpw=<PASSWORD> -Dp=<PATH_TO_PROJECT>
Enable-openshift-ci will log into your OpenShift account, create a domain (if needed), an application for your project and a jenkins application. It will then add the remote application git repo to your local project. You will then be ready to merge the remote content to your local project, add the openshift profile to your pom and push your project upstream. This will trigger the jenkins build.
h1. Implementation
h2. Build setup
First of all enable-openshift-ci requires the https://github.com/openshift/openshift-java-client openshift-java-client. The client library is available as artifact from maven central. Enable-openshift-ci is a maven project, we can therefore add the openshift-java-client to its classpath by simply using the following snippet in the it's pom:
<dependency>
<groupId>com.openshift</groupId>
<artifactId>openshift-java-client</artifactId>
<version>2.0.0</version>
</dependency>
h2. A few classes
* https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... Main: Bootstrapping
* https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... Parameters: Parses, validates and holds the command line parameters
* https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... OpenShiftCI: Creates the OpenShift CI, pushes your project to it
h2. Parameters: Talk to me via command line parameters
To keep the example simple, we will stick to a GUI-less programm, that you control by command-line arguments. The https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... Parameters class holds all parameters that were given at the command line. It will check them for validity and offer them for further processing.
What's important in this context is that the Parameters class will ensure that your project exists, that it is a http://maven.apache.org/ maven project and that it is shared with a http://git-scm.com/ git repository.
h2. OpenShiftCI: I want my CI instance!
The https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... OpenShiftCI class is where it all happens. It will connect to your https://openshift.redhat.com/app/ OpenShift account, create your Jenkins instance and push your project to it. The https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... create() method looks like this:
IUser user = createUser();
IDomain domain = getOrCreateDomain(user);
IApplication application = getOrCreateApplication(project.getName(), domain);
IApplication jenkinsApplication = getOrCreateJenkins(domain);
waitForApplication(jenkinsApplication);
waitForApplication(application);
embedJenkinsClient(application);
deployToOpenShift(application);
System.out.println("Done.");
h2. Let's get in touch with OpenShift
Before enable-openshift-ci can manipulate resources on OpenShift, it has to connect to it. It asks the https://github.com/openshift/openshift-java-client/blob/master/src/main/j... OpenShiftConnectionFactory for a new connection.
The first required parameter is the url of the OpenShift PaaS. You may either hard code it or ask the OpenShift configuration for it:
new OpenShiftConfiguration().getLibraServer()
The connection factory also asks for a meaningful client id. We will use "enable-openshift-ci".
Last but not least, you also have to give it your OpenShift credentials.
String openshiftServer = new OpenShiftConfiguration().getLibraServer();
IOpenShiftConnection connection = new OpenShiftConnectionFactory().getConnection("enable-openshift-ci", "<user>", "<password>", openshiftServer);
Once you have your connection you can get your user instance which will allow you to create your the domain and the applications:
IUser user = connection.getUser();
h2. Now I need a domain
All resources on OpenShift are bound to a domain. We therefore have to make sure we have a domain in a first step, we either get the existing one or create a new one in https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... getOrCreateDomain():
IDomain domain = user.getDefaultDomain();
if (domain == null) {
domain = user.createDomain("openshiftci");
In case we create a new domain, we have to make sure that OpenShift has our ssh-key. The ssh-key is required as soon as you deal with an OpenShift git-repository, the application logs etc (not when manipulating resources). To keep things simple, we will stick to the default ssh-key id_rsa.pub and add it to OpenShift in case it's not present yet. When adding the key, we will use a unique name which is the current time in millisecons in this simplified example:
ISSHPublicKey key = new SSHPublicKey(SSH_PUBLIC_KEY);
IOpenShiftSSHKey addedKey = user.getSSHKeyByPublicKey(key.getPublicKey());
if (addedKey == null) {
user.putSSHKey(String.valueOf(System.currentTimeMillis()), key);
}
h2. Let's get an application for my project
Now that we have a domain, we are ready to create an application for our project.
Our tool uses an constant name for the new project. It therefore checks if this application already exists:
IApplication application = domain.getApplicationByName("openshiftci");
If there's no such application, it will create a new one:
IApplication application = domain.createApplication(name, ICartridge.JBOSSAS_7);
If it already exists, https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... getOrCreateApplication() will check if it's a jbossas-7 application, since we are dealing with a maven aka java project.
ICartridge.JBOSSAS_7.equals(application.getCartridge())
h2. OpenShift, gimme my CI instance!
We now created an application that OpenShift builds whenever we push to it's git repository. The build is executed within the git push. To have a jenkins CI instance doing that work, we have to add a jenkins application and connect both.
https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... getOrCreateJenkins() first checks if there are any jenkins applications within your domain:
List<IApplication> jenkinsApplications = domain.getApplicationsByCartridge(ICartridge.JENKINS_14);
if(jenkinsApplications.isEmpty()) {
...
If it spots an jenkins instance, it will leave this step alone, it wont create another jenkins application. If there's none yet, it will create a new one and print it's url and credentials:
IApplication jenkins = domain.createApplication(DEFAULT_JENKINS_NAME, ICartridge.JENKINS_14);
System.out.println(jenkins.getCreationLog());
We now have to make sure both applications are reachable. We will eventually https://github.com/adietish/enable-openshift-ci/blob/master/src/main/java... wait for them to become ready:
Future<Boolean> applicationAccessible = application.waitForAccessibleAsync(WAIT_TIMEOUT);
if (!applicationAccessible.get()) {
...
Once they are both ready, we can connect both and add the jenkins cartridge to our project application. Doing this tells OpenShift to build the project application within in the jenkins application.
The https://github.com/openshift/openshift-java-client/blob/master/src/main/j... embedded cartridge offers a creation log, that shows at what url the jenkins jobs may be reached at.
IEmbeddedCartridge jenkinsClient = application.addEmbeddableCartridge(IEmbeddableCartridge.JENKINS_14);
System.out.println(jenkinsClient.getCreationLog());
h2. We're almost there
Enable-openshift-ci will now last but not least add the git repository of your application as remote to your local project repository. It will use the git command line to "git add remote":
exec("git remote add openshift -f " + application.getGitUrl());
To now have your project built on OpenShift, you'll have to make sure your pom has an openshift profile:
<profile>
<!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. -->
<!-- Use this profile for any OpenShift specific customization your app will need. -->
<!-- By default that is to put the resulting archive into the 'deployments' folder. -->
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environm... -->
<id>openshift</id>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>deployments</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
You'll then simply merge the remote repo into you local repo and push it upstream. You'll do something like this:
git add .
git commit -a -m 'deploying to openshift'
git merge openshift/master -s recursive -X ours
git push openshift HEAD
Pushing your project upstream will now trigger a jenkins build.
We're there, you now have a utility that will setup a jenkins for your project. We discussed all steps involved.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-19828]
Create a new document in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months
[jBPM] - timer job Exception
by Miloud Haimoune
Miloud Haimoune [https://community.jboss.org/people/milhaim] created the discussion
"timer job Exception"
To view the discussion, visit: https://community.jboss.org/message/754050#754050
--------------------------------------------------------------
Hi all,
I m using JBPM 5.3 in a web application with jboss server 5.1
I discovered this exception in the logs:
javax.persistence.TransactionRequiredException: No active JTA transaction on joinTransaction call
at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:458)
at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:431)
at org.drools.persistence.jpa.JpaPersistenceContext.joinTransaction(JpaPersistenceContext.java:29)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:349)
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:34)
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:14)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
16:03:57,751 ERROR [JpaTimerJobInstance] Unable to execute timer job!
it happens from time to time, I can not see any directly related cause,
do you have any idea where this coming from and how to fix it ?
Many thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754050#754050]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[EJB3] - Runtime Exception while creating EJB Object
by Hushen Savani
Hushen Savani [https://community.jboss.org/people/hushen.savani] created the discussion
"Runtime Exception while creating EJB Object"
To view the discussion, visit: https://community.jboss.org/message/648806#648806
--------------------------------------------------------------
Hi Community,
I have developed an application with *Java 1.6*, *EJB-2.1*. The application is deployed on *JBossAS-5.1.0*. The application has been running very smooth for long a time. But for last two days, I found following sort of Runtime Exception while creating EJB Local Object/Local Home:
*Log Snippet-1*:
2012-01-25 17:09:02,896 ERROR [STDERR] (WorkerThread#4[127.0.0.1:47153])
Caused by: java.lang.NullPointerException
2012-01-25 17:09:02,896 ERROR [STDERR] (WorkerThread#4[127.0.0.1:47153])
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyF
actory.java:343)
2012-01-25 17:09:02,896 ERROR [STDERR] (WorkerThread#4[127.0.0.1:47153])
at
org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
2012-01-25 17:09:02,896 ERROR [STDERR] (WorkerThread#4[127.0.0.1:47153])
at $Proxy257.create(Unknown Source)
*Log Snippet-2*:
java.lang.NullPointerException
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:457)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
at $Proxy263.getDynamicLoopMessage_Generalized(Unknown Source)
*Log Snippet-3*:
2012-01-17 16:44:49,063 ERROR [org.jboss.ejb.plugins.LogInterceptor] (WorkerThread#5[192.168.1.76:19743]) RuntimeException in method: public abstract com.elitecore.billingengine.utils.BEResultObject com.elitecore.billingengine.ejb.billpreview.interfaces.IBillPreviewSessionLocal.doBasePriceCalculation(com.elitecore.billingengine.utils.BEHashMap):
java.lang.NullPointerException
at com.elitecore.billingengine.ejb.billpreview.sessionfacade.BillPreviewSessionFacade.doBasePriceCalculation(BillPreviewSessionFacade.java:357)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Also, the whole server.log is attached with this thread. Pls. suggest some pointers on the same.
Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/648806#648806]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months