[JNDI and Naming] - JBoss JMS JNDI lookup NameNotFoundException
by John Wasmat
John Wasmat [https://community.jboss.org/people/johnwasmat] created the discussion
"JBoss JMS JNDI lookup NameNotFoundException"
To view the discussion, visit: https://community.jboss.org/message/744682#744682
--------------------------------------------------------------
Hello,
Following is my JMS client code. I`m getting a NameNotFoundException. I`m struggling for almost 2 weeks now and would appreciate any help
Clinet code:
private static final String DEFAULT_MESSAGE = "Hello, World!";
private static final String DEFAULT_CONNECTION_FACTORY = "jms/RemoteConnectionFactory";
private static final String DEFAULT_DESTINATION = "jms/queue/test";
private static final String DEFAULT_MESSAGE_COUNT = "1";
private static final String DEFAULT_USERNAME = "admin";
private static final String DEFAULT_PASSWORD = "admin";
private static final String INITIAL_CONTEXT_FACTORY = "org.jboss.naming.remote.client.InitialContextFactory";
private static final String PROVIDER_URL = "remote://127.0.0.1:4447";
final Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
env.put(Context.PROVIDER_URL, System.getProperty(Context.PROVIDER_URL, PROVIDER_URL));
env.put(Context.SECURITY_PRINCIPAL, System.getProperty("username", DEFAULT_USERNAME));
env.put(Context.SECURITY_CREDENTIALS, System.getProperty("password", DEFAULT_PASSWORD));
context = new InitialContext(env);
// Perform the JNDI lookups
String connectionFactoryString = System.getProperty("connection.factory", DEFAULT_CONNECTION_FACTORY);
log.info("Attempting to acquire connection factory \"" + connectionFactoryString + "\"");
connectionFactory = (ConnectionFactory) context.lookup(connectionFactoryString);
log.info("Found connection factory \"" + connectionFactoryString + "\" in JNDI");
"admin" "admin" is added as an ApplicationRealm user. following is the exception i`m getting
SEVERE: Error in setupPubSub jboss/exported/jms/topic/ServerNotification -- service jboss.naming.context.java.jboss.exported.jboss.exported.jms.topic.ServerNotification
javax.naming.NameNotFoundException: jboss/exported/jms/topic/ServerNotification -- service jboss.naming.context.java.jboss.exported.jboss.exported.jms.topic.ServerNotification
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)
at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744682#744682]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 4 months
[jBPM] - OSGi: Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl
by Mariusz Cwikla
Mariusz Cwikla [https://community.jboss.org/people/mariuszcwikla] created the discussion
"OSGi: Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl"
To view the discussion, visit: https://community.jboss.org/message/780506#780506
--------------------------------------------------------------
Hello,
I'm trying to run JBPM 5.4 inside an OSGi container. I've encountered a problem when using JPAKnowledgeService.newStatefulKnowledgeSession.
I get following error:
java.lang.RuntimeException: Provider org.drools.persistence.jpa.KnowledgeStoreServiceImpl could not be set.
at org.drools.persistence.jpa.JPAKnowledgeService.loadProvider(JPAKnowledgeService.java:155)
at org.drools.persistence.jpa.JPAKnowledgeService.getJPAKnowledgeServiceProvider(JPAKnowledgeService.java:143)
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
....
Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl
I found out that JPAKnowledgeService uses reflection to instantiate KnowledgeStoreServiceImpl class. Both classes are in org.drools.persistence.jpa package, but one is knowledge-api-5.5.0.Final.jar and second is in drools-persistence-jpa-5.5.0.Final.jar.
I'm not an OSGi expert, but I think that both classes should be in one .jar file (currently it's "split packages" problem).
Currently I have a workaround to use KnowledgetStoreServiceImpl directly and not use JPAKnowledgeService.
Or is there another workaround?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/780506#780506]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[JBoss Web Services] - Migrating secured WS from JBoss 5.1 to 7.1.1
by Xavier Dury
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion
"Migrating secured WS from JBoss 5.1 to 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/780326#780326
--------------------------------------------------------------
Hi,
I've been migrating one of our projects from JBoss 5.1 to 7.1.1, all was done without too much problems but I'm stuck on the security configuration for a Web Service (which does not have WS-Security Policy):
In JBoss 5.1, configuring WS-Security was done within the file "META-INF/jboss-wsse-server.xml"
<jboss-ws-security>
<key-store-file>${wsse.keystore}</key-store-file>
<key-store-type>jks</key-store-type>
<key-store-password>${wsse.keystore.password}</key-store-password>
<trust-store-file>${wsse.truststore}</trust-store-file>
<trust-store-type>jks</trust-store-type>
<trust-store-password>${wsse.truststore.password}</trust-store-password>
<config>
<timestamp ttl="3000" />
<sign type="x509v3" alias="${wsse.keystore.alias}" />
<requires>
<timestamp maxAge="3000" />
<signature />
</requires>
</config>
</jboss-ws-security>
So, I just need requests and responses to be signed and timestamped but I have a hard time understanding how to achieve this in AS7.1.1.
I've read the page https://docs.jboss.org/author/display/JBWS/WS-Security https://docs.jboss.org/author/display/JBWS/WS-Security, but it didn't help.
Do I need to configure this via jbossws-cxf.xml? (tried this but seems to be ignored)
Is it available out-of-the-box in JBoss AS7.1.1? (I see spring is being used but there are no spring jars in the distribution)
I must be missing something...
Thanks,
Xavier
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/780326#780326]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months