Google AppEngine Enhancer: Encountered a problam: Unexpected exception - java

Possible duplicate of Google App Engine JDO enhancement is failing.
This is my first app engine app which I'm implementing based on "appengine-java-sdk-1.8.8" and Intellij Idea 13.0. Following image shows my application.
I have designed my application based on tutorial on Intellij Idea page.
In web.xml file if I clear lines 8-18 and remove mobilesoft.asia package from src folder then application works fine and when I click on Run button then I can see my "Hello world" message that I have written on index.jsp file.
However, with having of my package and lines 8-18 in web.xml then exception happens when I click on Run button.
Any suggestion would be appreciated.
==============
Edit: I downloaded 'datanucleus-appengine-2.0.0-final-dist' via this page. Seems it is latest release. Then I compared with what items I found under appengine-java-sdk-1.8.8\lib\opt\tools\datanucleus\v2 and realized that seems appengine has newer version of datanucleus. Therefore, app engine shouldn't have problem with compile, I'm confused....

finally I found the solution. I set 'Persistence' to "JPA 2" during creation of project. By set it to "JPA 1" problem solved (I don't know why) and I am able to compile the project.
So, select your project from Project panel. Then hit F4. Project structure opens. Select Google App Enfine from middle panel (under name of your project). Set Persistence to "JPA 1".

Related

Getting error message "Code Recommenders cannot download its model repository index"

My Eclipse works fine, but now, periodically a message box comes up saying
Code Recommenders cannot download its model repository index
What does this mean?
If you go to "Preferences"/"Code Recommenders"/"Models" you will see some Repository URL's listed. In my case it is http://download.eclipse.org/recommenders/models/photon/.
But when you call that URL you will get a 404 since the site has been archived in July 2019.
So this URL beeing invalid causes the Error. Since the URL is not available is seems save to silently ignore it, as beeing suggested in the error-dialog.
As beeing said in the Reviews on eclipse Marketplace the project is archived due to lack of comitting developers. And you may find an archived last version here: https://repo.eclipse.org/content/shadows/releases.unzip/org/eclipse/recommenders/stable/
As written in the other answer, Code Recommenders has been archived due to lack of active maintainers, see this forum post.
Therefore when the plugin tries to download the models it fails because the site does not exist anymore, and you will see the following error dialog:
While you could choose to ignore this download failure in the future, I am not sure if Code Recommenders actually does anything without its models (please correct me if I am wrong), so at this point you could also uninstall the plugin.
OR, you could download the models manually:
Download the archived data of Code Recommenders: https://archive.eclipse.org/archived_projects/recommenders.tgz (9.7 GB!)
Extract recommenders/downloads/models/photon
In Eclipse: Open "Window" > "Preferences" > "Code Recommenders" > "Models"
Remove the existing download.eclipse.org entry
Add a new entry with a file URI pointing to the folder you extracted earlier. Note that you have to percent escape the URI, e.g.
C:\Program Files\eclipse\recommenders becomes file:///C:/Program%20Files/eclipse/recommenders
Click the "Apply" (and Close) button
Note however, that since you downloaded the files locally and there is no active development, you won't get recommendations for new Java features.
I don't want any of you to have to download 10 gigabytes like in #Marcono1234's solution, so I re-uploaded version-specific code recommender models to mega.nz and shared them here.
Download the code recommenders
For Eclipse Juno users: https://mega.nz/file/tuRFGYQD#zB_mq6XwO7nupLqMDRWQRnnhD3-FAgT3ijtDQyGvjFE
For Eclipse Kelper users: https://mega.nz/file/NjxXFYyb#uwpP3zxESL02prgTimhDL35xPXMnDkbDwzrhJG1rcgc
For Eclipse Luna users: https://mega.nz/file/02g1DASB#3GSzaKtFSGsxhdnNx2aX47DoD22ZZ6aUu9eXTUvoxKg
For Eclipse Mars users:
https://mega.nz/file/xnQDTQLC#wmA0cfL_ChVHuQ9r0Mo_Js3ef_eDyg2yU6Z2_JTUPbE
For Eclipse Neon users: https://mega.nz/file/siBF1QYC#aVfX3-FS5sNfLmRqCPg6eUaovQPpEkMqIPWugv3E3qk
For Eclipse Oxygen users: https://mega.nz/file/9nAjUITQ#BpQ4HagdlrfZOelW8jqVgJWI-5QlA38JLCGpGoMbWpc
For Eclipse Photon users: https://mega.nz/file/oq5klCBR#vB8f0vmPH3gaYGwkw7U1SVThW5IxKMuvhBughN-sJi4
Extract it to any folders you want (in my case, c:\workspaces\eclipse\recommenders)
In Eclipse: Open "Window" > "Preferences" > "Code Recommenders" > "Models"
Remove the default entry
Add a file URL to the path you extracted your code recommender model. In my case, it's file://workspaces/eclipse/recommenders.
Click the "Apply" (and Close) button
Enjoy!

Business Objects 'bcm.jar' error when exporting Java app

I have been working on creating a simple Java desktop app using the RESTful API for Business Objects and have run into an issue. Whenever I run my app in Eclipse in works fine; whenever I export it as a 'Runnable Jar' and select the Library handling option 'Package required libraries into generated JAR' it works fine. However, whenever I try to export it using the Library handling option 'Extract required libraries into generated JAR' I get the following error after running the app:
java.lang.NoClassDefFoundError: Could not initialize class com.businessobjects.bcm.BCM
I have the 'bcm.jar' file added under a 'res' Source Folder and have it added to the Build Path. At one point I added all the JARs under the 'SAP BusinessObjects' java folder, and external folder, but it still throws the error. The problem stems from this line of code:
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userID, password, CMS, auth);
Would anyone know why I am getting said error? I really want to use the Extract option as it will improve performance as my app becomes larger. Any help resolving this issue would be greatly appreciated :)
EDIT: I would be happy to provide clarification or further detail upon request!
Seems this was introduced in SP04 and SAP has no intent of fixing it as the RESTful API wasn't designed to be used with Desktop apps.
Have you included the cryptojFIPS.jar? Leaving it out can cause the error.

Eclipse + GAE: Properties changes and therefor problems with deploy

I have had some problems with getting GAE and Maven to work with each other but that is finally solved!
I can now test my servlet locally but when I try to deploy to Google App Engine. It states that my project is not a GAE-project. When I enter the properties window and select Google -> App Engine I get a error message stating "The currently displayed page contains invalid values." I check "Use Google App Engine" and enters Application ID and Version.
When I try to deploy to GAE again I get the same message that its not a GAE-project and when I enter the properties window again I can see that the "Use Google App Engine" is unchecked.
Sometimes the checked state is saved but the Application ID is blank.
What is this error about invalid values and why are not my properties saved?
I ran into same problem. I solved by following steps:
1) Right click on project name, open Properties
2) Select Google-> Web Application
3) Specify the WAR directory (my application is a web application so I do have a war dir)
4) Click OK
With these, i can successfully open the Google App Engine settings page without that error. The changes I made on the App Engine page can also persist
I solved it!
As usual something really stupid...
I had a . in the version number in appengine-web.xml.

Eclipse Project Error

I am working on the Bluetooth Chat from the Android Developer site in
Eclipse IDE. I am using Android 2.1 and changed the Action Bar to
display Toast messages instead and am only working with Secure
connections.
I have three classes under the same package called BluetoothChat,
BluetoothChatService, and DeviceListActivity and the project name is
BluetoothCh.
Two of the files had errors that I fixed. They were saved and are
clear of the red x that previously marked both .java files. All of
the other files are clear of errors as well. However, the main
Android project folder still contains a red x, and Eclipse is not
allowing a run or debug of the application because of errors in
the project.
Does anyone have any ideas how to solve this? Any advice is very much
appreciated! Thank you!
Refresh the project then clean the project.
Delete the error in the "Problems" tab.
Right click the project->Android->Clean project properties (or whatever it is).
Clean the project and rebuild it see if the X mark still persists.
"When I clean the project it now gives me errors that R cannot be resolved as a variable. Where should I go from here?"
It sounds like you have an error in your code somewhere. You need to find out where the error is (what file and line) and fix it. This can be done with the problems tab in eclipse. It should tell you the description, file, path, line, and type of error you are getting.

Netbeans Error: "Could not add one or more tag libraries"

I am using Netbeans 6.1 and Tomcat 6.0.1.6.
I made some very minor changes to a project that had been working and now I am getting the following error:
com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: Could not add one or more tag libraries.
The only change I made was to a backing bean method, no new UI components, jsp, etc.
Any direction would be greatly appreciated.
Thanks!
I get the idea that Netbeans regenerated/updated the web.xml or sun-web.xml files in your project. Perhaps someone made some changes to one of those files that were overridden when Netbeans updates those files.
To prove it, revert your changes and see if the error still occurs. If so, backup those files, make your code changes, rebuild or whatever and then copy those backed up files over the Netbeans modified files and build.

Categories