[EJB 3.0] - "EJB cannot be resolved to a type" when using @EJB from a JS
by stn75
Using JBOSS 5 and Richfaces.
I have an EAR file containing
lib.jar
ui.war
lib.war contains an EJB "Service"
| @Stateless
| public class ServiceImpl implements Service {
| ...
| }
|
ui.war contains a JSF backing bean "Backing"
| public class Backing{
|
| @EJB
| Service myService;
| ....
|
When I try to access a web page using the Backing bean I get the following stack trace.
Any idea what is happening here?
javax.servlet.ServletException: Servlet execution threw an exception
| org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
| org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
| org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
| org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| root cause
|
| java.lang.Error: Unresolved compilation problem:
| EJB cannot be resolved to a type
|
| org.something.Backing.<init>(Backing.java:8)
| sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250870#4250870
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250870
16 years, 8 months
[JBoss Messaging] - Memory leak / Stale subscriptions after client failover
by leigh.anderson
I'm having difficult with an application deployed in a JBoss 5.0.1 cluster using JBoss messaging. After a period of time, we run out of heap and everything falls over. Using Eclipse Memory Analyzer, I've tracked the leak down to a surfeit of JBossObjectMessage objects, which appear to still be attached to the Topics they were posted to. Looking in the JMX console, these topics have large numbers of messages, seemingly all the messages ever posted.
The application uses NON_PERSISTENT messages and non-durable subscriptions, so I would have expected these messages to disappear from the topics on delivery.
The second symptom I've noticed is that there is a much larger number of subscriptions on each topic than I would expect. This seems to increase when one of the clients logs a
JBoss Messaging server failure detected - waiting for failover to complete message. This failover occurs randomly, even though both nodes in the cluster are up, and never to all subscriptions on a given client. Further, it seems that once this failover has occurred, any further subscriptions to that topic are not cleaned up on client exit.
The JBM configuration we are using is that shipped with JBoss, but with MSSQL for persistence.
Sorry for the long post. Any thoughts or ideas are much appreciated!
Cheers,
Leigh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250869#4250869
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250869
16 years, 8 months
[EJB 3.0] - Re: Could not obtain connection to any of these urls: Remote
by a0001428
Hi,
problem is the same:
javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: obelix; nested exception is:
java.net.UnknownHostException: obelix]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:724)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(Unknown Source)
at demoEJB.Testing.main(Testing.java:27)
Caused by: java.rmi.UnknownHostException: Unknown host: obelix; nested exception is:
java.net.UnknownHostException: obelix
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
... 3 more
Caused by: java.net.UnknownHostException: obelix
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 9 more
Server remote modify Host file:
127.0.0.1 localhost
x.x.x.x obelix
I was traying:
obelix 77.226.178.32
x.x.x.x localhost
I was traying:
obelix 77.226.178.32
localhost x.x.x.x
is the same .
help me.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250864#4250864
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250864
16 years, 8 months
[JBoss Messaging] - Connecting more than one servers
by artima
Hi All,
I have one ParentServer, which will generate all the messages [queue/topic] and atleast 20-50 other servers, on which we want to recieve the same message that was sent to the ParentServer by a client program. All these servers are running JBoss AS 5.1.x and JBM 2, BETA 4.
Since I am new to messaging, based on whatever I have read so far, a bridge seems to be an appropriate approach for my scenario.
1. Can one of the guru's confirm this or suggest a better alternative.
2. If bridge, can I still connect all these server using the "Core bridge" instead of using the JMS 1.1 compliant bridge.
3. Do I need to create one bridge for each connection b/w ParentServer and ChildServer ?
I do need the JBoss AS application as we are recieving the message via an MDB and would also need some bussiness logic/container help once we receive the message.
Thanks in advance,
artima.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250858#4250858
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250858
16 years, 8 months