JBoss 4.23 and EJB 2 support - jboss

Does anyone know if the JBoss 4.2.3 release that is compiled for Java 6 still supports EJB 2? I'm having issues where it can't cast a class to a certain interface where I never had this problem before and the code hasn't changed.

EJB2-style beans should still work in the 4.2 release. What interface do you want to cast to? Maybe that particular interface was renamed or moved. You should try not to use container-specific classes.

Related

Sitecore.Forms.MVC.dll 8.0 to 8.1 removed classes : FieldModel & SectionModel

I am in the process of converting the deprecated methods & classes of WFFM from 8.0 rev.150429 (Update-3) to 8.1 rev. 151008 (Initial release). Sitecore provided a good documentation > release notes for the 'breaking changes' that would occur when converted to WFFM 8.1.
Link to release note:
https://dev.sitecore.net/Downloads/Web%20Forms%20For%20Marketers/Web%20Forms%20For%20Marketers%2081/Web%20Forms%20For%20Marketers%2081%20Initial%20Version/Release%20Notes
And that includes moving some classes from Sitecore.Form.Core.dll to Sitecore.WFFM.Abstractions.Actions.dll (okay I understand).
However, though I am not really sure, maybe I just couldn't locate the right page/site, but there were also some changes made in the Sitecore.Forms.MVC 8.0 to 8.1 which were not documented. To be specific, classes are as follows:
Sitecore.Forms.MVC.Models.FieldModel (removed in Sitecore.Forms.MVC 8.1)
Sitecore.Forms.MVC.Models.SectionModel (removed in Sitecore.Forms.MVC 8.1)
Maybe there were also other classes that were removed, as well. But I am only concerned about the above two (2) classes for the mean time.
So, I'd like to know if someone already ran into this scenario before when upgrading WFFM to 8.1 and how you were able to resolved the issue?
I have a hint that I just have to look for the NEW DLL that uses or implements the FieldModel and SectionModel, but again, I couldn't find it as of this writing.
Appreciate any help. Thanks.
There is no FieldModel and SectionModel anymore, but I assume you are looking for the FieldViewModel and SectionViewModel. They can be found still in Sitecore.Forms.Mvc in the Sitecore.Forms.Mvc.ViewModels namespace.
If you need more specific classes, you can check the Sitecore.Forms.Mvc.ViewModels.Fields as well - or open the Sitecore.Forms.Mvc dll with a decompiler (as I did).

httpclient's (3.1) URIUtil.encodeQuery() is gone in org.apache.httpcomponents (4.4.1), any substitute?

In my project code, there is a requirement to encode the URL. its currently using httpclient 3.1 jar and uses its method URIUtil.encodeQuery() to do the job. but we are upgrading the jar to the newer version, org.apache.httpcomponents 4.4.1.
where I couldn't find any exact substitute for encodeQuery method. it has been discussed in the post What happened to URIUtil.encodePath from commons-httpclient-3.1?.
But still I am looking for any good substitute for encodeQuery(), can anyone has suggestion.
Thanks
In our project we use the URIBuilder class.
https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html
The builder returns the standard java URI.
If you have a new project I suggest to follow the other answer by using the Builder.
On my side, as my project is old and do not want to refactor too much, I just switched to another util class in the CXF project (as it's already a dependency I have).
I just replaced the code URIUtil.encodeQuery(strQuery) by URIParserUtil.escapeChars(strQuery)
The API documentation is here.

Problems with GWT 2.4

I compiled the version in svn tagged as gwt2.4rc. Now there are a
couple of more libraries than I had the last time. Are the any
instructions on which library is needed for what? I tried it with only
the standard libraries (servlet, servlet-deps, user) but I get the
following error when a requestfactory call is made:
java.lang.NoSuchMethodError:
com.google.gwt.core.client.impl.WeakMapping.setWeak(Ljava/lang/
Object;Ljava/lang/String;Ljava/lang/Object;)
I tried declaring the requestfactory-client and requestfactory-server
jars as dependencies, but i doesn't help. I am using maven to manage
my dependencies.
I would go back to 2.4 beta, but I need the drag&drop features that
were introduced later.
Does anybody has an idea what could be wrong? or any hints how i can
dig deeper into this? I spend a lot of time trying to figure this out
but without any success :(
Do I need to provide more information?
Regards,
arne
Are you sure you deployed the 2.4-rc1 gwt-servlet.jar in your war/WEB-INF/lib ? Also, make sure you override the SDK for the gwt-maven-plugin: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/using-different-gwt-sdk-version.html
That being said:
when using Maven, you shouldn't use gwt-servlet-deps but instead reference org.json:json and javax.validation:validation-api
requestfactory-server can be used instead of gwt-servlet if you only use RequestFactory on the server-side (no GWT-RPC, no SafeHtml, no RegExp, etc.); requestfactory-client is to be used for Java clients (such as Android), not the case here.

Can you integrate Java 1.6 classes into Eclipse Blackberry project?

I am using the latest IDE for eclipse and have attached the blackberry 5.0 sim. i am a new bb developer and i was wondering if there is any way of integrating java 1.6 classes (or any 3rd party jars) within the blackberry project without getting an error similar to the following:
org.apache.axis2.util.Utils$3: Warning!: Duplicate method only differs by return type: run
org.apache.axis2.jaxws.util.WSDL4JWrapper: Warning!: Duplicate method only differs by return type: getFirstPortBinding
C:\Program Files\Eclipse\axis\axis2-1.5.1\lib\axis2-transport-http-1.5.1.jar(org/apache/axis2/transport/http/ApplicationXMLFormatter.class): Error!: Duplicate definition for 'org.apache.axis2.transport.http.ApplicationXMLFormatter' found in: org.apache.axis2.transport.http.ApplicationXMLFormatter
I know why i am getting this error (because of duplicate definitions for the same class)....but am i really stuck just sticking to "net.rim" classes within my project? if i wanted to use the "asList()" method, can i not do that because that's outside of the RIM classes?
I am really just hoping that i can integrate outside jars into my blackberry project without getting "duplicate" warnings and error messages.
All source code and external libraries used in your BlackBerry app must conform to J2ME which you can think of as a subset of the Java SDKs. J2ME is quite limited - for example there are no Collections classes in J2ME (just the older Vector, etc.). The language level used by the compiler is Java 1.3.
So in a nutshell - you're going to have a hard time porting over third-party libraries unless they were specifically designed to run in a J2ME environment.
You can't uses the JDK 6, you need the JDK 5.
You can integrate third parties jars except if you want:
I/O
Swing
In those cases you need to uses the Blackberry API.

Add warning for missing #Override annotation for interface implementation in Eclipse

In Eclipse 3.4.1 using JDK1.6.0_10 how can I activate a warning on a missing #Override annotation on a method that implements an interface method?
In the Preferences window this option:
Java > Compiler > Errors / Warnings >
Annotations > Missing '#Override'
annotation
works fine for missing annotations on methods that override a superclass method, but it does nothing for interface methods.
It is not possible in Eclipse 3.4.1. It is a known issue. See this bug report page for more information.
Belay what I said in the other thread. Apparently it's not a compiler option, but a Java compatibility version issue: if your compatibility version is 5, you won't be able to annotate interface implementation methods. If your compatibility version is 6, then you will be able to.
However I don't think there's a way of actually forcing Eclipse to generate an error if you do not annotate each implemented method. From this page:
Missing '#Override' annotation: When enabled, the compiler will issue an error or a warning whenever it encounters a method overriding another implemented method, and the '#Override' annotation is missing.
The compatibility setting to 1.6 instead of 1.5 worked for me on:
Eclipse Java EE IDE for Web Developers.
Build id: 20100218-1602
Maybe I'm missing something but interface methods are already required to be implemented by implementation classes.
The compiler will generate an error if the interface is not completely implemented.