[JBoss Seam] - Re: jboss seam example
by ptmain
I have the same problem. I haven't modified anything - I just followed the "Getting Started with JBoss Seam" instructions. The example applications seem to load okay, but when I try to submit any page (register a new user, for example), I get the error mentioned above. I'm using JDK 1.5.0_07 and JBoss 4.0.4 (GA) with EJB3 enabled.
According to my logs, the error above was caused (on my system) by this:
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: javax.interceptor.InvocationContext.getTarget()Ljava/lang/Object;
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:128)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
... 45 more
Caused by: java.lang.NoSuchMethodError: javax.interceptor.InvocationContext.getTarget()Ljava/lang/Object;
at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
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.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
... 52 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960730#3960730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960730
19 years, 9 months
[JBoss Seam] - Re: Stale Session Objects ? DataModelSelection Problems
by kryptontri
Sorry about the bad formatting and being lazy. I am tying to provide
add/remove functionality through a page, where by there is a 1 to
many relationship.
If I now take the messages example and modify it
to add messages (remove already exists) I cannot get this to work
properly, can anyone point me in the right direction or to an example
that does this ie managed relationships for objects?
In the view - messages.jsp I added (I tried make it format nice, but for some mysterious
reason it does not want to, i have previoued this severla times :-( )
anonymous wrote :
| <!-- Added New Messages -->
| <h:form>
|
|
|
| <h:outputLabel for="title">Title:</h:outputLabel>
|
|
| <h:inputText id="title" value="#{message.title}"/>
|
|
| <h:outputLabel for="text">Text:</h:outputLabel>
|
|
| <h:inputText id="text" value="#{message.text}"/>
|
|
|
|
| <h:commandButton value="Add Message" action="#{messageManager.addMessage}"/>
|
|
|
| </h:form>
| <!-- End Add New Messages -->
|
For the MessageManager
anonymous wrote :
| @Local
| public interface MessageManager
| {
| public void findMessages();
| public void select();
| public void delete();
| public void destroy();
| public void addMessage();
| }
|
For the MessageManagerBean
anonymous wrote :
| public class MessageManagerBean implements Serializable, MessageManager
| {
|
| @DataModel
| private List messageList;
|
| @DataModelSelection
| @Out(required=false)
| private Message selectedMessage;
|
| // --- Added ----- //
| @In(required = false, create = true)
| @Out(required=false)
| private Message message;
|
| @PersistenceContext(type=EXTENDED)
| private EntityManager em;
|
| @Factory("messageList")
| public void findMessages()
| {
| messageList = em.createQuery("from Message msg order by msg.datetime desc").getResultList();
| }
|
| public void select()
| {
| selectedMessage.setRead(true);
| }
|
| public void delete()
| {
| messageList.remove(selectedMessage);
| em.remove(selectedMessage);
| message=null;
| }
|
| @Remove @Destroy
| public void destroy() {}
|
| // --- Added ----- //
| public void addMessage() {
| message.setRead(false);
| message.setDatetime(new Date());
| em.persist(message);
| messageList.add(message);
| //messageList = em.merge(messageList);
| message = null;
| }
|
| }
|
Do you see where I am going wrong ? As it stands I can add 1 message, but then
I cannot add a second and the input box never gets cleared.
I am after a clean example that adds/removes etc ? Any ideas ? TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960728#3960728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960728
19 years, 9 months
[EJB 3.0] - Re: Maven2 and Embeddable EJB3
by mygol
java.lang.RuntimeException: java.lang.NoSuchMethodError: org.jboss.util.propertyeditor.PropertyEditors.init()V
at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391)
at net.youngsoft.erp.test.EjbTest.setUp(EjbTest.java:20)
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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NoSuchMethodError: org.jboss.util.propertyeditor.PropertyEditors.init()V
at org.jboss.kernel.plugins.config.xml.JavaBeanSchemaInitializer.(JavaBeanSchemaInitializer.java:96)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver.addSchemaInitializer(DefaultSchemaResolver.java:165)
at org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory.addSchema(SingletonSchemaResolverFactory.java:83)
at org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory.addSchema(SingletonSchemaResolverFactory.java:104)
at org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory.(SingletonSchemaResolverFactory.java:64)
at org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory.(SingletonSchemaResolverFactory.java:41)
at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.(BeanXMLDeployer.java:53)
at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:377)
... 21 more
i miss something?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960725#3960725
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960725
19 years, 9 months