WSO2 ESB - From VFS to JMS MessageStore - vfs

I gotta to receive a file and send it to a jms message store
If I done this using Webservice evrithing work fine but if I try use VFS I recive following exception:
[2013-08-21 16:37:45,903] ERROR - VFSTransportListener Error processing File URI : file:///C:/test/myTestInput.txt
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at org.wso2.carbon.message.store.persistence.jms.util.JMSPersistentMessageHelper.getTransportHeaders(JMSPersistentMessageHelper.java:413)
at org.wso2.carbon.message.store.persistence.jms.util.JMSPersistentMessageHelper.createPersistentMessage(JMSPersistentMessageHelper.java:296)
at org.wso2.carbon.message.store.persistence.jms.JMSMessageStore.offer(JMSMessageStore.java:171)
at org.apache.synapse.mediators.store.MessageStoreMediator.mediate(MessageStoreMediator.java:83)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:328)
at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:581)
at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:324)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:158)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:107)
at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
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)

Related

Richfaces-3.3.3.Final, JSF2.0, facelet1.1.14 with weblogic 12c

I have issue with richfaces3.3.3.Final, jsf2.0, facelet1.1.14 with weblogic 12c.
Application is deploying successfully. While loading the login page getting the following exception.
Logs:-
java.io.IOException: Error parsing [jar:file:/C:/Oracle_Home12.2.1.2/wlserver/modules/glassfish.jsf.jar!/META-INF/mojarra_ext.taglib.xml]:
at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:410)
at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:431)
at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:197)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95)
java.io.IOException: Error parsing [zip:C:/Oracle_Home12.2.1.2/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/gems_2.0/n3ib5y/lib/jsf-impl-2.0.0.jar!/META-INF/taglib/ui.taglib.xml]:
at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:410)
at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:431)
at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:197)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
Caused By: org.xml.sax.SAXException: Error Handling [zip:C:/Oracle_Home12.2.1.2/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/gems_2.0/n3ib5y/lib/jsf-impl-2.0.0.jar!/META-INF/taglib/ui.taglib.xml#41,31]
at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:376)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:137)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1599)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1877)
Note:-
I have already check the *.taglib.xml version it was 2.0, which will compatible with JSF2.0. Please help to solve.

HazelCast client throws error when hazelcast server is restarted

I have a hazelcast server and client. The client successfully connects to its server. But due to some problem when the server needs to restarts, the client is not able to connect to the server.
My configuration on client side is
<network>
<cluster-members>
<address>127.0.0.1</address>
</cluster-members>
<smart-routing>true</smart-routing>
<redo-operation>true</redo-operation>
<connection-timeout>100000</connection-timeout>
<connection-attempt-limit>10</connection-attempt-limit>
<connection-pool-size>30</connection-pool-size>
</network>
And the error I get in the client is
Hazelcast instance is not active!. Stacktrace follows:
com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is no
t active!
at com.hazelcast.client.HazelcastClientProxy.getClient(HazelcastClientPr
oxy.java:245)
at com.hazelcast.client.HazelcastClientProxy.getMap(HazelcastClientProxy
.java:95)
at com.hazelcast.web.WebFilter.getClusterMap(WebFilter.java:302)
at com.hazelcast.web.WebFilter.loadHazelcastSession(WebFilter.java:252)
at com.hazelcast.web.WebFilter.createNewSession(WebFilter.java:246)
at com.hazelcast.web.WebFilter.access$1100(WebFilter.java:59)
at com.hazelcast.web.WebFilter$RequestWrapper.getSession(WebFilter.java:
403)
at com.hazelcast.web.WebFilter$RequestWrapper.getSession(WebFilter.java:
314)
at com.k12report.security.AuthController$_closure4.doCall(AuthController
.groovy:40)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(Pag
eFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter
.java:63)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:694)
at com.hazelcast.web.WebFilter$RequestWrapper$1.forward(WebFilter.java:3
42)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:704)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:745)
[2014-07-10 21:22:18,929] - errors.GrailsExceptionResolver Unable to render erro
rs view: Hazelcast instance is not active!
com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is no
t active!
at com.hazelcast.client.HazelcastClientProxy.getClient(HazelcastClientPr
oxy.java:245)
at com.hazelcast.client.HazelcastClientProxy.getMap(HazelcastClientProxy
.java:95)
at com.hazelcast.web.WebFilter.getClusterMap(WebFilter.java:302)
at com.hazelcast.web.WebFilter.access$1000(WebFilter.java:59)
at com.hazelcast.web.WebFilter$HazelcastHttpSession.getAttribute(WebFilt
er.java:448)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(Pag
eFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter
.java:63)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:694)
at com.hazelcast.web.WebFilter$RequestWrapper$1.forward(WebFilter.java:3
42)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:704)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:745)
[2014-07-10 21:22:19,130] - [/frontend].[grails] Servlet.service() for servlet g
rails threw exception
com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is no
t active!
at com.hazelcast.client.HazelcastClientProxy.getClient(HazelcastClientPr
oxy.java:245)
at com.hazelcast.client.HazelcastClientProxy.getMap(HazelcastClientProxy
.java:95)
at com.hazelcast.web.WebFilter.getClusterMap(WebFilter.java:302)
at com.hazelcast.web.WebFilter.access$1000(WebFilter.java:59)
at com.hazelcast.web.WebFilter$HazelcastHttpSession.getAttribute(WebFilt
er.java:448)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(Pag
eFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter
.java:63)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:694)
at com.hazelcast.web.WebFilter$RequestWrapper$1.forward(WebFilter.java:3
42)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:704)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:745)
[2014-07-10 21:22:19,371] - [/frontend].[default] Servlet.service() for servlet
[default] in context with path [/frontend] threw exception [org.springframework.
web.util.NestedServletException: Request processing failed; nested exception is
org.codehaus.groovy.grails.exceptions.GrailsRuntimeException: com.hazelcast.core
.HazelcastInstanceNotActiveException: Hazelcast instance is not active!] with ro
ot cause
com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is no
t active!
at com.hazelcast.client.HazelcastClientProxy.getClient(HazelcastClientPr
oxy.java:245)
at com.hazelcast.client.HazelcastClientProxy.getMap(HazelcastClientProxy
.java:95)
at com.hazelcast.web.WebFilter.getClusterMap(WebFilter.java:302)
at com.hazelcast.web.WebFilter.access$1000(WebFilter.java:59)
at com.hazelcast.web.WebFilter$HazelcastHttpSession.getAttribute(WebFilt
er.java:448)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(Pag
eFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter
.java:63)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:694)
at com.hazelcast.web.WebFilter$RequestWrapper$1.forward(WebFilter.java:3
42)
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:704)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:745)
And there is no any error on the server side.
Thanks

Error when access vcloud via jcloud

I got the following error when I tried to access VClouds using Jcloud. What would be the possible reason for this eror?
When I accessed the url https://something.com/api/admin/org/89925701-f1f9-406d-8c9f-26b1f7ca6843/catalogs using the browser, it desplays
No valid API version can be selected
2013-08-06 17:15:54,416 ERROR AllCatalogsInOrg [user thread 4]
catalogs in username, completed: 0/3, errors: 1, rate: 35ms/op
org.jclouds.vcloud.VCloudResponseException: request GET https://something.com/api/admin/org/89925701-f1f9-406d-8c9f-26b1f7ca6843/catalogs HTTP/1.1 failed with code 405, error: [majorErrorCode=405, message=HTTP method not allowed, minorErrorCode=METHOD_NOT_ALLOWED, stackTrace=null, vendorSpecificErrorCode=null]
at org.jclouds.vcloud.handlers.ParseVCloudErrorFromHttpResponse.handleError(ParseVCloudErrorFromHttpResponse.java:74)
at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:69)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.shouldContinue(BaseHttpCommandExecutorService.java:197)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:167)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:135)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
at org.jclouds.concurrent.config.DescribingExecutorService.submit(DescribingExecutorService.java:89)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.submit(BaseHttpCommandExecutorService.java:132)
at org.jclouds.http.TransformingHttpCommandExecutorServiceImpl.submit(TransformingHttpCommandExecutorServiceImpl.java:54)
at org.jclouds.http.TransformingHttpCommandImpl.execute(TransformingHttpCommandImpl.java:73)
at org.jclouds.rest.internal.AsyncRestClientProxy.createListenableFutureForHttpRequestMappedToMethodAndArgs(AsyncRestClientProxy.java:248)
at org.jclouds.rest.internal.AsyncRestClientProxy.invoke(AsyncRestClientProxy.java:148)
at com.sun.proxy.$Proxy86.getCatalog(Unknown Source)
at org.jclouds.vcloud.functions.AllCatalogsInOrg$1.apply(AllCatalogsInOrg.java:64)
at org.jclouds.vcloud.functions.AllCatalogsInOrg$1.apply(AllCatalogsInOrg.java:1)
at org.jclouds.concurrent.FutureIterables.transformParallel(FutureIterables.java:98)
at org.jclouds.concurrent.FutureIterables.transformParallel(FutureIterables.java:86)
at org.jclouds.vcloud.functions.AllCatalogsInOrg.apply(AllCatalogsInOrg.java:60)
at org.jclouds.vcloud.functions.AllCatalogsInOrg.apply(AllCatalogsInOrg.java:1)
at org.jclouds.vcloud.functions.AllCatalogItemsInOrg.apply(AllCatalogItemsInOrg.java:50)
at org.jclouds.vcloud.functions.AllCatalogItemsInOrg.apply(AllCatalogItemsInOrg.java:1)
at org.jclouds.vcloud.functions.VAppTemplatesInOrg.apply(VAppTemplatesInOrg.java:56)
at org.jclouds.vcloud.functions.VAppTemplatesInOrg.apply(VAppTemplatesInOrg.java:1)
at org.jclouds.vcloud.suppliers.VAppTemplatesSupplier$1$1.call(VAppTemplatesSupplier.java:82)
at org.jclouds.vcloud.suppliers.VAppTemplatesSupplier$1$1.call(VAppTemplatesSupplier.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
at org.jclouds.concurrent.config.DescribingExecutorService.submit(DescribingExecutorService.java:89)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.submit(BaseHttpCommandExecutorService.java:132)
at org.jclouds.http.TransformingHttpCommandExecutorServiceImpl.submit(TransformingHttpCommandExecutorServiceImpl.java:54)
at org.jclouds.http.TransformingHttpCommandImpl.execute(TransformingHttpCommandImpl.java:73)
at org.jclouds.rest.internal.AsyncRestClientProxy.createListenableFutureForHttpRequestMappedToMethodAndArgs(AsyncRestClientProxy.java:248)
at org.jclouds.rest.internal.AsyncRestClientProxy.invoke(AsyncRestClientProxy.java:148)
at com.sun.proxy.$Proxy86.getCatalog(Unknown Source)
at org.jclouds.vcloud.functions.AllCatalogsInOrg$1.apply(AllCatalogsInOrg.java:64)
at org.jclouds.vcloud.functions.AllCatalogsInOrg$1.apply(AllCatalogsInOrg.java:1)
at org.jclouds.concurrent.FutureIterables.transformParallel(FutureIterables.java:98)
at org.jclouds.concurrent.FutureIterables.transformParallel(FutureIterables.java:86)
at org.jclouds.vcloud.functions.AllCatalogsInOrg.apply(AllCatalogsInOrg.java:60)
at org.jclouds.vcloud.functions.AllCatalogsInOrg.apply(AllCatalogsInOrg.java:1)
at org.jclouds.vcloud.functions.AllCatalogItemsInOrg.apply(AllCatalogItemsInOrg.java:50)
at org.jclouds.vcloud.functions.AllCatalogItemsInOrg.apply(AllCatalogItemsInOrg.java:1)
at org.jclouds.vcloud.functions.VAppTemplatesInOrg.apply(VAppTemplatesInOrg.java:56)
at org.jclouds.vcloud.functions.VAppTemplatesInOrg.apply(VAppTemplatesInOrg.java:1)
at org.jclouds.vcloud.suppliers.VAppTemplatesSupplier$1$1.call(VAppTemplatesSupplier.java:82)
at org.jclouds.vcloud.suppliers.VAppTemplatesSupplier$1$1.call(VAppTemplatesSupplier.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
What version of vCloud Director is your cloud running?
From what I can tell jclouds only supports v1.0 and I get an error (but not the same as yours) as our installation supports only 1.5 and 5.1.
If your installation is more recent than 2012 (circa) chances are that it's newer than 1.0.

Spring integration - imap - credentials issue

Here is my xml:
<mail:inbound-channel-adapter id="imapAdapter"
store-uri="imaps://[avita.nir#gmail.com]:[secretPass]#imap.gmail.com/INBOX"
channel="recieveEmailChannel"
should-delete-messages="false"
should-mark-messages-as-read="true"
auto-startup="true"
java-mail-properties="javaMailProperties">
For some reason when i type this "store-uri" i get this exception (null password):
DEBUG: protocolConnect returning false, host=gmail.com], user=[avita.nir, password=<null>
21 יול 2013 15:32:05 ERROR LoggingHandler - org.springframework.integration.MessagingException: failure occurred while polling for mail
at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:73)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.doPoll(SourcePollingChannelAdapter.java:89)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:145)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:143)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:206)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:201)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolE xecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
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)
Caused by: org.springframework.integration.MessagingException: failure occurred while receiving from folder
at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:240)
at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:59)
... 18 more
Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified?
Remove the [ ] and you should be good - also if the username or password contains special characters you will have to escape them.
It's always useful to set mail.debug to true for these issues and you'll get more information on the console.

Error performing resource injection on glassfish

This is my problem:
I'm learning Java EE development and I wanted to build up a WebApplication using Ejb. First of all I tried developing on the same machine, creating a EJB module on a glassfish domain and accessing it through a web application running on the same machine but on different domain: all worked fine. I was able, using glassfish 3.1, to access to the EJBmodule from the webapp thanks to the definition of glassfish-web.xml in my WEB-ING folder:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<ejb-ref>
<ejb-ref-name>ejb/FirstBeanRemote</ejb-ref-name>
<jndi-name>corbaname:iiop:127.0.0.1:3700#java:global/EJBModule/FirstBean!ejb.FirstBeanRemote</jndi-name>
</ejb-ref>
</glassfish-web-app>
After this, I wanted to change experiment, using different machines for the ejb module and the webapp. First of all I installed on a debian machine glassfish 3.1 and deployed my module including the required interfaces. No errors returned in the deploying so I proceeded starting the domain and again all seems to work fine. In server.log I copied the portable jndi names for my EJB FirstBean:
Portable JNDI names for EJB FirstBean: [java:global/EJBModule/FirstBean, java:global/EJBModule/FirstBean!ejb.FirstBeanRemote]
So now on another machine using Netbeans ( under windows 7 ) I created the same webapp as the previous one just changing the glassfish-web.xml in this way:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<ejb-ref>
<ejb-ref-name>ejb/FirstBeanRemote</ejb-ref-name>
<jndi-name>corbaname:iiop:192.168.1.110:3700#java:global/EJBModule/FirstBean!ejb.FirstBeanRemote</jndi-name>
</ejb-ref>
</glassfish-web-app>
I'm sure about Ip(static in my lan) and port (I create a default domain on glassfish).
The problem comes now. When I start the webapplication I get the error:
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean prova
at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:211)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:103)
at com.sun.el.parser.AstValue.getValue(AstValue.java:179)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
at javax.faces.component.UIOutput.getValue(UIOutput.java:169)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1764)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.sun.faces.spi.InjectionProviderException: com.sun.enterprise.container.common.spi.util.InjectionException: Eccezione durante il tentativo di inserire Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session in class ciao.Prova: Lookup failed for 'java:comp/env/ejb/FirstBeanRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}
at org.glassfish.faces.integration.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:194)
at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:205)
... 51 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Eccezione durante il tentativo di inserire Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session in class ciao.Prova: Lookup failed for 'java:comp/env/ejb/FirstBeanRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:703)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:470)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:171)
at org.glassfish.faces.integration.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:184)
... 52 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/ejb/FirstBeanRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__' [Root exception is org.omg.CORBA.BAD_PARAM: Buono: IOP00100009: string_to_object conversion failed due to bad schema specific part in name java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__ vmcid: SUN minor code: 9 completed: No]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:599)
... 55 more
Caused by: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__' [Root exception is org.omg.CORBA.BAD_PARAM: Buono: IOP00100009: string_to_object conversion failed due to bad schema specific part in name java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__ vmcid: SUN minor code: 9 completed: No]
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:191)
at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy.create(ComponentEnvManagerImpl.java:1109)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:776)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:744)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:169)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:498)
... 59 more
Caused by: org.omg.CORBA.BAD_PARAM: Buono: IOP00100009: string_to_object conversion failed due to bad schema specific part in name java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__ vmcid: SUN minor code: 9 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy151.soBadSchemaSpecific(Unknown Source)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOperationImpl.java:227)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveINSURL(INSURLOperationImpl.java:154)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:145)
at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:976)
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:184)
... 64 more
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
at org.omg.CosNaming._NamingContextExtStub.resolve_str(_NamingContextExtStub.java:165)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOperationImpl.java:222)
... 68 more
It seems to me a jndi problem, infact in the exception list I can read "Lookup failed for 'java:comp/env/ejb/FirstBeanRemote', so the webapp is not even able to access to the EJBModule. But I'm wondering why, since I'm using the portable jndi provided me by the glassfish server itself!
I hope I was clear and someone can help me.
Max

Resources