This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Websphere 6.1 JAR Deployment and AutoDeploy_v31 tool - VVV IMP
vedika ashtekar
Greenhorn
Joined: Dec 15, 2008
Posts: 19
posted
0
To load EAR/JAR file on Websphere either we need to upload files using ADMIN consol or by using autodeploy scripts. I have downloaded AutoDeploy_v31 tool and followed the instructions to update respective files.
But I after running the TestDeploy.bat file I am getting following error : ------------------ WASX7017E: Exception received while running file "D:\Projects Documents\Softworx\POC work\WebspherePOC\AutoDeploy_v31\AutoDeploy\automatedDeploy.py"; exception information: com.ibm.ws.scripting.ScriptingException: AdminControl service not available
SIMULATE OPERATOR MANUAL CHECK (BROWSE APP) ... Press any key to continue . . . -------------------
how to Remove this error? Should I need to reinstall Websphere with some admin facility OR need to update some files ??
Please Help!
Anant Rao
Ranch Hand
Joined: Nov 12, 2004
Posts: 126
posted
0
Make sure your application server is up and running.
Anant
vedika ashtekar
Greenhorn
Joined: Dec 15, 2008
Posts: 19
posted
0
Yes sir, server is UP! I have uninstalled the Websphere and installed without restricting it to for ADMIN. then I have started the server as follows : ------------------------------------------------------- C:\Program Files\IBM\WebSphere\AppServer1\bin>startServer server1 ADMU0116I: Tool information is being logged in file C:\Program Files\IBM\WebSphere\AppServer1\profiles\AppSrv01\logs\server1\startServer.log ADMU0128I: Starting tool with the AppSrv01 profile ADMU3100I: Reading configuration for server: server1 ADMU3200I: Server launched. Waiting for initialization status. ADMU3000I: Server server1 open for e-business; process id is 520 -----------------------------------------------------------
BUT when i am trying to deploy TestDeploy.bat file it is giving following ERROR: ------------------------------------------------------------------- D:\AutoDeploy_v31\AutoDeploy>TestDeploy.bat D:\AutoDeploy_v31\AutoDeploy>setlocal D:\\AutoDeploy_v31\AutoDeploy>set WAS_ROOT=C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01 D:\AutoDeploy_v31\AutoDeploy>set ADMIN=-host bcsearle2 -port 8879 -username wsguest -password ws61guest D:\AutoDeploy_v31\AutoDeploy>if $$ == $$ set LANG=jython
Yes I tried it in different way little bit. From JBuilder 2008 IDE i tried as follow: 1) selecting the java file 2) RUN AS -> Java application 3) Its is giving me following error.
javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.(InitialContext.java:197) at Test.TestApp.getInitialContext(TestApp.java:59) at Test.TestApp.initialize(TestApp.java:34) at Test.TestApp.(TestApp.java:22) at Test.TestApp.main(TestApp.java:88) Caused by: java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
In java class i have tried to get the simple context as follows : Properties prop = new Properties(); prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory"); prop.put(Context.PROVIDER_URL,"iiop://localhost:2809"); InitialContext init = new InitialContext(prop); if(null != init) { log(" ** get the initial context **\n"); init.lookup(""); }
Can anybody guide me where I am going wrong ? Please HELP!
Sai Swaminathan
Greenhorn
Joined: Dec 11, 2008
Posts: 4
posted
0
Check if the WebSphere runtime jar is in your classpath. It should be present in the server's 'runtimes' folder. (In version 6.1.0, the jar name is com.ibm.ws.runtime_6.1.0.jar. )
-----------------------------------<br />All truths are easy to understand once they are discovered; the point is to discover them.<br />- Galileo Galilei
vedika ashtekar
Greenhorn
Joined: Dec 15, 2008
Posts: 19
posted
0
This problem is resolved by just using the IBM JDK.
BUT new problem is occurred when I am trying to look up the sessionBean using the initial context.
CODE is : --------------------------------------------------------------- // get naming context Context context = getInitialContext(); if(null != context) { log("** get the context **"); /**I am getting the context. log is getting printed**/} // look up sessionBean (using its JNDI name) Object ref = context.lookup("SecuritySes"); ----------- -------- ------- private Context getInitialContext() throws NamingException {
javax.naming.NameNotFoundException: Context: ses025Node01Cell/nodes/ses025Node01/servers/server1, name: SecuritySes: First component in name SecuritySes not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0] at com.ibm.ws.naming.jndicos.CNContextImpl.processNotFoundException(CNContextImpl.java:4730) at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1907) at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1862) at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1552) at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1354) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172) at javax.naming.InitialContext.lookup(InitialContext.java:363) at Test.TestApp.initialize(TestApp.java:37) at Test.TestApp.<init>(TestApp.java:19) at Test.TestApp.main(TestApp.java:88) Please Help
Sai Swaminathan
Greenhorn
Joined: Dec 11, 2008
Posts: 4
posted
0
Are you trying to do a lookup from a stand-alone class? I had a problem doing the same and none of the solutions I found on the net helped. But the same code works fine from within a server context - say, from a servlet. That said, it could also be due to the JNDI really not available. Run the dumpNameSpaces.bat (it should be in the server's bin folder) - this would list all objects in the JNDI. If what you are looking for is not seen in the output, then you need to check your configuration again. Hope this helps.