Hi Folks,
I know that as soon as I
get things running, my eye will stop twitching. I get the
following exception being thrown
during lookup. I'm probably doing something
stupid so I thought to include some
information. Anyway, any help would be
greatly appreciated.
-Sean
main (21:24:07):
javax.naming.CommunicationException. Root exception is
java.io.StreamCorruptedException: Type code out of range, is 125 main (21:24:07): at java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1280) main (21:24:07): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:282) main (21:24:07): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232) main (21:24:07): at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:978) main (21:24:07): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) main (21:24:07): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232) main (21:24:07): at java.rmi.MarshalledObject.get(MarshalledObject.java:142) main (21:24:07): at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299) main (21:24:07): at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279) main (21:24:07): at javax.naming.InitialContext.lookup(InitialContext.java:354) main (21:24:07): at Proto.jboss(Proto.java:33) main (21:24:07): at Proto.main(Proto.java:95) main (21:24:07): at symantec.tools.debug.Agent.runMain(Native Method) main (21:24:07): at symantec.tools.debug.MainThread.run(Agent.java:48) // code snippet
Properties props=new
Properties();
props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); props.setProperty("java.naming.provider.url","localhost:1099"); // 1099 props.setProperty("java.naming.factory.url.pkgs","org.jboss.naming"); // Get a naming
context
InitialContext jndiContext=null; try{jndiContext = new InitialContext(props);} catch(Exception exception) { exception.printStackTrace(); return; } System.out.println("Got context"); Object
objRef=null;
try{jndiContext.lookup("DiveLog");} // it all goes south here. catch(Exception exception) { exception.printStackTrace(); return; } System.out.println("Got reference"); // deployment
<?xml version="1.0"
encoding="UTF-8" ?>
<description>This is a test bean</description>
<ejb-name>DiveLog</ejb-name>
<home>com.diversified.Dive.DiveHome</home>
<remote>com.diversified.Dive.DiveBean</remote>
<ejb-class>com.diversified.Dive.DiveBeanEJB</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.diversified.Dive.DivePK</prim-key-class>
<reentrant>False</reentrant> </entity> </enterprise-beans>
<assembly-descriptor /> </ejb-jar> // server messages as i deployed the
bean
[Naming] Naming started on port 1099
.....
......
[J2EE Deployer Default] Deploy J2EE application:
file:/D:/parts/JBoss-2.2.1/deploy/DiveBean.jar
[J2EE Deployer Default] Create application DiveBean.jar [J2EE Deployer Default] install module DiveBean.jar [Container factory] Deploying:file:/D:/parts/JBoss-2.2.1/tmp/deploy/Default/DiveBean.jar/ [Verifier] Verifying file:/D:/parts/JBoss-2.2.1/tmp/deploy/Default/DiveBean.jar/ejb1002.jar [Verifier] DiveLog: Verified. [Container factory] Deploying DiveLog [Container factory] Container Invoker RMI Port='4444' [Container factory] Container Invoker Client SocketFactory='Default' [Container factory] Container Invoker Server SocketFactory='Default' [Container factory] Container Invoker Optimize='true' [Container factory] JRMP 1.3 CI initialized [Container factory] Bound DiveLog to DiveLog [Container factory] Deployed application: file:/D:/parts/JBoss-2.2.1/tmp/deploy/Default/DiveBean.jar/ [J2EE Deployer Default] J2EE application: file:/D:/parts/JBoss-2.2.1/deploy/DiveBean.jar is deployed. [Bean Cache] Resized cache for bean DiveLog: old capacity = 1000, new capacity = 50 // The only other question I have is how I go about
configuring the server so that I can use
the <resource-ref> tag (ie)
below.
<resource-ref>
<description>DataSource for DiveLog database</description> <res-ref-name>jdbc\Dive</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> (ie) what should the
<res-ref-name> resolve to under jboss???? I'm kind of hoping it will
resolve to my SQL
Server database, but I'm not too
sure. The database configuration was a little easier under Allaire,
I'm
a little confused here, especially
with the DataSourceClass, which I copied verbatim from the SQL
Server
ODBC/BRIDGE documentation that
came with my jboss install.
<mbean
code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=SQLServerPool">
<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute> <attribute name="PoolName">SQLServerPool</attribute> <attribute name="URL">jdbc:odbc:Dive</attribute> </mbean> |
- Re: [JBoss-user] StreamCorruptedException Sean Kessler
- Re: [JBoss-user] StreamCorruptedException jK.MkIII
- RE: [JBoss-user] StreamCorruptedException Sean Kessler
- RE: [JBoss-user] StreamCorruptedException Steve Magoun