[JBoss Seam] - Vacation
by gavin.king@jboss.com
Hi everyone :-)
Just to let you know, I'll be on vacation for about 2.5 weeks, with a woman instead of a laptop, so please fight amongst yourselves until I get back.
Actually, Norman Richards is now temporarily in charge of all the essential functions I usually perform, eg. drunkenly insulting users at 3AM, getting in flamewars with Spring zealots, sending counterproductive curse-word-laden emails to services about why we don't have Seam training productized yet, not getting out of bed until 1PM, posting flamebait blogs, etc, so please give him as hard a time as possible until I get back, so that he can learn to regret the move from PM to dev.
OK, what I really mean to say is thanks for everyone's support and encouragement, have a great holiday, and please be nice to Norman :-)
Merry christmas!
Gavin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995475#3995475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995475
19 years, 4 months
[EJB 3.0] - One to many relation issues
by jeremygibson
Hi,
I'm trying to have a person entity who has a collection of person entities representing his children. I have it marked as follows:
| private Collection<Person> children;
| ...
| @OneToMany
| public Collection<Person> getChildren() {
| return children;
| }
|
But when I deploy this it gives me the following error.
org.hibernate.MappingException: Could not determine type for: java.util.Collection, for columns: [org.hibernate.mapping.Column(children)]
I haven't found other examples of entity having instances of themselves but did see a post where someone was having a similar issue relating to having a collection of enitites from a "close relative" on the inheritance tree, so I am not sure whether this is a common issue. Any help is appreciated
Jeremy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995473#3995473
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995473
19 years, 4 months
[EJB 3.0] - Display data via EJB 3
by weiming
Hi there
I can create, insert and delete date via EJB 3, but I got a problem with displaying data.
I created an entitybean "UserCredentialsEntity.java", which defined all setter/getter.
In interface "UserCredentialsHandler.java", I set a method
"public Collection getUser(String firstName);"
In Javabean "UserCredentialsBean.java", I implemented this method
"public Collection getUser(String firstName){
String oql = "select u from UserCredentialsEntity u where u.firstName=:firstName";
return em.createQuery(oql).setParameter("firstName", firstName).getResultList();
}"
Then I create a test.jsp to test this method: (code about displaying data)
<%@page import="javax.naming.*,
java.text.*,
java.util.*,
com.SurveyMaker.ejb.entity.*,
com.SurveyMaker.ejb.session.*"%>
<%!
private UserCredentialsHandler aUser = null;
public void jspInit () {
try {
InitialContext ctx = new InitialContext();
aUser = (UserCredentialsHandler) ctx.lookup("surveymaker/UserCredentialsBean/local");
} catch (Exception e) {
e.printStackTrace ();
}
}%>
<%
Collection somePeople= aUser.getUser("Allen");
for(Iterator iter = somePeople.iterator(); iter.hasNext();){
UserCredentialsEntity user = (UserCredentialsEntity)iter.next();
%>
Username: <%=user.getFirstName() %>
<%
}
%>
It brings me an error:
org.apache.jasper.JasperException: Exception in JSP: /test.jsp:29
26: <%
27: Collection somePeople= aUser.getUser("Allen");
28: for(Iterator iter = somePeople.iterator(); iter.hasNext();){
29: UserCredentialsEntity user = (UserCredentialsEntity)iter.next();
30: %>
31: Username: <%=user.getFirstName() %>
32: <%
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.ClassCastException: com.SurveyMaker.ejb.entity.UserCredentialsEntity
org.apache.jsp.test_jsp._jspService(test_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Can anyone help me, please?
Cheers
Ming
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995469#3995469
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995469
19 years, 4 months
[JBoss Eclipse IDE (users)] - Re: How contribute to Freemarker plugin and add my Plugin ec
by azerr
anonymous wrote : Please send a *patch* and not just an updated plugin.
I have sent you my Freemarker updated, because I would like that you see my new feature and that you validate it. I have change a lot of code like package name, so I'm waiting for your validation.
anonymous wrote :
| Hibernate tools can also generate different artifacts; nothing special about that.
I agree with you, but when you want generate any component, you must respect some rules, like have java classes bean in your project. Imagine you want generate components for PHP, Hibernate mapping is used to get metadata of your database (with Hibernate Tools), BUT you need not to have Bean classes when you want generate components like PHP page.
If you want use others XML model, like XMI, WSDL, ... is it possible to use Hibernate Tool for generate component without XML mapping hibernate but with WSDL, XMI,... XML models?
anonymous wrote : ditto for Hibernate Tools.
I'm sorry, I don't understand what you mean? Is it possible with Hibernate Tools, to generate Bean, DTO and Assembleur (which transform Bean to DTO and DTO to Bean)?
anonymous wrote : In Hibernate Tools these are called "Exporters"; we don't have a generic way of describing them but if someone wants to add it feel free ;)
Akrogen is not bulk generator. When you develop a new CRUD Form, you want generate ONLY components for this form (just the ActionForm for instance, because others developpers has for instance already developped another components that you don't want generate), sometimes, you want update name of your CRUD form, sometimes you want update others parameters. Hibernate Tools is bulk generator, Akrogen is not bulk generator. It generate ONLY the component for a XML model that you need.
If you take the functionnality Source/Generate getter/setter in the Eclipse, you can checked the getter/setter that you want generate and not all the getter/setter of your class. Akrogen have the same goal.
Regards Angelo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995468#3995468
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995468
19 years, 4 months
[JBoss Seam] - Seam cannot find my components
by jdaggs
At first you may be thinking that I forget to put my seam.properties file in the right place. I wish it was that simple. However. I did look in my server.log and found the following snippet:
006-12-20 17:17:38,312 DEBUG [org.jboss.seam.deployment.ComponentScanner] found component class: seam-test-ejb.jar/com/rms/beans/UserActionBean.class
2006-12-20 17:17:38,328 DEBUG [org.jboss.seam.deployment.ComponentScanner] could not load class: seam-test-ejb.jar.com.rms.beans.UserActionBean
java.lang.ClassNotFoundException: seam-test-ejb.jar.com.rms.beans.UserActionBean
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at org.jboss.seam.deployment.ComponentScanner.handleItem(ComponentScanner.java:61)
at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:131)
at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
at org.jboss.seam.deployment.Scanner.scan(Scanner.java:90)
at org.jboss.seam.deployment.ComponentScanner.getClasses(ComponentScanner.java:41)
at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:440)
at org.jboss.seam.init.Initialization.init(Initialization.java:426)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy38.start(Unknown Source)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy39.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Is this error related to the fact that Seam cannot find my componets. If so how can I fix it? Otherwise what is this error trying to tell me?
Thanks in Advance,
Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995467#3995467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995467
19 years, 4 months