[JBoss Portal] - Re: Cannot retrieve user: Unable to locate current JTA trans
by kpalania
Okay, one step further. This is what I need:
public boolean checkPermission(PortalPermission permission) throws IllegalArgumentException, PortalSecurityException
| {
| try
| {
| // Get the current authenticated subject through the JACC contract
| Subject subject = (Subject)PolicyContext.getContext("javax.security.auth.Subject.container");
|
| //
| return checkPermission(subject, permission);
| }
| catch (PolicyContextException e)
| {
| throw new PortalSecurityException(e);
| }
| }
This is the API in org.jboss.portal.security.impl.jacc.JACCPortalAuthorizationManager. If I can get this subject to be populated in my servlet, I am COOL!
Essentially, I need to be able to set the subject to this "javax.security.auth.Subject.container" context. I could even create a new instance of the Subject and add the necessary principals manually, so long as there is a way to actually make the container use that subject by setting this context variable.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071677#4071677
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071677
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: Configuration Problem - Incompletely deployed packages
by hugabï¼ gmx.net
You are right. this is a DataSource.
After renaming the file the JBoss still stopping by
D:\jboss\bin>run.bat -c all
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: D:\jboss\bin\\..
.
JAVA: C:\Programme\Java\jdk1.6.0\bin\java
.
JAVA_OPTS: -Dadobeidp.serverName=server1 -DCASBOOTPROPS=bam.properties -Dcom.
celequest.bootstrap.envpropname=CASBOOTPROPS -Dfile.encoding=utf8 -Djava.net.pre
ferIPv4Stack=true -Dprogram.name=run.bat -Djava.security.manager -Djava.security
.policy=../server/all/conf/server.policy -Djava.security.debug=failure -XX:MaxPe
rmSize=256m -Xms256m -Xmx1024m
.
CLASSPATH: C:\Programme\Java\jdk1.6.0\lib\tools.jar;D:\jboss\bin\\run.jar
.
===============================================================================
.
15:51:41,812 INFO [Server] Starting JBoss (MX MicroKernel)...
15:51:41,812 INFO [Server] Release ID: JBoss [Zion] 4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)
15:51:41,812 INFO [Server] Home Dir: D:\jboss
15:51:41,812 INFO [Server] Home URL: file:/D:/jboss/
15:51:41,812 INFO [Server] Patch URL: null
15:51:41,812 INFO [Server] Server Name: all
15:51:41,812 INFO [Server] Server Home Dir: D:\jboss\server\all
15:51:41,812 INFO [Server] Server Home URL: file:/D:/jboss/server/all/
15:51:41,812 INFO [Server] Server Temp Dir: D:\jboss\server\all\tmp
15:51:41,828 INFO [Server] Root Deployment Filename: jboss-service.xml
15:51:42,093 INFO [ServerInfo] Java version: 1.6.0,Sun Microsystems Inc.
15:51:42,093 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0-b105,Sun Microsystems Inc.
15:51:42,093 INFO [ServerInfo] OS-System: Windows 2003 5.2,x86
15:51:42,453 INFO [Server] Core system initialized
15:51:44,515 INFO [WebService] Using RMI server codebase: http://TOXSERVER2:8083/
15:51:44,531 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071673#4071673
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071673
18Â years, 8Â months
[JBoss Portal] - Re: Cannot retrieve user: Unable to locate current JTA trans
by kpalania
"sohil.shah(a)jboss.com" wrote : Yes you are correct. New security realm is not the issue. Its inability of the Servlet Environment to properly populate the security information needed by JBoss Portal.
|
| In fact why dont you try swicthing the portal security realm to your custom/shared security realm and its LoginModules. You will still need to use the deep JAAS/container managed approach, but you will be using the security realm which is shared by all your applications.
|
| You should be able to do this by:
|
| 1/ Modify <application-policy name="portal"> inside jboss-portal.sar/conf/login-config.xml to
| <application-policy name="{your security realm here}">
|
| 2/ Inside jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml make <security-domain>java:jaas/portal</security-domain> to <security-domain>java:jaas/{your security realm here}</security-domain>
|
| Note: even with this approach you will still need to use the container based/j_security approach for Portal to be properly populated with the security information.
|
| btw- I have never tried swapping the realm this way for Portal. This is in theory, so let us know if this actually works ;)
|
| Thanks
Sohil,
This is exactly how I have it now. It is working as I expected it to. And I've had this working this way for a while.
However, as I mentioned earlier, the requirements changed and for some other reasons, I can't do that anymore and I need to be able to explicitly invoke the login module. This is where the problem creeps up.
I disabled container managed security for app #1 that is also deployed in JBoss and uses the shared security realm. All works well because that is our app and we control the authorization.
It doesn't work for app#2 (using JBoss Portal) as the authorization is beyond my control. Actually, I even ran into a NPE from the JBoss Portal code (a Portal bug that I need to file a jira issue for) but I managed to get past it by doing some hacks. However, I am now at the point where the subject doesn't contain any principals.
The only, last thing I need is a way to add the principals to the subject. How do I get a handle to the subject so that I can add the principals, is the million dollar question at this point....
Have spent hours on this (identify the NPE, finding a hack for it, etc.) so any solutions to this would be immensely helpful and truly appreciated!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071672#4071672
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071672
18Â years, 8Â months
[JBoss jBPM] - can't delete a taskinstance from my database
by galvino
hi, i want to delete a task instance from my database (mysql).
this is my source code:
| Connection connection=jbpmContext.getConnection();
| Statement statement=connection.createStatement();
|
| // écriture de la requête de recherche
| request="DELETE "
| + "FROM jbpm_taskinstance "
| + "WHERE id_='"
| + taskInstanceId + "'";
|
| // execution de la requête
| statement.execute(request);
|
| // fermeture de la connection à la base de données
| statement.close();
| connection.close();
|
|
but i doesn't work because, i think it doesn't execute query :
| statement.execute(request);
|
i tried statement.executeUpDate(request);
but i have the same error:
|
| com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`paolo/jbpm_log`, CONSTRAINT `FK_LOG_TASKINST` FOREIGN KEY (`TASKINSTANCE_`) REFERENCES `jbpm_taskinstance` (`ID_`))
| at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)
| at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
| at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
| at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
| at com.mysql.jdbc.Connection.execSQL(Connection.java:3178)
| at com.mysql.jdbc.Statement.execute(Statement.java:711)
| at BesoinJBpm.deleteTaskInstance(BesoinJBpm.java:361)
| at BesoinJBpm.Test(BesoinJBpm.java:55)
| 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 junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
|
|
how can i delete this ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071667#4071667
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071667
18Â years, 8Â months