[JBoss Portal] - Re: Permissions Portal Pages and Portlets
by PeterJ
Regarding Portal page permissions, add the following to each page entry:
<page>
| . . .
| <security-constraint>
| <policy-permission />
| </security-constraint>
| </page>
You have to explicitly give an empty permission or the default (Unchecked, viewrecursive) is applied.
Regarding portlet permissions, you cannot set permissions on a portlet window (actually you can, the Managament Portlet will let you, but the portal ignores the setting). Instead, set the permission on the portlet instance. To do this, in the Management Portlet, click on the Instances link at the top of the portlet window, then scroll through the list of instances until you find the instance for Portlet A, click the instance link (not the portlet link!) then click on Security at the right side of the window. Then you can set the security (only view access shows up for the various roles). (Wish I could post a screen shot...)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990131#3990131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990131
18Â years, 1Â month
[JNDI/Naming/Network] - JBoss server restart and java.rmi.NoSuchObjectException: no
by arunasreeram
Hi
I am running into an issue with remote object lookup after a Jboss Server restart.
I am running JBoss 4.0.5 GA.
I have a test case that does the following -
*test client creates Init Context with properties and successfully looks up a remote EJB interface.
*test client closes init context
*test client sleeps for 45 seconds.
*In the meanwhile the JBoss server is restarted.
*The test client wakes up and creates a new initial context with same props as before
*Test client tries to look up the same remote EJB interface as before.This time the look up fails with java.rmi.NoSuchObjectException: no such object in table.
*Even if the test client looks up a different remote EJB interface the same exception is thrown
The relevant code snippet from the test client is below
| InitialContext ctx = new InitialContext();
| ctx.addToEnvironment("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| ctx.addToEnvironment("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
| ctx.addToEnvironment(InitialContext.PROVIDER_URL,"my-hostname");
| Object beanobj = ctx.lookup("MyService/RemoteIAdmin");
| assertNotNull(beanobj);
| ctx.close();
| try {
| System.out.println("Waiting for 35 seconds. Restart Jboss now!!");
| Thread.sleep(45 * 1000); // wait for 30 seconds
| System.out.println("Done sleeping. Will do second lookup now");
| } catch (InterruptedException e) {
| e.printStackTrace();
| }
| InitialContext ctx_1 = new InitialContext();
| ctx_1.addToEnvironment("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| ctx_1.addToEnvironment("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
| ctx.addToEnvironment(InitialContext.PROVIDER_URL,"my-hostname");
| Object beanobj_1 = ctx.lookup("MyService/RemoteIAdmin");
| assertNotNull(beanobj_1);
|
The exception occurs on the second lookup the stack trace is as follows
| javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(Unknown Source)
| ....
| Caused by: java.rmi.NoSuchObjectException: no such object in table
| 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:625)
| ... 19 more
|
|
I turned on rmi debug for both server and client using -Dsun.rmi.loader.logLevel=verbose but I wasnt able to discern much from the log output
I did a bit of reading on the jboss forums and wiki but none of the solutions listed has helped me. Readings include
-http://wiki.jboss.org/wiki/Wiki.jsp?page=IGetNoSuchObjectException
-http://www.jboss.com/index.html?module=bb&op=viewtopic&t=62446
-AS
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990127#3990127
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990127
18Â years, 1Â month
[JBoss Seam] - java.lang.ClassCastException: org.apache.xerces.jaxp.SAXPars
by fxmichaud
Hi,
I use a JBOSS 4.04 (Seam + JSF/Facelet) with a JVM Sun 1.5.09.
One service must convert HTML to PDF. For this task, IText v.1.4.7 (http://www.lowagie.com/iText/) library is employed.
But IText requires a SAX parser factory and when I'm calling action, I obtain the next exception :
| 16:24:59,765 ERROR [STDERR] Error while converting document. Message: org.apache.xerces.jaxp.SAXParserFactoryImpl
| 16:24:59,765 ERROR [STDERR] java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
| 16:24:59,765 ERROR [STDERR] at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
In my classpath :
commons-beanutils-1.7.0.jar
| commons-codec-1.3.jar
| commons-digester-1.6.jar
| emma_ant.jar
| emma.jar
| hibernate-all.jar
| javax.servlet.jsp.jar
| jboss-aop-jdk50.jar
| jboss-cache-jdk50.jar
| jboss-ejb3-all.jar
| jbpm-3.1.1.jar
| jgroups.jar
| jstl.jar
| mailstuff.jar
| myfaces-api-1.1.3.jar
| myfaces-impl-1.1.3.jar
| portlet-api-lib.jar
| servlet-api.jar
| testng-4.5.1-jdk15.jar
| jboss-seam-debug.jar
| jboss-seam-ui.jar
| jboss-seam.jar
| postgresql-8.1-407.jdbc3.jar
| commons-io-1.1.jar
| itext-1.4.7.jar
| Tidy.jar
| thirdparty-all.jar
| xerces.jar
| resolver.jar
| serializer.jar
| xml-apis.jar
|
EAR hierarchy :
EAR
| + itext-1.4.7.jar
| + jboss-seam.jar
| + jbpm-3.1.1.jar
| + Tidy.jar
| + application.jar
| + application.ear
Partial code of service :
| try {
| SAXParserFactory factory = SAXParserFactory.newInstance();
| SAXParser saxParser = factory.newSAXParser();
|
| if (saxParser != null) {
| Document document = new Document(PageSize.A4);
| PdfWriter.getInstance(document, out);
| }
| }
| catch (ParserConfigurationException e)
| {
| System.err.println("[ParserConfigurationException] Error while converting document. Message: " + e.getMessage());
| }
| catch (Exception e) {
| System.err.println("Error while converting document. Message: " + e.getMessage());
| e.printStackTrace();
| }
Exist there a configuration handling to solve this problem ?
Thank you for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990122#3990122
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990122
18Â years, 1Â month