org.drools.RuntimeDroolsException: Unable to resolve class - seam

I have this seam project that a colleague built. I am trying to get it to build in Jboss dev Studio. He uses ant and builds manually. I got the project built in JBDS and deployed on the JBoss server. When i try to run the app, when it is time for the rules to fire, I get this error
Caused by: org.drools.RuntimeDroolsException: Unable to resolve class 'dne.nmst.ciscoconfig.model.ConfigParams_$$_javassist_seam_4'
The offending code is in the drools config file which includes 2 imports
package Config;
import dne.nmst.ciscoconfig.model.ConfigParams;
import dne.nmst.ciscoconfig.action.ConfigSelector;
Perhaps I need more detail here, I don't know what would be useful to post. I'm not even sure I know how to ask the question other than how do I fix this. Advice anyone?

Are you 100% sure the jar containing those imports is available at runtime, rather than just at compile time?

Related

Can't compile servlet using command line

I'm trying to compile a servlet which sets session data for my site. However I'm having big problems trying to import other class files which the servlet relies on.
I need to import my custom made MySQL class file which is located in evo.net. (WEB-INF/classes/evo/net). This is already compiled and works perfectly.
And I also need to import my custom made Encryption class for encrypting passwords using it's md5() method. This is located in evo.common (WEB-INF/classes/evo/common). This is already compiled and works perfectly too.
My Session servlet is located in the same package as my MySQL class (evo.net or WEB-INF/classes/evo/net).
I'm setting the classpaths as follows:
set classpath=;D:\Apache Software Foundation\Tomcat
7.0\lib\servlet-api.jar;D:\Apache Software Foundation\Tomcat 7.0\webapps\ROOT\WEB-INF\classes\evo\common\Encryption;D:\Apache Software Foundation\Tomcat
7.0\webapps\ROOT\WEB-INF\classes\evo\net\MySQL
Is this the wrong way to set multiple classpaths? As its throwing 'cannot find symbol' errors. If I just set the classpath pointing at the servlet-api.jar it fixes the javax cannot find symbol errors, but when I add the others on the classpath it doesnt work. Help much appreciated. Thanks!

What is __meteor_bootstrap__?

I am just starting with Meteor and working on an existing project. I am running into an issue with one of the packages(observatory-apollo) that's has the following line:
__meteor_bootstrap__.app.use Observatory.logger #TLog.useragent
It is complaining that __meteor_bootstrap__.app is undefined.
What is __meteor_boostrap__ exactly? I can't seem to find a description of what it is but from threads, people seem to know how to use it. I can only see it defined in boot.js, but it doesn't really tell me much...
Meteor uses connect npm module under the hood for various reasons, to serve static files, for example. __meteor_bootstrap__.app was the reference to connect app instance.
Before it was __meteor_bootstrap__.app but it changed couple of releases ago and became WebApp.connectHandlers object and is part of WebApp package.
WebApp is a standard package of Meteor, core package for building webapps. You don't usually need to add explicitly as it is a dependency of standard-app-packages.
Example of usage the connectHandlers is to inject connect middlewares in the same way as you would use any connect middleware (or some express middlewares, express is built on top of connect):
WebApp.connectHandlers
.use(connect.query())
.use(this._config.requestParser(bodyParser))
You can look at meteor-router Atmosphere package and take it as an example: https://github.com/tmeasday/meteor-router/blob/master/lib/router_server.js
More about connect: https://npmjs.org/package/connect

Guice, Peaberry and ServletModule

I am having an issue getting Peaberry/Guice/OSGi/Servlets to place nice. To begin, I have been migrating a Jetty-based, WAR deployed webapp over to OSGi to leverage the plugin architecture. My original application was using guice everywhere.
I have broken everything into modules and Maven-iszed the build. Everything seems to be working except for the pesky installation of the ServletModule.
I receive the following exception when I attempt to install a ServletModule:
java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Preconditions
at com.google.inject.servlet.ServletModule.configure(ServletModule.java:44)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.AbstractModule.install(AbstractModule.java:118)
at com.payplum.CoreActivator$CoreImportModule.configure(CoreActivator.java:145)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.payplum.CoreActivator.start(CoreActivator.java:53)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
So I'm not quite clear on why it's failing to find these bundles. I have added the guice-servlet dependency and have verified that it is making it into my deployed bundles.
I guess the other piece of importance is registering the GuiceFilter. I use the ServiceTracker to get the ExtHttpService, as I'm using Jetty. When that Tracker returns, I add register it out using the typical call
service.registerFilter( this.guiceFilter, "/*", null, 0, null );
And that seems to work fine. I'm really struggling to get these things working and I'm a little caught in the middle between the Guice/OSGi/Peaberry part. Any help is much appreciated.
Thanks!
The exception means you're missing a class on your classpath, so you're either missing a jar or one of the jars (surprisingly) doesn't include its required classes. Check the JARs that are included in your final war file e.g. using 'jar -tf thejar.jar' on whether they include the $Preconditions class.

Runtime error but project compiles fine - Imports/using missing

I am very confused right now. I have VS2008 at my job right now and I have a weird behavior that I have been searching for a while now.
When I compile the project, it works fine, but in runtime I have an error saying object not defined or something like that. The problem is that the imports/using is missing in my class but why does it compile?
In fact, I want to be able to see that error when compiling not when running the webapp.
REEDITED: Here is an example. Lets say i want to use a typed list, I am declaring my object list(of int) for example without having added my imports (system.collection.generic) in the class. then I compile, it works and then I run it, it fails because of the imports missing. is this normal behavior or not?
REREEDITED: I just noticed that the DLL of all my references were not copied in my bin folders even though all of them are set to "Copy local = true". Is it possible that it has to do with our shared directory (all external dlls) being on a network drive (\server\shared). I am really out of ideas on this issue....
problem was because we were having the classes in the app_data folder
The answer to the current question - why you are getting this error - is that ASP.NET does not show many errors at compile-time. You will need to manually go through the application to verify that all pages work correctly. This is very common with ASP.NET development, due to the nature of the environment.
If you post the real errors (probably should be as another SO question), we can perhaps help you with them.
Remove all the dll, etc from bin...
rebuild the whole solution then run
It should run fine...

flex3 autoupdater error

Dear all, I am working on flex3 and want to update my application by flex3 autoupdate. When my installed application runs, my checkUpdate function calls the autoUpdater code. It starts but when it reaches to 100%, it shows this error: "There was an error downloading the update. Error# 16824"
My mxml code is here http://tinypaste.com/92138b and server xml code is here http://tinypaste.com/e3792
Please guide me.
Many Thanks
Google is your friend for this one; it looks like you forgot to update the application descriptor version number in the updated version on the interweb.
http://dezeloper.wordpress.com/2010/01/21/adobe-air-updater-error-16824/
I was unable to see your code as our work router blocks tinypaste. That said, however, I can tell you that air updates done via the ApplicationUpdater class are all based upon the updater xml file that you create/copy-out-there, and the xml file used for the compiler that sets the filename, version, application ID, etc. (most of which is used for the exe-compiler/exe-wrapper that facilitates the "bridge" between the OS and your compiled actionscript code). This link, might help: dezeloper.wordpress.com.
All-in-all keep debugging. The ApplicationUpdater class is one that was relatively well-written and is pretty self-explainable... once you get past this bug, there are a couple more that might be a sync-the-xml-text pain-in-the-butt. For example... I can tell you that in AIR 1.0 (and this may still be true in recent releases) if you made a change to your application xml file, and you're compiling from eclipse/flexBuilder/flashBuilder, you had to "project > clean" for those xml options to get picked up.
Best of luck,
Jeremy

Resources