[JBoss Seam] - Re: [TestNG] IncompatibleClassChangeError
by enzhao
It seems that the embedded ejb which is needed by testng was not started correctly. I did not change the default configuration which was generated by seam-gen. How should I change it to make the embedded container work with testng? For now I'm not mocking any DB or doing integration test, but the simplest unit test could not execute...
I tried to instantiate a stateful backing bean in the simple test class. Something like this:
anonymous wrote :
| public class FooUseCaseTest extends SeamTest{
|
| @Test
| public void testStartOver() throws Exception {
| Foo foo = new FooImpl();
| foo.startOver(); // the field bar is initialized in the startOver() method
| assert foo.bar != null;
| }
| }
|
|
but did not work, error was always the same, like above. The console shows that jboss-seam.jar was found, and jars like jboss-seam-ioc, jboss-seam-remoting, etc. were also found. But I did not see any component initializing. When I was running "ant testexample" under in the seam distribution directory, I did see a lot more console output showing the embedded container was initializing....
Could anyone please help? Thanks!
Regards,
Ellen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056886#4056886
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056886
18Â years, 10Â months
[Messaging, JMS & JBossMQ] - java.net.SocketException: socket closed
by tkvarenes
Every 30 sec we get an exception in the JBoss log:
2007-06-22 14:51:21,206 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 35s:924ms
2007-06-22 14:51:33,081 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
2007-06-22 14:51:33,081 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
2007-06-22 14:51:33,081 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
2007-06-22 14:51:33,081 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
2007-06-22 14:51:33,081 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Setting up the UILClientIL Connection
2007-06-22 14:51:33,081 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] The UILClientIL Connection is set up
2007-06-22 14:51:33,097 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
2007-06-22 14:51:33,097 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
java.net.SocketException: socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:67)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2313)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2380)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2452)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2601)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:290)
at java.lang.Thread.run(Thread.java:534)
2007-06-22 14:51:33,097 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
2007-06-22 14:52:03,098 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
2007-06-22 14:52:03,098 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
2007-06-22 14:52:03,098 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
2007-06-22 14:52:03,098 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
2007-06-22 14:52:03,098 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Setting up the UILClientIL Connection
2007-06-22 14:52:03,098 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] The UILClientIL Connection is set up
2007-06-22 14:52:03,129 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
2007-06-22 14:52:03,129 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
java.net.SocketException: socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:67)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2313)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2380)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2452)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2601)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:290)
at java.lang.Thread.run(Thread.java:534)
2007-06-22 14:52:03,129 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
2007-06-22 14:52:33,115 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
2007-06-22 14:52:33,115 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
2007-06-22 14:52:33,115 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
2007-06-22 14:52:33,115 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
What might be the problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056885#4056885
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056885
18Â years, 10Â months
[JBoss Seam] - Re: Complex Search Results - return object identifiers inste
by jfrankman
I agree that lazy instantiation is the best way to go, but my problem with the lazy instantiation is that I have trouble keeping my objects in the session. My seam action classes call my business layer to get all objects:
i.e. List clients=clientService.findByLastName("Doe");
This works fine to display the search results, but when I click a detail row to go to the detail page I get lazy initialization errors:
client.getPolicies(); <-- produces lazy initialization error.
I think the problem is that the call to the entity manager is buried in my DAO layer and is not in the action itself. In other words, my action calls the business layer which in turn calls the DAO layer to get the object. Because the EntityManager is not in the action I get lazy initialization errors, is this correct? Am I going about this all wrong?
I know there must be a way to do this, but others have complained about this problem as well: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=62275
I cannot quite understand how to keep the object in the session between pages I keep getting LazyInitialization errors on all subsequent pages. What am I doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056883#4056883
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056883
18Â years, 10Â months