 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sandro Germani Guest
|
Posted: Mon Oct 31, 2005 10:57 am Post subject: Problems with JBuilder, JBoss and Enterprise Applications |
|
|
I have the following problems with JBuilder 2006 (and also 2005) and
JBoss 4.0.2.
I developed a simple enterprise application including a stateless
session bean and
a servlet. The stateless session bean has only 1 method (hello) that
accept a String parameter
(the name) and return the String "Hello " + name.
The servlet accept a parameter (the name) with am HTML form and call the
stateless session bean
hello method and display the result on a new html page.
These are the steps I followed (I used mainly the JBuilder wizards
without changing the names
proposed in the wizard).
I created the Hello Project setting the Jdk 1.4 and setting as
Enterprise Server JBoss 4.0.2 (JBuilder
2006 support this release).
I created an ejb module, then I created a stateless session bean with a
single method (hello method).
At this point, to test the stateless session bean, I created the test
application (with the wizard) and I deployed
the ejb in the server. I run the test client application and all worked
fine. At this point I undeployed
the ejb module.
In the same project I created a web application, then a standard servlet
with the doPost method and an html
form with one parameter. In the doPost method I created the reference to
the ejb with the following
statements:
try {
Context context = new InitialContext();
Object ref = context.lookup("java:comp/env/ejb/hello");
enterprise1Home =
(Enterprise1Home)PortableRemoteObject.narrow(ref,
Enterprise1Home.class);
enterprise1 = enterprise1Home.create();
} catch (Exception ex) {
ex.printStackTrace();
}
So in the web.xml file I created the reference to the ejb. All these
steps are veri simple in JBuilder and I did that
a lot of time.
At this point I created with the wizard a EAR application. Also in this
case all is very simple.
I deployed the EAR application in the JBoss AS, I opened my browser and
I connected to html page, I inserted
a name in the form and I cliked the Submit button. At this point I have
the following error message displayed
in the JBoss window.
I didn't understand this error because I have developed in the past a
lot of similar applications using minor
release of JBoss and all worked fine. In fact I deployed the same EAR
without recompilation in the JBoss 4.0.1SP1
Server, I repeated the same operations and now all has worked fine
without problems.
Please, I am trying to solve this problems since several days without
success. Is there someone who wants to try?
I can also send the complete project.
Thank you very much and bye,
Sandro
Here is the JBoss error message:
11:35:57,515 INFO [STDOUT] java.lang.ClassCastException
11:35:57,515 INFO [STDOUT] at
com.sun.corba.se.impl.javax.rmi.PortableRemot
eObject.narrow(PortableRemoteObject.java:229)
11:35:57,515 INFO [STDOUT] at
javax.rmi.PortableRemoteObject.narrow(Portabl
eRemoteObject.java:137)
11:35:57,515 INFO [STDOUT] at
helloproject.HelloServlet.doGet(HelloServlet.
java:32)
11:35:57,515 INFO [STDOUT] at
helloproject.HelloServlet.doPost(HelloServlet
..java:57)
11:35:57,515 INFO [STDOUT] at
javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:717)
11:35:57,515 INFO [STDOUT] at
javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:810)
11:35:57,515 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:252)
11:35:57,515 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:173)
11:35:57,515 INFO [STDOUT] at
org.jboss.web.tomcat.filters.ReplyHeaderFilte
r.doFilter(ReplyHeaderFilter.java:81)
11:35:57,515 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:202)
11:35:57,515 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:173)
11:35:57,531 INFO [STDOUT] at
org.apache.catalina.core.StandardWrapperValve
..invoke(StandardWrapperValve.java:213)
11:35:57,531 INFO [STDOUT] at
org.apache.catalina.core.StandardContextValve
..invoke(StandardContextValve.java:178)
11:35:57,531 INFO [STDOUT] at
org.jboss.web.tomcat.security.CustomPrincipal
Valve.invoke(CustomPrincipalValve.java:39)
11:35:57,531 INFO [STDOUT] at
org.jboss.web.tomcat.security.SecurityAssocia
tionValve.invoke(SecurityAssociationValve.java:153)
11:35:57,531 INFO [STDOUT] at
org.jboss.web.tomcat.security.JaccContextValv
e.invoke(JaccContextValve.java:59)
11:35:57,531 INFO [STDOUT] at
org.apache.catalina.core.StandardHostValve.in
voke(StandardHostValve.java:126)
11:35:57,531 INFO [STDOUT] at
org.apache.catalina.valves.ErrorReportValve.i
nvoke(ErrorReportValve.java:105)
11:35:57,531 INFO [STDOUT] at
org.apache.catalina.core.StandardEngineValve.
invoke(StandardEngineValve.java:107)
11:35:57,531 INFO [STDOUT] at
org.apache.catalina.connector.CoyoteAdapter.s
ervice(CoyoteAdapter.java:148)
11:35:57,531 INFO [STDOUT] at
org.apache.coyote.http11.Http11Processor.proc
ess(Http11Processor.java:856)
11:35:57,531 INFO [STDOUT] at
org.apache.coyote.http11.Http11Protocol$Http1
1ConnectionHandler.processConnection(Http11Protocol.java:744)
11:35:57,531 INFO [STDOUT] at
org.apache.tomcat.util.net.PoolTcpEndpoint.pr
ocessSocket(PoolTcpEndpoint.java:527)
11:35:57,531 INFO [STDOUT] at
org.apache.tomcat.util.net.MasterSlaveWorkerT
hread.run(MasterSlaveWorkerThread.java:112)
11:35:57,531 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
11:35:57,531 INFO [STDOUT] Caused by: java.lang.ClassCastException:
$Proxy55
11:35:57,531 INFO [STDOUT] at
com.sun.corba.se.impl.javax.rmi.PortableRemot
eObject.narrow(PortableRemoteObject.java:212)
11:35:57,531 INFO [STDOUT] ... 24 more
11:35:57,531 ERROR [[helloservlet]] Servlet.service() for servlet
helloservlet t
hrew exception
java.lang.NullPointerException
at helloproject.HelloServlet.doGet(HelloServlet.java:3
at helloproject.HelloServlet.doPost(HelloServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
ipalValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:153)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:59)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
kerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|