[JBoss Seam] - Re: Seam 1.2.1.GA Integration Testing (identity.login)
by mhaubrich
Hey,
I just noticed the following exception being thrown:
ERROR 2007-05-08 11:59:49,578 org.jboss.seam.security.jaas.SeamLoginModule -- Error invoking login method
| java.lang.NullPointerException
| at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:104)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at javax.security.auth.login.LoginContext.invoke(Unknown Source)
| at javax.security.auth.login.LoginContext.access$000(Unknown Source)
| at javax.security.auth.login.LoginContext$5.run(Unknown Source)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.login.LoginContext.invokeCreatorPriv(Unknown Source)
| at javax.security.auth.login.LoginContext.login(Unknown Source)
| at org.jboss.seam.security.Identity.authenticate(Identity.java:247)
| at org.jboss.seam.security.Identity.authenticate(Identity.java:240)
| at org.jboss.seam.security.Identity.login(Identity.java:170)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at com.sun.el.parser.AstValue.invoke(AstValue.java:174)
| at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
| at org.jboss.seam.util.UnifiedELMethodBinding.invoke(UnifiedELMethodBinding.java:36)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
| at org.jboss.seam.mock.SeamTest$Request.invokeMethod(SeamTest.java:401)
| at com.booknolia.AuthenticatorTest$1.invokeApplication(AuthenticatorTest.java:48)
| at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:489)
| at com.booknolia.AuthenticatorTest.testAuthenticate(AuthenticatorTest.java:66)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
| at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:479)
| at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:715)
| at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
| at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
| at org.testng.TestRunner.runWorkers(TestRunner.java:673)
| at org.testng.TestRunner.privateRun(TestRunner.java:620)
| at org.testng.TestRunner.run(TestRunner.java:480)
| at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
| at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
| at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
| at org.testng.SuiteRunner.run(SuiteRunner.java:168)
| at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
| at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
| at org.testng.TestNG.run(TestNG.java:719)
| at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
| at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:122)
I assume that in my test environment the #{authenticator.authenticate} is not mapped correctly !
Any ideas as to how I could fix this ??
THanks !!
Maarten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044036#4044036
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044036
19 years, 1 month
[JBoss Messaging] - Re: RediveryDelay implemented yet?
by cresny
"timfox" wrote : If you are using MDBs, then the MDB container lives between JBoss Messaging and your MDB.
|
| So if your MDB throws an exception it is caught in the MDB container, which handles redelivery.
|
| I don't believe the MDB container contains delayed redelivery functionality.
|
| It may be possible to confgure the MDB container to not do redelivery and pass the exception back up , I need to check with Weston to see if it supports that.
I don't see how this is the case. The queues have almost the exact configuration with JBossMQ, and the redelivery delay works perfectly in JbossMQ using same MDB container. Also, I assumed the MDB Container would simply rethrow the mdb exception and let the TransactionManager sort it out.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044031#4044031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044031
19 years, 1 month
[Messaging, JMS & JBossMQ] - Re: Rerun DLQ messages?
by rocken7
So here is how to rerun expected messages from the DLQ. The close() calls are not perfect ...
And I coded up a JMX call to do this:
try
| {
| InitialContext ctx = new InitialContext();
| QueueConnection qc = TxsQueue.newConnection(ctx);
| Queue queue = TxsQueue.newQueue( ctx, "queue/DLQ" );
| QueueSession session = qc.createQueueSession(true, javax.jms.Session.AUTO_ACKNOWLEDGE);
| QueueReceiver qr = session.createReceiver(queue);
| qc.start();
|
| for( Message m = qr.receiveNoWait(); m != null; )
| {
| if( m instanceof ObjectMessage )
| {
| ObjectMessage om = (ObjectMessage) m;
| Object obj = om.getObject();
|
| if(obj instanceof BaseTaskMessage)
| {
| TxsQueue.send(Constants.MDB_TASKS, om.getObject());
| }
| else if( obj instanceof BaseEmailMessage )
| {
| TxsQueue.send(Constants.MDB_EMAIL, om.getObject());
| }
| }
|
| m = qr.receiveNoWait();
| }
|
| qr.close();
| session.close();
| qc.close();
| }
| catch(Exception e)
| {
| e.printStackTrace();
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044027#4044027
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044027
19 years, 1 month
[JBoss Seam] - Seam 1.2.1 and Recursive tables
by dacloutier@gmail.com
HELP!
I am having a problem where as the seam generated app, which has a recursive table (as described above), can't add new child entries.
This is because the link to add the new child points to the same edit page that I am currently on, and goes back to the same parent entry....
Details:
I have a ReportSection class which has a
Set<ReportSection> reportSections property and ReportSection parentReportSection property.
My ReportSectionEdit.xhtml page has a tab which lists the reportSections and has a "Add reportSection" button, as follows:
| <s:button id="addreportSection"
| value="Add reportSection"
| view="/ReportSectionEdit.xhtml"
| propagation="none">
| <f:param name="reportSectionId" value="#{reportSectionHome.instance.id}"/>
| <f:param name="reportSectionFrom" value="ReportSection"/>
| </s:button>
|
When I click on "Add reportSection" button, I just go back to the same page.
Any help is appreciated
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044026#4044026
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044026
19 years, 1 month
[EJB 3.0] - Problem running Stateless bean with JBOSS 4.0.4 GA and EJB 3
by neisann
Hi there,
I?m trying to run na EJB application developed with JBOSS IDE 2.0 and JBOSS 4.0.4 GA. I have an remote stateless session bean named TestStatelessBean that inherit from TestStateless. Here is the code for them:
package com.test.ejbs;
import javax.ejb.Remote;
@Remote
public interface TestStateless {
public String testBean();
}
----------------------------------------------------------------------------
package com.test.ejbs;
import javax.ejb.*;
import com.test.ejbs.TestStateless;
public @Stateless class TestStatelessBean implements TestStateless {
public String testBean() {
return "the server returned this string";
}
}
------------------------------------------------------------------------------
I have a servlet that calls the EJB:
package com.test.web;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.naming.*;
import java.io.*;
import com.test.ejbs.*;
public class TestStatelessEJBServlet extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 1L;
private TestStatelessBean statelessBean;
public void init() {
try {
Context context = new InitialContext();
System.out.println("Before lookup");
// statelessBean = (TestStatelessBean) context.lookup("TestStatelessBean/remote");
statelessBean = (TestStatelessBean) context.lookup(TestStatelessBean.class.getName());
System.out.println("After lookup");
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
PrintWriter writer = resp.getWriter();
writer.write("The stateless bean returned this string: " +
statelessBean.testBean());
}
public void doPost(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
this.doGet(req, resp);
}
}
--------------------------------------------------------------------
If I try to get the bean with the code ?statelessBean = (TestStatelessBean) context.lookup("TestStatelessBean/remote");? I get a class cast exception.
If try to get the bean with the code ?statelessBean = (TestStatelessBean) context.lookup(TestStatelessBean.class.getName());? I get a Bean not bound exception.
I deployed my bean with the JBOSS IDE in the files TestInstallation.ejb3 and TetsInstallation.war. My project name is ejb3teste. These two files are in $JBOSS_HOME\server\default\deploy. The content of jndi.properties is:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost:1099
The web.xml file contains:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet-name>TestStatelessEJBServlet</servlet-name>
<servlet-class>com.test.web.TestStatelessEJBServlet</servlet-class>
<servlet-mapping>
<servlet-name>TestStatelessEJBServlet</servlet-name>
<url-pattern>/testStatelessEJB</url-pattern>
</servlet-mapping>
</web-app>
The content of the file packaging-buid.xml is:
?xml version="1.0" encoding="UTF-8"?
project name="Packaging Generator" "default="_packaging_generation_"
target name="_packaging_generation_" depends="N65540,N65565"
target name="N65540" description="TestInstallation.ejb3"
jar destfile="TestInstallation.ejb3"
zipfileset dir="src"
include name="jndi.properties"
zipfileset
zipfileset dir="bin" includes="**/ejbs/*"
jar
target
target name="N65565" description="TestInstallation.war
jar destfile="TestInstallation.war"
zipfileset dir="src" prefix="WEB-INF"
include name="web.xml"
zipfileset
zipfileset dir="bin" prefix="WEB-INF/classes" includes="**/web/*"
jar
target
project
In the jmx-console I have:
jboss.j2ee
* jar=TestInstallation.ejb3,name=TestStatelessBean,service=EJB3
* module=TestInstallation.ejb3,service=EJB3
* service=ClientDeployer
* service=EARDeployer
jboss.web
* J2EEApplication=none,J2EEServer=none,WebModule=//localhost/TestInstallation,j2eeType=Servlet,name=TestStatelessEJBServlet
----------------------------------------------------------
The JNDI Namespace
Global JNDI Namespace
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- TestStatelessBean (class: org.jnp.interfaces.NamingContext)
| +- remote (proxy: $Proxy58 implements interface com.test.ejbs.TestStateless,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
----------------------------------------------------------------------
I?m calling the servlet with the command line ?http://mymachine:8080/TestInstallation/testStatelessEJB?. I have to use this URL because the URL ?http://localhost:8080/TestInstallation/testStatelessEJB? doesn?t work. Do you think this can be the cause of the error?
Thank you very much.
Nei
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044025#4044025
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044025
19 years, 1 month