RE: There are two almost similar versions of jboss-spring deployer.
One with old InvocationContext, @EJB and the other one with fixed (see
http://jboss.org/jbossBlog/blog/bburke/2006/06/02/JBoss_EJB_3_0_Preview_R...).
Right. But available zip download does not have client jars. I need them for remoting.
And it's not only me:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=84310
Re: Check what version 4.0.4.GA has - see jboss-ejb3x.jar in ejb3.deployer.
Roger! For now I am sticking with Implementation-Version: JBoss EJB 3.0 RC7 - FD
The same problem - I need client jars to move to RC8 and available distribution lacks
them.
Re: This is not the cause - look before this.
MEA CULPA! MEA CULPA! MEA CULPA! Sorry, JBoss. That was just a bloody rogue war in deploy
directory. You know - 'build', 'colddelpoy', 'run' - who check the
deploy directory, right?... I should have, I should have.
Re: Put the right order in application.xml.
Looks fine to me.
| <?xml version="1.0" encoding="UTF-8"?>
| <application version="1.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
|
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
| <display-name>EJB 3 Test Application - Spring</display-name>
| <module>
| <java>common.jar</java>
| </module>
| <module>
| <java>domain.jar</java>
| </module>
| <module>
| <java>service.spring</java>
| </module>
| <module>
| <ejb>facade.jar</ejb>
| </module>
| <module>
| <web>
| <web-uri>web.war</web-uri>
| <context-root>titan</context-root>
| </web>
| </module>
| <!-- library -->
| <module>
| <java>commons-lang.jar</java>
| </module>
| </application>
|
Re: Or adjust deployer order.
How actually are you doing this?
Re: I use a lot of JSTL....
Way to go! I found the problem which killed my JSTL. My first version of web.xml had the
following declaration
| <web-app
|
xmlns="http://java.sun.com/xml/ns/j2ee"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
|
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" />
|
Looks right but lacking version="2.4" As soon as I've changed to
| <web-app
|
xmlns="http://java.sun.com/xml/ns/j2ee"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
|
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"
/>
|
JSTL tags are OK.
Re:' I use a lot of JSTL....'
Well, how about another wonderful Spring feature - Spring tags. I was trying to use them
in my test application. Created a simple jsp with Spring tags
| <body>
| <h1>Search for Flights</h1>
| <spring:nestedPath path="flightSearchCriteria">
| <form action="" method="post">
| <table>
| <tr>
| <td>Depart From:</td>
| <td>
| <spring:bind path="departFrom">
| <input type="text" name="${status.expression}"
value="${status.value}"/>
| </spring:bind>
| </td>
| <td>Depart On:</td>
| <td>
| <spring:bind path="departOn">
| <input type="text" name="${status.expression}"
value="${status.value}"/>
| </spring:bind>
| <span style="font-size:smaller">(yyyy-MM-dd HH)</span>
| </td>
| </tr>
| <tr>
| <td>Arrive At:</td>
| <td>
| <spring:bind path="arriveAt">
| <input type="text" name="${status.expression}"
value="${status.value}"/>
| </spring:bind>
| </td>
| <td>Return On:</td>
| <td>
| <spring:bind path="returnOn">
| <input type="text" name="${status.expression}"
value="${status.value}"/>
| </spring:bind>
| <span style="font-size:smaller">(yyyy-MM-dd HH)</span>
| </td>
| </tr>
| <tr>
| <td/>
| <td>
| <input type="submit" value="Search"/>
| </td>
| <td/>
| <td/>
| </tr>
| </table>
| </form>
| </spring:nestedPath>
| </body>
|
and appropriate command
| public class FlightSearchCriteria implements Serializable {
| private static final long serialVersionUID = 145645L;
|
| private String departFrom;
|
| private Date departOn;
|
| private String arriveAt;
|
| private Date returnOn;
| ...
| }
|
trings are working fine but any attempt to process Dates generates the following :
| 2006-08-02 09:44:25,312 DEBUG [org.springframework.beans.BeanWrapperImpl] About to
invoke write method [public void
com.arno.net.business.logic.FlightSearchCriteria.setDepartFrom(java.lang.String)] on
object of class [com.arno.net.business.logic.FlightSearchCriteria]
| 2006-08-02 09:44:25,312 DEBUG [org.springframework.beans.BeanWrapperImpl] Invoked
write method [public void
com.arno.net.business.logic.FlightSearchCriteria.setDepartFrom(java.lang.String)] with
value of type [java.lang.String]
| 2006-08-02 09:44:25,320 DEBUG [org.springframework.beans.PropertyTypeConverter]
Converting String to [class java.util.Date] using property editor
[org.jboss.util.propertyeditor.DateEditor@c017d]
| 2006-08-02 09:44:25,321 ERROR [org.springframework.web.servlet.DispatcherServlet]
Could not complete request
| java.lang.NullPointerException
| at org.jboss.util.propertyeditor.DateEditor.setValue(DateEditor.java:97)
| at
org.springframework.beans.PropertyTypeConverter.convertValue(PropertyTypeConverter.java:254)
| at
org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:176)
| at
org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:106)
| at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:713)
| at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:565)
| at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(AbstractPropertyAccessor.java:49)
| at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:68)
| at
org.springframework.validation.DataBinder.applyPropertyValues(DataBinder.java:424)
| at org.springframework.validation.DataBinder.doBind(DataBinder.java:331)
| at org.springframework.web.bind.WebDataBinder.doBind(WebDataBinder.java:111)
| at
org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:108)
| at
org.springframework.web.servlet.mvc.BaseCommandController.bindAndValidate(BaseCommandController.java:305)
| at
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:244)
| at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
| at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
| at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
| at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
| at
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:386)
| at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:355)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 2006-08-02 09:44:25,327 DEBUG
[org.springframework.web.context.support.XmlWebApplicationContext] Publishing event in
context [WebApplicationContext for namespace 'jboss-spring-servlet']:
RequestHandledEvent: url=[/titan/search.htm]; time=[33ms]; client=[127.0.0.1];
method=[POST]; servlet=[jboss-spring]; session=[570DFBE803F76A952BA0B334F5CA4305];
user=[null]; status=[failed: java.lang.NullPointerException]
| 2006-08-02 09:44:25,327 DEBUG
[org.springframework.web.context.support.XmlWebApplicationContext] Publishing event in
context [Root WebApplicationContext]: RequestHandledEvent: url=[/titan/search.htm];
time=[33ms]; client=[127.0.0.1]; method=[POST]; servlet=[jboss-spring];
session=[570DFBE803F76A952BA0B334F5CA4305]; user=[null]; status=[failed:
java.lang.NullPointerException]
| 2006-08-02 09:44:25,329 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/titan].[jboss-spring]]
Servlet.service() for servlet jboss-spring threw exception
| java.lang.NullPointerException
| at org.jboss.util.propertyeditor.DateEditor.setValue(DateEditor.java:97)
| at
org.springframework.beans.PropertyTypeConverter.convertValue(PropertyTypeConverter.java:254)
| at
org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:176)
| at
org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:106)
| at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:713)
| at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:565)
| at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(AbstractPropertyAccessor.java:49)
| at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:68)
| at
org.springframework.validation.DataBinder.applyPropertyValues(DataBinder.java:424)
| at org.springframework.validation.DataBinder.doBind(DataBinder.java:331)
| at org.springframework.web.bind.WebDataBinder.doBind(WebDataBinder.java:111)
| at
org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:108)
| at
org.springframework.web.servlet.mvc.BaseCommandController.bindAndValidate(BaseCommandController.java:305)
| at
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:244)
| at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
| at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
| at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
| at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
| at
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:386)
| at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:355)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
JBoss property editor is not really happy :(
Any insight?
Like I said, I've read your article:
anonymous wrote :
| It would be quite annoying to have to apply this interceptor to each and every bean
class or define it for each bean in XML, so there in the final draft of the EJB 3.0
specification will be a way to define default interceptors.
Tried it
| <assembly-descriptor>
| <interceptor-binding>
| <ejb-name>*</ejb-name>
| <interceptor-class>
|
org.jboss.tutorial.ee.service.impl.interceptor.SpringBeanLifecycleInterceptor
| </interceptor-class>
| </interceptor-binding>
| </assembly-descriptor>
|
Works like a charm.
Thanks for the tip, Ales. BTW, is EJB 3.0 specs are official by now? There was supposed to
be such a declaration on Java One, wasn't it?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962500#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...