[JBoss Tools] - Testing visual parts in JBT
by Jiri Peterka
Jiri Peterka [http://community.jboss.org/people/jpeterka] created the document:
"Testing visual parts in JBT"
To view the document, visit: http://community.jboss.org/docs/DOC-16691
--------------------------------------------------------------
h1. Testing visual parts in JBT
h4. Document goal
This article should provide basic overview of http://www.eclipse.org/swtbot/ SWTBot test development for various http://www.eclipse.org/gef/ GEF based eclipse parts and other graphical representations.
h4. GEF Introduction for SWTBot test developers
Graphical Editing Framework (GEF) is widely used in http://www.jboss.org/tools JBoss Tools Editors as well as many others 3rd party plugins. So there is a need for testing GUI based on it. API provided by SWTBot for GEF parts is available in http://download.eclipse.org/technology/swtbot/galileo/dev-build/apidocs/ org.eclipse.swtbot.eclipse.gef* packages. Top classes are:
* SWTBotEclipseTestCase
* SWTGefBot
SWTBotEclipseTestCase encapsulates SWTGefBot for usage in GEF based tests. SWTBotGef provides high level methods for finding editor, view and viewer. These particular classes are located in http://download.eclipse.org/technology/swtbot/galileo/dev-build/apidocs/ gef.finder.widgets package, namely:
* SWTBotGefEditor
* SWTBotGefView
* SWTBotGefViewer
h4. Usual scenario for GEF bot test:
* Locate GEF editor
* Access some element
* Check state
* Perform operation on it
* Check if operation is done
h4. Example of basic GEF usage
SWTGefBot gefBot = new SWTGefBot();
SWTBotGefEditor editor = gefBot.gefEditor("simple");
SWTBotMultiPageEditor multi = new SWTBotMultiPageEditor(editor.getReference(), gefBot);
multi.activatePage("Diagram");
editor.getEditPart("start").select();
h4. SWTBotExt Limitations
There are several known issues related to GEF SWTBot:
* some elements can't be found via SWTGefBot
* context menu item is not always triggered successfully
* different platform issues
* timing and synchronization
* missing API for particular operations
* unreachable elements attributes from the bot
h4. SWTBotExt GEF
SWTBotExt GEF API tries to solve/workaround some of these limitations/issues and provides fine-grained approach for some operations. It can be found in org.jboss.tools.ui.bot.ext.gef package in org.jboss.tools.ui.bot.ext plug-in. It provides these basic classes:
* SWTBotGefEditorExt - uses SWTBotGefEditor and provides additional routines for figures manipulation
* SWTBotGefViewerExt - provides methods for finding root figure
* SWTBotGefFigure - provides access to GEF figure and it's attributes
* SWTBotGefFinder - can finds particular elements like editor canvas, etc.
* SWTBotGefMouse - general mouse controller for GEF Canvas. Can be used in your GEF api or outside as well
* SWTGefContextMenuExt - context menu controller resolving bot GEF context menu issues
* SWTArranger - provides facility for arranging figures on canvas like resolving empty area, etc.
h4. Example changing label on a figure
SWTBotGefEditorExt editor = new SWTBotGefEditorExt("simple");
SWTBotGefFigure label = editor.labelFigure("text");
editor.setLabelText(label, "new_text");
editor.save();
h4. Zest components
http://www.eclipse.org/gef/zest/ GEF Zest API provides draw2d based components for visual data representation without editing features. Since SWTBot doesn't provide API for Zest manipulation SWTBotExt tries to cover this area
* SWTBotZestBot
* SWTBotZestGraph
* SWTBotZestContextMenu
* SWTBotZestNode
* SWTBotZestConnection
h4. Basic example of Zest Bot usage
SWTZestBot zestBot = new SWTZestBot();
SWTBotZestGraph graph = zestBot.getZestGraph(0);
SWTBotZestNode node = graph.node("Input Task");
node.click();
SWTBotZestContextMenu menu = node.contextMenu();
menu.clickMenu("Add Task","Java Mapping");
graph.node("Input Task").click();
graph.connection(graph.node("Input Task"), graph.node("Java Mapping")).click();
h4. General approach for resolving issues
Area of Visual representation used in Eclipse editors and viewers is quite wide and there can scenarios where SWTBot and even SWTBotExt API can fail (based on editors implementations, platform issues, etc). Specific treatment for these cases is often needed so there is some general approach how to resolve them. Let's say we need to manipulate some element on editor and we are not able to do that via SWTBot. General approach is to:
* Get as deep as possible via SWTBot or SWTBotExt - to get at least an editor
* Find root figure - to be able to access rest of the element figures
* Find particular figures and get their boundaries
* Perform needed operation (via SWTBotMouse for example)
* if it's general problem, implement some API for further usage
h4. Other notes
Since there are quite often changes related to SWTBot GEF API not everything described here must be necessary best approach. So please watch http://www.eclipse.org/swtbot/downloads.php SWTBot for latest updates or use an approach which fits you best.
h4. Related links
* http://www.eclipse.org/swtbot/ SWTBot Main Page
* http://download.eclipse.org/technology/swtbot/galileo/dev-build/apidocs/ SWTBot Javadoc
* http://www.eclipse.org/gef/ Eclipse GEF
* http://www.eclipse.org/gef/zest/ Eclipse Zest
h4. Further tasks related to GEF Bot Ext
* Refactor and clean API
* More generic approach
* Separate from main BotExt plugin
* Contribute into SWTBot if possible
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16691]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 8 months
[EJB3] - EJB3 and Struts2 with CDI
by rop
rop [http://community.jboss.org/people/rop] created the discussion
"EJB3 and Struts2 with CDI"
To view the discussion, visit: http://community.jboss.org/message/597639#597639
--------------------------------------------------------------
Hi,
Under Jboss 6, I am trying to make a Stateless EJB accessible in a Struts2 Action-class with CDI.
They are in an ejb-jar and war-app, packed into a common ear-file.
Following some examples I found, I created an empty *beans.xml* in the WEB-INF folder,
I annotated the EJB-class with
*@Stateless @Named("myEjb") public class MyEjb ...*
and in the Action-class I try
* @Inject MyEjb myEjbM;*
Apparanetly, this is not enough, since at deploy-time I get the error below.
Looks like there is some BeanManager item missing in the JNDI-context.
How do I get it in there?
Any clues?
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss-switchboard:appName=foobar-ear-0.0.1,module=foobar-webapp-0.0.1"
is missing the following dependencies:
Dependency "java:global/cdi/foobar-ear-0.0.1/foobar-webapp-0.0.1/BeanManager"
(should be in state "Installed", but is actually in state "** NOT FOUND
Depends on 'java:global/cdi/foobar-ear-0.0.1/foobar-webapp-0.0.1/BeanManager' **")
Deployment "jboss.web.deployment:war=/foobar-webapp" is missing the following dependencies:
Dependency "vfs:///C:/program1/jboss6/server/default/deploy/foobar-ear-0.0.1.ear_WeldBootstrapBean"
(should be in state "Create", but is actually in state "**ERROR**")
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/597639#597639]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Web Services] - Re: JBoss 5.1.0, Apache CXF, Spring, and WSS4J issue
by Alessio Soldano
Alessio Soldano [http://community.jboss.org/people/asoldano] created the discussion
"Re: JBoss 5.1.0, Apache CXF, Spring, and WSS4J issue"
To view the discussion, visit: http://community.jboss.org/message/597751#597751
--------------------------------------------------------------
Hi John,
ok, so you're not using jbossws-cxf and this is a generic issue with using Apache CXF directly on top of JBoss Application Server. I might provide some hints / suggestion to help, but generally speaking one of aims of the JBossWS-CXF project is exactly solving this kind of integration problems.
> john h wrote:
>
> Thanks Alessio for the response. Forgive me I'm relatively new to this.
>
> I haven't done anything with the JBoss 5.1.0 GA server that is downloaded other than adding the ojdbc.jar to access an Oracle datasource.
>
> Deploying works fine and other than the addition of the wss4j security the web service works fine. Here's the beginning of the stack trace happening when I call any web service interface method:
>
> 2011-04-01 11:09:00,126 ERROR [STDERR] (http-127.0.0.1-8080-2) java.lang.ClassNotFoundException: org.apache.ws.security.transform.STRTransform
> from mailto:BaseClassLoader@110769b%7BVFSClassLoaderPolicy@1daf835%7Bname=vfsfile:/C:/Documents%20and%20Settings/webedj/Desktop/GA/jboss-5.1.0.GA/server/default BaseClassLoader@110769b{VFSClassLoaderPolicy@1daf835{name=vfsfile:/C:/Documents%20and%20Settings/jj/Desktop/GA/jboss-5.1.0.GA/server/default
> /deployers/jbossws.deployer/ http://community.jboss.org/mailto:domain=ClassLoaderDomain@19c7c21{name=D... domain=ClassLoaderDomain@19c7c21{name=DefaultDomain parentPolicy=BEFORE mailto:parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@1de3f2d parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@1de3f2d}
> roots=[MemoryContextHandler@14513156[path= context=vfsmemory://ap403g-tsevsv-glz909pu-1-glz910q2-e real=vfsmemory://ap403g-tsevsv-glz909pu-1-glz910q2-e],
What's the full stacktrace?
And where did you add the wss4j lib? It seems there's some kind of clash, given the classloader for the jbossws.deployer is trying to access that apache class. Or the classloading setup you mention below is preventing jbossws from accessing wss4j classes (and why does it need them?).
>
> As far as I know I haven't done anything with jbossws-cxf as all the CXF stuff I'm working with is directly Apache. I assume the jbossws-cxf stack is JBoss specific? If so I would prefer to stay away from a vendor specific implemetation of anything as I don't want to tie it to JBoss in the future.
Besides jokes (how is that JBossWS is vendor specific and Apache CXF and Spring later are not? ;-) ), JBossWS-CXF provides a integration layer for CXF on top of JBoss AS. So you can use plain jaxws api and stay really on a 100% portable application, or you can use the apache cxf api (annotations, interceptors, ...) with it. Take a look at the documentation for more info.
>
> When I deploy the war, I also make sure the war file uses the library files I include in the war file and not the ones in JBoss via the addition of a jboss-web.xml file telling it to do so:
>
> <jboss-web>
> <class-loading java2ClassLoadingCompliance="true">
> <loader-repository>
>
>
>
> com.comp.wu:loader=MyService.war
>
> </loader-repository>
> </class-loading>
> </jboss-web>
>
OK, in any case it's not clear if you're deploying a ws endpoint or you have a servlet app acting as a ws client.
The full stacktrace above might reveal more on when the exception is thrown and what throws it.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/597751#597751]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss AOP] - How to work with aspects?
by Myryan Dzhachvadze
Myryan Dzhachvadze [http://community.jboss.org/people/narayan812] created the discussion
"How to work with aspects?"
To view the discussion, visit: http://community.jboss.org/message/597731#597731
--------------------------------------------------------------
Hi.
I am a little noob in Jboss AOP. I read a lot of manual and undestood that aspects in Jboss can be defined
with xml or annotations. I prefer to use annotations. So, almost each articles told how to write aspect but
I didn't find how to configure jboss to work wit it. I undestood that I can create for instance class like this:
@Aspect( scope = Scope.PER_VM )
public class LogControlAspect
{
public static final Logger log = Logger.getLogger( "defgoLogger" );
@Bind( pointcut = "execution(net.defgo.logger.impl.DiaryLoggerBean+ * *(..))" )
public Object trace( Invocation invocation ) throws Throwable
{
log.debug( "!!!! ENTER !!!!" );
Object method = invocation.invokeNext();
log.debug( "!!!! EXIT !!!!:" + method );
return method;
}
}
but what should I do to force it work? I think it should be some lines in jboss configs but I can't find what exactly.
Coult you please tell how to work with aspects?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/597731#597731]
Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[EJB3] - Jboss6(final) EJB3 deployment error
by caoshan cao
caoshan cao [http://community.jboss.org/people/lightening] created the discussion
"Jboss6(final) EJB3 deployment error"
To view the discussion, visit: http://community.jboss.org/message/597694#597694
--------------------------------------------------------------
Dear all, the helloworld.jar couldn't be run on Jboss6.0 Final.Here is the console information.
Could anyone know what's wrong with it?
best regards,
thanks in advance!
13:09:40,821 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@293214931{vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar}
13:09:40,823 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@293214931{vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar}
13:09:40,823 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@293214931{vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar}
13:09:40,846 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Real: name=vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_24]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_24]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_24]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_24]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_24]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_24]
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:662) [:1.6.0_24]
Caused by: java.lang.RuntimeException: Failed to load component class: sample.HelloBean from loader: BaseClassLoader@63124f52{vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar}
at org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer$WebServiceDeclarationAdapter.getComponentClass(WSEJBAdapterDeployer.java:232) [:6.0.0.Final]
at org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer$WebServiceDeclarationAdapter.getAnnotation(WSEJBAdapterDeployer.java:214) [:6.0.0.Final]
at org.jboss.webservices.integration.util.ASHelper.isWebServiceBean(ASHelper.java:239) [:6.0.0.Final]
at org.jboss.webservices.integration.util.ASHelper.getJaxwsEjbs(ASHelper.java:222) [:6.0.0.Final]
at org.jboss.webservices.integration.deployers.WSTypeDeployer.isJaxwsEjbDeployment(WSTypeDeployer.java:140) [:6.0.0.Final]
at org.jboss.webservices.integration.deployers.WSTypeDeployer.internalDeploy(WSTypeDeployer.java:73) [:6.0.0.Final]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
... 37 more
13:09:40,858 WARN [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error
vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar -> org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar
DEPLOYMENTS IN ERROR:
Deployment "vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar" is in error due to the following reason(s): java.lang.RuntimeException: Failed to load component class: sample.HelloBean from loader: BaseClassLoader@63124f52{vfs:///home/caoshan/Work/DevelopTrunk/jboss_6.0/server/default/deploy/HelloWorld.jar}
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_24]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_24]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_24]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_24]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_24]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_24]
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:662) [:1.6.0_24]
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/597694#597694]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Microcontainer] - [EjbDeployer] Verify failed; continuing: java.lang.NoClassDefFoundError:
by manish jain
manish jain [http://community.jboss.org/people/mkj] created the discussion
"[EjbDeployer] Verify failed; continuing: java.lang.NoClassDefFoundError:"
To view the discussion, visit: http://community.jboss.org/message/597683#597683
--------------------------------------------------------------
I am trying to deploy my application to jboss-6.0.0.Final.
The structure of our application is
/server/.../deploy
--A.WAR (exploded)
--B.EAR (exploded)
----B1.WAR (not exploded)
Below class ValidationException is avialble inside the B1.war file but for some reason it says NoClassDefFoundError.
I didn't find any documentation help for class loading related configuration for jboss-6.
Can anyone please help me out ?
17:04:26,438 INFO [ContextConfig] WARNING: Security role name username used in an <auth-constraint> without being defined in a <security-role>
17:04:27,595 WARN [EjbDeployer] Verify failed; continuing: java.lang.NoClassDefFoundError: com/generic/exceptions/ValidationException
at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_24]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [:1.6.0_24]
at java.lang.Class.privateGetPublicMethods(Class.java:2547) [:1.6.0_24]
at java.lang.Class.getMethods(Class.java:1410) [:1.6.0_24]
at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:686) [:6.0.0.Final]
at org.jboss.verifier.strategy.EJBVerifier20.verifySessionBean(EJBVerifier20.java:848) [:6.0.0.Final]
at org.jboss.verifier.strategy.EJBVerifier20.checkSession(EJBVerifier20.java:78) [:6.0.0.Final]
at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:183) [:6.0.0.Final]
at org.jboss.ejb.deployers.EjbDeployer.deploy(EjbDeployer.java:261) [:6.0.0.Final]
at org.jboss.ejb.deployers.EjbDeployer.deploy(EjbDeployer.java:74) [:6.0.0.Final]
at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]
at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.0.0.Final]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Caused by: java.lang.ClassNotFoundException: com.generic.exceptions.ValidationException from BaseClassLoader@124ab8f0{vfs:///jboss-6.0.0.Final/server/default/deploy/ans/ansHealthB2B.ear}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]
at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_24]
... 58 more
17:04:27,635 ERROR [AbstractKernelController] Error installing to Real: name=vfs:///jboss-6.0.0.Final/server/default/deploy/ans/ansHealthB2B.ear state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
at org.jboss.ejb.deployers.EjbDeployer.deploy(EjbDeployer.java:276) [:6.0.0.Final]
at org.jboss.ejb.deployers.EjbDeployer.deploy(EjbDeployer.java:74) [:6.0.0.Final]
at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/597683#597683]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Tools] - Using Sapphire Doesn't Make You Blue! - Experiments with a new UI framework
by Brian Fitzpatrick
Brian Fitzpatrick [http://community.jboss.org/people/bfitzpat] modified the blog post:
"Using Sapphire Doesn't Make You Blue! - Experiments with a new UI framework"
To view the blog post, visit: http://community.jboss.org/community/tools/blog/2011/04/04/using-sapphire...
--------------------------------------------------------------
While at EclipseCon a few weeks ago, I heard about a new framework at Eclipse for quickly developing Eclipse editors for XML files, especially XML configuration files. As Konstantin Komissarchik, one of the lead developers on Sapphire, pointed out in the summary for his EclipseCon talk - "[Sapphire] is a UI building framework that allows developers to specify UI in terms of higher level constructs like property editors instead of widgets and layouts. This paradigm results in several orders of magnitude improvement in developer productivity while simultaneously delivering better quality UI that is easier to maintain."
Though I missed his talk, I had a chance to sit down with Konstantin afterwards and he showed off what his framework can do. To say the least, I was excited. One of the things we do a lot of in JBoss tools is editing XML configuration files. We have them everywhere. And we don't really have a consistent look and feel to any of them. The other thing I was excited to see was the potential integration with Graphiti, a framework for graphical editors. Perhaps they've hit upon the "Holy Grail" of UI development?
Here's an example from one of the samples that comes with the Sapphire framework:
http://community.jboss.org/servlet/JiveServlet/showImage/38-3736-16090/sa... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3736-1609...
I wanted to find out. So when I got back from my trip, I started playing with Sapphire locally. You have to keep in mind that this is very early in the process for Sapphire. The version I'm working with is 0.3 and they're providing bug fixes nearly every day, which means things may break or change between updates. Honestly that's fine - Konstantin said they're using the framework at Oracle and have commercial editors out in the wild based on this technology, so it has to be pretty good, right?
We have a runtime project at JBoss that's rolling along at a pretty good clip now. It's the next generation of our ESB called SwitchYard. You can check out the http://www.jboss.org/switchyard SwitchYard Community Page for more details. But they've been working on the format of an XML configuration file that we'll need to develop an editor for. It seemed like the perfect opportunity to put Sapphire to the test
.
Over the course of the last 5 or 6 business days, I've probably put in 20-30 hours on this editor. I've run into a few issues here and there, most because I didn't grok the framework fully at the start. But I've ended up with a good first cut that is able to edit the initial sample of the configuration file. And that's amazing to have something that even sort of works in that short a timeframe.
Ultimately developing an editor in Sapphire boils down to two main things:
* A set of Java interface files that map to different parts of your XML configuration.
* And a Sapphire Definition (sdef) file, which defines how different parts of the UI are rendered.
Think of the Java interface files as a quick and easy Java bean representation of your XML. So various element structures and properties are reduced to getters and setters in the interfaces. All you do from there is take the Switchyard annotations and indicate how to tie those properties back to the XML you're editing. The Sapphire framework then takes those annotations to define a model (using EMF of course see the correction below) on the fly representing your XML. This is the "Model" part of your typical Model-Viewer-Controller approach.
[Correction: Konstantin pointed out that "Sapphire does not use EMF for any part of modeling or data binding. The developer specifies semantics in interfaces and annotations. The annotation processor generates implementation classes. The XML binding code directly reads and writes on the live DOM API exposed by the XML editor."]
Then the SDEF file describes how to present that generated model to the user in UI form. Want to generate a view? Cool. Wizard or dialog? Cool. Editor? Cool. And you can define reusable components of the UI so you don't have to redefine everything if you decide to go, for example, from a dialog to an editor later on. It's nice because there's instant integration between the Outline view and the Editor for example, so you don't have to worry about the niggly little bits that can sometimes consume days at a time to get right.
What's awesome is that the Sapphire UI Definition Editor is itself written in Sapphire. Talk about eating your own dog food. :)
Here's a screen shot of what I have working so far:
http://community.jboss.org/servlet/JiveServlet/showImage/38-3736-16091/sw... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3736-1609...
There are some gotchas:
* Annotation processing is not turned on by default for projects. To do that, go to Project Properties -> Java Compiler -> Annotation Processing -> Enable annotation processing.
* To see the classes generated by the Sapphire framework for your interfaces, you have to turn off the filter that hides files & folders starting with "." Those generated classes appear in the ".apt_generated" folder.
* It's taken me several days to grok how to get XML namespace declarations just right with the XmlNamespace and XmlNamespaces and XmlRootBinding annotations. But it boils down to declaring them when you use them. Easier said than done, but it makes sense once you've played with it a bit.
* You have to make sure that you name things consistently. This is one of the areas I have run into again and again. The name of the property field, property name, getter and setter must be consistent or the framework complains loudly at runtime. So if you have a property named "SOAPBindings", you need to make sure the property is PROP_SOAPBINDINGS, the property name is "SOAPBindings" and the getter is "getSoapbindings()".
Why? Seems to be something with how the processor is looking at the capitalization of various bits in the model and if one is out of whack, they're all out of whack. You can make it a bit more consistent by adding underscores to the PROP_ declaration - such as PROP_SOAP_BINDINGS would need the property name "SoapBindings" and the getter would be "getSoapBindings()" - the underscore hints that there's a uppercase letter coming up.
That's about it at this point. Now that I have the structure working and can define/modify/delete things via the editor, I want to go in and add some polish. Things like boolean options - true/false, combo boxes, validation, etc. After that's done, I'll start playing some with the Graphiti integration - but I'm not quite ready to tackle that yet.
Interested in playing with Sapphire yourself? Here are a few links to get you started:
* Main Sapphire page: http://www.eclipse.org/sapphire/ http://www.eclipse.org/sapphire/
* Konstantin's Sapphire-related blog articles: http://lt-rider.blogspot.com/search/label/eclipse-sapphire http://lt-rider.blogspot.com/search/label/eclipse-sapphire
* Until Indigo is released, Sapphire requires the latest milestones of Graphiti to work correctly. You can find that update site here: http://download.eclipse.org/graphiti/updates/milestones/ http://download.eclipse.org/graphiti/updates/milestones/
* But you can also download latest built packages from Eclipse Hudson server: https://hudson.eclipse.org/hudson/job/sapphire-0.3.x/ https://hudson.eclipse.org/hudson/job/sapphire-0.3.x/
A big thanks to Konstantin for helping me out on the Sapphire mailing list and forum. He's been very patient dealing with me over the last week!
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/community/tools/blog/2011/04/04/using-sapphire...]
13 years, 8 months