Ant tasks in eclipse
Feature request:
It would be nice if the kodo ant tasks were attached to the
"org.eclipse.ant.core.antTasks" extension point of eclipse so that ant
scripts run from within eclipse would not have to define a "taskdef"
element for those ant tasks.
-Chris West
Thanks for the suggestion. Hopefully we can get it in.
http://bugzilla.solarmetric.com/show_bug.cgi?id=719
Chris West wrote:
Feature request:
It would be nice if the kodo ant tasks were attached to the
"org.eclipse.ant.core.antTasks" extension point of eclipse so that ant
scripts run from within eclipse would not have to define a "taskdef"
element for those ant tasks.
-Chris West
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com
Similar Messages
-
Using wsdlc Ant task and Eclipse
Hi all,
I'm using the WebLogic Ant Task wsdlc to generate a default implementation of a java web service based on an existing WSDL.
Everythign generates just fine. I have one little problem though: the classes that represent some of the complex types defined in the WSDL are generated in the compiled WSDL file (the JAR file that wsdlc creates). If I open the java source file for the web service (also created by the wsdlc task, but NOT in the compiled wsdl jar) with Eclipse, Eclipse cannot find the source code for those complex types, and therefore underlines the data types in red to indicate an error.
My question is this: is there a way to tell Eclipse to look for additional source files inside of the compiled wsdl.jar file?
Many thanks in advance!
JeffI got around this by unjaring the generated source jar into a "generated/src" directory and put that directory on the build path.
Andy O -
I am trying to generate a webservice using ant inside of eclipse. The build.xml uses weblogic.wsee.tools.anttasks.JwscTask. The build file is good because if I go to a dos command box and run the setDomainEnv.cmd and then run ant everything works fine. I have tried including all kinds of jars in eclipse. I currently have the task being executed in a seperate JVM as I saw one post that did that. But no luck.
The error I get is
C:\dev\javadev\R21Frame\R21\build\build.xml:136: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: C:\dev\javadev\R21Frame\R21\src\java\src\com\Test.java
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:189)
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(DefaultExecutor.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: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: C:\dev\javadev\R21Frame\R21\src\java\src\com\Test.java
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:470)
at weblogic.wsee.tools.jws.build.JwsCompiler.compile(JwsCompiler.java:438)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:289)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:219)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:182)
... 12 more
Caused by: weblogic.wsee.tools.WsBuildException: Failed to write wsdl
at weblogic.wsee.tools.jws.WebServiceWriter.process(WebServiceWriter.java:43)
at weblogic.wsee.tools.jws.process.CompositeProcessor.process(CompositeProcessor.java:36)
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:466)
... 16 more
Caused by: java.lang.ClassCastException: com.bea.xbean.store.Xobj$ElementXobj
at org.apache.crimson.tree.XmlDocument.importNode(XmlDocument.java:1260)
at weblogic.wsee.wsdl.WsdlSchema.write(WsdlSchema.java:131)
at weblogic.wsee.wsdl.WsdlTypes.write(WsdlTypes.java:232)
at weblogic.wsee.wsdl.WsdlDefinitions.write(WsdlDefinitions.java:634)
at weblogic.wsee.wsdl.WsdlDefinitions.toDocument(WsdlDefinitions.java:597)
at weblogic.wsee.wsdl.WsdlDefinitions.write(WsdlDefinitions.java:573)
at weblogic.wsee.wsdl.WsdlDefinitions.writeToFile(WsdlDefinitions.java:536)
at weblogic.wsee.tools.jws.WebServiceWriter.writeWsdl(WebServiceWriter.java:112)
at weblogic.wsee.tools.jws.WebServiceWriter.process(WebServiceWriter.java:33)
... 18 more
===============================================
Snip from my Ant Script.
<target name="compile" depends="init" description="compile the source " >
<java classname="org.apache.tools.ant.launch.Launcher" fork="true">
<classpath>
<pathelement path="${java.class.path}"/>
<path refid="bea-classpath"/>
</classpath>
<sysproperty key="ant.home" value="${ant.home}"/>
<arg value="-buildfile"/>
<arg value="${ant.file}"/>
<arg value="~jwsc"/>
</java>
</target>
<target name="~jwsc">
<record name="${log.directory}/compile.log" action="start"/>
<delete dir="build2"/>
<mkdir dir="build2"/>
<jwsc
srcdir="src/java/src"
destdir="build2"
classpathref="bea-classpath"
verbose="true"
>
<jws file="com/Test.java"/>
</jwsc>
<record name="${log.directory}/compile.log" action="stop"/>
</target>
Any help would be much appreciated. I also have a case open with bea. But I don't know that they have to make it work any further then DOS.
Thanks
JeffHi Jeff,
We had the same issue of trying to use the jwsc task from within eclipse. To resolve this we added the following jar to our project.
lib/xbean.jar
lib/wsse.jar
lib/weblogic-container-binding.jar
lib/webservices.jar
lib/weblogic.jar
lib/apache_xbean.jar
lib/webserviceclient.jar
In addition to that, we had to implement our build.xml as follows.
Add a classpath ref for the weblogic specific jar files.
<path id="wl.class.path">
<fileset dir="${basedir}" includes="**/*.jar" />
</path>
Define weblogic tasks and give the classpath ref defined earlier.
<taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask" classpathref="wl.class.path"/>
<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" classpathref="wl.class.path"/>
Include the classpathref attribute anytime we used a task.
<target name="wsdlcTask">
<wsdlc
verbose="true"
classpathref="wl.class.path"
srcWsdl="${wsdlFile}"
destJwsDir="${libDir}"
/>
</target>
<target name="jwscTask">
<delete dir="${outDir}" />
<jwsc
verbose="true"
classpathref="wl.class.path"
srcdir="${srcDir}"
destdir="${outDir}"
>
<jws file="${ImpleFile}" compiledWsdl="${antGenJarFile}" />
</jwsc>
</target>
Hope this helps.
Adi. -
NullPointerException in Schematool ANT-Task and Eclipse-plugin
Hi,
When running the Schematool from the Eclipse-plugin or from the ANT-task,
I get a NullPointerException. The ANT-plugin gives a more-or-less usefull
exception-traceback, the Eclipse-plugin doesn't give any useful hints.
The funny thing however is that from the commandline it all works!
The exception from ANT is:
[schematool] com.solarmetric.kodo.runtime.FatalException: There was an
error mapping field "operator" of type "class
com.unisys.nl.ruleengine.rules.CompoundCondition" to a schema.
[schematool] NestedThrowables:
[schematool] java.lang.NullPointerException
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMapping(Mapping.java:244)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMappings(Mapping.java:131)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMappings(Mapping.java:86)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.createMappings(SchemaTool.java:831)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.refresh(SchemaTool.java:333)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.refresh(SchemaTool.java:321)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1166)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1102)
[schematool] at
com.solarmetric.modules.integration.ant.SchemaToolTask.executeOn(SchemaToolTask.java:54)
[schematool] at
com.solarmetric.modules.integration.ant.TaskBase.execute(TaskBase.java:118)
[schematool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
[schematool] at org.apache.tools.ant.Task.perform(Task.java:341)
[schematool] at org.apache.tools.ant.Target.execute(Target.java:309)
[schematool] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[schematool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[schematool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[schematool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569)
[schematool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367)
[schematool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[schematool] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[schematool] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[schematool] at java.lang.reflect.Method.invoke(Method.java:324)
[schematool] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
[schematool] at
org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
[schematool] at java.lang.Thread.run(Thread.java:534)
[schematool] NestedThrowablesStackTrace:
[schematool] java.lang.NullPointerException
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.StringificationMapping.findMethod(StringificationMapping.java:215)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.StringificationMapping.getExternalizer(StringificationMapping.java:123)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.StringificationMapping.getExternalizer(StringificationMapping.java:112)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.StringificationMapping.install(StringificationMapping.java:105)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMapping(Mapping.java:234)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMappings(Mapping.java:131)
[schematool] at
com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMappings(Mapping.java:86)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.createMappings(SchemaTool.java:831)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.refresh(SchemaTool.java:333)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.refresh(SchemaTool.java:321)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1166)
[schematool] at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1102)
[schematool] at
com.solarmetric.modules.integration.ant.SchemaToolTask.executeOn(SchemaToolTask.java:54)
[schematool] at
com.solarmetric.modules.integration.ant.TaskBase.execute(TaskBase.java:118)
[schematool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
[schematool] at org.apache.tools.ant.Task.perform(Task.java:341)
[schematool] at org.apache.tools.ant.Target.execute(Target.java:309)
[schematool] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[schematool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[schematool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[schematool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569)
[schematool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367)
[schematool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[schematool] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[schematool] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[schematool] at java.lang.reflect.Method.invoke(Method.java:324)
[schematool] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
[schematool] at
org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
[schematool] at java.lang.Thread.run(Thread.java:534)
[schematool] BUILD FAILED:
file:C:/java/eclipse/workspace/EclipseProject/build.xml:84:
com.solarmetric.kodo.runtime.FatalException: There was an error mapping
field "operator" of type "class
com.unisys.nl.ruleengine.rules.CompoundCondition" to a schema.
NestedThrowables:
java.lang.NullPointerException
The .jdo file is:
<?xml version="1.0" encoding="UTF-8"?>
<jdo>
<package name="com.unisys.nl.ruleengine.rules">
<class name="Condition">
<extension vendor-name="kodo" key="table" value="condition"/>
</class>
<class name="ConditionDummyPlaceHolder"
persistence-capable-superclass="Condition">
<field name="m_condition">
<extension vendor-name="kodo" key="data-column"
value="condition"/>
<extension vendor-name="kodo" key="dependent" value="true"/>
</field>
</class>
<class name="AtomicCondition"
persistence-capable-superclass="Condition">
<field name="lefthand">
<extension vendor-name="kodo" key="dependent"
value="true"/>
</field>
<field name="operator">
<extension vendor-name="kodo" key="externalizer"
value="toString"/>
<extension vendor-name="kodo" key="factory"
value="getOperatorWithSymbol"/>
</field>
<field name="righthand">
<extension vendor-name="kodo" key="dependent"
value="true"/>
</field>
</class>
<class name="CompoundCondition"
persistence-capable-superclass="Condition">
<field name="subConditions">
<collection
element-type="com.unisys.nl.ruleengine.rules.Condition"/>
<extension vendor-name="kodo" key="element-dependent"
value="true"/>
<extension vendor-name="kodo" key="ordered" value="true"/>
</field>
<field name="operator">
<extension vendor-name="kodo" key="externalizer"
value="toString"/>
<extension vendor-name="kodo" key="factory"
value="getOperatorWithSymbol"/>
</field>
</class>
<class name="ConditionValue">
<extension vendor-name="kodo" key="table"
value="condition_value"/>
</class>
<class name="DerivedValue"
persistence-capable-superclass="ConditionValue">
<field name="valueProperty">
<extension vendor-name="kodo" key="dependent" value="true"/>
</field>
</class>
<class name="SimpleValue"
persistence-capable-superclass="ConditionValue"/>
<class name="Rule" persistence-capable-superclass="RuleSetElement">
<extension vendor-name="kodo" key="table" value="rule"/>
<field name="context">
<extension vendor-name="kodo" key="dependent" value="false"/>
</field>
<field name="condition">
<extension vendor-name="kodo" key="dependent" value="true"/>
</field>
<field name="comment">
<extension vendor-name="kodo" key="column-length"
value="-1"/>
</field>
</class>
<class name="RuleSet"
persistence-capable-superclass="RuleSetElement">
<extension vendor-name="kodo" key="table" value="ruleset"/>
<field name="rules">
<collection
element-type="com.unisys.nl.ruleengine.rules.RuleSetElement"/>
<extension vendor-name="kodo" key="element-dependent"
value="true"/>
</field>
</class>
<class name="RuleSetElement">
<extension vendor-name="kodo" key="table"
value="ruleset_element"/>
</class>
</package>
</jdo>
Any pointers what I'm doing wrong here?
(Another data-point: when I moved the sources to the laptop of a collegue,
and we try to generate the schema there, the plugin complains about not
having any JDO metadata available for the class RelationOperator - which
is the type of the field 'operator' that gives the NPE.
I'm using KODO-JDO 2.5.0RC2)
--TimTim-
This seems to be a problem with ClassLoader interactions; it will be
fixed for the next 2.5 RC (or final release). Thanks for pointing it
out.
In article <bbngrl$j47$[email protected]>, Tim van der Leeuw wrote:
>
Hi,
When running the Schematool from the Eclipse-plugin or from the ANT-task,
I get a NullPointerException. The ANT-plugin gives a more-or-less usefull
exception-traceback, the Eclipse-plugin doesn't give any useful hints.
The funny thing however is that from the commandline it all works!--
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Eclipse and WebLogic Ant Tasks
In WL_HOME/server/lib/ant/ is an ant.jar. It has a "defaults.properties" containing all of the ant taskdefs. I tried to extract that so that my build.xml could use them but it keeps complaining about weblogic.ant.taskdefs.perforce.P4Changes cannot be found. The reason why is that it's under the wrong package. How does one run the weblogic ant tasks outside of the weblogic ant installation? Thanks, Jeremy
bengali.Hi,
you also have to include a <taskdef> for the servicegen task of >weblogicThat's why I did but I still have a problem with the source2wsdd
ant task ( the other tasks run correctly within Eclipse).
I get a :
[source2wsdd] source2wsdd: Cannot find doclet class weblogic.webservice.tools.ddgen.ServiceGen
[source2wsdd] 1 error
BUILD FAILED: build.xml:324: javadoc execution failed
Total time: 3 seconds
The problem is that my source2wsdd has been defined with a well suited classpath
and is also called with the right classpath.
The problem only happens with this task !
Bengali -
Weblogic ant tasks integration in Eclipse
Hi,
I would like to make Weblogic ant tasks ( web services one) work in Eclipse 3.0
. Someone on this newsgroup suggested to just add weblogic.jar and webservices.jar
to the built-in ant classpath of Eclipse. The problem is that it doesn't work
for me. The tasks don't run because ant doesn't recognize the tasks.
What should I do ? If anyone has already managed to do it, please let me know.
bengali.bengali.Hi,
you also have to include a <taskdef> for the servicegen task of >weblogicThat's why I did but I still have a problem with the source2wsdd
ant task ( the other tasks run correctly within Eclipse).
I get a :
[source2wsdd] source2wsdd: Cannot find doclet class weblogic.webservice.tools.ddgen.ServiceGen
[source2wsdd] 1 error
BUILD FAILED: build.xml:324: javadoc execution failed
Total time: 3 seconds
The problem is that my source2wsdd has been defined with a well suited classpath
and is also called with the right classpath.
The problem only happens with this task !
Bengali -
Using Eclipse Ant tasks - for web service client creation
Hi,
I am following Eclipse documentation for creating Axis runtime environment web services and clients using web services Ant tasks.
As per document when I import Ant files into workspace, files that will be imported are wsgen.xml (Ant file) , axisservice.properties and axisclient.properties but for me these files are not getting imported into the project instead files axis_bujava.properties and axis_bujava.xml are imported.
Please do let me know if anyone have any ideas on this asap.
Thanks,
Roopa.Hi,
I am following Eclipse documentation for creating Axis runtime environment web services and clients using web services Ant tasks.
As per document when I import Ant files into workspace, files that will be imported are wsgen.xml (Ant file) , axisservice.properties and axisclient.properties but for me these files are not getting imported into the project instead files axis_bujava.properties and axis_bujava.xml are imported.
Please do let me know if anyone have any ideas on this asap.
Thanks,
Roopa. -
Error in writing an Ant task for creating a new connection pool.
I have written the following ant task to create a new connection pool in weblogic 10.3.
<target name="pool.dev">
<wlconfig url="http://localhost:7001/" username="weblogic" password="weblogic">
<query domain="C:/weblogic/rtg-L0" name="myserver"/>
<create type="JDBCConnectionPool" name="OneSourceConnectionPool">
<set attribute="DriverName"
value="oracle.jdbc.OracleDriver"/>
<set attribute="InitialCapacity" value="1"/>
<set attribute="MaxCapacity" value="5"/>
<set attribute="Password" value="rating"/>
<set attribute="Properties" value="user=rating"/>
<set attribute="RefreshMinutes" value="0"/>
<set attribute="ShrinkPeriodMinutes" value="15"/>
<set attribute="ShrinkingEnabled" value="true"/>
<set attribute="TestConnectionsOnRelease" value="true"/>
<set attribute="TestConnectionsOnReserve" value="true"/>
<set attribute="TestConnectionsOnCreate" value="true"/>
<set attribute="TestTableName" value="SQL SELECT 1 FROM DUAL"/>
<set attribute="URL"
value="jdbc:oracle:thin:@xyz.com:1522:oradvl"/>
<set attribute="Targets" value="myserver"/>
</create>
</wlconfig>
</target>
When I run it, I see the following error:
BUILD FAILED
C:\ganymede\eclipse\workspace1\RtgSvr\build.xml:286: Failed to connect to the server: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
Can anybody please help me regarding this...
Thank you,
SowmyaHi everybody,
Thank you very much for your replies....actually I added weblogic.jar to the classpath of the target. So, now I dont see that error. But, I have another problem which is as follows:
<target name="initJDBC">
<wlconfig url="t3://${host}:${port}" username="${username}" password="${password}">
<query domain="domain.name" type="Server" name="${target.server}" property="${target.server}"/>
<create type="JDBCConnectionPool" name="TestConnectionPool">
<set attribute="DriverName" value="oracle.jdbc.OracleDriver"/>
<set attribute="Password" value="welcome"/>
<set attribute="Properties" value="user=welcome"/>
<set attribute="URL" value="jdbc:oracle:thin:@test.com:1522:oradvl"/>
<set attribute="Targets" value=""/>
<set attribute="TestTableName" value="SQL SELECT 1 FROM DUAL"/>
<set attribute="TestConnectionsOnRelease" value="false"/>
<set attribute="TestConnectionsOnReserve" value="true"/>
</create>
<create type="JDBCDataSource" name="TestDataSource">
<set attribute="JNDIName" value="TestDataSource"/>
<set attribute="PoolName" value="TestConnectionPool"/>
<set attribute="Targets" value=""/>
</create>
</wlconfig>
</target>
I am not knowing what to give in the value field of <set attribute="Targets" value=""/>. The following is my build.properties file:
target.server=myserver
host=127.0.0.1
port=7001
username=weblogic
password=weblogic
domain.name=testDomain
If I give <set attribute="Targets" value="${myserver}"/>, I get the following error:
BUILD FAILED
C:\ganymede\eclipse\workspace1\TestSvr\build.xml:290: Property not set: ${myserver}
When I set myserver=myserver in build.properties, I get the following error:
BUILD FAILED
C:\ganymede\eclipse\workspace1\TestSvr\build.xml:290: Error invoking MBean command: java.lang.IllegalArgumentException: Property Name and value not valid for the MBean. Value myserver for parameter[Targets].java.lang.IllegalArgumentException: Unable to convert the argument valuemyserver to class javax.management.ObjectName.java.lang.reflect.InvocationTargetException
Can someone plzz help me in this regard.
Thank you,
Sowmya -
Wsdlc Ant Task - Problem creating java files in the correct package
In eclipse, for weblogic 9.2
Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
autogen.src.dir=../code/java/beaAutoGen
base.dest=../../../var/build/wsmToPlmWS
bea.build.dir=beaBuild
<target name="generate-from-wsdl" depends="prepare">
<delete dir="${src.dir}" includeemptydirs="true" />
<delete dir="${autogen.src.dir}" includeemptydirs="true" />
<wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
srcServiceName="WSPlmMto_Service"
debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
verbose="on" classpathref="bea-classpath" />
<!-- unjar to get the all the details so we can tokenize -->
<unjar dest="${autogen.src.dir}"
src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
<!-- copy over the impl file -->
<copy todir="../code/java/src">
<fileset dir="${base.dest}/${bea.build.dir}/impl" />
</copy>
</target>In eclipse, for weblogic 9.2
Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
autogen.src.dir=../code/java/beaAutoGen
base.dest=../../../var/build/wsmToPlmWS
bea.build.dir=beaBuild
<target name="generate-from-wsdl" depends="prepare">
<delete dir="${src.dir}" includeemptydirs="true" />
<delete dir="${autogen.src.dir}" includeemptydirs="true" />
<wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
srcServiceName="WSPlmMto_Service"
debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
verbose="on" classpathref="bea-classpath" />
<!-- unjar to get the all the details so we can tokenize -->
<unjar dest="${autogen.src.dir}"
src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
<!-- copy over the impl file -->
<copy todir="../code/java/src">
<fileset dir="${base.dest}/${bea.build.dir}/impl" />
</copy>
</target> -
Are the WLS 9.1 Web Service Ant Tasks ready for prime time?
I am trying to create a Proof of Concept (POC) for Enterprise and B2B Services at Wendy's Int'l, Inc.
As part of this POC, I created a WSDL for an in-house service and then used the wsdlc and jwsc Ant Tasks to translate this WSDL to Java classes and ultimately (I hoped) a deployable services.
In this document, I describe the issues I encountered setting up what I consider to be a simple POC.
I'll try to attach my WSDL file and build.xml so you can follow along.
I'll also try to attach my CSS file so you can compare how the generated WSDL appears in the Browser to the way I want it to appear.
If attachments are not allowed on these forums, then I will wait and see if there is interest in those documents before I paste them under this topic.
Some preliminary information about my environment.
Environment:
Windows XP Pro SP2
WebLogic 9.1
Java 1.5.0_04
Service Name:
AppRelease
Note: If I modify my WSDL (perhaps to add a new Operation or to change the definition of an element) and run wsdlc again, the AppReleaseSOAPPortImpl.java file is overwritten For this reason, I implemented my service logic in a class called AppReleaseServiceImple.java.
Now, for the issues.
1. Bug:
In the WSDL generated by wsdlc, the wsdl:part child of the wsdl:message tag is erroneously prefixed with a colon.
This occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
2. Bug:
In the WSDL generated by wsdlc, the wsdl:input and wsdl:output children of the wsdl:operation child of wsdl:portType tag are erroneously prefixed with a colon. Like 1 above, this occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
The error message generated by Bugs 1 and 2 is not helpful in diagnosing the problem:
[jwsc] Error at line:46 col:7 ':' expected [?! -- [CDATA[ ]
3. Bug:
In the WSDL generated by wsdlc, the documentation elements have all of my html elements stripped out, as well as my xhtml and wsdl namespace references. This completely negates one of the best features of the documentation tag, being able to present the WSDL in a browser as a nicely formatted, human friendly document which is also the underlying WSDL that can be viewed when the person views the source document.
I label this as a bug because it greatly reduces the functionality of the resulting WSDL.
4. Annoyance:
The WSDL generated by wsdlc has all of my comments stripped out, except the comments in the xsd:schema section of the wsdl:types element. I would prefer that all my comments be left in the WSDL, but if comments must be stripped out then I think all of the comments should be stripped out.
5. Annoyance:
The WSDL generated by wsdlc has my CSS specification stripped.
Work around: I don’t know if adding the CSS back will do any good because I have not yet created a deployable service (see the last issue below).
6. Annoyance:
The WSDL generated by wsdlc has different namespace prefixes than the ones I specified for my application's namespace and for the http://schemas.xmlsoap.org/wsdl/soap/ namespace.
Work around: Perform a find/replace on namespace prefixes "s0" and "s1" to return them to my prefered values.
Another thing I can do at this point is simply replace the generated WSDL in the jar file with my original WSDL. This would address issues 1 thru 6 above.
7. Annoyance:
The java source files created by wsdlc are put into a jar file. This makes it annoying when working within a traditional IDE like Eclipse because there is no way to reference the source files within the jar as working source.
Work around: Extract the source files from the jar and identify the resulting directory structure as part of the source structure of the project.
8. Bug:
The jwsc task complains if the same parameter name is used in multiple operations. I received the following Errors from jwsc:
[jwsc] C:\IDE\workspace\Acre-WL9.1\AppReleaseSOAPPort.java 0:0
[jwsc] [ERROR] - Parameter element "{http://acre.services.wendys.com/AppRelease/}garRequest" is not unique across document/literal bare WebService.
Since the operation names are unique, I see no reason to also require uniqueness in the parameter names used by those operations.
Work around: Use unique element names for the input parameters of the services operations.
9. Bug:
Once items 1, 2 and 8 above are taken care of, jwsc fails with the following error:
java.lang.AssertionError: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.ApplicationBeanImpl
This seems to be due to the weblogic.jar file not being in the System Classpath.
However, I should note that when I set verbose="on" and debug="on" in the jwsc ant task, there was a message from the task which stated "[jwsc] [search path for class files: [big freakin’ jar list]". In the big freakin’ jar list, I did find weblogic.jar and weblogic.jar has the required ApplicationBeanImpl. This indicates to me that the jwsc task does not fully honor either its classpathref attribute, nor an embedded classpath element.
Work around: Make sure the weblogic.jar is in the System Classpath.
10. Bug:
I fixed bug #9 by running a setDomainEnv script and then ran my ant task. This time I received the following output:
ant build-serviceBuildfile: build.xml
build-service:
[jwsc] 1 JWS files will be processed.
[jwsc] Processing JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java
[jwsc] JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java Validated.
[AntUtil.deleteDir] Deleting directory <some temporary directory>
BUILD FAILED
java.lang.ExceptionInInitializerError
At this point, I am completely stymied about how to proceed.
I wonder what new issues await once this 10th issue is addressed.
Really, is this tool set ready for prime time?<i>Sorry to hear you are having so many issues with using the WLS 9.1 web service Ant tasks, inside of Eclipse.
I generally create a User Library for the couple weblogic jars needed, and use it (the User Library) in my Eclipse projects that I create JWSes in.</i><br>
I also have a separate WebLogic Library in Eclipse (actually 2 libraries since I work with WL 8.1 and now WL 9.1). As you may know, one of the long-standing issues with the Ant integration within Eclipse is the fact that Ant, being an External Tool, does not receive the Project-specific Paths/Libraries. However, since most Java-relevant Ant tasks can take classpath and classpathref attributes, this is usually not an issue. In the case of the BEA-supplied wsdlc Ant task, it is apparent from the verbose/debug console output that wsdlc can see the jars in its classpathref, but it ignores those references when resolving class references and instead only uses the system classpath.
<p>
<i>I've only needed the weblogic.jar and xbean.jar, not all the ones you mentioned in an earlier thread of this post.</i><br>
I have not tried to winnow down exactly which jars are required. I simply included all the jars that exist and were added to the system classpath by the setDomainEnv.bat file created by WebLogic 9.1.
<p>
<i>Afterwards, I create an Ant Builder to build the JWS Web Service EAR, as opposed to fiddlin' with Eclipse.</i><br>
I too use Ant to build my deployable archives. Eclipse is simply my IDE of choice. I validated that all the issues I listed occurred when running Ant from the command line.
<p>
<i>If you are interested in how I do it, send me an e-mail (to [email protected]), and I'll send you a zip of one of these JWS projects. The build.xml script for the project, takes care of a lot of the "annoyances" you mentioned, one of which I think is not accurate. I have never had a situation where the wsdlc Ant task "overwrote" my XXXImpl.java file..</i><br>
Since I'm doing a POC to determine how we want to proceed with developing Web Services and an SOA in general, I tried to perform the same tasks using Axis 2 1.0, the WebLogic 9.1 tools, and XFire 1.1. Overwriting the Impl class is a common failing in the tools which take a WSDL and create Java source files for all three frameworks.
<p>
Try my scenario. Add another operation to an existing WSDL, and run the wsdlc Ant Task. The old IMPL class will be over-written.
<p>
Because of this, I have a separate Impl class and I make sure that all its methods and annotations match the methods and annotations in the Skeleton Impl class created by wsdlc.
<p>
<i>Maybe that's because I use the <exec> Ant task with jar.exe (the xvf options) in my build.xml, to only get what I need out of the .jar/.zip the wsdlc generates. I'm typically only interest in the interface class that my XXXImpl.java file needs to implements, because I use XMLBeans for the input args (and return values) of my web service operations.</i><br>
Perhaps. I am not using XMLBeans in any of the three frameworks because the resulting service seems to be lighter-weight in all three frameworks if XMLBeans is not used. I'm sure there will be scenarios where XMLBeans is preferred, but I have not encountered that case in this POC.
<p>
<i>Regards,
Mike Wooten</i>
Thanks for the follow-up.
Mike McAngus -
Java.lang.NullPointerException running flexunit ant task in 4.1 Beta 2
Hello,
After trying to debug this all day, I thought I would ask the community.
I am trying out the new FU4.1 Beta 2 (3.5) from the downloads page. We have a working CI system set up with 4.0, and I thought trying out 4.1 beta 2 would simply be a matter of replacing the binaries in my lib folder and re-running the ant script. Evidently not, or else I am missing something.
After updating to the 4.1 Beta 2 binaries, if I re-run a sample project in Eclipse, the build fails with a java NullPointerException when the <flexunit> ant task is invoked. We have an involved setup that uses the groovy AntBuilder and other esoteric constructs, so I thought I would create a very simple test script similar to the sample CI project to see if that would work. Unfortunately, I am still seeing the NPE. The worst part is that there is absolutely no debug information provided - no message, no traceback. I even attached the Ant source and debugged it. I could see the NPE being caught, but it contained a null message and null traceback.
Here is the simplified ant script:
<project name="tests" basedir=".">
<target name="test-init" depends="">
<mkdir dir="${build.dir}"/>
<mkdir dir="${reports.dir}"/>
<mkdir dir="${reports.xml}"/>
<mkdir dir="${reports.html}"/>
<!-- Setup Flex and FlexUnit ant tasks -->
<!-- You can set this directly so mxmlc will work correctly, or set
<taskdef resource="flexUnitTasks.tasks" classpath="${lib}/flexUnitTasks-4.1.0-beta2.18.jar" />
</target>
<target name="run-flex-tests" depends="test-init">
<sequential>
<!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
<flexunit
swf="${build.dir}/TestRunner.swf"
toDir="${reports.xml}"
haltonfailure="false"
verbose="true"
localTrusted="true"
timeout="60000"/>
<!-- Generate readable JUnit-style reports -->
<junitreport todir="${reports.xml}">
<fileset dir="${reports.xml}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${reports.html}" />
</junitreport>
</sequential>
</target>
</project>
The output is:
Buildfile: C:\EclipseWorkspace\tests\Source\Flex\build_test.xml
test-init:
run-flex-tests:
[flexunit] Validating task attributes ...
BUILD FAILED
C:\EclipseWorkspace\tests\Source\Flex\build_test.xml:23: java.lang.NullPointerException
Total time: 297 milliseconds
Is there something obvious I am missing?
Thanks for any help!
TrevorBrian,
OK, a colleague worked with me (thanks, John!) to debug the problem a little further, and I think we found the fundamental problem. I wanted to post that info to save you some time...
Aside: One thing we did have to do was to rebuild the flexUnitTasks.jar to include debug information, since the binary in the 4.1 beta 2 package did not have debug=true. I'd suggest that we might want to change the build script to build the binaries with debug moving forward.
Back to the problem.
The NullPointerException is thrown in TaskConfiguration::validateSharedProperties(), when equals() is invoked. Here is the code snippet:
//if we can't find the FLEX_HOME and we're using ADL or compilation
if((flexHome == null || !flexHome.exists()) && (testRunConfiguration.getPlayer().equals("air") || shouldCompile()))
throw new BuildException("Please specify, or verify the location for, the FLEX_HOME property. "
+ "It is required when testing with 'air' as the player or when using the 'testSource' element. "
+ "It should point to the installation directory for a Flex SDK.");
In my case, I do not have a FLEX_HOME property set in Ant currently. I'll bet most folks have this set, so the logic would run differently for them. For my case, the (flexHome == null) check is true. That means that the testRunConfiguration.getPlayer().equals("air")check will occur next, and here is the problem. The "player" member is not set in the testRunConfiguration yet at this point, so testRunConfiguration.getPlayer() returns null. testRunConfiguration.setPlayer() is called in generateDefaults(). But generateDefaults() is not called until after validateSharedProperties() is called. So, if properties initialization could be improved here and I think this code will run more robustly.
I can work-around my issue temporarily by just setting a FLEX_HOME property in Ant. But I hope you will agree that the initialization issue with "player" still should be addressed. Would you like me to open a bug report, or is this thread enough?
Thanks,
Trevor -
ClassCastException using Subant and wldeploy ant task
Hi!
I'm using subant to call all diffrent build.xml files located in subdirectories. The buildfile looks like this:
<project name="extern.call" default="callall">
<target name="callall">
<fileset id="buildfile.set" dir=".." includes="*2/build.xml">
<exclude name="Br*2/*"/>
</fileset>
<subant target="deploy-local" inheritall ="false" failonerror="true">
<fileset refid="buildfile.set"/>
</subant>
</target>
</project>
The first called build.xml files works fine ... but the execution of the second build.xml (it's not important which file is the second one, it's crash always at the second call), stop with a "java.lang.ClassCastException".
See Stacktrace:
[subant] weblogic.Deployer -debug -nowait -verbose -upload -noexit -name ClarifyRead -source \build\ClarifyRead\delivery\ClarifyRead.ear -targets myserver -adminurl t3://localhost:7001 -user weblogic -password ******** -deploy
[subant] dumping Exception stack
[subant] java.lang.ClassCastException
[subant] at weblogic.management.deploy.utils.DeployerHelper.uploadSource(DeployerHelper.java:586)
[subant] at weblogic.Deployer.runBodyWithAuthenticatedSubject(Deployer.java:824)
[subant] at weblogic.Deployer.runBody(Deployer.java:711)
[subant] at weblogic.utils.compiler.Tool.run(Tool.java:146)
[subant] at weblogic.utils.compiler.Tool.run(Tool.java:103)
[subant] at weblogic.Deployer.runMain(Deployer.java:566)
[subant] at weblogic.Deployer.mainWithExceptions(Deployer.java:576)
[subant] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[subant] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[subant] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[subant] at java.lang.reflect.Method.invoke(Method.java:324)
[subant] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:264)
[subant] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:204)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.Target.execute(Target.java:301)
[subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[subant] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
[subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:182)
[subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:112)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.Target.execute(Target.java:301)
[subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:379)
[subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
There is no diffrent between using ant in eclipse environment or as standalone, the result it the same.
Do someone else have the same problem?
Kind regards
JosephHi
I got the same message and I couldn't resolve it too, I am wordering if you got the key to the problem?
Thanks
Daivd Huang -
Changing the wldeploy ant task behaviour
wldeploy ant task while deploying the application deploys it under <configured weblogic upload dir>/<application name>/app/ application name.
Is there any way we can change this behaviour as we couldnt find the options in ant task to change itThat is all you should have to do, the ant tasks are sitting inside the
weblogic.jar.
Cheers
mbg
"Shane Witbeck" <[email protected]> wrote in message
news:[email protected]..
Rob Bennett <[email protected]> wrote in message
news:<[email protected]>...
What is required for the wldeploy ant task to function properly? I am
able to use it when I run ant from the command line and use the version
of ant that came with Weblogic 8 (I have the platform beta, not the
release version). When I try to use it inside of eclipse (which uses
its own copy of ant), the task fails.. it looks like it is trying to
generate RMI stubs. If anyone can shed light on what I am missing from
the eclipse environment, I would appreciate it.
-RobI actually just got it to work by adding the weblogic.jar to my
classpath. (Im using WL 8.1).
-Shane -
Meta migration ant task throw exception
Hi,
I am trying the migration from kodo 2 to 3.
I successfully migrated the properties file using the integrated ant
task; but run into some problem with the meta data migration (the *.jdo
files). following is the ant task I am using:
<target name="migrate-meta" depends="init, prepare-jdo-meta, compile" >
<!-- define the kodo2migrator task; this can be done at the top
of -->
<!-- the build.xml file, so it will be available for all
targets -->
<taskdef name="kodo2migrator"
classname="kodo.jdbc.ant.Kodo2MigratorTask">
<classpath>
<pathelement
path="${java.class.path}:${project.classpath}:${project.build.jdometa.dtd}"/>
</classpath>
</taskdef>
<!-- invoke migrator on all .jdo files below the src directory -->
<kodo2migrator>
<classpath>
<pathelement
path="${java.class.path}:${project.classpath}:${project.build.jdometa.dtd}"/>
</classpath>
<fileset dir="${project.kodo.src}">
<include name="**/*.jdo" />
</fileset>
<config properties="${jdo.properties}" />
</kodo2migrator>
</target>
the exception it is throwning is :
[kodo2migrator] kodo.jdbc.migration.kodo2.util.FatalUserException: The
specified driver class "null" is neither a java.sql.Driver nor a
javax.sql.DataSource. Please specify a valid driver in the
javax.jdo.option.ConnectionDriverName property.
[kodo2migrator] at
kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.createConnectionFactory(ConfigurationConnector.java:108)
[kodo2migrator] at
kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.<init>(ConfigurationConnector.java:65)
[kodo2migrator] at
kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.<init>(ConfigurationConnector.java:57)
[kodo2migrator] at
kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.<init>(ConfigurationConnector.java:37)
[kodo2migrator] at
kodo.jdbc.migration.kodo2.Kodo2Migrator.migrate(Kodo2Migrator.java:161)
[kodo2migrator] at
kodo.jdbc.migration.kodo2.Kodo2Migrator.run(Kodo2Migrator.java:1141)
[kodo2migrator] at
kodo.jdbc.ant.Kodo2MigratorTask.executeOn(Kodo2MigratorTask.java:53)
[kodo2migrator] at
com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[kodo2migrator] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
[kodo2migrator] at org.apache.tools.ant.Task.perform(Task.java:341)
[kodo2migrator] at
org.apache.tools.ant.Target.execute(Target.java:309)
[kodo2migrator] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[kodo2migrator] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[kodo2migrator] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[kodo2migrator] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[kodo2migrator] at org.apache.tools.ant.Main.start(Main.java:196)
[kodo2migrator] at org.apache.tools.ant.Main.main(Main.java:235)
BUILD FAILED
file:/home/tyang/eclipse/workspace/UMA/build.xml:208:
kodo.jdbc.migration.kodo2.util.FatalUserException: The specified driver
class "null" is neither a java.sql.Driver nor a javax.sql.DataSource.
Please specify a valid driver in the
javax.jdo.option.ConnectionDriverName property.
the properties file I am using is like this: (just a snipet)
javax.jdo.PersistenceManagerFactoryClass:
kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName: org.postgresql.Driver
javax.jdo.option.ConnectionURL: jdbc:postgresql://127.0.0.1/cwdevdb
javax.jdo.option.ConnectionUserName: cwdev
javax.jdo.option.ConnectionPassword:
javax.jdo.option.DefaultFetchBatchSize: 10
javax.jdo.option.DefaultFetchThreshold: 30
javax.jdo.option.IgnoreCache: true
javax.jdo.option.NontransactionalRead: true
javax.jdo.option.NontransactionalWrite: false
javax.jdo.option.Optimistic: true
javax.jdo.option.RestoreValues: false
javax.jdo.option.RetainValues: false
kodo.ConnectionFactoryProperties: MaxActive=20, MaxWait=5000
kodo.ConnectionRetainMode: persistence-manager
kodo.DataCache: true(CacheSize=10000)
kodo.LicenseKey: xxxx-xxxx-xxxx-xxxx-xxxx
kodo.ManagedRuntime: TransactionManagerName=java:/TransactionManager
kodo.PersistenceManagerImpl: CloseOnManagedCommit=true
kodo.QueryCache: true
kodo.RemoteCommitProvider: sjvm(Topic=topic/KodoCacheTopic)
kodo.jdbc.DBDictionary: postgres(StoreCharsAsNumbers=false)
kodo.jdbc.SequenceFactory: PrimaryKeyColumn=PKX,
SequenceColumn=SEQUENCEX, TableName=JDO_SEQUENCEX
To make sure this IS the one it is using, not only I echo out the
"${jdo.properties}" value, but also I tried to comment out the
licenseKey line, then it threw "license key invalid" exception. so I am
sure this is the properties file I am using in that ant task.
Also I tried using the command line on one of our classes, it does not
run into this problem.
Any clue what I am missing?
Thanks a lot,
TaoThe 3.0.0 migrator task has a couple of bugs. These will be ironed out
in 3.0.1, which is due for release any day now. But if you must work
around the bugs immediately, you'll have to:
1. Run the task using your old properties file. Actually this will be a
requirement even in 3.0.1; that's why in the migration chapter of the
docs we say to migrate your metadata before your properties. The
migration tool needs to access 2.5 properties to map your classes properly.
2. Add the the following property to your old properties file:
kodo.LicenseKey: <your license key>
3. Name the properties file "kodo.properties" and place it in one of the
directories listed in the ant task's CLASSPATH. If that doesn't work,
place it in a directory in your system CLASSPATH. The 3.0.0 task has
some classpath problems, and also the <config> task element doesn't work.
Or, you could just set your system CLASSPATH and run the kodo2migrator
tool from the command line.
I hope this helps. As I said, 3.0.1 resolves these ant problems, and
will be released very shortly. -
Nested class path element in ANT task
I am having some problems with the nested classpath element in the
enhancer ANT task. Does anyone else use this? If so can you share your
config with me.
class loader could not resolve the class name "XYZ"
sean.Sean Hager wrote:
I am having some problems with the nested classpath element in the
enhancer ANT task. Does anyone else use this? If so can you share your
config with me.
class loader could not resolve the class name "XYZ"Impossible to say what your error means without looking at your build.xml.
My enhancer task looks like:
<taskdef name="jdoc" classpathref="eclipse.classpath"
classname="com.solarmetric.modules.integration.ant.JDOEnhancerTask"/>
<jdoc>
<fileset dir="${src.dir}">
<include name="**/*.jdo" />
</fileset>
<fileset dir="${testsrc.dir}">
<include name="**/*.jdo" />
</fileset>
<classpath>
<pathelement location="bin/"/>
<path refid="eclipse.classpath"/>
</classpath>
</jdoc>
Hope that helps.
Tom
Maybe you are looking for
-
Customer with no sales activity
Hi All, How to check the customer whoes doesn't have any sales activity at all. Is there any Function module to find this? Thanks, Sowmya
-
Itunes on windows 7 keeps crashing (64 bit)
I am having a huge problem with itunes 10.5.3.3. When i am using itunes... it suddenly crashes and I get a message box saying "Itunes has stopped working". another box then appears saying "A problem casued the program to stop working correctly. Windo
-
Xcode vs titanium studio? pros and cons?
hi, im new to developing and coding, just wondering which program u guys found easier to develop with and why. Personally ive been working with titanium studio cuz i couldnt figure out xcode but im starting to get stumped there too..
-
Hello Everyone, This is my first post so please bare with me. I tried using Backup last week and had failed attempts trying to backup iLife and then doing just my Pictures folder separately. I gave up and went back to searching through iPhoto 6. As s
-
Adobe Acrobat installation from cs2
After multiple install/uninstalls, I am unable to install Acrobat 7.0. I have cs2 and windows xp. The other programs (GoLive, Illustrator, etc) appear as install options but the Acrobat 7.0 does not. (It is greyed out). Can anyone assist me on this?