[JBoss Seam] - Re: Could not instantiate Seam component:
by pasmith
Hi Sateesh,
We appreciate your help.
Here is the contents of our console.log:
| 10:35:23,693 INFO [EARDeployer] Init J2EE application: file:/var/lib/jbossas/server/all/deploy/projectMgmt.ear
| 10:35:26,474 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to action.LoginAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@23c223c2
| 10:35:26,543 INFO [Ejb3Deployment] EJB3 deployment time took: 349
| 10:35:26,556 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=projectMgmt.ear,jar=projectMgmt.jar,unitName=projectMgmtDatabase with dependencies:
| 10:35:26,556 INFO [JmxKernelAbstraction] jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
| 10:35:26,654 INFO [Version] Hibernate EntityManager 3.2.0.CR1
| 10:35:26,670 INFO [Version] Hibernate Annotations 3.2.0.CR1
| 10:35:26,681 INFO [Environment] Hibernate 3.2 cr2
| 10:35:26,690 INFO [Environment] hibernate.properties not found
| 10:35:26,694 INFO [Environment] Bytecode provider name : javassist
| 10:35:26,701 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
| 10:35:26,939 INFO [Ejb3Configuration] found EJB3 Entity bean: model.Comment
| 10:35:26,940 INFO [Ejb3Configuration] found EJB3 Entity bean: model.Project
| 10:35:26,942 INFO [Ejb3Configuration] found EJB3 Entity bean: model.Task
| 10:35:26,943 INFO [Ejb3Configuration] found EJB3 Entity bean: model.TimeRecord
| 10:35:26,944 INFO [Ejb3Configuration] found EJB3 Entity bean: model.User
| 10:35:26,946 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
| 10:35:27,030 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
| 10:35:27,035 INFO [Ejb3Configuration] [PersistenceUnit: projectMgmtDatabase] no META-INF/orm.xml found
| 10:35:27,167 INFO [AnnotationBinder] Binding entity from annotated class: model.Comment
| 10:35:27,217 INFO [EntityBinder] Bind entity model.Comment on table comment
| 10:35:27,283 INFO [AnnotationBinder] Binding entity from annotated class: model.Project
| 10:35:27,283 INFO [EntityBinder] Bind entity model.Project on table project
| 10:35:27,352 INFO [AnnotationBinder] Binding entity from annotated class: model.Task
| 10:35:27,353 INFO [EntityBinder] Bind entity model.Task on table task
| 10:35:27,362 INFO [AnnotationBinder] Binding entity from annotated class: model.TimeRecord
| 10:35:27,362 INFO [EntityBinder] Bind entity model.TimeRecord on table time_record
| 10:35:27,365 INFO [AnnotationBinder] Binding entity from annotated class: model.User
| 10:35:27,365 INFO [EntityBinder] Bind entity model.User on table user
| 10:35:28,065 INFO [CollectionBinder] Mapping collection: model.Task.timeSpent -> time_record
| 10:35:28,066 INFO [CollectionBinder] Mapping collection: model.Task.comments -> comment
| 10:35:28,068 INFO [CollectionBinder] Mapping collection: model.Project.tasks -> task
| 10:35:28,071 INFO [CollectionBinder] Mapping collection: model.Task.tasks -> task
| 10:35:28,072 INFO [CollectionBinder] Mapping collection: model.User.tasks -> task
| 10:35:28,234 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
| 10:35:28,248 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
| 10:35:28,257 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
| 10:35:28,257 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
| 10:35:28,329 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
| 10:35:28,337 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
| 10:35:28,342 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
| 10:35:28,345 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
| 10:35:28,345 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
| 10:35:28,345 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
| 10:35:28,346 INFO [SettingsFactory] JDBC batch size: 15
| 10:35:28,346 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
| 10:35:28,347 INFO [SettingsFactory] Scrollable result sets: enabled
| 10:35:28,347 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
| 10:35:28,347 INFO [SettingsFactory] Connection release mode: auto
| 10:35:28,349 INFO [SettingsFactory] Default batch fetch size: 1
| 10:35:28,349 INFO [SettingsFactory] Generate SQL with comments: disabled
| 10:35:28,349 INFO [SettingsFactory] Order SQL updates by primary key: disabled
| 10:35:28,349 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
| 10:35:28,353 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
| 10:35:28,354 INFO [SettingsFactory] Query language substitutions: {}
| 10:35:28,354 INFO [SettingsFactory] Second-level cache: enabled
| 10:35:28,354 INFO [SettingsFactory] Query cache: disabled
| 10:35:28,354 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
| 10:35:28,356 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
| 10:35:28,356 INFO [SettingsFactory] Structured second-level cache entries: disabled
| 10:35:28,366 INFO [SettingsFactory] Statistics: disabled
| 10:35:28,366 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
| 10:35:28,367 INFO [SettingsFactory] Default entity-mode: pojo
| 10:35:28,432 INFO [SessionFactoryImpl] building session factory
| 10:35:29,455 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
| 10:35:29,475 INFO [SchemaExport] Running hbm2ddl schema export
| 10:35:29,475 INFO [SchemaExport] exporting generated schema to database
| 10:35:29,486 INFO [SchemaExport] Executing import script: /import.sql
| 10:35:29,487 INFO [SchemaExport] schema export complete
| 10:35:29,503 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 10:35:29,551 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=projectMgmt.ear,jar=projectMgmt.jar,name=LoginAction,service=EJB3 with dependencies:
| 10:35:29,551 INFO [JmxKernelAbstraction] persistence.units:ear=projectMgmt.ear,jar=projectMgmt.jar,unitName=projectMgmtDatabase
| 10:35:30,291 INFO [EJBContainer] STARTED EJB: action.LoginAction ejbName: LoginAction
| 10:35:30,317 INFO [EJB3Deployer] Deployed: file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt.jar
| 10:35:30,320 INFO [TomcatDeployer] deploy, ctxPath=/projectMgmt, warUrl=.../tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/
| 10:35:31,510 INFO [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
| 10:35:31,593 INFO [FacesConfigurator] Reading config jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/jboss-seam.jar!/META-INF/faces-config.xml
| 10:35:31,597 INFO [FacesConfigurator] Reading config jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt.jar-contents/jboss-seam.jar!/META-INF/faces-config.xml
| 10:35:31,601 INFO [FacesConfigurator] Reading config jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jboss-seam-debug.jar!/META-INF/faces-config.xml
| 10:35:31,605 INFO [FacesConfigurator] Reading config jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/faces-config.xml
| 10:35:31,611 INFO [FacesConfigurator] Reading config jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
| 10:35:31,617 INFO [FacesConfigurator] Reading config jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/tomahawk-1.1.0.jar!/META-INF/faces-config.xml
| 10:35:31,640 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
| 10:35:31,761 ERROR [LocaleUtils] Locale name null or empty, ignoring
| 10:35:32,207 INFO [StartupServletContextListener] ServletContext '/var/lib/jbossas/server/all/./tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/' initialized.
| 10:35:32,208 INFO [ServletContextListener] Welcome to Seam 1.0.1.GA
| 10:35:32,218 INFO [Initialization] no components.xml file found
| 10:35:32,219 INFO [Initialization] reading properties from: /seam.properties
| 10:35:32,220 INFO [Initialization] reading properties from: /jndi.properties
| 10:35:32,228 INFO [Initialization] initializing Seam
| 10:35:32,263 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
| 10:35:32,441 INFO [Component] Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pages
| 10:35:32,456 INFO [Component] Component: events, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Events
| 10:35:32,468 INFO [Component] Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
| 10:35:32,511 INFO [Component] Component: switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
| 10:35:32,527 INFO [Component] Component: redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Redirect
| 10:35:32,541 INFO [Component] Component: httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.HttpError
| 10:35:32,556 INFO [Component] Component: userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.UserPrincipal
| 10:35:32,569 INFO [Component] Component: isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.IsUserInRole
| 10:35:32,580 INFO [Component] Component: conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
| 10:35:32,674 INFO [Component] Component: conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationList
| 10:35:32,679 INFO [Component] Component: conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack
| 10:35:32,683 INFO [Component] Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
| 10:35:32,689 INFO [Component] Component: pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PageContext
| 10:35:32,694 INFO [Component] Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
| 10:35:32,699 INFO [Component] Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
| 10:35:32,704 INFO [Component] Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
| 10:35:32,710 INFO [Component] Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
| 10:35:32,715 INFO [Component] Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
| 10:35:32,719 INFO [Component] Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
| 10:35:32,724 INFO [Component] Component: locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Locale
| 10:35:32,728 INFO [Component] Component: messages, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Messages
| 10:35:32,735 INFO [Component] Component: interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator
| 10:35:32,740 INFO [Component] Component: facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesMessages
| 10:35:32,751 INFO [Component] Component: resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBundle
| 10:35:32,758 INFO [Component] Component: localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.LocaleSelector
| 10:35:32,767 INFO [Component] Component: uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.UiComponent
| 10:35:32,817 INFO [Component] Component: org.jboss.seam.remoting.messaging.subscriptionRegistry, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.remoting.messaging.SubscriptionRegistry
| 10:35:32,823 INFO [Component] Component: pojoCache, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PojoCache
| 10:35:32,828 INFO [Component] Component: org.jboss.seam.debug.introspector, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.debug.Introspector
| 10:35:32,856 INFO [Component] Component: org.jboss.seam.debug.contexts, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.debug.Contexts
| 10:35:32,868 INFO [Scanner] scanning: /var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt.jar
| 10:35:32,872 WARN [Component] Component class should be serializable: user
| 10:35:32,872 INFO [Component] Component: user, scope: SESSION, type: ENTITY_BEAN, class: model.User
| 10:35:32,876 INFO [Component] Component: login, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: action.LoginAction, JNDI: LoginAction/local
| 10:35:32,887 INFO [Initialization] done initializing Seam
| 10:35:32,958 INFO [EARDeployer] Started J2EE application: file:/var/lib/jbossas/server/all/deploy/projectMgmt.ear
| 10:36:02,862 INFO [Pages] no pages.xml file found
| 10:36:05,106 ERROR [STDERR] Aug 2, 2006 10:36:05 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
| 10:36:05,167 ERROR [STDERR] Aug 2, 2006 10:36:05 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
| 10:36:05,199 ERROR [STDERR] Aug 2, 2006 10:36:05 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
| 10:36:05,290 ERROR [STDERR] Aug 2, 2006 10:36:05 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/seam.taglib.xml
| 10:36:05,337 ERROR [STDERR] Aug 2, 2006 10:36:05 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
| 10:36:05,400 ERROR [STDERR] Aug 2, 2006 10:36:05 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/var/lib/jbossas/server/all/tmp/deploy/tmp22378projectMgmt.ear-contents/projectMgmt-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
| 10:36:05,756 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
| 10:36:05,756 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
| 10:36:05,756 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
| 10:36:05,756 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false
|
Thanks agian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962517#3962517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962517
18 years, 5 months
[JBoss/Spring Integration] - Re: Is it SpringLifecycleInterceptor or just me?
by Arno Werr
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#3962500
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962500
18 years, 5 months
[J2EE Design Patterns] - newb EJB 3 Design Pattern question
by sunsh!ne
My question revolves around remote interfaces and using the persistence API. An example might give more insight into my question?
I have 3 tables Customer, Order, LineItem with the corresponding object associations:
| class Customer {
|
| long id;
| List<Order> orders;
|
| public long getId() {};
| public List<Order> getOrders(){};
| }
|
| class Order {
|
| long id;
| List<LineItem> lineItems;
|
| public long getId() {};
| public List<LineItem> getLineItems() {};
| public Customer getCustomer() {};
| }
|
| Class LineItem {
|
| long id;
|
| public long getId() {};
| public Order getOrder() {};
| }
|
When using a session bean that implements a remote interface I make a call similar to the following?
| @Stateless
| class OrderBean implements RemoteOrder {
|
| public List<Order> getOrders(long custId) {
| return em.createNamedQuery(?order.findByCustomerId?)
| .setParmater(?custId?, custId)
| .getResultList();
| }
| }
|
1)
Now this would work great in a Servlet/JSP that was running in the same JVM, but I am accessing this from a web service. I am wondering what is the ?standard? way to return the persistent data to the web service client? Is it off load everything into value objects? Something has to be done otherwise I will always get exceptions when trying to access the lazy children of Customer. Even if I do a FETCH JOIN for Customer.orders then the problem nest down to Order.lineItems, should I FETCH JOIN this to?
2)
What about the cyclic call during marhsalling from Customer.getOrders() then Orders.getCustomers()? I have yet to find documentation ?anywhere? ;) that defines a standard way to handle this or should we still develop the J2EE way and use Transfer Objects (J2EE design Pattern), but I thought the persistence layer and POJOs was supposed to remove this extra layer from the enterprise application.
3)
If the Order Pojo had some header information an thats all I needed for a particluar web service request, meaning I do not want the lineitems, should I create another pojo object mapped to the table but with only the fields that represent the header? Should I create a Transfer Object/Value Object?
I guess I am some confused of when or if I should use the Pojo when returning data for remote calls. I have read the J2EE Design Patterns and maybe those Patterns still apply I just thought that pojos where supposed to take place of value and transfer objects.
Thanks for any help :)
J
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962499#3962499
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962499
18 years, 5 months
[EJB 3.0] - Session bean design for accessing tree based entity beans
by k34216
Hi, I am just getting started with EJB3, and I was working through an example and I can't seem to find a clean way to implement a session bean that access an entity bean which is recursive.
So lets say our entity bean looks like so:
@Entity
public class TreeNode {
@Id
@GeneratedValue
long getId();
void setId(long id);
@OneToOne(cascade={CascadeType.REFRESH})
TreeNode getParent();
void setParent(TreeNode parent);
@OneToMany(cascade={CascadeType.ALL})
Collection getChildren();
void setChildren(Collection children);
}
And the tree is very large and deep, so using eager loading is not really what we want.
I have tried a few designs of stateless session beans and it seems like all of them fail the principal of least astonishment - You can't use the getChildren() on the TreeNode after it has been serialized and passed to the client, because the children are lazy loaded. So instead your left having to implement an interface on the session bean for getting the children of a particular node.
I haven't even touched on modifying the tree yet via the session bean :(
Assuming that we needed a way for the client to examine and modify the tree what might the session bean interface look like? Would it be worth while making it a statefull session bean?
Thanks,
k34216
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962497#3962497
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962497
18 years, 5 months