Thursday, March 27, 2014

Jboss naming context factory and url


You might get following error while initial testing of your project

02:52:52,174 INFO  [stdout] (http-localhost/127.0.0.1:8088-1) INFO : CommonServlet do post

02:52:52,185 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.Consulting.war:main" from Service Module Loader

02:52:52,185 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

02:52:52,185 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

02:52:52,186 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

02:52:52,186 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.InitialContext.init(Unknown Source)

02:52:52,186 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.InitialContext.<init>(Unknown Source)

02:52:52,186 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.framework.naming.NamingWrapper.doLookUp(NamingWrapper.java:24)


Possible solution of this problem is changing the entry in
"org.jboss.naming.remote.client.InitialContextFactory".
"remote://localhost:4447"

but still it will fail :



03:32:57,376 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.Consulting.war:main" from Service Module Loader

03:32:57,376 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

03:32:57,377 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

03:32:57,377 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

03:32:57,377 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.InitialContext.init(Unknown Source)

03:32:57,377 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.InitialContext.<init>(Unknown Source)


Fed up....
Now remove the entry and create initail context with any hashtable .

You might possible get the following error

03:58:25,999 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) javax.naming.NameNotFoundException: consultingDS -- service jboss.naming.context.java.consultingDS

03:58:26,000 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103)

03:58:26,000 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)

03:58:26,000 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:120)

03:58:26,001 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)

03:58:26,001 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)

03:58:26,001 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)  at javax.naming.InitialContext.lookup(Unknown Source)


org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103)


Then you have to make sure that your standalone.xml and domain.xmlis updated with the datasource and driver

If you have updated domain.xml and still the same exception as above the you have to update standalone.xml
while starting server might throw the following exception :


04:04:41,444 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.jdbc-driver.oracle (missing) dependents: [service jboss.driver-demander.java:/consultingDS, service jboss.data-source.java:/consultingDS]

04:04:41,564 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management



Tuesday, March 11, 2014

JBOSS AS 7 JMS

Hi Guys ,

I am going to set up Jboss AS 7 using Eclipse Kepler .

First of all you need to downlaod Jboss Developer Studios for Eclipse Kepler .

You need to create a server and all that basic steps that everyone knows .

If you are using JBOSS AS 7 for the first time and if you are an overconfident JBOSS 5 user , then be prepared you might face some difficulties .

Eclipse , by default will set up Program argument for server as

-mp "D:/software/jboss-eap-6.2.0/jboss-eap-6.2/modules" -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b localhost -c standalone.xml

You need to change it to

-mp "D:/software/jboss-eap-6.2.0/jboss-eap-6.2/modules" -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b localhost -c standalone-full.xml

Remember you can start JBOSS using standalone.xml also but messaging will not be visible and hornetq server for messaging will not be started .


ec2-user@ec2 Permission denied