[JNDI/Naming/Network] - Accessing EJB through HTTPS Invoker
by eeldor
Hi,
I'm trying to access ejb3 beans through RMI over HTTP using jboss4 app server.
these are the configurations I did:
1) I've configured my jndi.properties with the following:
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
java.naming.provider.url=http://localhost:1099/invoker/JNDIFactory
2) configured the deploy/http-invoker.sar/META-INF/jboss-service.xml and http-invoker.war/WEB-INF/web.xml as written in the jboss tutorial.
BUT, in the client's main, when reaching the
context = new InitialContext();
I get the following exception:
javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.lang.ClassCastException: java.rmi.MarshalledObject]
at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:84)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.(Unknown Source)
at test.lib.Ejb3Client.createContext(Ejb3Client.java:178)
at test.lib.Ejb3Client.main(Ejb3Client.java:199)
Caused by: java.lang.ClassCastException: java.rmi.MarshalledObject
at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:135)
at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:80)
... 6 more
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.lang.ClassCastException: java.rmi.MarshalledObject]
at test.lib.Ejb3Client.createContext(Ejb3Client.java:187)
at test.lib.Ejb3Client.main(Ejb3Client.java:199)
Caused by: javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.lang.ClassCastException: java.rmi.MarshalledObject]
at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:84)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.(Unknown Source)
at test.lib.Ejb3Client.createContext(Ejb3Client.java:178)
... 1 more
Caused by: java.lang.ClassCastException: java.rmi.MarshalledObject
at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:135)
at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:80)
... 6 more
does anyone has a clue about the problem?
regards,
Elad
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023588#4023588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023588
19Â years, 1Â month
[Installation, Configuration & Deployment] - JBoss 5beta1, JSF1.2 and Netbeans Visual Web Pack
by h0ppy
Hi, I'm trying to get a net beans visual web pack created project to deploy in Jboss 5 beta 1. Initially Jboss complained that the generated managed-beans.xml was not well formed, but I couldn't see anything wrong with it according the the JSF1.2 schema:
| <?xml version="1.0" encoding="UTF-8"?>
| <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
| <managed-bean>
| <managed-bean-name>BackOfficeSession</managed-bean-name>
| <managed-bean-class>com.uk.realistic.regal.web.BackOfficeSession</managed-bean-class>
| <managed-bean-scope>session</managed-bean-scope>
| </managed-bean>
| ...
| (all lot more of the same)
| ...
|
| </faces-config>
|
Moving this into the main faces-config.xml and removing the reference to managed-beans.xml in web.xml fixes this. Any ideas why it thinks it isn't well formed?
The next problem is that it will not compile any .jsp file that uses a Visual Web Pack component (Woodstock components), I get a huge number of errors far too long to publish here, but here are the interesting ones:
| org.apache.jasper.JasperException: Unable to compile class for JSP
|
| An error occurred at line: 5 in the jsp file: /Index.jsp
| Generated servlet error:
| The method setId(String) in the type UIComponentClassicTagBase is not applicable for the arguments (JspValueExpression)
| ..
| ..
| An error occurred at line: 5 in the jsp file: /Footer.jspf
| Generated servlet error:
| The method setId(String) in the type UIComponentClassicTagBase is not applicable for the arguments (JspValueExpression)
|
|
| at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
| at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:329)
| at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
| at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
| at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
| at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
| at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
| ..
| ..
| ..
| An error occurred at line: 5 in the jsp file: /Footer.jspf
| Generated servlet error:
| The method setId(String) in the type UIComponentClassicTagBase is not applicable for the arguments (JspValueExpression)
|
|
| at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:418)
| at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:480)
| at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:125)
| at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
| ...
| ...
| ...
| An error occurred at line: 5 in the jsp file: /Footer.jspf
| Generated servlet error:
| The method setId(String) in the type UIComponentClassicTagBase is not applicable for the arguments (JspValueExpression)
|
|
| at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
| at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:290)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
|
I feel that I should be performing some additional configuration for the woodstock (visual web pack/creator 2) components, but have no idea where to start! Any suggestions/pointers would be most welcome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023580#4023580
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023580
19Â years, 1Â month