wood burning stoves 2.0*
The moose likes Websphere and the fly likes Websphere 6.1 JAR Deployment and AutoDeploy_v31 tool - VVV IMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Websphere 6.1 JAR Deployment and AutoDeploy_v31 tool - VVV IMP" Watch "Websphere 6.1 JAR Deployment and AutoDeploy_v31 tool - VVV IMP" New topic
Author

Websphere 6.1 JAR Deployment and AutoDeploy_v31 tool - VVV IMP

vedika ashtekar
Greenhorn

Joined: Dec 15, 2008
Posts: 19
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
Make sure your application server is up and running.

Anant
vedika ashtekar
Greenhorn

Joined: Dec 15, 2008
Posts: 19
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

D:\AutoDeploy_v31\AutoDeploy>set ADMIN=-host bcsearle2 -port 8879 -username wsguest -password ws61guest -lang jython

D:\AutoDeploy_v31\AutoDeploy>set SERVERHTTP=bcsearle2:9081

D:\AutoDeploy_v31\AutoDeploy>set APP_CONTEXT=AdderWAR/AdderTest.jsp

D:\AutoDeploy_v31\AutoDeploy>if jython == jython
FIRST install ...

D:\AutoDeploy_v31\AutoDeploy>call "C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\wsadmin" -host bcsearle2
-port 8879 -username wsguest -password ws61guest -lang jython -f "D:\AutoDeploy_v31\AutoDeploy\automatedDeploy.py" insta
ll -pilot true
The system cannot find the path specified.
SIMULATE OPERATOR MANUAL CHECK (BROWSE APP) ...
Press any key to continue . . .

Could you please guide me for this scenario please?
vedika ashtekar
Greenhorn

Joined: Dec 15, 2008
Posts: 19
Insted of tool , I used the command and kept jar file in BIN folder of websphere 6.1.
and it get deployed successfully!

now issue remans how to run the application ?
Anant Rao
Ranch Hand

Joined: Nov 12, 2004
Posts: 126
That's easy. Get the webcontainter hostname and port number and append the application context root.

example

<a href="http://<hostname>:<port_number>/context_root" target="_blank" rel="nofollow">http://<hostname>:<port_number>/context_root
<a href="https://<hostname>:<port_number>/context_root" target="_blank" rel="nofollow">https://<hostname>:<port_number>/context_root

Anant
vedika ashtekar
Greenhorn

Joined: Dec 15, 2008
Posts: 19
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
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
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 {

java.util.Properties props = new java.util.Properties();

props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(javax.naming.Context.URL_PKG_PREFIXES,
"com.ibm.ws.naming");
props.put(javax.naming.Context.PROVIDER_URL, "iiop://localhost:2809");

return new javax.naming.InitialContext(props);

}
------------------------------------------------------------------

I am getting following error.

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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Websphere 6.1 JAR Deployment and AutoDeploy_v31 tool - VVV IMP
 
Similar Threads
Error in Loading WAR file
EAR deployment using wsadmin.
(java.exe Application Error ) Websphere Commerce Suite Auto Build
Deploying a War file using Admin COnsole
jms application without websphere MQ