Win a copy of Head First Android this week in the Android forum!

brian buckholz

Greenhorn
+ Follow
since Feb 08, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by brian buckholz

I am trying to start JBoss 4.04.RC1 using "run -c all" and JBoss fails to start...->

C:\jboss\bin>run -c all
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: C:\jboss\bin\\..
.
JAVA: C:\Program Files\Java\jdk1.5.0_06\bin\java
.
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
.
CLASSPATH: C:\Program Files\Java\jdk1.5.0_06\lib\tools.jar;C:\jboss\bin\\run.j
ar
.
===============================================================================
.
00:15:10,218 INFO [Server] Starting JBoss (MX MicroKernel)...
00:15:10,218 INFO [Server] Release ID: JBoss [Zion] 4.0.4RC1 (build: CVSTag=JBo
ss_4_0_4_RC1 date=200602071519)
00:15:10,234 INFO [Server] Home Dir: C:\jboss
00:15:10,234 INFO [Server] Home URL: file:/C:/jboss/
00:15:10,250 INFO [Server] Patch URL: null
00:15:10,250 INFO [Server] Server Name: all
00:15:10,250 INFO [Server] Server Home Dir: C:\jboss\server\all
00:15:10,250 INFO [Server] Server Home URL: file:/C:/jboss/server/all/
00:15:10,250 INFO [Server] Server Temp Dir: C:\jboss\server\all\tmp
00:15:10,250 INFO [Server] Root Deployment Filename: jboss-service.xml
00:15:10,968 INFO [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
00:15:10,968 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_06-b05
,Sun Microsystems Inc.
00:15:10,968 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
00:15:11,671 INFO [Server] Core system initialized
Failed to boot JBoss:
org.jboss.deployment.DeploymentException: url file:/C:/jboss/server/all/conf/jboss-service.xml could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.<init>(DeploymentInfo.java:211)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:770)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:260)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:477)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:357)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:464)
at java.lang.Thread.run(Thread.java:595)
00:15:11,703 INFO [Server] Runtime shutdown hook called, forceHalt: true
00:15:11,703 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
00:15:11,718 INFO [Server] Shutdown complete
Shutdown complete
Halting VM
Press any key to continue . . .
15 years ago
I am using the Sun Ref Server J2EE 1.4, Beta 2 with JDK 1.4.2 on a Windows XP desktop.
I am using an EJB example and have the following app error when I try to run the client code.
Can anybody help with this? thanks!
the error, classpath settings, and code are below...
---------------------------
C:\brian\j2ee-wrox\chap8\SimpleSessionApp>java client.SimpleSessionClient test argument
javax.naming.NoInitialContextException: Need to specify class name in environment or system property,
or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at client.SimpleSessionClient.main(SimpleSessionClient.java:22)
C:\brian\j2ee-wrox\chap8\SimpleSessionApp>

-----------------------------------------------------------
echo %CLASSPATH%
.;c:\.;c:\j2sdk1.4.2\bin;c:\j2sdkee1.4\lib\j2ee.jar;c:\brian\j2ee-wrox\chap8\SimpleSessionApp\SimpleSessionAppClient.jar
-----------------------------------------------------------
package client;
import java.util.*;
import beans.SimpleSession;
import beans.SimpleSessionHome;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
public class SimpleSessionClient {
public static void main(String[] args) {
try {
// Get a naming context
InitialContext jndiContext = new InitialContext();
// Get a reference to the SimpleSession JNDI entry
Object ref = jndiContext.lookup("ejb/beans.SimpleSession");
// Get a reference from this to the Bean's Home interface
SimpleSessionHome home = (SimpleSessionHome)
PortableRemoteObject.narrow(ref, SimpleSessionHome.class);
// Create a SimpleSession object from the Home interface
SimpleSession simpleSession = home.create();

// loop through the words
for (int i = 0; i < args.length; i++) {
String returnedString =
simpleSession.getEchoString(args[i]);
System.out.println("sent string: " + args[i]
+ ", received string: " + returnedString);
}
} catch(Exception e) {
e.printStackTrace();
}
}
}
I'm trying to deploy an EJB from the WROX book - Beginning J2EE 1.4, chap 8. DeployTool failed to deploy the bean. I was unable to determine the problem by referring to the Troubleshooting the Deploy section on pg 376. All other steps completed successfully. I am running on a Windows XP desktop PC with java version "1.4.1_02", Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode) installed...
SimpleSession.java-->
package beans;
import java.rmi.RemoteException;
import javax.ejb.EJBObject;
public interface SimpleSession extends EJBObject {
// the public business method on the SimpleSession bean
public String getEchoString(String clientString)
throws RemoteException;
}
-----------------------------------
SimpleSessionBean -->
package beans;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
public class SimpleSessionBean implements SessionBean {
// the public business method. this must be coded in the
// remote interface also.
public String getEchoString(String clientString) {
return clientString + " - from session bean";
}
// standard ejb methods
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbRemove() {}
public void ejbCreate() {}
public void setSessionContext(SessionContext context) { }
}
-----------------------------------
-->SimpleSessionHome.java
package beans;
import java.rmi.RemoteException;
import javax.ejb.EJBHome;
import javax.ejb.CreateException;
public interface SimpleSessionHome extends EJBHome {
// the create method for the SimpleSession bean.
public SimpleSession create()
throws CreateException, RemoteException;
}
--------------------------------------
--> this is the message I get when I deploy...
----------------------------------------------------------------------
distribute: C:\8333\Ch8\SimpleSessionApp\SimpleSessionApp.ear
Deploy action running...
Contacted Server...
Application SimpleSessionApp transferred
Application SimpleSessionApp transferred
Deployment of SimpleSessionApp is complete.
Deployment of SimpleSessionApp is complete.
Completed
--- Operation Completed Successfully ---

----------------------------------------------------------------------
start: SimpleSessionApp
Running...
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: null; nested exception is:
javax.management.ReflectionException
at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:61)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at org.omg.stub.com.sun.enterprise.tools.deployment.backend._JarInstaller_Stub.start(Unknown Source)
at com.sun.enterprise.deployapi.actions.ModuleStateAction.run(ModuleStateAction.java:58)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.rmi.RemoteException: null; nested exception is:
javax.management.ReflectionException
at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.start(JarInstallerImpl.java:1171)
at org.omg.stub.com.sun.enterprise.tools.deployment.backend._JarInstallerImpl_Tie._invoke(Unknown Source)
at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:252)
at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
Caused by: javax.management.ReflectionException
at com.sun.management.j2se.MOAgents.EmmaBeanUtil.invoke(EmmaBeanUtil.java:346)
at com.sun.enterprise.management.model.emma.J2EEApplicationMdlEmmaAgent.invoke(J2EEApplicationMdlEmmaAgent.java:406)
at com.sun.jdmk.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:334)
at com.sun.jdmk.MetaDataImpl.invoke(MetaDataImpl.java:496)
at com.sun.jdmk.DefaultMBeanAccessor.invoke(DefaultMBeanAccessor.java:528)
at com.sun.jdmk.MBeanServerImpl.invoke(MBeanServerImpl.java:579)
at com.sun.enterprise.management.agent.MEJBUtility.invoke(MEJBUtility.java:314)
at com.sun.enterprise.management.util.J2EEManagementObjectManager.startModule(J2EEManagementObjectManager.java:636)
at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.start(JarInstallerImpl.java:1161)
... 5 more
!!! Operation Failed !!!
**********************************************************************
[Completed (time=8.7sec, status=13)]
**********************************************************************
-----------------------------------
It would be great if you could assist. Thank you for your time.
Regards
Brian Buckholz
Suresh,
It works - seems I forgot a lot of the earlier examples in the book left this out. Thank you !!
18 years ago
JSP
I was just reviewing Geremy Kawaller's JSP Weekend Crash Course. There is an MVC example in section 24 that I installed using Tomcat 4.0.4. Using http://localhost:8080/mvc/buy.jsp I get:
Generated servlet error:
C:\jakarta-tomcat-4.0.4\work\Standalone\localhost\mvc\buy$jsp.java:58: Undefined variable or class name: Item
out.print( Item.getAllItemsChoice("item") );
-- buy.jsp -->
<%@ page session="true" %>
<HTML><HEAD><TITLE>Shop Til You Drop</TITLE></HEAD>
<BODY BGCOLOR=cornsilk>
<form name=shopping
action=/mvc/controller.go
method=post>
Choose one:
<%= Item.getAllItemsChoice("item") %>
<input type=hidden name=viewcmd value=A>
<input type=submit value="Add to Cart">
</form>
<form action=/mvc/controller.go method=post>
<input type=hidden name=viewcmd value=C>
<input type=submit value="Show Cart">
</form>
</BODY></HTML>
<-- end buy.jsp ----
The Item.Class is in:
.../webapps/mvc/WEB-INF/classes
Any ideas ?? Seems it doesn't find the "Item" clas.
thanks.
18 years ago
JSP