[JBoss Seam] - Re: Security
by SmokingAPipe
"sbryzak2" wrote : There will be integration with JSF/JAAS security, but I can't promise that it will be in the first release. Do you have a specific requirement/reason for having to use JAAS?
I don't. I checked into JAAS and it seemed way more complicated than what I need.
For me, the use case I need is simple:
Log in users based on a simple call-back object, which will itself check passwords in the DB or using the EntityManager.
Restrict access to web pages based on the user type
Render or don't render certain components of web pages based on user type. For example, in a web forum, for a moderator show a "lock thread" button, but for ordinary users, don't show it.
That's all I need! I can do that quite easily with Seam and a Filter now, but it would be great if it were integrated.
Oh, and a bit of extra niceness I would like, but don't need: be able to annotate methods on various classes to say that only certain user roles can access them. So there might be methods on objects that an Administrator can access, but a Customer can't even use the method, so if I mess up, the object itself has a layer of protection. That would be nice.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992474#3992474
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992474
19 years, 7 months
[Installation, Configuration & Deployment] - Re: Exploded archives vs packages
by PeterJ
Advantages of deploying a packaged file: everything is in a single file; you can deploy using jmx-console (or twiddle).
Advantages of deploying an exploded directory: you can easily change/add various files (such as JSPs, CSS, HTML) and have them picked up automatically without redeploying the application (note that this does not work with class files); JBoss does not have to unpack the files into the tmp directory.
Yes, the exploded directory must have the same suffix as the packaged file. The main deployer user uses suffix to determine what kind of directory it is and then invokes the correct deployer (actually, it asks each deployer is it recognizes the file, and the first that say 'yes' gets to deploy it). Other than that, the contexts are the same as if you had unzipped the packaged file.
Yes, if you have to be careful if you switch between exploded and packaged, because a simple copy/overwrite will not work. In my Ant script, I typically attempt to delete both the file and directory before copying over whatever it is I am deploying. Unless I am always doing exploded, in which case Ant's copy task copies only the updated files.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992467#3992467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992467
19 years, 7 months
[JBossWS] - LinkageError when connecting to webservice
by draken
Hi,
I'm trying to connect (using Apache Cactus ServletTestRunner) to a WS deployed on JBoss4.0.5GA, and I'm getting the following exception:
|
| loader constraints violated when linking org/jboss/util/xml/JBossEntityResolver class
|
| java.lang.LinkageError: loader constraints violated when linking org/jboss/util/xml/JBossEntityResolver class
| at org.jboss.ws.jaxb.SchemaBindingBuilder.buildSchemaBinding(SchemaBindingBuilder.java:90)
| at org.jboss.ws.metadata.ServiceMetaData.getSchemaBinding(ServiceMetaData.java:332)
| at org.jboss.ws.metadata.ServiceMetaData.eagerInitialize(ServiceMetaData.java:400)
| at org.jboss.ws.metadata.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:147)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:129)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
| at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:96)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at com.mycompany.MyCactusTest.testFunctionalityAsWebservice(Unknown Source)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
| at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
| at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
| at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
| at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
| at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
| at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
| at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
| at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
| at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
| at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:534)
|
|
The code I'm invoking is:
|
| try {
| URL url = new URL(WSDL_URL);
|
| QName qname = new QName(WS_NAMESPACE, WS_NAME);
|
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(url, qname);
|
| (....)
| } catch(Exception e) {
| e.printStackTrace();
| }
|
|
Thanks in advance for your help,
Marcin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992465#3992465
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992465
19 years, 7 months
[Persistence, JBoss/CMP, Hibernate, Database] - LEFT JOIN, EXISTS or WHAT ELSE?
by toni
Hi,
I have three Entity Beans: Client, Person and Cooperation of which the later may connect/reference the first two using a @OneToOne Relationship.
I'm looking for a EJB QL Query, which will return all the Person's, which are not referenced/contained in Cooperation's.
How would the Query look like?
All the following queries produced errors or did not return anything:
SELECT x.p FROM (SELECT p, cm FROM Cooperation AS cm LEFT JOIN cm.partner p) as x WHERE x.cm IS NULL
OR
FROM Partner p WHERE NOT EXISTS (SELECT cm FROM Cooperation cm WHERE cm.partner IS NOT NULL AND cm.partner=p)
public class Person implements java.io.Serializable
{
@Id @NotNull @Length(min=5, max=40)
String hostname;
String firstName;
String lastName;
String street;
...
}
public class Client extends Person implements java.io.Serializable
{
@OneToOne(cascade={CascadeType.ALL})
@PrimaryKeyJoinColumn
EmailAccount emailAccount;
...
}
public class Cooperation implements Serializable
{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
long id;
@OneToOne(cascade={CascadeType.ALL})
Client client;
@OneToOne(cascade={CascadeType.ALL})
Partner partner;
...
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992450#3992450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992450
19 years, 7 months
[JBoss Seam] - Seam dependent on JBoss Cache?
by alexg79
I'm using Seam 1.1CR2 with Glassfish v1 final.
When I added:
<context-param>
| <param-name>com.sun.faces.verifyObjects</param-name>
| <param-value>true</param-value>
| </context-param>
|
to figure out why the submitted form data in my application was lost, I ran into this:
javax.faces.FacesException: Cant instantiate class: org.jboss.seam.ui.UICache.
...
Caused by: javax.faces.FacesException: Cant instantiate class: org.jboss.seam.ui.UICache.
...
Caused by: java.lang.NoClassDefFoundError: org/jboss/cache/CacheException
Am I understanding correctly that Seam UI's caching only works under JBoss?
I have not used the <s:cache> tag anywhere. How can I disable caching in Seam UI? The whole Seam UI thing seems largely undocumented.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992448#3992448
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992448
19 years, 7 months
[JBoss Seam] - could not get id of: org.jboss.seam.framework.Home.instance
by jgilbert
Does anyone have an idea why I am getting this error?
I am experimenting with the new framework classes in the 1.1.0.CR release.
java.lang.IllegalStateException: could not get id of: org.jboss.seam.framework.Home.instance
| at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.entityRefsToIds(ManagedEntityIdentityInterceptor.java:149)
| at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:83)
| at sun.reflect.GeneratedMethodAccessor297.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:33)
| at sun.reflect.GeneratedMethodAccessor295.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992446#3992446
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992446
19 years, 7 months
[JBoss Seam] - JavaScript Object Undefined in JMS ObjectMessage Topic Callb
by jasonshaffer
I am experiencing an object undefined JavaScript error in my client side Seam Remoting topic subscription callback function. The function is executed when expected (when I publish an object message to the topic) but the message object's value property is undefined. I have also tried to use the message's object property which is also undefined. Can anyone point me to the right direction?
Here is my JavaScript callback function:
| function subscriptionCallback(message) {
| var game = message.getValue();
| alert('Test: ' + game.getDescription());
| }
|
Here is my server side publishing code:
| private void publish(Game game) {
| try {
| topicPublisher.publish(topicSession.createObjectMessage(game));
| } catch (Exception ex) {
| throw new RuntimeException(ex);
| }
| }
|
Also, I notice an inconsistency in the chatroom example and the Contextual Components documentation. The chatroom example uses the getValue() method to retrieve the object from the message:
| function channelMessageCallback(message) {
| var ctl = getObject("channelDisplay");
|
| var actionDTO = message.getValue();
|
but the documentation instructs us to use the getObject() method:
anonymous wrote :
| A TextMessage contains the text value in its text field (or alternatively call getText() on it), while an ObjectMessage contains its object value in its object field (or call its getObject() method).
|
Thanks for your advise.
Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992445#3992445
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992445
19 years, 7 months
[Javassist user questions] - Re: Illegal class modifiers
by wessan
OK ... this is as much deatils as I can provide:
This is an example exception thrown:
Exception in thread "main" java.lang.ClassFormatError: Illegal class modifiers in class test/cz/solari/shards/example/app1/EmployeeImpl: 0x431
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
| at cz.solari.shards.loader.Loader.findClass(Loader.java:136)
| at cz.solari.shards.loader.Loader.loadClass(Loader.java:70)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at test.cz.solari.shards.source.DefaultSourceTest.main(DefaultSourceTest.java:23)
| 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:597)
It seems that the generated bytecode is incorrect. The code passed to defineClass method is generated using CtClass.toByteCode() method. The class may be altered (fields/methods may be added) by the custom ClassLoader however the class modifiers are never changed. It seems that Javassist doesn't throw any excetion during compilation, just the ClassLoader does.
I tried it with both JDK 1.6 and JDK 1.5 with both of them the same exception is thrown.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992436#3992436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992436
19 years, 7 months