Community Updates, June 2 - June 9
by JBoss Community
===============================================================
Community Updates for June 2 - June 9
===============================================================
You haven't set a status update. Log in and set your status at: http://community.jboss.org.
Your Content
* testing the new list server [http://community.jboss.org/thread/127309]
was viewed 12,657 times and replied to by 3 people
* No Link to Jboss Nukes [http://community.jboss.org/thread/90785]
was viewed 109,500 times and replied to by 3 people
Your Connections - Activity by people you are following
You don't have any connections yet. Find people and connect! [http://community.jboss.org/people/]
Tips and tricks - Upload a File
You can include any file in Community so that other people can access it, comment on it, and even rate it. Just select New > Document from the menu bar and choose Upload a File to include the file in Community. Best of all, your file is now under version control so that you can get back to older versions of the file if you need to.
Find out more.
Not interested in these emails anymore, or want to change how often they come? Update your email preferences by visiting: http://community.jboss.org/user-notification-preferences!input.jspa
13 years, 4 months
[JMX Development] - Trying to connect to an JBoss 4.2.1.GA org.jboss.system.server.ServerInfo with groovy without success results in "error during JRMP connection establishment"
by Andreas Oswald
Andreas Oswald [http://community.jboss.org/people/cptblaubaer] created the discussion
"Trying to connect to an JBoss 4.2.1.GA org.jboss.system.server.ServerInfo with groovy without success results in "error during JRMP connection establishment""
To view the discussion, visit: http://community.jboss.org/message/609267#609267
--------------------------------------------------------------
Hi there,
to monitor FreeMemory in org.jboss.system.server.ServerInfo on a regular basis I would like to connect to 4.2.1.GA with the help of a groovy script and execute some actions in the groovy script if the FreeMemory goes under a critical value. Also I would like to log the FreeMemory over the time, which could be done in the groovy script as well.
When using the jmx console with the browser I can show the wanted value as can be done with executing twiddle.
> Accessing from twiddle works fine
>
>
> C:\Programme\jboss-4.2.1.GA\bin>twiddle -s vm-appsfs4p:1099 get "jboss.system:type=ServerInfo" FreeMemory
> FreeMemory=320676872
>
I tried quite a few code snippets from the internet and tried different permutation of URL syntax
import java.lang.management.*
import javax.management.ObjectName
import javax.management.remote.JMXConnectorFactory as JmxFactory
import javax.management.remote.JMXServiceURL as JmxUrl
def serverUrl = "service:jmx:rmi:///jndi/rmi://vm-appsfs4p:1099/jmxrmi"
String beanName = "jboss.system:type=ServerInfo"
def server = JmxFactory.connect(new JmxUrl(serverUrl)).MBeanServerConnection
def mbean = new GroovyMBean(server, beanName)
println "Connected to:\n$dataSystem\n"
println mbean.FreeMemory;
> Here's what my output looks like
>
>
> C:\temp>jmx.groovy
>
> Caught: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException
> [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
> java.net.SocketException: Software caused connection abort: recv failed]
> at jmx.run(jmx.groovy:9)
>
What am I doing wrong? Please be kind as those are my first experiments in this area.
I'd be happy if someone could help me with this, thanks in advance for your help
Take care
Andreas
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/609267#609267]
Start a new discussion in JMX Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months
[JBoss AS7 Development] - [DRAFT] Using JBoss Negotiation on AS7
by Darran Lofthouse
Darran Lofthouse [http://community.jboss.org/people/dlofthouse] modified the document:
"[DRAFT] Using JBoss Negotiation on AS7"
To view the document, visit: http://community.jboss.org/docs/DOC-16876
--------------------------------------------------------------
Once https://issues.jboss.org/browse/AS7-770 AS7-770 is resolved it will be possible to start using JBoss Negotiation with web applications deployed to JBoss AS7.
JBoss Negotiation is still JBoss Negotiation so the majority of the configuration is still the same as on previous JBoss AS releases, this article just highlights some of the differences.
h2. Security Domains
As before two security domains are still required, one to represent the identity of the server and one to secure the web application - in JBoss AS7 these are defined in the domain model e.g.
> <security-domains>
> <security-domain name="host" cache-type="default">
>
> <authentication>
>
> <login-module code="Kerberos" flag="required">
>
> <module-option name="storeKey" value="true"/>
>
> <module-option name="useKeyTab" value="true"/>
>
> <module-option name="principal" value="host/testserver@MY_REALM"/>
>
> <module-option name="keyTab" value="/home/username/service.keytab"/>
>
> <module-option name="doNotPrompt" value="true"/>
>
> <module-option name="debug" value="false"/>
>
> </login-module>
>
> </authentication>
>
> </security-domain>
>
>
>
> <security-domain name="SPNEGO" cache-type="default">
>
> <authentication>
>
> <login-module code="SPNEGO" flag="requisite">
>
> <module-option name="password-stacking" value="useFirstPass"/>
>
> <module-option name="serverSecurityDomain" value="host"/>
>
> </login-module>
>
>
>
> <!-- Login Module For Roles Search -->
>
> </security-domain>
>
Here the security domain options are exactly the same as in previous JBoss AS releases, the only noteable difference is that the 'Code' attribute for each login-module can now use a simple name instead of the fully qualified class name used previously.
The following tables shows the name mapping used when working with JBoss Negotiation: -
|| *Simple Name* || *Class Name* ||
| Kerberos | com.sun.security.auth.module.Krb5LoginModule |
| SPNEGO | org.jboss.security.negotiation.spnego.SPNEGOLoginModule |
| AdvancedLdap | org.jboss.security.negotiation.AdvancedLdapLoginModule |
| AdvancedAdLdap | org.jboss.security.negotiation.AdvancedADLoginModule |
h2. System Properties
Instead of a seperate deployment the system properties (if required) can now also be set in the domain model.
e.g.
> <system-properties>
>
> <property name="java.security.krb5.kdc" value="mykdc.mydomain"/>
>
> <property name="java.security.krb5.realm" value="MY_REALM"/>
>
> </system-properties>
>
h2. Web Application
Within JBoss AS7 it is not possible to override the authenticators as before, however it is possible to just add the NegotiationAuthenticator as a valve to your jboss-web.xml descriptor to achieve the same effect.
e.g.
> <!DOCTYPE jboss-web PUBLIC
> "-//JBoss//DTD Web Application 2.4//EN"
> " http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
>
>
> <jboss-web>
>
> <security-domain>java:/jaas/SPNEGO</security-domain>
>
> <valve>
>
> <class-name>org.jboss.security.negotiation.NegotiationAuthenticator</class-name>
>
> </valve>
>
> </jboss-web>
>
Note - the valve still requirs the security-constraint and login-config to be defined in the web.xml as this is still used to decide which resources are secured - however the chosen auth-method will be overriden by this authenticator.
Finally the web application requires a dependency defining in META-INF/MANIFEST.MF so that the JBoss Negotiation classes can be located.
> Manifest-Version: 1.0
> Build-Jdk: 1.6.0_24
> Dependencies: org.jboss.security.negotiation
h2. JBoss Negotiation Toolkit
Attached to this article is a version of the JBoss Negotiation Toolkit for use with JBoss AS7 to allow you as before to test the different aspects of SPNEGO before introducing your own application.
Note - As the toolkit is intended for debugging if you look at the dependencies in the MANIFEST.MF you will see some additional dependencies defined, these are needed for the debugging features of the toolkit and are not normally needed for your own web application.
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16876]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 4 months
[JBoss Profiler Development] - JVMTI_ERROR_NOT_AVAILABLE
by Michael Erskine
Michael Erskine [http://community.jboss.org/people/erskinem] created the discussion
"JVMTI_ERROR_NOT_AVAILABLE"
To view the discussion, visit: http://community.jboss.org/message/609003#609003
--------------------------------------------------------------
Hi All,
I'm attempting to use JBoss Profiler 1.0.CR4 to get a JVM heap dump (using Java 1.5.0_22 and JBoss 5.1.0).
I've installed the Agent as per the jvmtiProfilerDoc.pdf but I get the following error when starting JBoss:
JVMTI Error JVMTI_ERROR_NOT_AVAILABLE
I've looked up this error on the Sun (Oracle) website and the description is "The functionality is not available in this virtual machine".
When attempting to dump the heap (via the JBoss Profiler JVMTI bean accessed via the JMX console) the following error is thrown:
JVMTI_ERROR_MUST_POSSESS_CAPABILITY.
which I guess is a result of the earlier error.
Surely the 1.5.0_22 JVM has the functionality for JVMTI? If so, does anyone know why I'd get this error?
Thanks for any help
Best regards,
Mike.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/609003#609003]
Start a new discussion in JBoss Profiler Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months
[JBoss Tools Development] - How to Build JBoss Tools with Maven 3
by Max Rydahl Andersen
Max Rydahl Andersen [http://community.jboss.org/people/maxandersen] modified the document:
"How to Build JBoss Tools with Maven 3"
To view the document, visit: http://community.jboss.org/docs/DOC-16604
--------------------------------------------------------------
+*This article is a replacement for its precursor, http://community.jboss.org/docs/DOC-15513 How to Build JBoss Tools 3.2 with Maven 3.*+
h2. Prerequisites
1. Java 1.6 SDK
2. Maven 3
3. Ant 1.7.1 or later
4. About 6 GB of free disk space if you want to run all integration tests for (JBoss AS, Seam and Web Services Tools) - *requires VPN access*
5. subversion client 1.6.X (should work with lower version as well)
h2. Environment Setup
h3. Maven and Java
Make sure your maven 3 is available by default and Java 1.6 is used.
mvn -version
should print out something like
*Apache Maven 3.0.2* (r1056850; 2011-01-08 19:58:10-0500)
*Java version: 1.6.0_20*, vendor: Sun Microsystems Inc.
*Java home: /usr/java/jdk1.6.0_20/jre*
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32.23-170.fc12.i686", arch: "i386", family: "unix"
h2.
h2. Building Locally Via Commandline
To run a local build of JBoss Tools 3.3 against the new Eclipse 3.7-based Target Platform, I suggest a three-step approach:
a) build the parent & target platform poms (v0.0.2-SNAPSHOT) *[ONLY NEEDED WHEN THESE CHANGE]*
b) resolve the target platform to your local disk *[ONLY NEEDED WHEN THESE CHANGE]*
c) build against your local copy of the target platform [every time you change sources and want to rebuild]
Once (a) and (b) are done, you need only perform (c) iteratively until you're happy (that is, until everything compiles). This lets you test changes locally before committing back to SVN.
*(a) and (b) need only be done when the parent pom and Target Platform (TP) change.* Of course if we get these published to nexus then you may not need those first bootstrapping steps. Stay tuned - work in progress.
*a) build the parent & target platform poms (v0.0.2-SNAPSHOT)*
svn co http://svn.jboss.org/repos/jbosstools/trunk jbosstools
cd jbosstools/build/parent
mvn clean install
...
[INFO] Reactor Summary:
[INFO]
[INFO] JBoss Tools Target Platform Definition ............ SUCCESS [0.724s]
[INFO] JBoss Tools Parent ................................ SUCCESS [0.461s]
...
*NOTE: You need not fetch the entire JBoss Tools tree from SVN (or Git (http://divby0.blogspot.com/2011/01/howto-partially-clone-svn-repo-to-git....
*Instead, you can just fetch the build/ folder and one or more component folders, then as before,*
*build the parent pom. After that, go into the component folder and run maven there (#runmavenpercomponent).*
mkdir jbosstools
cd jbosstools
svn co http://svn.jboss.org/repos/jbosstools/trunk/build
svn co http://svn.jboss.org/repos/jbosstools/trunk/jmx
cd jbosstools/build/parent
mvn clean install
...
[INFO] Reactor Summary:
[INFO]
[INFO] JBoss Tools Target Platform Definition ............ SUCCESS [0.724s]
[INFO] JBoss Tools Parent ................................ SUCCESS [0.461s]
...
*b) resolve the target platform to your local disk*
There are two ways to do this:
i) Download and unpack the latest TP zip, *OR*
ii) Resolve the TP using Maven or Ant
+i) Download and unpack the latest TP zip+
You can either download the TP as a zip [5] and unpack it into some folder on your disk. For convenience, the easiest is to unzip into jbosstools/build/target-platform/REPO/, since that's where the Maven or Ant process will by default operate.
You can do that with any browser or on a command line with curl or similar:
curl -C - -O http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo/e...
...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 606M 100 606M 0 0 164k 0 1:02:54 1:02:54 --:--:-- 172k
and then unzip it:
mkdir jbosstools/build/target-platform/REPO
unzip e37M7-wtp33M7.target.zip -d jbosstools/build/target-platform/REPO
[5] http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo/e... http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo/e...
*OR*
*
*
+ii) Resolve the TP using Maven or Ant with wget+
*MAC USERS**:* +you may need to install wget. + +http://download.cnet.com/Wget/3000-18506_4-128268.html Download it here++, or http://www.asitis.org/installing-wget-for-mac-os-x build it here.
+
cd jbosstools/build/target-platform
mvn clean install -Pget.local.target
The get.local.target profile will resolve the target platform file, multiple.target, as a p2 repository on your local disk in ~/3.3.indigo/build/target-platform/REPO/. It may take a while, so you're better off from a speed point-of-view simply fetching the latest zip [5]. However, if you want to see what actually happens to create the TP (as done in Hudson) this is the approach to take.
Since the Maven profile is simply a wrapper call to Ant, you can also use Ant 1.7.1 or later directly:
cd jbosstools/build/target-platform
ant
*c) build against your local copy of the target platform*
*LINUX / MAC USERS*
cd build
mvn clean install -U -B -fae -e -P local.site -Dlocal.site=file:/${HOME}/3.3.indigo/build/target-platform/REPO/ | tee build.all.log.txt
(tee is a program that pipes console output to BOTH console and a file so you can watch the build AND keep a log.)
*WINDOWS USERS*
cd c:\3.3.indigo\build
mvn3 clean install -U -B -fae -e -P local.site -Dlocal.site=file:///C:/3.3.indigo/build/target-platform/REPO/
or
mvn3 clean install -U -B -fae -e -Plocal.site -Dlocal.site=file:///C:/3.3.indigo/build/target-platform/REPO/ > build.all.log.txt
If you downloaded the zip and unpacked is somewhere else, use -Dlocal.site=file:/.../ to point at that folder instead.
#
If you would rather build a single component (or even just a single plugin), go into that folder and run Maven there:
cd ~/3.3.indigo/build/jmx
mvn3 clean install -U -B -fae -e -P local.site -Dlocal.site=file:/${HOME}/3.3.indigo/build/target-platform/REPO/ | tee build.jmx.log.txt
+-- OR, if you prefer to use the "bootstrap profiles": --+
cd ~/3.3.indigo/build
mvn3 clean install -U -B -fae -e -P local.site,jmx-bootstrap -Dlocal.site=file:/${HOME}/3.3.indigo/build/target-platform/REPO/ | teebuild.jmx.log.txt
++
#
h2. Building Locally In Eclipse
First, you must have installed m2eclipse into your Eclipse (or JBDS). You can install the currently supported version from this update site:
http://download.jboss.org/jbosstools/updates/indigo/ http://download.jboss.org/jbosstools/updates/indigo/
Next, start up Eclipse or JBDS and do *File > Import* to import the project(s) you already checked out from SVN above into your workspace.
http://community.jboss.org/servlet/JiveServlet/showImage/102-16604-19-138... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-19...
Browse to where you have the project(s) checked out, and select a folder to import pom projects. In this case, I'm importing the parent pom (which refers to the target platform pom). Optionally, you can add these new projects to a working set to collect them in your Package Explorer view.
http://community.jboss.org/servlet/JiveServlet/showImage/102-16604-19-138... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-19...
Once the project(s) are imported, you'll want to build them. You can either do *CTRL-SHIFT-X,M (Run Maven Build),* or right-click the project and select *Run As > Maven Build*. The following screenshots show how to configure a build job.
First, on the *Main* tab, set a *Name*, *Goals*, *Profile*(s), and add a *Parameter*. Or, if you prefer, put everything in the *Goals* field for simplicity:
+clean install -U -B -fae -e -Plocal.site -Dlocal.site=file://home/nboldt/tmp/JBT_REPO_Indigo/+
Be sure to check *Resolve Workspace artifacts*, and, if you have a newer version of Maven installed, point your build at that *Maven Runtime* instead of the bundled one that ships with m2eclipse.
http://community.jboss.org/servlet/JiveServlet/showImage/102-16604-19-138... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-19...
On the *JRE* tab, make sure you're using a 6.0 JDK.
http://community.jboss.org/servlet/JiveServlet/showImage/102-16604-19-138... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-19...
On the *Refresh* tab, define which workspace resources you want to refresh when the build's done.
http://community.jboss.org/servlet/JiveServlet/showImage/102-16604-19-138... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-19...
On the *Common* tab, you can store the output of the build in a log file in case it's particularly long and you need to refer back to it.
http://community.jboss.org/servlet/JiveServlet/showImage/102-16604-19-138... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-19...
Click *Run* to run the build.
http://community.jboss.org/servlet/JiveServlet/showImage/102-16604-19-138... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-19...
Now you can repeat the above step to build any other component or plugin or feature or update site from the JBoss Tools repo. Simply import the project(s) and build them as above.
h2. Tips and tricks for making BOTH PDE UI and headless Maven builds happy
It's fairly common to have plugins compiling in eclipse while tycho would not work. Basically you could say that tycho is far more picky compared to Eclipse PDE.
h3.
Check your build.properties
Check build.properties in your plugin. If it has warnings in Eclipse, you'll most likely end with tycho failing to compile your sources. You'll have to make sure that you correct all warnings.
Especially check your build.properties to have entries for *source..* and *output..*
*
*
source.. = src/
output.. = bin/
h2.
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16604]
Create a new document in JBoss Tools Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 4 months
[JBoss AS7 Development] - @Resource definition in 3rd party library causes deployment failure
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"@Resource definition in 3rd party library causes deployment failure"
To view the discussion, visit: http://community.jboss.org/message/608833#608833
--------------------------------------------------------------
Hi all,
Earlier snapshots of AS7 didn't give me this problem, but it's started showing up due to some recent changes regarding @Resource handling.
I use a library called Enunciate for help with a couple different webservice related things. One of its modules (org.codehaus.enunciate:enunciate-jersey-rt:1.21) http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.enunciate/en... has a class named EnunciateSpringComponentProviderFactory with a @Resource annotation in it defined like this:
@Resource ( name = "service-bean-interceptors" )
public void setEnunciateInterceptors(List<Object> interceptors) {
this.interceptors = interceptors;
}
I believe this was intended to be used for Spring dependency wiring. This class is intended to be an 'optional' class, in that it adds Spring support to Enunciate's Jersey integration, but if Spring doesn't exist on the classpath, the Enunciate-Jersey integration http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.enunciate/en... should still work fine.
My app doesn't use Spring, and I don't need this class to be used by Enunciate or noticed in any way by Jboss.
However, AS7 seems to notice the @Resource declaration, and it tries to register EnunciateSpringComponentProviderFactory as an EE Component.
Now, this first caused me a little irritation because AS7 tried to load this class, which failed with a Linkage error because I don't have the jersey-spring integration jar in my app. So, I worked around the issue by adding that jar.
However, AS7 (as of late) now fails to deploy my app, resulting in this stacktrace:
13:07:07,388 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."ccp.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ccp.war".PARSE: Failed to process phase PARSE of deployment "ccp.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Can't handle @Resource for ENC name: service-bean-interceptors since it's missing a "lookup" (or "mappedName") value and isn't of any known type
at org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor.process(ResourceInjectionAnnotationParsingProcessor.java:208)
at org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor.processMethodResource(ResourceInjectionAnnotationParsingProcessor.java:168)
at org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor.deploy(ResourceInjectionAnnotationParsingProcessor.java:119)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 4 more
Is there any way I can tell AS7 to ignore this class?
Or perhaps AS7 is being a little too aggressive regarding its @Resource scanning/validating? Honestly I don't know the Java EE rules regarding @Resource, so maybe this behavior is correct.
I do imagine, however, that the current behavior will be really irritating to people who use Spring and use @Resource to declare Spring injection points.
Oh, and also, the error message would be friendlier if it inlcuded the name of the class containing the offening @Resource declaration.
Thanks!
-Matt
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608833#608833]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months