[JBoss Seam] - remoting helloworld on tomcat
by billbruyn
Should I be able to deploy the remoting helloworld example to a standalone tomcat? A few properties were left out of the build script so that deploy.tomcat didn't work like it did with the other examples I've tried. Fixed that up and got it to deploy, but now I get the following on execution. Did I leave something out of the build, or am I barking up the wrong tree here?
ERROR 02-10 07:03:58,589 (Log4JLogger.java:error:119) -Error during remote request
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: helloAction
| at org.jboss.seam.Component.newInstance(Component.java:735)
| at org.jboss.seam.Component.newInstance(Component.java:1308)
| at org.jboss.seam.Component.getInstance(Component.java:1263)
| at org.jboss.seam.Component.getInstance(Component.java:1246)
| at org.jboss.seam.remoting.Call.execute(Call.java:101)
| at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:92)
| at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:56)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 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.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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.naming.NamingException: Local server is not initialized
| at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.<init>(InitialContext.java:197)
| at org.jboss.seam.util.Naming.getInitialContext(Naming.java:26)
| at org.jboss.seam.util.Naming.getInitialContext(Naming.java:37)
| at org.jboss.seam.Component.instantiate(Component.java:774)
| at org.jboss.seam.Component.newInstance(Component.java:731)
| ... 22 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975496#3975496
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975496
19 years
[JBossWS] - <mapped-name> in <service-ref> required but not legal?
by georgesberscheid
Hi,
I'm trying to reference a web service endpoint from an EJB. Since the @WebServiceRef annotation is not yet available in EJB3 RC9 I want to use <service-ref> in ejb-jar.xml:
| <service-ref>
| <service-ref-name>service/myWebService</service-ref-name>
| <service-interface>com.foo.bar.MyWebService</service-interface>
| <wsdl-file>META-INF/WebService.wsdl</wsdl-file>
| <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
| <port-component-ref>
| <service-endpoint-interface>com.foo.bar.MyWebServiceEndpoint</service-endpoint-interface>
| </port-component-ref>
| </service-ref>
|
This works nicely when included in the web.xml file of a servlet, but when included in the ejb-jar.xml I get the following exception during deployment:
| java.lang.RuntimeException: mapped-name is required for <service-ref> service/myWebService of MyStatelessBean
| at org.jboss.injection.WebServiceHandler.loadXml(WebServiceHandler.java:48)
| at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:268)
| at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java:116)
| at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:273)
|
Now, that error message seems pretty clear, however if I add a <mapped-name> tag in <service-ref> (as it's possible in a <resource-ref>) deployment fails with the following exception:
| org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'mapped-name'. One of '{"http://java.sun.com/xml/ns/j2ee":service-qname, "http://java.sun.com/xml/ns/j2ee":port-component-ref, "http://java.sun.com/xml/ns/j2ee":handler}' is expected. @ *unknown*[17,18]
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:156)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:169)
| at org.jboss.ejb3.metamodel.EjbJarDDObjectFactory.parse(EjbJarDDObjectFactory.java:87)
| at org.jboss.ejb3.Ejb3HandlerFactory$DDFactory.<init>(Ejb3HandlerFactory.java:44)
|
What am I supposed to do?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975490#3975490
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975490
19 years
[JBoss Seam] - Populate pojoCache from Database at startup
by rlhr
Hello,
I created a component that is initialized at startup.
This component is supposed to retrieve data from the database and store them in the pojoCache.
The component is defined as:
@Scope(ScopeType.APPLICATION)
| @Intercept(NEVER)
| @Startup(depends = {"pojoCache"})
| @Name("myComponent")
| public class MyComponent {
|
| privatePojoCache pojoCache = org.jboss.seam.core.PojoCache.instance();
|
| private EntityManager entityManager;
|
| @Create
| public void startup() throws Exception {
|
| // get data and store in the cache
| }
| }
|
The entityManager that is also a component defined in the component.xml file as:
<component name="entityManager" class="org.jboss.seam.core.ManagedPersistenceContext">
| <property name="persistenceUnitJndiName">java:/EntityManagerFactories/myDB</property>
| </component>
|
To make sure the entityManager is loaded, I guess I need to add in the startup dependencies "entityManager", but then how do I get an instance of entityManager at this point?
Injection is not working at startup.
Thanks,
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975482#3975482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975482
19 years
[JBoss Portal] - LDAP and Active Directory
by creative77
I have been trying to setup LDAP in JBoss Portal, I have the user authenticating but, I don't know how to get the correct role to get logged in.
I get a "HTTP Status 403 - Access to the requested resource has been denied"
which I believe is due to the group/role not be resolved correctly.
I am using the LdapExtLoginModule below is the trace from the log file after trying to get logged in.
Any help would be appreciated...
###################################################
08:12:41,235 DEBUG [CoyoteAdapter] Requested cookie session id is 5A3FCFF056D82C70B3E68866F9CE0384
08:12:41,235 DEBUG [AuthenticatorBase] Security checking request POST /portal/j_security_check
08:12:41,235 DEBUG [FormAuthenticator] Authenticating username 'dsj0920'
08:12:41,235 DEBUG [FormAuthenticator] Authentication of 'XXX0920' was successful
08:12:41,235 DEBUG [FormAuthenticator] Redirecting to original '/portal'
08:12:41,235 DEBUG [AuthenticatorBase] Failed authenticate() test ??/portal/j_security_check
08:12:41,235 DEBUG [CoyoteAdapter] Requested cookie session id is 5A3FCFF056D82C70B3E68866F9CE0384
08:12:41,235 DEBUG [AuthenticatorBase] Security checking request GET /portal
08:12:41,235 DEBUG [RealmBase] Checking constraint 'SecurityConstraint[Authenticated]' against GET / --> true
08:12:41,235 DEBUG [RealmBase] Checking constraint 'SecurityConstraint[Secure]' against GET / --> false
08:12:41,235 DEBUG [RealmBase] Checking constraint 'SecurityConstraint[Secure+Authenticated]' against GET / --> false
08:12:41,235 DEBUG [RealmBase] Checking constraint 'SecurityConstraint[Authenticated]' against GET / --> true
08:12:41,235 DEBUG [RealmBase] Checking constraint 'SecurityConstraint[Secure]' against GET / --> false
08:12:41,235 DEBUG [RealmBase] Checking constraint 'SecurityConstraint[Secure+Authenticated]' against GET / --> false
08:12:41,235 DEBUG [AuthenticatorBase] Calling hasUserDataPermission()
08:12:41,235 DEBUG [RealmBase] User data constraint has no restrictions
08:12:41,235 DEBUG [AuthenticatorBase] Calling authenticate()
08:12:41,235 DEBUG [FormAuthenticator] Restore request from session '5A3FCFF056D82C70B3E68866F9CE0384'
08:12:41,235 DEBUG [AuthenticatorBase] Authenticated 'XXX0920' with type 'FORM'
08:12:41,235 DEBUG [FormAuthenticator] Proceed to restored request
08:12:41,235 DEBUG [AuthenticatorBase] Calling accessControl()
08:12:41,235 DEBUG [RealmBase] Username XXX0920 does NOT have role Authenticated
08:12:41,235 DEBUG [AuthenticatorBase] Failed accessControl() test
Here is what the RoleDN output is:
################################################
08:15:51,032 DEBUG [AuthenticatorBase] Security checking request GET /portal
08:15:51,032 DEBUG [AuthenticatorBase] We have cached auth type FORM for principal GenericPrincipal[dsj0920(CN=AccessIT,CN=Users,DC=adomain,DC=com,CN=Admin,OU=Security Groups,OU=Adomain Users,DC=adomain,DC=com,CN=Citrix Users,OU=Farm,OU=Citrix,DC=adomain,DC=com,CN=GG AP All Associates,OU=Security Groups,OU=AdomainUsers,DC=adomain,DC=com,CN=GG AP All Information Systems,OU=Security Groups,OU=Adomain Users,DC=adomain,DC=com,CN=GG AP Portal Admins,OU=Security Groups,OU=Adomain Users,DC=adomain,DC=com,CN=GG AP Portal Module Administrators,OU=Security Groups,OU=Adomain Users,DC=adomain,DC=com,CN=GG FA Associate Portal Development,CN=Users,DC=adomain,DC=com,CN=GG FA HROL Credentialing File Access,CN=Users,DC=adomain,DC=com,CN=Help Desk,CN=Users,DC=adomain,DC=com,CN=INFOSYS,CN=Users,DC=adomain,DC=com,CN=IS - Apps Team,CN=Users,DC=adomain,DC=com,CN=MRI NIMC,CN=Users,DC=adomain,DC=com,CN=Telecom,CN=Users,DC=adomain,DC=com,CN=\#Associate Portal Steering Committee,CN=Distribution Lists,CN=Users,DC=adomain,DC=com,CN=\#Change Management,CN=Distribution Lists,CN=Users,DC=adomain,DC=com,CN=\#Company-Wide,CN=Distribution Lists,CN=Users,DC=adomain,DC=com,CN=\#Core Upgrade Applications Team,CN=Distribution Lists,CN=Users,DC=adomain,DC=com,CN=\#IS-Application Team,CN=Distribution Lists,CN=Users,DC=adomain,DC=com,CN=\#IS-CHS31,CN=Distribution Lists,CN=Users,DC=adomain,DC=com,)]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975481#3975481
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975481
19 years