[JBoss Tools] - Eclipse "Deployment Assembly" including too many jars in war
by Brian Wallis
Brian Wallis [http://community.jboss.org/people/bwallis42] created the discussion
"Eclipse "Deployment Assembly" including too many jars in war"
To view the discussion, visit: http://community.jboss.org/message/608684#608684
--------------------------------------------------------------
I have a war project that is assembled from a number of other local projects and depencencies, the projects are all maven based builds. (JBoss Developer Studio is 4.0.0.GA running with JDK 1.6.0_24 on a Mac OSX 10.6).
To configure the war to deploy in a jboss 6 server in eclipse I configure the projects and the maven depencencies in the web deployment assembly under the Deployment Assembly tab in the project properties. The problem that I have is that I have to include the maven dependencies in the deployment assembly (of course) but that seems to be including *all* of the depencencies +regardless of the scope+.
When I build the war in maven only the compile and runtime dependencies are included in the war but when running in jbds the test and provided depencencies are also (wrongly) being included in the deployed war.
Is there any way to exclude these? They should not be included in the deployment and it means that I am developing and testing with something that is different from what is actually deployed in the real war file and the behaviour can change.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608684#608684]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[Javassist] - Adding interface to an existing class
by mnrz
mnrz [http://community.jboss.org/people/mnrz] created the discussion
"Adding interface to an existing class"
To view the discussion, visit: http://community.jboss.org/message/608679#608679
--------------------------------------------------------------
Hi
I have a class which is in legacy system and we cannot change the class. I need to create a java proxy for that class but this is a class without interface. So I have created an interface and write the following code to add this interface to that class at runtime but the class.getInterfaces() method still returns no interface!
--
public class Main {
public static void main(String[] args) throws Exception {
//@SuppressWarnings("rawtypes")
createInterface();
AnAbstractClass instance = new AClassFromAbstract();//instance.getClass().getInterfaces()
Object proxy = Proxy.newProxyInstance(ProxyIntAnAbstractClass.class.getClassLoader(),
new Class[] {ProxyIntAnAbstractClass.class},
new MyInvocationHandler(instance));
ProxyIntAnAbstractClass instance2 = (ProxyIntAnAbstractClass) proxy;
instance2.doSomething();
instance2.doSomethingElse();
}
public static Class createInterface() throws Exception{
ClassPool pool = ClassPool.getDefault();
ClassPath cp = new ClassClassPath(AnAbstractClass.class);
pool.insertClassPath(cp);
pool.importPackage("com.macquarie.test.proxy");
CtClass myinterface = pool.get("com.mmm.test.proxy.ProxyIntAnAbstractClass");
CtClass tclass = pool.getCtClass("com.mmm.test.proxy.AnAbstractClass");
tclass.setInterfaces(new CtClass[] {myinterface});
tclass.rebuildClassFile();
tclass.detach();
return myinterface.toClass();
}
}
--
When I execute this code, since the ProxyIntAnAbstractClass is not interface of AnAbstractClass, InvocationHandler complains that the object is not an instance of declaring class
Can you please help me on this?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608679#608679]
Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Messaging] - jboss report this error when create session for jms
by dugu sword
dugu sword [http://community.jboss.org/people/dugusword] created the discussion
"jboss report this error when create session for jms"
To view the discussion, visit: http://community.jboss.org/message/608598#608598
--------------------------------------------------------------
My program run well for several weeks, but it corrupt one day
Has somebody tell me what's the problem?thanks
org.jboss.jms.exception.MessagingJMSException: Failed to invoke
at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$createSessionDelegate$aop(ClientConnectionDelegate.java:190)
at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeTarget(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
at org.jboss.jms.client.container.StateCreationAspect.handleCreateSessionDelegate(StateCreationAspect.java:115)
at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateSessionDelegate_28980466.invoke(StateCreationAspect_z_handleCreateSessionDelegate_28980466.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ConnectionAspect.handleCreateSessionDelegate(ConnectionAspect.java:164)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.createSessionDelegate(ClientConnectionDelegate.java)
at org.jboss.jms.client.JBossConnection.createSessionInternal(JBossConnection.java:269)
at org.jboss.jms.client.JBossConnection.createSession(JBossConnection.java:91)
at com.bjdv.acadapter.server.jms.JmsFactory.getQueueSession(JmsFactory.java:83)
at com.bjdv.acadapter.server.jms.JmsClient.conn(JmsClient.java:73)
at com.bjdv.acadapter.server.jms.JmsClient.<init>(JmsClient.java:33)
at com.bjdv.acadapter.server.Client.sendJms(Client.java:51)
at com.bjdv.acadapter.server.io.WebClient.onReceive(WebClient.java:70)
at com.bjdv.acadapter.server.io.ServerHandlerAdapter.messageReceived(ServerHandlerAdapter.java:59)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:58)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:180)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: Cannot find object in dispatcher with id bt81-7a8exnng-1-mn4ju9mg-erx8ge-h3e6o4c5
at org.jboss.jms.wireformat.ConnectionCreateSessionDelegateRequest.serverInvoke(ConnectionCreateSessionDelegateRequest.java:84)
at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:157)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:768)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:721)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:575)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:213)
at org.jboss.remoting.Client.invoke(Client.java:1927)
at org.jboss.remoting.Client.invoke(Client.java:770)
at org.jboss.remoting.Client.invoke(Client.java:758)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
... 43 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608598#608598]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Portal] - SecurityAssociation values are null when called from authenticating EJB
by Siddu Bulla
Siddu Bulla [http://community.jboss.org/people/hublisid] created the discussion
"SecurityAssociation values are null when called from authenticating EJB"
To view the discussion, visit: http://community.jboss.org/message/608572#608572
--------------------------------------------------------------
I have a web applciation and an EJB component.
I am using GenericHeaderAuthenticator and SSOLoginModule for the authentication. In GenericHeaderAuthenticator, I am getting the roles from siteminder and setting in org.jboss.security.SecurityAssociation class.
SecurityAssociation.+setContextInfo+("sm_role", roles);
For the authentication in EJB, the securityDomain is pointing to SSOLoginModule,
When I am trying to access the SecurityAssociation context info in SSOLoginModule , its giving me null values, so the EJB authentication failed!!
String role = (String)SecurityAssociation.+getContextInfo+("sm_role"); roles are coming as null.
This problem is in Unix environment, the same code I tried in Windows environment it's working fine.
Can anyone help me to resolve this issue?
The configuration are as below:-
####################EJB Code:######################################
@org.jboss.ejb3.annotation.SecurityDomain("SSOGenericHeaderAuth")
@Stateless
**public class** FooBean **implements** FooRemote {
*@RolesAllowed("essga_cmdbost_custodian") *
@Resource **private** SessionContext sctx;
*#######war-deployers-jboss-beans.xml(c:\jboss-5.1.0.GA\server\default\deployers\jbossweb.deployer\META-INF) ########*
<property name="authenticators">
<map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
<entry>
<key>HEADER</key>
<value>org.jboss.example.web.tomcat.security.GenericHeaderAuthenticator</value>
</entry>
...........
...........
*######web.xml*###########
<login-config>
<auth-method>HEADER</auth-method>
</login-config>
*#######login-config.xml(c:\jboss-5.1.0.GA\server\default\conf):##########*
<application-policy name="SSOGenericHeaderAuth">
<authentication>
<login-module code="org.jboss.example.web.tomcat.security.SSOLoginModule" flag="sufficient"/>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/jmx-console-users.properties</module-option>
<module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608572#608572]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[jBPM] - jbpm5 Web Designer (Oryx based) without Guvnor integration?
by Rama Kaldindi
Rama Kaldindi [http://community.jboss.org/people/k.ramaraju] created the discussion
"jbpm5 Web Designer (Oryx based) without Guvnor integration?"
To view the discussion, visit: http://community.jboss.org/message/608178#608178
--------------------------------------------------------------
Hi All,
I installed jbpm 5 (with bpmn2.0) and played with couple of examples using both the eclipse editor and the web-based editor. So even though, as engineer I like the eclipse editor, we would like to expose the web-based interface for our business users to define business processes (the very objective of BPMN).
However, I see that the Web-Designer (Oryx based) is tightly integrated with the Guvnor repository. But what we really want to do is:
- Use the Web-designer integrated/cutomized within our web-app that does not use/integrate with Guvnor repository.
- Once the user created the Business Process, he/she would have option to 'export' the BPMN 2.0 xml file directly.
- Our app would let user send/upload that xml and the same can then be used with rest of the jbpm execution framework
To achieve above, I think I have following options:
A) Build a web-designer using Oryx framework directly
B) Decouple the web-designer shipped with jbpm 5 and use it for my purposes.
With option A) I would not be able to make use of the good-work that the jbpm team might have done already (for translations/customizations etc.).
So for option B):
- Is the web-designer code/binary (being shipped with jbpm 5) fairly indpendent so that I can use it? If so, can anyone point me to the right jars/wars?
- Does such jar/war capable of exporting BPMN 2.0 xml directly or the translation magic happen in Guvnor integration part?
Bottomline is Iam struggling to find the boundary between the jbpm 5 shipped Web-Designer and the Guvnor repository. So any help in this regard would be highly appreciated.
Regards
Rama
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608178#608178]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months