nkatoch2001 (35) [Avatar] Offline
#1
Hi Reza/Debu,

Thanks for your time. I am getting the following while running ant script:-

C:forWLSEJB3chapter1>ant
Buildfile: build.xml

common:
[echo] BuildName: chapter1
[echo] BuildHome: C:forWLSEJB3chapter1
[echo] BuildFile: C:forWLSEJB3chapter1uild.xml
[echo] BuildJVM: 1.6

java-env-check:

init:
[echo] -----> Initializing project properties

setup:
[echo] -----> Creating the required sub-directories

compile-ejb-classes:
[echo] -----> Compiling EJBs

ejb-descriptor:

package-ejb:
[echo] -----> Create EJB jar file

compile-cli-classes:

cli-descriptor:

package-client:

package-app:

deploy:

BUILD FAILED
C:forWLSEJB3chapter1uild.xml:233: Problem: failed to create task or type wldeploy
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


Total time: 2 seconds

Please guide me to fix this problem.

Thanks again,

Naveen Katoch
nkatoch2001 (35) [Avatar] Offline
#2
Re: Problem running chapter 1 with weblogic 10
Hi all,

I have run this file before ant script which is as below:-

C:eaWeblogic10wlserver_10.0samplesdomainswl_server>SetExamplesEnv
Calling setDomainEnv in this domain
Modifying classpath for the samples
Classpath has successfully been set to: C:eaWeblogic10wlserver_10.0samplesserverexamplesuildserverclasses;C:BEAWEB~2patch_wss110profilesdefaul
_manifest_classpathweblogic_patch.jar;C:BEAWEB~2patch_wlw1021profilesdefaultsys_manifest_classpathweblogic_patch.jar;C:BEAWEB~2patch_wls1002profi
efaultsys_manifest_classpathweblogic_patch.jar;C:BEAWEB~2patch_cie640profilesdefaultsys_manifest_classpathweblogic_patch.jar;C:BEAWEB~2JROCKI~1l
ols.jar;C:BEAWEB~2WLSERV~1.0serverlibweblogic_sp.jar;C:BEAWEB~2WLSERV~1.0serverlibweblogic.jar;C:BEAWEB~2modulesfeaturesweblogic.server.modul
.0.2.0.jar;C:BEAWEB~2modulesfeaturescom.bea.cie.common-plugin.launch_2.1.2.0.jar;C:BEAWEB~2WLSERV~1.0serverlibwebservices.jar;C:BEAWEB~2modules\r
A~1.5/lib/ant-all.jar;C:BEAWEB~2modulesNETSFA~1.0/lib/ant-contrib.jar;;C:BEAWEB~2WLSERV~1.0commonevalpointbaselibpbembedded51.jar;C:BEAWEB~2WLS
.0commonevalpointbaselibpbupgrade51.jar;C:BEAWEB~2WLSERV~1.0commonevalpointbaselibpbclient51.jar;C:BEAWEB~2WLSERV~1.0serverlibxqrl.jar;;C:
eblogic10wlserver_10.0samplesserverexamplesuildclientclasses
Script has completed successfully

Thanks,

Naveen
nkatoch2001 (35) [Avatar] Offline
#3
Re: Problem running chapter 1 with weblogic 10
Hi all,

The following is from the build file:-

<target name="deploy" >
depends="init"
unless="ee">
<echo message="Deploying ${app.name} example" >
level="verbose"></echo>

<wldeploy >
user="${admin.user}"
password="${admin.password}"
adminurl="t3://${admin.host}:${admin.port}"
debug="true"
action="deploy"
name="${app.name}"
source="lib/${ear.name}.ear"
failonerror="${failondeploy}"/>

</target>

Where was "${failondeploy}" declared in properies? This is just a guess.

Thanks,

Naveen
nkatoch2001 (35) [Avatar] Offline
#4
Re: Problem running chapter 1 with weblogic 10
Now I am getting the following error when I run ant:-

Csmilieocuments and SettingsNaveen Katoch>cd C:eaWeblogic10wlserver_10.0samplesdomainswl_server

C:eaWeblogic10wlserver_10.0samplesdomainswl_server>SetExamplesEnv
Calling setDomainEnv in this domain
Modifying classpath for the samples
Classpath has successfully been set to: C:eaWeblogic10wlserver_10.0samplesserverexamplesuildserverclasses;C:BEAWEB~2patch_wss110profilesdefaul
tsys_manifest_classpathweblogic_patch.jar;C:BEAWEB~2patch_wlw1021profilesdefaultsys_manifest_classpathweblogic_patch.jar;C:BEAWEB~2patch_wls1002
profilesdefaultsys_manifest_classpathweblogic_patch.jar;C:BEAWEB~2patch_cie640profilesdefaultsys_manifest_classpathweblogic_patch.jar;C:BEAWEB~2
JROCKI~1lib ools.jar;C:BEAWEB~2WLSERV~1.0serverlibweblogic_sp.jar;C:BEAWEB~2WLSERV~1.0serverlibweblogic.jar;C:BEAWEB~2modulesfeaturesweblog
ic.server.modules_10.0.2.0.jar;C:BEAWEB~2modulesfeaturescom.bea.cie.common-plugin.launch_2.1.2.0.jar;C:BEAWEB~2WLSERV~1.0serverlibwebservices.jar;
C:BEAWEB~2modulesORGAPA~1.5/lib/ant-all.jar;C:BEAWEB~2modulesNETSFA~1.0/lib/ant-contrib.jar;;C:BEAWEB~2WLSERV~1.0commonevalpointbaselibpbembed
ded51.jar;C:BEAWEB~2WLSERV~1.0commonevalpointbaselibpbupgrade51.jar;C:BEAWEB~2WLSERV~1.0commonevalpointbaselibpbclient51.jar;C:BEAWEB~2WLSE
RV~1.0serverlibxqrl.jar;;C:eaWeblogic10wlserver_10.0samplesserverexamplesuildclientclasses
Script has completed successfully
C:eaWeblogic10wlserver_10.0samplesdomainswl_server>cd C:forWLSEJB3chapter1

C:forWLSEJB3chapter1>antBuildfile: build.xml

common:
[echo] BuildName: chapter1
[echo] BuildHome: C:forWLSEJB3chapter1
[echo] BuildFile: C:forWLSEJB3chapter1uild.xml
[echo] BuildJVM: 1.5

java-env-check:

init:
[echo] -----> Initializing project properties

setup:
[echo] -----> Creating the required sub-directories

compile-ejb-classes:
[echo] -----> Compiling EJBs

ejb-descriptor:

package-ejb:
[echo] -----> Create EJB jar file

compile-cli-classes:

cli-descriptor:

package-client:

package-app:

deploy:
[wldeploy] weblogic.Deployer -debug -noexit -name chapter1 -source C:forWLSEJB3chapter1libchapter1.ear -adminurl t3://localhost:7001 -user weblogic -p
assword ******** -deploy
[wldeploy] weblogic.Deployer invoked with options: -debug -noexit -name chapter1 -source C:forWLSEJB3chapter1libchapter1.ear -adminurl t3://localhost
:7001 -user weblogic -deploy
[wldeploy] [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE version V1_4 deployments
[wldeploy] [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at localhost:7001, as user weblogic
[wldeploy] [ServerConnectionImpl.getEnvironment():288] : setting environment
[wldeploy] [ServerConnectionImpl.getEnvironment():291] : getting context using t3://localhost:7001
[wldeploy] [ServerConnectionImpl.close():334] : Closing DM connection
[wldeploy] [ServerConnectionImpl.close():354] : Unregistered all listeners
[wldeploy] javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:121)
[wldeploy] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:84)
[wldeploy] at weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionHelper.java:432)
[wldeploy] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:304)
[wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
[wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:8smilie
[wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:15smilie
[wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[wldeploy] at weblogic.Deployer.run(Deployer.java:70)
[wldeploy] at weblogic.Deployer.mainWithExceptions(Deployer.java:62)
[wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[wldeploy] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[wldeploy] at java.lang.reflect.Method.invoke(Method.java:585)
[wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:419)
[wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:349)
[wldeploy] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[wldeploy] at org.apache.tools.ant.Task.perform(Task.java:364)
[wldeploy] at org.apache.tools.ant.Target.execute(Target.java:341)
[wldeploy] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[wldeploy] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[wldeploy] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[wldeploy] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[wldeploy] at org.apache.tools.ant.Project.executeTargets(Project.java:106smilie
[wldeploy] at org.apache.tools.ant.Main.runBuild(Main.java:66smilie
[wldeploy] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[wldeploy] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[wldeploy] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[wldeploy] Caused by: weblogic.deploy.api.spi.exceptions.ServerConnectionException
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:143)
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(WebLogicDeploymentManagerImpl.java:14smilie
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:11smilie
[wldeploy] ... 27 more
[wldeploy] Caused by: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7001: Destination unreachable; nest
ed exception is:
[wldeploy] java.net.ConnectException: Connection refused: connect; No available router to destination]
[wldeploy] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:363)
[wldeploy] at weblogic.jndi.Environment.getContext(Environment.java:307)
[wldeploy] at weblogic.jndi.Environment.getContext(Environment.java:277)
[wldeploy] at weblogic.jndi.Environment.createInitialContext(Environment.java:200)
[wldeploy] at weblogic.jndi.Environment.getInitialContext(Environment.java:184)
[wldeploy] at weblogic.jndi.Environment.getInitialContext(Environment.java:162)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getContext(ServerConnectionImpl.java:330)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getEnvironment(ServerConnectionImpl.java:302)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:141)
[wldeploy] ... 29 more
[wldeploy] Caused by: java.net.ConnectException: t3://localhost:7001: Destination unreachable; nested exception is:
[wldeploy] java.net.ConnectException: Connection refused: connect; No available router to destination
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:217)
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:171)
[wldeploy] at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:154)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:342)
[wldeploy] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
[wldeploy] at weblogic.security.service.SecurityManager.runAs(Unknown Source)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:337)
[wldeploy] ... 37 more
[wldeploy] Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
[wldeploy] java.net.ConnectException: Connection refused: connect; No available router to destination
[wldeploy] at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:472)
[wldeploy] at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:323)
[wldeploy] at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:265)
[wldeploy] at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:20smilie
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:239)
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:201)
[wldeploy] ... 43 more
[wldeploy] weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://localhost:7001': Destination unreachable; nested exception is:

[wldeploy] java.net.ConnectException: Connection refused: connect; No available router to destination. Ensure the url represents a running admin serve
r and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server.
[wldeploy] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:316)
[wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
[wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:8smilie
[wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:15smilie
[wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[wldeploy] at weblogic.Deployer.run(Deployer.java:70)
[wldeploy] at weblogic.Deployer.mainWithExceptions(Deployer.java:62)
[wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[wldeploy] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[wldeploy] at java.lang.reflect.Method.invoke(Method.java:585)
[wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:419)
[wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:349)
[wldeploy] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[wldeploy] at org.apache.tools.ant.Task.perform(Task.java:364)
[wldeploy] at org.apache.tools.ant.Target.execute(Target.java:341)
[wldeploy] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[wldeploy] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[wldeploy] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[wldeploy] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[wldeploy] at org.apache.tools.ant.Project.executeTargets(Project.java:106smilie
[wldeploy] at org.apache.tools.ant.Main.runBuild(Main.java:66smilie
[wldeploy] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[wldeploy] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[wldeploy] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[wldeploy] Caused by: javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:121)
[wldeploy] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:84)
[wldeploy] at weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionHelper.java:432)
[wldeploy] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:304)
[wldeploy] ... 24 more
[wldeploy] Caused by: weblogic.deploy.api.spi.exceptions.ServerConnectionException
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:143)
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(WebLogicDeploymentManagerImpl.java:14smilie
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:11smilie
[wldeploy] ... 27 more
[wldeploy] Caused by: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7001: Destination unreachable; nest
ed exception is:
[wldeploy] java.net.ConnectException: Connection refused: connect; No available router to destination]
[wldeploy] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:363)
[wldeploy] at weblogic.jndi.Environment.getContext(Environment.java:307)
[wldeploy] at weblogic.jndi.Environment.getContext(Environment.java:277)
[wldeploy] at weblogic.jndi.Environment.createInitialContext(Environment.java:200)
[wldeploy] at weblogic.jndi.Environment.getInitialContext(Environment.java:184)
[wldeploy] at weblogic.jndi.Environment.getInitialContext(Environment.java:162)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getContext(ServerConnectionImpl.java:330)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getEnvironment(ServerConnectionImpl.java:302)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:141)
[wldeploy] ... 29 more
[wldeploy] Caused by: java.net.ConnectException: t3://localhost:7001: Destination unreachable; nested exception is:
[wldeploy] java.net.ConnectException: Connection refused: connect; No available router to destination
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:217)
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:171)
[wldeploy] at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:154)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:342)
[wldeploy] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
[wldeploy] at weblogic.security.service.SecurityManager.runAs(Unknown Source)
[wldeploy] at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:337)
[wldeploy] ... 37 more
[wldeploy] Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
[wldeploy] java.net.ConnectException: Connection refused: connect; No available router to destination
[wldeploy] at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:472)
[wldeploy] at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:323)
[wldeploy] at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:265)
[wldeploy] at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:20smilie
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:239)
[wldeploy] at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:201)
[wldeploy] ... 43 more

all:
[echo] -----> Creates and deploys all deployable units for the application

BUILD SUCCESSFUL
Total time: 23 seconds

Thanks for your inputs,

Naveen
nkatoch2001 (35) [Avatar] Offline
#5
Re: Problem running chapter 1 with weblogic 10
Hi all,

I have been waiting for any inputs.

Thanks,

Naveen
reza_rahman (456) [Avatar] Offline
#6
Re: Problem running chapter 1 with weblogic 10
Naveen,

I can't help you here since I am not familiar with the WLS code. I doubt Debu has time to contribute given his current workload. I would try a WLS forum.

Cheers,
Reza