This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of React Cookbook: Recipes for Mastering the React Framework and have David Griffiths & Dawn Griffiths on-line!
See this thread for details.
Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Help! Accessing EJB from Applet Error!

 
hailang@zh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
system :
win2000(sp3)、jboss-3.0.8_tomcat-4.1.24、jdk1.4.2、JBuilder7、IE6.0(already install jre1.4.2)
EJB attribute:
--------------
Session Bean:ResourceTransfer
interface: remote
session type: stateful
session synchronization: false
transcation type: container
-----------------
Applet code:
-----------------------------------------------------
private ResourceTransferHome resourceTransferHome = null;
public AppletExportTest(int n) throws Exception{
try {
Context ctx = getJBossInitialContext();
JOptionPane.showMessageDialog(null,"start look up jndi name","message",JOptionPane.ERROR_MESSAGE);
Object ref = ctx.lookup("ResourceTransfer");
resourceTransferHome = (ResourceTransferHome) PortableRemoteObject.narrow(ref, ResourceTransferHome.class);
}
catch(Exception e) {
JOptionPane.showMessageDialog(null,"look up jndi name false:"+e.getMessage(),"error",JOptionPane.ERROR_MESSAGE);
throw e;
}
private javax.naming.Context getJBossInitialContext() throws Exception{
Properties JNDIParm =new Properties();
try{
JNDIParm.put(Context.PROVIDER_URL, "192.168.3.168:1099");
JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
JOptionPane.showMessageDialog(null,"Start create EJB����","message",JOptionPane.INFORMATION_MESSAGE);
return new InitialContext(JNDIParm);
}catch(Exception e){
JOptionPane.showMessageDialog(null,"Unable connect to Server:"+e.getMessage(),"error",JOptionPane.ERROR_MESSAGE);
throw e;
}
}
public ResourceTransferHome getHome() {
return resourceTransferHome;
}
-------------------------------------------------
the applet�s button click event :
void jButton1_actionPerformed(ActionEvent e) {
try{
AppletExportTest client = new AppletExportTest(0);
ResourceTransferHome home=client.getHome() ;
ResourceTransfer=home.create() ;
JOptionPane.showMessageDialog(null,"Create EJB Success。",
"message",JOptionPane.INFORMATION_MESSAGE );
}catch(Exception f){
ExecuteFlag=false;
JOptionPane.showMessageDialog(
null,"Create EJB False:"+f.getMessage(),"error",JOptionPane.ERROR_MESSAGE);
}
}
---------------------------------------------------
when I click button,the jboss server window display error:
---------ERROR -----------
10:32:02,130 ERROR [Engine] StandardWrapperValve[default]: Servlet.service() for
servlet default threw exception
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffe
r.doWrite(InternalOutputBuffer.java:668)
at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(Identit
yOutputFilter.java:160)
at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputB
uffer.java:523)
at org.apache.coyote.Response.doWrite(Response.java:524)
at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.ja
va:384)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)
at org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:4
11)
at org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:398)
at org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream
.java:110)
at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.
java:1996)
at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:
1745)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServ
let.java:1073)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java
:506)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at resourcelib.filter.EncodingFilter.doFilter(EncodingFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSec
urityMgrRealm.java:227)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
509)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
3)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:619)
at java.lang.Thread.run(Thread.java:534)
[ November 20, 2003: Message edited by: zhang hai ]
 
It's exactly the same and completely different as this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic