[JBoss Tools (users)] - Creating Message Driven Bean, Error while testing
by marcelkoch_net
Hi everbody,
I just tested the JBoss Tools successfully for writing Session Beans, deployment, testing it with an console client.
But I got issues with creating a message driven bean.
I only changed the ConnectionFactory-Name and used the Util Class to get the connection the the queue object in client. When I try to run the client I'm getting the following Exception:
Exception in thread "main" javax.naming.NameNotFoundException: MD not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
| at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
| at sun.rmi.transport.Transport$1.run(Unknown Source)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Unknown Source)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
| at java.lang.Thread.run(Unknown Source)
| at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
| at sun.rmi.transport.StreamRemoteCall.executeCall(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)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
| at javax.naming.InitialContext.lookup(Unknown Source)
| at de.spi.test.MDUtil.getQueue(MDUtil.java:51)
| at de.spi.test.client.TestClient.main(TestClient.java:39)
This is the xdoclet comment of the MDBean-Class:
/**
| * <!-- begin-xdoclet-definition -->
| * @ejb.bean name="MD"
| * acknowledge-mode="Auto-acknowledge"
| * destination-type="javax.jms.Queue"
| * connection-factory-jndi-name = "ConnectionFactory"
| *
| * transaction-type="Container"
| * destination-jndi-name="MD"
| *
| * @ejb.transaction="Supports"
| *
| * <!-- end-xdoclet-definition -->
| * @generated
| **/
I'm Using Eclipse 3.3.0 and the Beta4 Jars of the JBoss Tools. I genarted the MDBean with New -> EJB -> XDoclet Enterprise Bean cause I got no such options in the JBoss Tools directory.
Another strange thing is that no jboss.xml is been created but the session bean works fine.
Has someone an idea?
Many thanks
Marcel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098715#4098715
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098715
18Â years, 6Â months
[JBoss Seam] - Problem showing content based on identity's role
by Colin_B
Hi, I'm new here and also this actually is the first time I'm working with a web framework, so I'm guessing the solution might be simple, but still, I can't get it to work. I've Googled, searched this forum and I've seen topics that seemed to have comparable problems, but nothing works, so I'm hoping you can help me.
I'm using Seam 2.0.0.CR2 and what I'm trying to do is very simple: just a small test to show a link only to users with a certain role.
I've setup a project with 'seam setup' and then 'seam create-project' and after that, I've changed the following to the generated project:
I've made Authenticator into an interface and created AuthenticatorAction and the authenticate method as follows:
@Name(value = "authenticator")
| @Stateless
| public class AuthenticatorAction implements Authenticator {
|
| @PersistenceContext
| private EntityManager em;
| @Logger
| private Log log;
| private User user;
|
| public boolean authenticate() {
| log.info("authenticating #0", Identity.instance().getUsername());
| if (checkLoginInformation()) {
| Identity.instance().addRole(getRole());
| Identity.instance().addRole("test");
| return true;
| } else {
| return false;
| }
| }
I'm using Identity.instance() now, but before I also tried '@In private Identity identity' as a class variable, changes nothing.
In components.xml I changed the security:identity part into:
<security:identity authenticate-method="#{authenticator.authenticate}" />
So I just removed the securityRules part, but also tried with it left in, didn't change anything.
Plus I've added the following two links to menu.xhtml:
<s:link view="/home.xhtml" value="test" rendered="#(identity.hasRole('manager')" />
| <s:link view="/home.xhtml" value="test2" rendered="#(identity.hasRole('test')" />
Instead of identity.hasRole('test'), I also tried s:hasRole('test') as that's what is also mentioned in the Security documentation of Seam. Also doesn't work. When I remove the 'rendered=....' part, it does show the links...
Even though I'm adding the role "test" to every user hard-coded, it doesn't show the second link to any logged in user. It seems like the roles are not being 'saved' to the identity, while I think I'm just doing everything like is in the documentation and / or what I found on the web.
Authentication / logging in works as I can only log in with users that are in the database. What do I miss here? Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098712#4098712
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098712
18Â years, 6Â months
[Beginners Corner] - Re: Coldfusion WAR Deployment fun
by GreatSeaSpider
Hi and thanks for the reply!
i've changed the url pattern, and a few others which were the same. now i'm getting
this:
--------------------------------------------------------------------------------------
2007-10-25 09:14:50,546 ERROR [STDERR] no such classpath element: ./WEB-INF/../../../classes
2007-10-25 09:14:50,546 ERROR [STDERR] C:\jboss-4.2.2.GA\lib\updates: directory does not exist, hotfixes cannot be applied
2007-10-25 09:14:51,609 ERROR [STDERR] javax.servlet.ServletException: The configuration file cound not be found at C:\jboss-4.2.2.GA\server\default\tmp\deploy\tmp29532siwtchgear-exp.war\WEB-INF\flex\flex-config.xml
--------------------------------------------------------------------------------------
and
--------------------------------------------------------------------------------------
2007-10-25 09:14:51,640 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/siwtchgear]] failed to load: flex.server.j2ee.cache.CacheFilter
2007-10-25 09:14:51,640 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/siwtchgear]] Exception starting filter CFCacheFilter
javax.servlet.ServletException: javax.servlet.ServletException: The configuration file cound not be found at C:\jboss-4.2.2.GA\server\default\tmp\deploy\tmp29532siwtchgear-exp.war\WEB-INF\flex\flex-config.xml
at coldfusion.bootstrap.ClassloaderHelper.initFilterClass(ClassloaderHelper.java:132)
at coldfusion.bootstrap.BootstrapFilter.init(BootstrapFilter.java:34)
--------------------------------------------------------------------------------------
thanks muchly for the help
Pete
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098703#4098703
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098703
18Â years, 6Â months