JDAL 2.0.M1 released (Vaadin 7)

Hello.

I’m pleased to announce the first beta release of JDAL version 2.0 with the following new features:

  • Vaadin 7 Support
  • New Spring Framework custom namespace for Vaadin.
  • Form Validation with JSR-303 annotations.
  • New support class for building forms. BoxFormBuilder.
  • New Scope of Spring Framework for Vaadin 7.
  • Automatic Binding between forms and models.

You can download the sample application from git repository hosted on github:

https://github.com/chelu/jdal-samples.git

The sample application is deployed in


http://www.jdal.org/jdal-vaadin-sample-2.0/

To use the library, use the following configuration in maven:


<repositories>
       <repository>
           <id>jdal</id>
           <name>JDAL Repository</name>
           <url>http://www.jdal.org/repo</url>
       </repository>
</repositories>

<dependency>
    <groupId>org.jdal</groupId>
    <artifactId>jdal-vaadin</artifactId>
    <version>2.0.M1</version>
</dependency>

Thanks for testing JDAL libraries.

– Jose Luis Martin.

Hi all

I’ve just deployed a new version of the sample application including the following new features:

  • Configurable Login Form: org.jdal.vaadin.auth.LoginView
  • Configurable button bar for vaadin navigator: org.jdal.vaadin.ui.ButtonBar
  • Serializable proxies are now configurable by annotations: @SerializableProxy
  • Some Improvements in form builder, BoxFormBuilder
  • Fix internationalizations issues.


Sample application is deployed in
http://www.jdal.org:8080/vaadin-sample-2.0.M2
use admin / admin as username / password.
Application source code is published on github:
https://github.com/chelu/jdal-samples/tree/master/vaadin

Cheers,

– Jose

Hi All,
I have problem when using JDL samples in ( view-content.xml and applicaitonContext.xml):

<jdal:serializable-proxy />

and also : <vaadin:button-bar id="buttonBar" scope="prototype">
Problem is : cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'vaadin:button-bar'.
Thanks for help

Hi Said,

Is a runtime exception or a IDE error? . Could you test if running the command

mvn jetty:run 

from sample base directory the application run fine?

If i’ts a error from an IDE, what version it is?.

Thanks

Hi Jose,
Thank you for taking the time to answer me .
The problem appears on the IDE. I have Ecplise Kepler 4.3 IDE.
After runing mvn jetty:run the problem was solved.
I think it was because of maven version ( I used maven integrated on eclipse to resolve dependencies).
Now the project is working perfectly
Thank you very much

Dear Jose,
I have another questions :
1- What should I modify to use an instance of MySQL data base ( non embedded H2 data source) ?
Should I modify the “dao-context.xml” file : this part : <jdbc:embedded-database id="dataSource" type="H2"> <jdbc:script location="classpath:create.sql"/> <jdbc:script location="classpath:import.sql"/> </jdbc:embedded-database> 2- jdal-vaadin-jpa project is working perfectly with Apache Tomcat server, but when I’m trying to deploy war file in Oracle GlassFish 4.0 server this error appear :

[2015-03-02T16:05:42.182+0100]
 [glassfish 4.1]
 [INFO]
 [] []
 [tid: _ThreadID=43 _ThreadName=Thread-9]
 [timeMillis: 1425308742182]
 [levelValue: 800]
 [[
  2015-03-02 16:05:42,182 ERROR [ContextLoader]
 Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context]

Offending resource: ServletContext resource 
[/WEB-INF/applicationContext.xml]

    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)

[2015-03-02T16:05:42.182+0100] [glassfish 4.1] [SEVERE] [AS-WEB-CORE-00175] [javax.enterprise.web.core] [tid: _ThreadID=43 _ThreadName=admin-listener(3)] [timeMillis: 1425308742182] [levelValue: 1000] [[ Exception during cleanup after start failed org.apache.catalina.LifecycleException: Manager has not yet been started at org.apache.catalina.session.StandardManager.stop(StandardManager.java:935) Thanks you for this great sample project _ and thank you so much for your help
Regards

Hi Said,

to use a MySQL database first create it using the
library.sql
script in
/db
directory of jdal samples. Then delete the jdbc:embedded bean definition and look at end of dao-context.xml file. There is a mysql datasource definition bean inside a mysql bean profile.
Drop the <beans profile="mysql"> ..... </beans>
tags that wrap the mysql datasource definition. Ensure that the file jdbc.properties has the correct configuration for host, user and passsword of your MySQL .

The second question is not related to JDAL, seems like you are missing the spring-context-xxxx.jar in the classpath.

Cheers.

Thank you Jose for these clarifications and for this great sample !

Hi Jose !
This error appear when I’m trying to deploy jdal-vaadin-sample project on GlassFish 4.0 server from Eclipse Kepler (run on server) :

cannot Deploy jdal-vaadin-sample-jpa
deploy is failing=Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context]

Offending resource: ServletContext resource 
[/WEB-INF/applicationContext.xml]
. Please see server.log for more details.

There is no error when doploying in Tomcate server !

Hi jose ,
JDAL is perfectly working with MySql data base after applaying your steps ( deleting the tags that wrap the mysql datasource definition , deleting emmbeded database h2 and adding these dependencies (pom file ) :

<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.6</version>
        </dependency>
<dependency>
            <groupId>c3p0</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.0.4</version>
        </dependency>

Hi Said,

I’m still not tested jdal samples on Glashfish. (I will do it as soon as posible)

I really appreciate your comments about JDAL.

Cheers.