Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
How to fix code generation fail error ("Could not find package for null with type")?
April 22, 2016
19:11, EEST
Avatar
HOYOUNG KANG
Member
Members
Forum Posts: 11
Member Since:
April 22, 2016
sp_UserOfflineSmall Offline

I’m new about OPC UA Java SDK.
Theseday I’m evaluating your java sdk of opc ua.
My evaluating scenario is following.
1. create custom information model using unified automation ua modeler: I created 3 custome object type, 2 property, 1 function.
2. generate c++ code using unified automation ua modeler.
3. builld server application using unified automation c++ opc ua sdk.
4. export xml format of custom information model using unified automation ua modeler.
5. generate java code using ant and prosys codegne java sdk.
6. build client application using prosys java opc ua sdk.
7. i access to c++ server application by java client application.

above procedures, i failed procedure 5.
How can i fix it. following is error message when i generate java code using codegen.
(I generated java code succefully and can make java applicaiton when I use your demo information model xml (SampleType.xml))

I think my explaination is lack for you to understand my situation. so i want to send you my simple information model xml file.
but i can’t because this forum applicaiton is not support uplod functionality.
If you want, I will send you asap.

error messge terminal standard output
————————————————————————————————————-
ant -propertyfile LSISCIM.codegen.properties

Buildfile: D:\workspace\opcua\LSIS\codegen\build.xml

codegen.codegen:

codegen.codegen-templates:

codegen.codegen-single-check:

codegen.codegen-single-check:

codegen.codegen-single-check:

codegen.codegen-single-with-package:

codegen.codegen-single-with-package:

codegen.codegen-single-with-package:

codegen.codegen-single-without-package:

codegen.codegen-single-without-package:

codegen.codegen-single-without-package:
[java] Arguments: D:\workspace\opcua\LSIS\codegen\LSISCIM.xml D:\workspace\opcua\LSIS\codegen/lib D:\workspace\opcua\LSIS\codegen\templates\client D:\workspace\opcua\LSIS\codegen/generated-intf D:\workspace\opcua\LSIS\codegen/generated-impl
[java] Arguments: D:\workspace\opcua\LSIS\codegen\LSISCIM.xml D:\workspace\opcua\LSIS\codegen/lib D:\workspace\opcua\LSIS\codegen\templates\common D:\workspace\opcua\LSIS\codegen/generated-intf D:\workspace\opcua\LSIS\codegen/generated-impl
[java] Arguments: D:\workspace\opcua\LSIS\codegen\LSISCIM.xml D:\workspace\opcua\LSIS\codegen/lib D:\workspace\opcua\LSIS\codegen\templates\server D:\workspace\opcua\LSIS\codegen/generated-intf D:\workspace\opcua\LSIS\codegen/generated-impl
[java] Generating Java classes from UaNodeSet file D:\workspace\opcua\LSIS\codegen\LSISCIM.xml (namespace: http://lsis.co.kr/LSISCIM).
[java] Using library files:
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Adi.NodeSet2.xml (namespace: http://opcfoundation.org/UA/ADI/)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Di.NodeSet2.xml (namespace: http://opcfoundation.org/UA/DI/)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.NodeSet2.xml (namespace: http://opcfoundation.org/UA/)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Plc.NodeSet2.xml (namespace: http://PLCopen.org/OpcUa/IEC61131-3/)
[java] Generating Java classes from UaNodeSet file D:\workspace\opcua\LSIS\codegen\LSISCIM.xml (namespace: http://lsis.co.kr/LSISCIM).
[java] Exception in thread “main” java.lang.Exception: Could not find package for null with type :all.
[java] Using library files:
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Adi.NodeSet2.xml (namespace: http://opcfoundation.org/UA/ADI/)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Di.NodeSet2.xml (namespace: http://opcfoundation.org/UA/DI/)
[java] at codegen.generator$get_package.invoke(generator.clj:92)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.NodeSet2.xml (namespace: http://opcfoundation.org/UA/)
[java] could not get package for element null at codegen.generator$raw_package.invoke(generator.clj:199)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Plc.NodeSet2.xml (namespace: http://PLCopen.org/OpcUa/IEC61131-3/)
[java] ERROR occured during generation.
[java] could not get package for element null
[java]
[java] Exception in thread “main” java.lang.Exception: Could not find package for null with type :all.ERROR occured during generation.
[java] at codegen.generator$fn__103.invoke(generator.clj:217)
[java]
[java] at clojure.lang.MultiFn.invoke(MultiFn.java:227)
[java] at codegen.generator$get_package.invoke(generator.clj:92)
[java] at codegen.generator$dependencies$fn__207.invoke(generator.clj:542)
[java] at codegen.generator$raw_package.invoke(generator.clj:199)
[java] at clojure.core$map$fn__4245.invoke(core.clj:2559)
[java] at codegen.generator$fn__103.invoke(generator.clj:217)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.RT.seq(RT.java:484)
[java] at clojure.lang.MultiFn.invoke(MultiFn.java:227)
[java] at clojure.lang.RT.nthFrom(RT.java:848)
[java] at clojure.lang.RT.nth(RT.java:807)
[java] at clojure.core$distinct$step__4716$fn__4717$fn__4719.invoke(core.clj:4618)
[java] at codegen.generator$dependencies$fn__207.invoke(generator.clj:542)
[java] at clojure.core$distinct$step__4716$fn__4717.invoke(core.clj:4618)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at clojure.core$map$fn__4245.invoke(core.clj:2559)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at clojure.lang.Cons.next(Cons.java:39)
[java] at clojure.lang.RT.length(RT.java:1646)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.RT.seqToArray(RT.java:1587)
[java] at clojure.lang.RT.seq(RT.java:484)
[java] at clojure.lang.LazySeq.toArray(LazySeq.java:126)
[java] at clojure.lang.RT.nthFrom(RT.java:848)
[java] at clojure.lang.RT.toArray(RT.java:1565)
[java] at clojure.lang.RT.nth(RT.java:807)
[java] at clojure.core$to_array.invoke(core.clj:333)
[java] at clojure.core$distinct$step__4716$fn__4717$fn__4719.invoke(core.clj:4618)
[java] at clojure.core$distinct$step__4716$fn__4717.invoke(core.clj:4618)
[java] at clojure.core$sort.invoke(core.clj:2828)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at codegen.generator$dependencies.invoke(generator.clj:524)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.Cons.next(Cons.java:39)
[java] at codegen.generator$mustachify.invoke(generator.clj:692)
[java] at clojure.lang.RT.length(RT.java:1646)
[java] Generating Java classes from UaNodeSet file D:\workspace\opcua\LSIS\codegen\LSISCIM.xml (namespace: http://lsis.co.kr/LSISCIM).
[java] at clojure.core$map$fn__4245.invoke(core.clj:2559)
[java] Exception in thread “main” java.lang.Exception: Could not find package for null with type :all.
[java] at clojure.lang.RT.seqToArray(RT.java:1587)
[java] Using library files:
[java] at clojure
[java] at codegen.generator$get_package.invoke(generator.clj:92)
[java] at clojure.lang.LazySeq.toArray(LazySeq.java:126)
[java] at codegen.generator$raw_package.invoke(generator.clj:199)
[foreach] Exception in thread “Thread-3” The following error occurred while executing this line:
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Adi.NodeSet2.xml (namespace: http://opcfoundation.org/UA/ADI/)
[java] at clojure.lang.RT.toArray(RT.java:1565)
[java] at codegen.generator$fn__103.invoke(generator.clj:217)
[foreach] D:\workspace\opcua\LSIS\codegen\build.xml:142: Java returned: 1
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Di.NodeSet2.xml (namespace: http://opcfoundation.org/UA/DI/) at clojure.lang.MultiFn.invoke(MultiFn.java:227)
[foreach] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:570)
[java]
[foreach] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:443)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.NodeSet2.xml (namespace: http://opcfoundation.org/UA/)
[foreach] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at codegen.generator$dependencies$fn__207.invoke(generator.clj:542)
[foreach] at net.sf.antcontrib.logic.ForEach$1.run(ForEach.java:125)
[java] D:\workspace\opcua\LSIS\codegen\lib\Opc.Ua.Plc.NodeSet2.xml (namespace: http://PLCopen.org/OpcUa/IEC61131-3/) at clojure.core$map$fn__4245.invoke(core.clj:2559)
[foreach] at net.sf.antcontrib.util.ThreadPoolThread.run(ThreadPoolThread.java:53)
[java]
[java] at clojure.core$to_arr
[java] could not get package for element null
[foreach] Exception in thread “Thread-2” The following error occurred while executing this line:
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[foreach] D:\workspace\opcua\LSIS\codegen\build.xml:142: Java returned: 1
[java] ERROR occured during generation.
[foreach] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:570)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[foreach] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:443)
[java] at clojure.lang.RT.seq(RT.java:484)
[foreach] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at clojure.lang.RT.nthFrom(RT.java:848)
[foreach] at net.sf.antcontrib.logic.ForEach$1.run(ForEach.java:125)
[java] at clojure.lang.RT.nth(RT.java:807)
[foreach] at net.sf.antcontrib.util.ThreadPoolThread.run(ThreadPoolThread.java:53)
[java] at clojure.core$distinct$step__4716$fn__4717$fn__4719.invoke(core.clj:4618)
[java] at clojure.core$distinct$step__4716$fn__4717.invoke(core.clj:4618)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.Cons.next(Cons.java:39)
[java] at clojure.lang.RT.length(RT.java:1646)
[java] at clojure.lang.RT.seqToArray(RT.java:1587)
[java] at clojure.lang.LazySeq.toArray(LazySeq.java:126)
[java] at clojure.lang.RT.toArray(RT.java:1565)
[java] at clojure.core$to_array.invoke(core.clj:333)
[java] at clojure.core$sort.invoke(core.clj:2828)
[java] at codegen.generator$dependencies.invoke(generator.clj:524)
[java] at codegen.generator$mustachify.invoke(generator.clj:692)
[java] at clojure.core$map$fn__4245.invoke(core.clj:2559)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.RT.seq(RT.java:484)
[java] at clojure.core$seq.invoke(core.clj:133)
[java] at clojure.core$concat$fn__3955.invoke(core.clj:685)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.Cons.next(Cons.java:39)
[java] at clojure.lang.RT.countFrom(RT.java:540)
[java] at clojure.lang.RT.count(RT.java:530)
[java] at codegen.generator$mustachify_list$fn__225.invoke(generator.clj:550)
[java] at clojure.core$map_indexed$mapi__6395$fn__6396.invoke(core.clj:6692)
[java] at clojure.lang.LazySeq.sval(LazySeq.java:40)
[java] at clojure.lang.LazySeq.seq(LazySeq.java:49)
[java] at clojure.lang.RT.seq(RT.java:484)
[java] at clojure.core$seq.invoke(core.clj:133)
[java] at clojure.core$empty_QMARK_.invoke(core.clj:5706)
[java] at stencil.core$fn__1512.invoke(core.clj:27)
[java] at stencil.ast$fn__274$G__269__283.invoke(ast.clj:19)
[java] at stencil.ast$fn__414.invoke(ast.clj:112)
[java] at stencil.ast$fn__274$G__269__283.invoke(ast.clj:19)
[java] at stencil.core$render.invoke(core.clj:74)
[java] at stencil.core$render_file.invoke(core.clj:81)
[java] at codegen.generator$render_template_many_to_one.invoke(generator.clj:848)
[java] at codegen.generator$render_template.invoke(generator.clj:857)
[java] at codegen.generator$generate$fn__372.invoke(generator.clj:882)
[java] at clojure.core$map$fn__4245.invoke(core.clj:2559)
[java] at clojure.lang.LazySeq.sval(Laz
[foreach] Exception in thread “Thread-1” The following error occurred while executing this line:
[foreach] D:\workspace\opcua\LSIS\codegen\build.xml:142: Java returned: 1
[foreach] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:570)
[foreach] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:443)
[foreach] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[foreach] at net.sf.antcontrib.logic.ForEach$1.run(ForEach.java:125)
[foreach] at net.sf.antcontrib.util.ThreadPoolThread.run(ThreadPoolThread.java:53)

BUILD SUCCESSFUL
Total time: 7 seconds
==========================================================================================================================

April 25, 2016
9:38, EEST
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

This error message is produced in situations where the information model contains types that are not defined anywhere in the UaNodeSet file and also not found from included models. Previously custom structures as method arguments have resulted in this kind of error.

As a first step, you should check your information model and make sure that all type information is contained in the same UaNodeSet file. If some type information is only contained in other UaNodeSet files, please make sure that these files are placed in codegen\lib folder.

Let us know if this helps. If not, you can send the information model xml to us at the email address uajava-support@prosysopc.com

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
54 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 738

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1