[Security & JAAS/JBoss] - j_securitycheck error 404
by kokhang
I have a webapp running. When I try to access a protected page, it will take me to the login page. There, I enter the user name and password. When i submit the form, the login page is shown again. If i enter my login info again, it will take me to an error page with the following information:
HTTP Status 404 - /j_security_check
type Status report
message /j_security_check
description The requested resource (/j_security_check) is not available.
JBossWeb/2.0.0.GA
if, however, I refresh the page after the login page is shown for the second time, I am taken to the protected page. This issue is intermittent.
I tried solving the problem by disabling caching but it still didnt work.
This is what i have done so far but with no success:
- Had all pages contain the following:
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="-1"/>
- Followed the instructions to disable caching from
http://wiki.jboss.org/wiki/Wiki.jsp?page=CachingLoginCredentials
and
http://wiki.jboss.org/wiki/Wiki.jsp?page=DisableCacheControl
The following is snippet of my web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Site</web-resource-name>
<url-pattern>/webadmin.html</url-pattern>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
<auth-constraint>
<role-name>Admin</role-name>
</auth-constraint>
</security-constraint>
<security-role>
Admin Role
<role-name>Admin</role-name>
</security-role>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginError.jsp</form-error-page>
</form-login-config>
</login-config>
<welcome-file-list>
<welcome-file>webadmin.html</welcome-file>
</welcome-file-list>
I'll appreciate any help i can get in order to get this issue resolved
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120262#4120262
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120262
18 years, 5 months
[JBoss jBPM] - jbpm designer deployment problem
by jh398
Hi,
I have just started using jbpm and currently using jbpm designer 3.1.2 and eclipse 3.3,
When i try to follow the example from the jbpm getting started guide and deploy from the eclipse jbpm designer (Test connection is OK), i get the following error,
!ENTRY org.jbpm.gd.jpdl 4 0 2008-01-15 22:32:59.714
!MESSAGE Exception happened while deploying
!STACK 0
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/jbpm-console/upload
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1170)
at org.jbpm.gd.jpdl.util.ProcessDeployer.deployProcessWithServlet(Unknown Source)
at org.jbpm.gd.jpdl.util.ProcessDeployer.access$3(Unknown Source)
at org.jbpm.gd.jpdl.util.ProcessDeployer$1.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:495)
at org.jbpm.gd.jpdl.util.ProcessDeployer.showProgressMonitorDialog(Unknown Source)
at org.jbpm.gd.jpdl.util.ProcessDeployer.deploy(Unknown Source)
at org.jbpm.gd.jpdl.deployment.DeploymentForm$1.widgetSelected(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2954)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
can anyone help?
many thanks
Jeff
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120257#4120257
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120257
18 years, 5 months
[Installation, Configuration & DEPLOYMENT] - How to hot redeploy ear file on windows Jboss.
by sunilk713
OS: Windows
Jboss ver : Not sure, but the latest
I want to do hot deployment of my *.ear file. I read it somewhere that if I change the following file, I should be abel to redeploy
C:\sfw\jboss\server\default\deploy\uaEar.ear\META-INF\application.xml
As soon I change it, I see the server tries to redeploy it, but it gives the error.
Can any anyone please let me know why I am getting this error.
>From the console following errors are observed
30 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [com.tektronix.undertakerLite.services], from group with resource name [classpath:/undertakerLite.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.tektronix.undertakerLite.services' defined in class path resource [undertakerLite.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.tektronix.coreframework.springutils.UAApplicationContext]: Constructor threw exception; nested exception is org.mule.MuleRuntimeException: Failed to reinitialise Mule after the Application Context was refreshed
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.tektronix.undertakerLite.services' defined in class path resource [undertakerLite.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.tektronix.coreframework.springutils.UAApplicationContext]: Constructor threw exception; nested exception is org.mule.MuleRuntimeException: Failed to reinitialise Mule after the Application Context was refreshed
Caused by:
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.tektronix.coreframework.springutils.UAApplicationContext]: Constructor threw exception; nested exception is org.mule.MuleRuntimeException: Failed to reinitialise Mule after the Application Context was refreshed
Caused by:
org.mule.MuleRuntimeException: Failed to reinitialise Mule after the Application Context was refreshed
Error listenerStart
16:57:20,361 ERROR [StandardContext] Context [/ua] startup failed due to previous errors
16:57:20,361 INFO [[/ua]] Closing Spring root WebApplicationContext
16:57:20,361 WARN [ServiceController] Problem starting service jboss.web.deployment:war=uaWeb.war,id=-884162305
org.jboss.deployment.DeploymentException: URL file:/C:/sfw/jboss/server/default/deploy/uaEar.ear/uaWeb.war/ deployment failed
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120256#4120256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120256
18 years, 5 months
[JBoss jBPM] - Re: jBPM in EJB environment
by jdbertron
Haha,
Very good question.
OK, I assume you want the database, hibernate cfg and jbpm cfg hidden from your users/applets, and you want the BPM to actually run on the J2EE server.
It's possible.
The Service Bean implementation actually relies on a couple of service beans.
It's been a while but you basically need to look them up,
Context initial = new InitialContext();
Object obj = initial.lookup(remoteCommandServiceJndiName);
RemoteCommandServiceHome remoteCommandServiceHome = (RemoteCommandServiceHome) PortableRemoteObject.narrow(obj,RemoteCommandServiceHome.class );
remoteCommandService = remoteCommandServiceHome.create();
and then you can use the service reference by sending it commands to execute:
result = remoteCommandService.execute(new GetProcessInstanceCommand(processInstanceId));
It's a really good design, but don't get your hopes up, it's not fully functional.
There are only about 6 command objects in the library, barely enough to get a listing of processes and their definitions. That works well. You can even signal transitions.
I'm patiently waiting to see if someone is going to contribute more commands to check permissions and set actors, get tasks etc...
It might be in there already, but I doubt it. And since the documentation, well , you're on your own.
Please post what you find here though. I'll have to tackle that myself when I'm done with the POJO implementation.
J.D.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120255#4120255
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120255
18 years, 5 months
[JBoss Seam] - custom component - HtmlLink works, HtmlCommandLink and HtmlA
by jsutherland
I am developing a Seam web application with 2.0.0.GA and I am writing a custom facelets component that instantiates seam and a4j components and renders itself.
Everything seems to be working fine but I have a problem where HtmlAjaxCommandLink (and HtmlCommandLink) will not work to call an action method I have set using setActionExpression, though switch to HtmlLink and it works fine.
| HtmlAjaxCommandLink link = new HtmlAjaxCommandLink();
| link.setId("link-"+id);
| div.getChildren().add(link);
| link.setParent(div);
| link.setValue(name);
| link.setReRender("some-id");
| MethodExpression methodExpression FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createMethodExpression(FacesContext.getCurrentInstance().getELContext(), "#{SomeAction.editAction("+id+")}", null, new Class<?>[0]);
| link.setActionExpression(methodExpression);
|
When I click this link it seems to rerender the part of the page it's supposed to, however the action is not called. This happens similarly when the link is defined as HtmlCommandLink except the page is reloaded.
When I define the link as HtmlLink (seam link) it works fine and the action is called, but the page is reloaded, and I am trying to do it with an ajax rerender.
One hint is about my problem is that when the a4j;outputPanel that I am rerendering is not set and ajaxRendered=false than the link doesn't rerender anything and a4j log output is as follows:
| debug[18:02:53,999]: Have Event [object Object] with properties: target: http://localhost:8080/calendar/home.seam#, srcElement: undefined, type: click
| debug[18:02:54,000]: NEW AJAX REQUEST !!! with form :j_id177
| debug[18:02:54,017]: Append hidden control j_id177 with value [j_id177] and value attribute [j_id177]
| debug[18:02:54,018]: Append hidden control autoScroll with value [] and value attribute []
| debug[18:02:54,018]: Append hidden control j_id177:_idcl with value [] and value attribute []
| debug[18:02:54,019]: Append hidden control j_id177:_link_hidden_ with value [] and value attribute []
| debug[18:02:54,019]: Append hidden control javax.faces.ViewState with value [_id1] and value attribute [_id1]
| debug[18:02:54,020]: parameter j_id177:edit-event-1 with value j_id177:edit-event-1
| debug[18:02:54,027]: Start XmlHttpRequest
| debug[18:02:54,028]: Reqest state : 1
| debug[18:02:54,029]: QueryString:
| AJAXREQUEST=_viewRoot&j_id177=j_id177&autoScroll=&j_id177%3A_idcl=&j_id177%3A_link_hidden_=&javax.faces.ViewState=_id1&j_id177%3Aedit-event-1=j_id177%3Aedit-event-1&
| debug[18:02:54,040]: Reqest state : 1
| debug[18:02:54,356]: Reqest state : 2
| debug[18:02:54,358]: Reqest state : 3
| debug[18:02:54,359]: Reqest state : 4
| debug[18:02:54,359]: Reqest end with state 4
| debug[18:02:54,359]: Response with content-type: text/xml;charset=UTF-8
| debug[18:02:54,360]: Full response content:
| <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml">
| <head><link type="text/css" rel="stylesheet" href="/calendar/a4j_3_1_3.GAcss/toolBar.xcss/DATB/eAF7WBtjAQAF7wHz" />
| <link type="text/css" rel="stylesheet" href="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/css/msg.css" />
| <link type="text/css" rel="stylesheet" href="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/css/msgs.css" />
| <link type="text/css" rel="stylesheet" href="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/css/calendar.xcss/DATB/eAF7WBtjAQAF7wHz" />
| <link type="text/css" rel="stylesheet" href="/calendar/a4j_3_1_3.GAcss/simpleTogglePanel.xcss/DATB/eAF7WBtjAQAF7wHz" />
| <link type="text/css" rel="stylesheet" href="/calendar/a4j_3_1_3.GAcss/tabPanel.xcss/DATB/eAF7WBtjAQAF7wHz" />
|
| <script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg.ajax4jsf.javascript.AjaxScript"> </script><script type="text/javascript"
| src="/calendar/a4j_3_1_3.GAorg/ajax4jsf/javascript/scripts/form.js"> </script><script type="text/javascript"
| src="/calendar/a4j_3_1_3.GAorg.ajax4jsf.javascript.PrototypeScript">
| </script><script type="text/javascript"
| src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/events.js">
| </script><script type="text/javascript"
| src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/utils.js">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/json/json-dom.js">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/scriptaculous/effects.js">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/jquery/jquery.js">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/JQuerySpinBtn.js">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/calendar.js">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg.ajax4jsf.javascript.ImageCacheScript">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAorg/richfaces/renderkit/html/scripts/browser_info.js">
| </script><script type="text/javascript" src="/calendar/a4j_3_1_3.GAscripts/simpleTogglePanel.js"> </script>
| <script type="text/javascript" src="/calendar/a4j_3_1_3.GAscripts/tabPanel.js">
| </script><meta name="Ajax-Update-Ids" content="" /><title></title></head><body>
| <span id="ajax-view-state">
| <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id1" />
| </span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
| debug[18:02:54,361]: Header Ajax-Expired not found, search in <meta>
| debug[18:02:54,361]: search for elements by name 'meta' in element #document
| debug[18:02:54,366]: getElementsByTagName found 2
| debug[18:02:54,366]: Find <meta name='Ajax-Update-Ids' content=''>
| debug[18:02:54,367]: Find <meta name='Ajax-Response' content='true'>
| debug[18:02:54,367]: Header Ajax-Update-Ids not found, search in <meta>
| debug[18:02:54,368]: search for elements by name 'meta' in element #document
| debug[18:02:54,372]: getElementsByTagName found 2
| debug[18:02:54,372]: Find <meta name='Ajax-Update-Ids' content=''>
| warn[18:02:54,373]: No information in response about elements to replace
| debug[18:02:54,373]: call getElementById for id= ajax-view-state
| debug[18:02:54,374]: Hidden JSF state fields: [object HTMLSpanElement]
| debug[18:02:54,374]: Namespace for hidden view-state input fields is undefined
| debug[18:02:54,375]: search for elements by name 'input' in element span
| debug[18:02:54,378]: getElementsByTagName found 1
| debug[18:02:54,379]: Replace value for inputs: 37 by new values: 1
| debug[18:02:54,379]: Input in response: javax.faces.ViewState
| debug[18:02:54,381]: Found same input on page with type: hidden
| debug[18:02:54,382]: Found same input on page with type: hidden
| debug[18:02:54,383]: Found same input on page with type: hidden
| debug[18:02:54,384]: Found same input on page with type: hidden
| debug[18:02:54,384]: Found same input on page with type: hidden
| debug[18:02:54,385]: Found same input on page with type: hidden
| debug[18:02:54,386]: Found same input on page with type: hidden
| debug[18:02:54,386]: Found same input on page with type: hidden
| debug[18:02:54,387]: search for elements by name 'INPUT' in element span
| debug[18:02:54,390]: getElementsByTagName found 0
| debug[18:02:54,391]: Replace value for inputs: 37 by new values: 0
| debug[18:02:54,391]: call getElementById for id= _A4J.AJAX.focus
| debug[18:02:54,392]: No focus information in response
| debug[18:02:54,392]: call getElementById for id= org.ajax4jsf.oncomplete
|
But when I change the a4j outputPanel to ajaxRendered=true the link seems to work (besides calling the action) and the panel does get rerendered and the a4j log looks normal and contains the xhtml for the panel that is to be rerendered.
Anything obviously wrong with what I am doing? Any hints are appreciated.
Thanks,
Jon
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120247#4120247
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120247
18 years, 5 months