archiecobbs / dellroad-stuff Goto Github PK
View Code? Open in Web Editor NEWMiscellaneous useful stuff for Java projects
Miscellaneous useful stuff for Java projects
"Version 1.0.925 Released September 16, 2014
- Removed arcane @ThreadConfigurable and @ThreadTransactional nobody"
Hello,
Can you put them back please ?
I intend to use this with test parallelisation.
Thank you !
Original issue reported on code.google.com by [email protected]
on 22 Mar 2015 at 3:21
The vaadin7 support is broken at least since beta2. I hacked some 'quick and
dirty' fix at https://github.com/aanno/dellroad-stuff-aanno . This is still
incomplete but perhaps provide a base to work on (or at least as an
counter-example).
In this the old vaadin6 'Application' translate to vaadin7 'VaadinServlet'...
Original issue reported on code.google.com by [email protected]
on 3 Oct 2012 at 3:52
What steps will reproduce the problem?
1. Setup Vaadin app with automatic push
2. Use VaadinUtil.invokeLater(runnable) whereby the Runnable changes the UI
What is the expected output? What do you see instead?
Expected: Task is triggered to run after session is unlocked
Actual: Task is not run until a new action is performed on the client
What version of the product are you using? On what operating system?
dellroad-stuff: 1.0.882
Vaadin: 7.2+
Please provide any additional information below.
The problem is in VaadinUtil.invokeLater(Runnable action). The call to
getPendingAccessQueue() of the VaadinSession is accessed directly without
obtaining a session lock. While Vaadin claims in the javadocs you can do this,
it breaks push support. This method should look like this:
public static Future<Void> invokeLater(VaadinSession session, Runnable action) {
if (session == null)
throw new IllegalArgumentException("null session");
if (action == null)
throw new IllegalArgumentException("null action");
return session.access(action);
}
Additionally, VaadinApplication.invokeLater(Runnable action) should return the
Future<Void>.
Original issue reported on code.google.com by [email protected]
on 14 Jun 2014 at 4:36
pom.xml
snippet <pluginManagement>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifestEntries>
<Build-Datetime>${build.datetime}</Build-Datetime>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.dellroad</groupId>
<artifactId>dellroad-stuff-maven-plugin</artifactId>
<version>2.4.10</version>
<executions>
<execution>
<id>exec-date</id>
<configuration>
<propertyName>build.datetime</propertyName>
<command>date</command>
<parameters>
<parameter>+'%Y/%m/%d %H:%M:%S %z'</parameter>
</parameters>
</configuration>
<goals>
<goal>exec-set-property</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
META-INF/MANIFEST.MF
in output jar fileManifest-Version: 1.0
Created-By: Apache Maven 3.6.3
Built-By: lei
Build-Jdk: 11.0.11
Build-Datetime: '2021/07/27 17:46:04 +0800'
Note the single quotes around the 2021/07/27 17:46:04 +0800
I expected the single quotes should not appear.
I don't know if I'm misused/misconfiged anything...
When serializing subclass of ContextApplication (for example, when applicaton
server like Tomcat or Websphere Community Edition is stopped) an Exception of
type NotSerializableException is being thrown because ContextApplication has
executorService field. This field contains object of type
FinalizableDelegatedExecutorService, which is not serializable.
Suggested fix: mark field executorService as transient. Add writeObject() and
readObject() methods that deal with executorService field.
Original issue reported on code.google.com by [email protected]
on 20 Jun 2012 at 11:40
What steps will reproduce the problem?
Add the add-on jar to the project and attempt to use ApectJ load time weaving.
What is the expected output? What do you see instead?
This exception is thrown at application startup:
java.lang.RuntimeException: Cannot register non aspect:
org$dellroad$stuff$spring$PostCompletionAspect ,
org.dellroad.stuff.spring.PostCompletionAspect
What version of the product are you using? On what operating system?
dellroad-stuff-vaadin-addon-1.0.432.jar
Please provide any additional information below.
The aspect org.dellroad.stuff.spring.PostCompletionAspect is mentioned in the
META-INF/aop.xml file in the add-on jar file, but this aspect is nowhere to be
found in the jar. Patching the jar by removing this line from aop.xml fixes
the problem. So if possible please remove this line in the next release
Original issue reported on code.google.com by [email protected]
on 8 Aug 2012 at 10:59
Just added the current latest versions of dependencies according to
mvnrepository.com
And also the servlet API dependency has changed, both groupId and artifactId
were apparently non-existent.
The problem is when I tried to generate site using maven, it gave
"dependencies.dependency.version missing" error for exactly these four
dependencies. So I guess this should fix it.
Tested the maven site and compile, both worked without errors with these
changes.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2013 at 9:36
Attachments:
Support for Portlet API would be a great feature.
Original issue reported on code.google.com by [email protected]
on 13 Jan 2012 at 10:34
Build produces deprecation warnings from AbstractDAO. Fix these.
Original issue reported on code.google.com by [email protected]
on 11 Oct 2012 at 10:47
The functionality in PersistentObject that makes the config file
"transactional" and provides backup copies is generically useful.
Extract this functionality out into a separate TransactionalFile class.
Suggested by Mark Thomas.
Original issue reported on code.google.com by [email protected]
on 27 Apr 2012 at 2:27
This is the same as #16 except, it uses javax.servlet:javax.servlet-api:3.0.1
the previous problem with javax.servlet was with my own maven installation.
also marked javax.servlet-api as "provided" scope, this indicates the
dependency will be provided by platform at runtime.
Original issue reported on code.google.com by [email protected]
on 27 Jan 2013 at 6:54
Attachments:
What steps will reproduce the problem?
Try to run your example with tomcat 6 or previous.
What is the expected output? What do you see instead?
Vaadin supports previous servlet versions, but the class
SpringContextApplication relies on servlet 3.0 specification at line 201. You
can't get the servletContext from the request in the servlet 2.5 or previous.
When executing the example I get a classNotFound exception.
What version of the product are you using? On what operating system?
Latest version on Tomcat 6.0
Please provide any additional information below.
I know we should always use the latest libraries but there are environments in
which is still not possible to move to the latest tomcat. I would suggest, to
get the servlet context, that you either use the
ContextLoaderListener.getCurrentWebApplicationContext().getServletContext()
method (but this relies on the fact that the context was started from the
listener), or that you add the interface ServletContextAware to the
ContextApplicationFactoryBean, so you have there the application context and
you can inject it the generated applications (or simply add the interface to
the SpringContextApplication).
Original issue reported on code.google.com by [email protected]
on 26 Jan 2012 at 10:50
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>Vaadin and Spring Test</display-name>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>VaadinApplication</servlet-name>
<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>org.test.SpringVaadin</param-value>
</init-param>
<init-param>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>VaadinApplication</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util"
xmlns:task="http://www.springframework.org/schema/task" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
">
<!-- Activate Spring annotation support -->
<context:annotation-config/>
<context:component-scan base-package="org.test"/>
<context:spring-configured/>
<bean class="org.dellroad.stuff.vaadin.ContextApplicationFactoryBean" p:autowire="true"/>
</beans>
SpringVaadin.java:
package org.test;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;
import org.dellroad.stuff.vaadin.ContextApplication;
import org.dellroad.stuff.vaadin.SpringContextApplication;
import org.springframework.web.context.ConfigurableWebApplicationContext;
public class SpringVaadin extends SpringContextApplication // Application
{
@Override
public void initSpringApplication(ConfigurableWebApplicationContext context)
{
Window mainWindow = new Window("Vaadin+Spring Demo #3");
mainWindow.addComponent(new Label("myBean: "));
this.setMainWindow(mainWindow);
}
}
Dependencies:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>6.7.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.10</version>
</dependency>
<dependency>
<groupId>org.dellroad</groupId>
<artifactId>dellroad-stuff-vaadin</artifactId>
<version>1.0.176</version>
</dependency>
Original issue reported on code.google.com by [email protected]
on 7 Nov 2011 at 2:11
This is almost petty, but the following snippet on the front page...
"A few additions to Spring integration"
...has a bad URL. "Spring" should point to http://www.springframework.org, not
http://www.springframework/org (note the slash, i.e., '/org' instead of '.org')
Original issue reported on code.google.com by [email protected]
on 1 Jul 2014 at 8:10
Maven pom.xml doesn't include any dependencies.
These should be added.
Original issue reported on code.google.com by [email protected]
on 30 Jun 2012 at 3:14
Dear Archie,
Thank you for making this project available. It's made our lives at fatminds
much easier and has personally taught me a great deal. We've created an addon
that requires spring, and includes a demo application that is dependent on
dellroad-stuff.
The add-on is a data binding and toolkit for integration of Vaadin with
Alfresco. It is hosted here: http://code.google.com/p/vaadin-cmis/admin.
In order to facilitate simple consumption of our add-on, might you be willing
to make dellroad-stuff available under your own groupId in the maven central
repo? Failing that, would you object if we made your artifacts available in the
sonatype repository either on the project's behalf as commuters, or under their
third party artifact upload policy, located here:
https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+Th
e+Central+Repository?
Thanks again!
Aaron Lee
Original issue reported on code.google.com by [email protected]
on 9 Jan 2012 at 8:30
Hi,
I'm using dellroad-stuff-vaadin-addon-1.0.432.jar and vaadin-7.0.0.alpha3.jar
My RootApplication extends SpringContextApplication.
import org.dellroad.stuff.vaadin7.SpringContextApplication;
public class TestApplication extends SpringContextApplication implements
BeanFactoryAware, InitializingBean, DisposableBean {
...}
When starting the Application the following error occures:
de.mkw.lovechain.application.TestApplication does not implement Root
Caused by:
com.vaadin.terminal.gwt.server.ServletPortletHelper$ApplicationClassException:
de.mkw.lovechain.application.TestApplication does not implement Root
at com.vaadin.terminal.gwt.server.ServletPortletHelper.verifyRootClass(ServletPortletHelper.java:69)
at com.vaadin.terminal.gwt.server.ServletPortletHelper.getApplicationClass(ServletPortletHelper.java:42)
at com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:60)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:492)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:383)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:571)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1367)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:662)
Original issue reported on code.google.com by [email protected]
on 12 Jul 2012 at 1:04
This problem be seen in the demo by removing the "depends-on" (which is just a
workaround for this bug) in the definition of the MyApplicationBean bean in
HelloWorld.xml. You get a NoSuchBeanDefinitionException.
Original issue reported on code.google.com by [email protected]
on 4 Apr 2012 at 3:38
Hi
I am writing a small Vaadin Touchkit App with Spring integration. I used the
addon spring-touchkit
(https://vaadin.com/directory#addon/spring-touchkit---addon:vaadin) which uses
your SpringContextApplication class.
In this I had a problem to use it in tomcat 6 (tomcat 7 is fine).
So I had to patch the class SpringContextApplication to retrieve the
servletContext in the catch Block at line 331 (Dellroad Version 1.0.592).
I attached a patch file. Maybe you could apply this to your project or add my
changes as another try catch block.
Regards
Ansgar
Original issue reported on code.google.com by [email protected]
on 31 Jan 2013 at 2:41
Attachments:
Please make sure the Maven pom that is published to the central repository has
the scope provided for the javax.servlet-api dependency.
If we use our library with Maven, the servlet-api becomes a compile scoped
dependency (the default) and is added to the war which should not happen.
To fix it, just add a <scope>provided</scope> in the <dependency> section of
the servlet-api dependency.
Thanks,
S.
Original issue reported on code.google.com by [email protected]
on 15 Mar 2012 at 8:19
I have a problem with that lib in version 1.0.571. It requires Spring
3.0.6.RELEASE when I'm using SPRING 3.1.3 RELEASE. There is conflict of libs,
and Spring throws exception when tries to load
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer class.
Even when I override dependency and use just 3.1.3 Spring libs problem still
remains.
I'm sure something change between 3.0.6 and 3.1.3 Spring libe and it makes a
problem.
Probably rebuilding your lib with newer Spring will solve that problem.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2012 at 9:18
What steps will reproduce the problem?
1.open the url http://localhost:8080/hello/HelloWorld
2.wait for 20 seconds
What is the expected output? What do you see instead?
--Web page http://localhost:8080/hello/HelloWorld--page should be displayed
without any errors.
--Instead getting this error popup:Failed to load the widgetset:
/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.
gwt.DefaultWidgetSet.nocache.js?1308265285251What version of the product are
you using? On what operating system?windows
Please provide any additional information below.
--i have attached sample maven project.
Original issue reported on code.google.com by [email protected]
on 16 Jun 2011 at 11:13
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.