B4J Question java.lang.RuntimeException: java.lang.ClassNotFoundException: [old package name here]

LucaMs

Expert
Licensed User
Longtime User
Error occurred on line: 285 (wshUser)
java.lang.RuntimeException: java.lang.ClassNotFoundException: xxx.old60.it.myclass
at anywheresoftware.b4a.keywords.Common.CallSubDelayed4(Common.java:545)
at anywheresoftware.b4a.keywords.Common.CallSubDelayed2(Common.java:531)
at xxx.old60.it.wshuser._from_client(wshuser.java:478)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:96)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$1.run(WebSocketModule.java:126)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:47)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:43)
at anywheresoftware.b4a.shell.ShellBA.startMessageLoop(ShellBA.java:119)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:175)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:309)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:96)
at xxx.old60.it.main.main(main.java:29)
Caused by: java.lang.ClassNotFoundException: xxx.old60.it.myclass
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at anywheresoftware.b4a.keywords.Common.getComponentBA(Common.java:577)
at anywheresoftware.b4a.keywords.Common.CallSubDelayed4(Common.java:543)
... 30 more
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Excuse me, Erel, but given my advanced age šŸ˜­šŸ˜„ and the fact that I do one thing here and one there, I don't remember for sure how I solved the problem (I think by changing the name of a routine).

My question is mainly: how come the old package name is searched.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Cleaning the project should solve such issues,
I also thought this and in fact the very first test I did was just that: CTRL + P (clean project).

I vaguely remember that sometimes it happened to me with some custom views: I was forced to remove them from the layout (Designer) and create them again.
(This is not the case, this is a NON-UI B4J).
 
Upvote 0
Top