[JBoss Tools] - Forging of the Forge Tools
by Koen Aers
Koen Aers [http://community.jboss.org/people/koen.aers%40jboss.com] modified the blog post:
"Forging of the Forge Tools"
To view the blog post, visit: http://community.jboss.org/community/tools/blog/2011/01/27/forging-of-the...
--------------------------------------------------------------
Over the past few weeks, I have started the integration of http://seamframework.org/Documentation/SeamForge Seam Forge into http://www.jboss.org/tools JBoss Tools. Today I am happy to present the first results of this work.
h1. Installation
If you are familiar with the Eclipse platform the installation should be a breeze for you. The easiest way is to http://www.eclipse.org/downloads/ download a recent Eclipse version and use the 'Help->Install New Software...' wizard to install the latest and greatest JBoss Tools from the http://download.jboss.org/jbosstools/updates/development/ update site. Don't forget to include the Maven integration for Eclipse as we will need it later on. After this, use the same mechanism to install the forge tools from http://download.jboss.org/jbosstools/extras/forge-tools.zip this update archive. Restart Eclipse and you should be set to go.
http://community.jboss.org/servlet/JiveServlet/showImage/38-3555-11210/In... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3555-1121...
h1. Starting and Stopping
Now that the installation is dealt with, let's have a look whether everything went ok. You can bring up the "Forge Console View" by selecting 'Window->Show View->Other...' and then 'Seam Forge->Forge Console'.
http://community.jboss.org/servlet/JiveServlet/showImage/38-3555-11212/Fo... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3555-1121... As you can see the Forge Console View has a toolbar and a dropdown menu that allow you to start and stop Forge. The initial message pane indicates that Forge is not running. Let's get going and push the 'Start Forge' button.
http://community.jboss.org/servlet/JiveServlet/showImage/38-3555-11213/Fo... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3555-1121...
After a while, the Forge welcome banner appears and you are invited to enter forge commands. The very convenient tab completion suggesting the list or possible commands does not work yet, but you can get the suggestions anyway by pressing tab followed by a return. Also, the coloring is not yet enabled like when using Forge directly in a terminal window. When you're done working you can stop Forge by pushing the 'Stop Forge' button.
h1. Create a Project
To make things a bit more interesting, let's try the tutorial from http://community.jboss.org/people/lincolnthree/blog/2010/12/31/forge-100a... Lincoln's blog. We create a new project called 'foo' with top level package 'org.foo':
[no project] workspace $ new-project --named foo --topLevelPackage org.foo
http://community.jboss.org/servlet/JiveServlet/showImage/38-3555-11214/Fo... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3555-1121... Now the project is created but unfortunately, we cannot see it in our workspace. This is one of the obvious features that need to be added. For now, we have to import the project in the workspace. Here is where the Maven plugins come into play. For Forge projects are indeed Maven projects too. Select 'File->Import...' and then 'Maven->Existing Maven Project'. Point the wizard at the workspace root and the 'foo' project should show up in the list of projects to import. After importing the project shows up in the package explorer.
http://community.jboss.org/servlet/JiveServlet/showImage/38-3555-11215/Pa... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3555-1121... We enter the next few commands from the tutorial:
[foo] foo $ install forge.scaffold
[foo] foo $ new-entity --named Person
[foo] Person.java $ new-field string --fieldName firstName
[foo] Person.java $ new-field string --fieldName lastName
[foo] Person.java $ cd ..
[foo] domain $ scaffold generate-metawidget-jsf *.java
To see which changes are performed in the project by these commands we need to refresh the project.
http://community.jboss.org/servlet/JiveServlet/showImage/38-3555-11216/Co... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3555-1121...
Again, it would be good if after issuing each command the relevant changes would be highlighted by setting the relevant folder, file or file element selected. This is more work for the future.
h1. The Future
As suggested, a lot more work is waiting... Some of the features that are on the list are:
* Adding a preference page to be able to add and select Forge runtimes.
* Support for tab completion suggesting the list of possible commands.
* Support for command history.
* Support for colors in the Eclipse Forge Console.
* Show appropriate feedback after each command.
* etc.
If you are interested in helping out implementing some of these features or if you just want to view the code implementing the current console, you can find the sources in the https://anonsvn.jboss.org/repos/jbosstools/trunk/forge/ JBoss Tools SVN.
Happy forging!
Koen
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/community/tools/blog/2011/01/27/forging-of-the...]
15 years, 2 months
[Javassist] - does javassist have a Proxy like class?
by null null
null null [http://community.jboss.org/people/deanhiller] created the discussion
"does javassist have a Proxy like class?"
To view the discussion, visit: http://community.jboss.org/message/583685#583685
--------------------------------------------------------------
I am wondering if javassist has a class just like jdk Proxy BUT for classes where if you call method.invoke it would
really translate to super.<method>() such that it would be really easy to create wrappers around classes and interfaces
and such using mostly the same code...in fact, the code I think could be mostly the same for creating a dynamic class
from an interface and a class from a class.
Does something like that exist? or if it is not in the library, I am sure someone probably thought of it already. anyone
have code for something like that so I don't have to write it myself?
I imagine this could be done by making the code written for a method to just invoke the invocationHandler that is passed
in to the constructor of my class(but again, I hope someone already has this).
thanks,
Dean
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/583685#583685]
Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 2 months
[JBoss Tools] - JBoss Tools 3.2 CR1 - Killer Of Bugs!
by Max Rydahl Andersen
Max Rydahl Andersen [http://community.jboss.org/people/max.andersen%40jboss.com] modified the blog post:
"JBoss Tools 3.2 CR1 - Killer Of Bugs!"
To view the blog post, visit: http://community.jboss.org/community/tools/blog/2011/01/27/jboss-tools-32...
--------------------------------------------------------------
http://in.relation.to/service/File/10824 http://in.relation.to/service/File/10824
h4. 3.2.0.CR1
[ http://www.jboss.org/tools/download Download] [ http://download.jboss.org/jbosstools/updates/development Update Site] [ http://marketplace.eclipse.org/content/jboss-tools-1 Market Place] [ http://docs.jboss.org/tools/whatsnew What's New] [ http://docs.jboss.org/tools/3.2.0.Beta1/ Documentation] [ http://www.jboss.com/index.html?module=bb&op=viewforum&f=201 Forums] [ http://jira.jboss.com/jira/browse/JBIDE JIRA] [ http://twitter.com/jbosstools Twitter]
> *Note:* Downloads are now being served from download.jboss.org while we wait for Sourceforge getting their http://sourceforge.net/apps/wordpress/sourceforge/2011/01/27/service-down... issue fixed.
This release is squashing https://issues.jboss.org/secure/ReleaseNote.jspa?projectId=10020&version=... 400+ issues thus if you use JBoss Tools milestones it is time to upgrade and if you find remaining issues http://community.jboss.org/thread/159819 report them as soon as possible.
http://docs.jboss.org/tools/whatsnew What's New covers the usability fixes there have been added, and a few new additions/improvements.
h2. Top 6 on Eclipse Marketplace
Even though we haven't been on Eclipse Marketplace for long we are already the 6th most downloaded Eclipse plugin within 30 days on Eclipse Marketplace; and in 9th place of all time.
Thank you for the interest and usage - if you don't know Eclipse Marketplace, you can see how to use it http://community.jboss.org/en/tools/blog/2010/10/21/jboss-tools-on-eclips... here.
For those already using it, I encourage you to go and give us your star or even a review at our http://marketplace.eclipse.org/content/jboss-tools-1 Eclipse Market Place page
h2. Automatic Runtime Detection
First of all this release finally enables one of my favorite new features "Automatic Runtime Detection". It's been possible for a while now to use the "Search" button under JBoss Tools to find JBoss runtimes and have them configured and setup in the IDE for direct usage without having to set up all the individual parts.
In this release we have gone a bit further and allowed you to configure a set (one or many) of directories that JBoss Tools will scan on new workspaces or if you enable it at every startup; if anything new is found it will show the new items and you can then say if you want the runtimes to be installed or not.
This means when you install a new version of JBoss AS, Seam, Drools, EAP, SOA-P, etc. you can simply put in this "watched" directory and JBoss Tools will configure them for you in the IDE. In the future we will add more types of runtime distribution detection such as Java JDK's.
This feature is available under Eclipse Preferences in *JBoss Tools > JBoss Tools Runtime Detection*
h2. CDI Improvements
For Context Dependency Injection (CDI) we've added a few quick fixes against some of the more common issues our validator finds.
This allows you to use Ctrl+1 on warnings and fix issues. For example fixing @Produces annotations on non-static methods in a Session Bean by making the method static.
We've also added support for the Maven integration to enable CDI automatically if/when your pom.xml file referenes the CDI api jars. Making it simple to import a Maven based CDI project and have all features enabled.
h2. Feedback
There is more shown in http://docs.jboss.org/tools/whatsnew What's New, take a look, try the release and let us know how it goes! If nothing major is found we'll be releasing the final version within the next couple of weeks.
Have fun!
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/community/tools/blog/2011/01/27/jboss-tools-32...]
15 years, 2 months
[JBoss Tools] - Tools & JSF 2.0
by Eric J. Van der Velden
Eric J. Van der Velden [http://community.jboss.org/people/ericjvandervelden] created the discussion
"Tools & JSF 2.0"
To view the discussion, visit: http://community.jboss.org/message/582589#582589
--------------------------------------------------------------
Hello,
If I do File -> New -> Seam Web Project and choose JSF 2.0 and for the rest choose the defaults, I cannot deploy the application. The project is called 'hello' and I see the errors,
2011-01-23 18:25:13,087 INFO [javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) Initializing Mojarra 2.0.3 ( b05) for context '/hello'
2011-01-23 18:25:14,975 INFO [javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) Unsanitized stacktrace from failed start...: javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a ComponentConfig
at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:292) [:2.0.3-]
...
2011-01-23 18:25:14,993 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/hello]] (HDScanner) Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossMojarra20ConfigureListener: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.jboss.seam.ui.handler.CommandButtonParameterComponentHandler.<init>(javax.faces.view.facelets.ComponentConfig)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:351) [:2.0.3-]
...
2011-01-23 18:25:15,000 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:800) [:2.0.3-]
...
2011-01-23 18:25:15,089 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=jboss.web.deployment:war=/hello state=Create mode=Manual requiredState=Installed: org.jboss.deployers.spi.DeploymentException: URL file:/home/eric/Eclipse/Java/3.6_6/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1295771824448/deploy/hello-ear.ear/hello.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:325) [:6.0.0.Final]
...
Thanks,
Eric J.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582589#582589]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 2 months
[Snowdrop] - Ear with jar and war with pure spring: how to configure?
by Alexey Ulyanov
Alexey Ulyanov [http://community.jboss.org/people/re3lex] created the discussion
"Ear with jar and war with pure spring: how to configure?"
To view the discussion, visit: http://community.jboss.org/message/583390#583390
--------------------------------------------------------------
Hi guys!
At first thanks to snowdrop team for this useful deployer!
I have two modules within ear: MyProject.jar and MyProject.war.
MyProject.jar contains some spring services, hibernate domains and dao modules.
MyProject.war contains some REST resources and MVC spring components to have web access to services which are placed in MyProject.jar.
I don't use any EJB beans and to deploy MyProject.jar I use JbossSpring deployer 3.3 (as I use Spring 3.0.x)
So when I run jboss I see in the log that MyProject.jar is loaded twice: one time once JbossSpring deployer is deploying MyProject.jar and second time once MyProject.war is deployed by WarDeployer (I'm not sure who deploys war).
Looks like this happens because WarDeployer loads war not in the same scope that JbossSpring deployer loads jar
Can you please point me on to mistakes in my jboss&spring configuration?
Here is configuration for each module:
> MyProject.ear
> +MyProject.jar
> | +META-INF
> | +com //compiled classes are there
> | +core-spring.xml
> | +core-app-context.xml //part of spring's services config and annotation scanning
> | +core-db-context.xml //part of spring's db config
> |
> +MyProject.war
> +META-INF
> +WEB-INF
> +classes //compiled classes are there
> +web.xml
> +web-app-context.xml //some security configuration and all mvc-related stuff
>
core-spring.xml:
> <beans>
> <bean id="core.spring.context" class="org.springframework.context.support.ClassPathXmlApplicationContext">
> <constructor-arg>
> <list>
> <value>classpath*:/META-INF/*-app-config.xml</value>
> </list>
> </constructor-arg>
> </bean>
> </beans>
web.xml (here is only neccessary part of file):
> <web-app id="WebApp_ID" version="2.4" xmlns=" http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation=" http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> <display-name>MyProject</display-name>
>
> <context-param>
> <param-name>parentContextKey</param-name>
> <param-value>core.spring.context</param-value>
> </context-param>
> <context-param>
> <param-name>locatorFactorySelector</param-name>
> <param-value>classpath*:/META-INF/core-spring.xml</param-value>
> </context-param>
>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>classpath*:/WEB-INF/*-app-context.xml</param-value>
> </context-param>
> <listener>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> ...
> <servlet>
> <servlet-name>ScoreCard</servlet-name>
> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
> <init-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>classpath*:/WEB-INF/*-app-config.xml</param-value>
> </init-param>
> </servlet>
> <servlet-mapping>
> <servlet-name>ScoreCard</servlet-name>
> <url-pattern>*.action</url-pattern>
> </servlet-mapping>
> ...
> </web-app>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/583390#583390]
Start a new discussion in Snowdrop at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 2 months