It's not a secret anymore!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Portal 10.2 Deployment -- mdimport Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Portal 10.2 Deployment -- mdimport Error " Watch "Portal 10.2 Deployment -- mdimport Error " New topic
Author

Portal 10.2 Deployment -- mdimport Error

AtulSha mahajan
Greenhorn

Joined: Dec 08, 2010
Posts: 4
Hi All,
I try to run the script created with workshop and I got error. Any idea what is mdimport task is doing?
There is absolutely NO documentation about it. Any help would be appreciated.

Part of the generated build script:
<target name="init" depends="check.setup,init.env,check.params,check.versions,init.typedefs" unless="init.executed">

<property name="init.executed" value="true"/>
<echo message="Using JDK: ${java.home}"/>
<echo message="WORKSPACE: ${workspace}"/>
<echo message="PROJ DIR: ${project.dir}"/>
<echo message="WLP HOME: ${wlp.home}"/>
<mdimport workspace="${workspace}/workspace.xml" pjdir="${project.dir}" echo="${echo.metadata}">
<option name="wlp.home" value="${wlp.home}"/>
</mdimport>

<path id="weblogic.jar.classpath">
<path location="${patch.home}/weblogic_patch.jar" />
<path location="${wl.home}/server/lib/weblogic.jar" />
</path>
</target>

RESULT:
Buildfile: build.xml
Trying to override old definition of task jspc

clean:
[mkdir] Created dir: /portalappdev/stc/stc_portal/selfcare/build/weboutput

clean.all:

check.setup:
[echo] Using project build file : /portalappdev/stc/stc_portal/selfcare/con
fig/env/oit.env
[echo] Using JDK: /opt/java6/jre
[echo] Using JDK Target version: ${java.target}
[echo] Using JDK Source version: ${java.source}
[echo] Using JDK bootclasspath: ${java.bootclasspath}

init.env:

check.params:

check.versions:

init.typedefs:
[echo] Using Workshop Libraries located in the /portalappdev/stc/stc_portal
/selfcare/workshop-lib directory.

init:
[echo] Using JDK: /opt/java6/jre
[echo] WORKSPACE: /portalappdev/stc/stc_portal/selfcare
[echo] PROJ DIR: /portalappdev/stc/stc_portal/selfcare
[echo] WLP HOME: /portalappdev/bea/wlportal_10.3

BUILD FAILED
/portalappdev/stc/stc_portal/selfcare/config/build.xml:82: java.lang.NullPointer
Exception

Line Number 82 is marked above.




Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi atultechm mahajan and welcome to Javaranch!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

What JAR file did you import the mdimport task from?
AtulSha mahajan
Greenhorn

Joined: Dec 08, 2010
Posts: 4
number of war files reading from workspace.xml file... But when it reached at mdimport, it throws null pointer exception.
And the month ago same code was working fine.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

The mdimport task is not part of Ant. Where did that task come from? Apparently it was not registered correctly (look earlier in the build script).


JBoss In Action
AtulSha mahajan
Greenhorn

Joined: Dec 08, 2010
Posts: 4
Please find the below mention details of build script error

BUILD FAILED
/portalappdev/stc/stc_portal/selfcare/config/build.xml:82: java.lang.NullPointer
Exception
at org.apache.tools.ant.Task.perform(Task.java:373)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.NullPointerException
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at com.bea.workshop.common.util.DomUtil.doc(DomUtil.java:73)
at com.bea.workshop.common.util.DomUtil.root(DomUtil.java:118)
at com.bea.workshop.cmdline.antlib.eclipse.wtp.WtpUtil.createVirtualFile
System(WtpUtil.java:63)
at com.bea.workshop.wls.antlib.mdimport.EarLibrariesContainerResolver.re
solve(EarLibrariesContainerResolver.java:42)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.re
solve(JavaImportParticipant.java:383)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.ge
tRawClasspath(JavaImportParticipant.java:257)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.ge
tResolvedClasspath(JavaImportParticipant.java:280)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.ex
ecute(JavaImportParticipant.java:147)
at com.bea.workshop.cmdline.antlib.eclipse.ImportProjectMetadataTask.exe
cute(ImportProjectMetadataTask.java:149)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
... 10 more
--- Nested Exception ---
java.lang.NullPointerException
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at com.bea.workshop.common.util.DomUtil.doc(DomUtil.java:73)
at com.bea.workshop.common.util.DomUtil.root(DomUtil.java:118)
at com.bea.workshop.cmdline.antlib.eclipse.wtp.WtpUtil.createVirtualFile
System(WtpUtil.java:63)
at com.bea.workshop.wls.antlib.mdimport.EarLibrariesContainerResolver.re
solve(EarLibrariesContainerResolver.java:42)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.re
solve(JavaImportParticipant.java:383)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.ge
tRawClasspath(JavaImportParticipant.java:257)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.ge
tResolvedClasspath(JavaImportParticipant.java:280)
at com.bea.workshop.cmdline.antlib.eclipse.java.JavaImportParticipant.ex
ecute(JavaImportParticipant.java:147)
at com.bea.workshop.cmdline.antlib.eclipse.ImportProjectMetadataTask.exe
cute(ImportProjectMetadataTask.java:149)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 11 seconds
bash-4.0$


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Based on this:

--- Nested Exception ---
java.lang.NullPointerException
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at com.bea.workshop.common.util.DomUtil.doc(DomUtil.java:73)


I suspect that you are doing something with WLS. Is that true? If so, the problem appears to be something in the WLS extensions to Ant, in which case I will move this port to the WLS forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Portal 10.2 Deployment -- mdimport Error