[JBoss Seam] - Re: Persistence unit not bound
by daleth
| 10:57:32,801 INFO [STDOUT] 10:57:32,801 DEBUG [SeamVariableResolver] resolving name: basicSearch
| 10:57:32,802 INFO [STDOUT] 10:57:32,802 DEBUG [Component] instantiating Seam component: basicSearch
| 10:57:32,802 INFO [STDOUT] 10:57:32,802 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 10:57:32,804 ERROR [STDERR] Dec 17, 2006 10:57:32 AM com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/basicSearch.xhtml]
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: basicSearch
| at org.jboss.seam.Component.newInstance(Component.java:1722)
| at org.jboss.seam.Component.getInstance(Component.java:1625)
| at org.jboss.seam.Component.getInstance(Component.java:1592)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:46)
| at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 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.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:613)
| Caused by: javax.naming.NameNotFoundException: portal not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.seam.Component.instantiateSessionBean(Component.java:1027)
| at org.jboss.seam.Component.instantiate(Component.java:1013)
| at org.jboss.seam.Component.newInstance(Component.java:1718)
| ... 45 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994505#3994505
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994505
19 years, 4 months
[JBoss jBPM] - Re: Problem testing Hello BPEL sample
by zauberlehrling
I 've found the following entry in the jndi:
anonymous wrote : Global JNDI Namespace
|
| +- jbpmbpel-client (class: org.jnp.interfaces.NamingContext)
| | +- service (class: org.jnp.interfaces.NamingContext)
| | | +- Hello (class: org.jboss.ws.jaxrpc.ServiceReferenceable)
|
And if I read the jndi with the following code:
Properties properties = new Properties();
| properties.setProperty("java.naming.provider.url", "jnp://localhost:1099");
| properties.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| properties.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming.client");
| properties.setProperty("j2ee.clientName", "jbpmbpel-client");
| InitialContext iniCtx = new InitialContext(properties);
|
| NamingEnumeration iter = (NamingEnumeration)iniCtx.list("jbpmbpel-client/service");
| while (iter.hasMore())
| {
| System.out.println(" "+iter.next());
| }
then I get the following answer:
Hello: org.jboss.ws.jaxrpc.ServiceReferenceable
This looks fine. But when I run the following commands:
Properties properties = new Properties();
| properties.setProperty("java.naming.provider.url", "jnp://localhost:1099");
| properties.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| properties.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming.client");
| properties.setProperty("j2ee.clientName", "jbpmbpel-client");
| InitialContext iniCtx = new InitialContext(properties);
|
| Object object = iniCtx.lookup("jbpmbpel-client/service/Hello");
then the answer is:
19:56:02,788 ERROR ServiceObjectFactory : Cannot create service
| javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
| at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:127)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
So as I understand there is a problem accessing the Hello-Object in the jndi.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994503#3994503
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994503
19 years, 4 months
[JBoss Seam] - jndi datasource publishing
by hstang
Hi, I'm new to Seam. I have a current interest to integrate Spring and Seam's data access strategy. However, I am unable to lookup the data source from JNDI using embedded ejb3 + SEAM configuration. I am using the "jpa" example from SEAM 1.1.0GA.
My log reports:
12:40:46,196 [main] INFO DataSourceFactory:43 - starting Datasource at JNDI name: java:/DefaultDS
| 12:40:46,216 [main] INFO LocalTxDataSource:102 - Bound datasource to JNDI name 'java:/DefaultDS'
|
However in my application, the only keys in the initial context are those listed in the jndi.properties, namely java.naming.factory.initial and java.naming.factory.url.pkgs.
| #jndi.properties
| java.naming.factory.initial org.jnp.interfaces.LocalOnlyContextFactory
| java.naming.factory.url.pkgs org.jboss.naming:org.jnp.interfaces
|
I have crawled through the Seam's source and there is only one place that initializes the jndi properties--Initialization.java, that's after reading in jndi.properties which makes sense.
So now I'm looking at org.jboss.seam.microcontainer.DataSourceFactory:
| // ds is of type LocalTxDataSource
| ds.setJndiName(jndiName);
| ds.setInitialContextProperties(Naming.getInitialContextProperties());
|
What does the code above do? I mean Seam is able to find the datasouce in my specified jndiName=java:/DefaultDS. However, in my application and in Spring, it could not find "DefaultDS" in the initial context.
Is it possible to bind the data source created by the microcontainer to JNDI in Seam? Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994497#3994497
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994497
19 years, 4 months