I work on an existing Maven project with Eclipse Luna and WebSphere 8.5.5.1.
The source of the ibm-application-bnd.xml is:
D:\projects\svn\application\ear\src\main\application\META-INF\ibm-application-bnd.xml
Once a day, at a random moment, the application folder itself is overwritten with the ear-file, so the \main folder contains a binary file named application and is actually the ear file because I openend the file because I saw it had the same size as the ear (8 MB).:
D:\projects\svn\application\ear\src\main\application
The happens at least once a day, and I have the impression that Eclipse, or JRebel of WebSphere creates this file.
The result is that I have to quit Eclipse, delete the file and update from SVN to get the application folder with the binding xml back.
Any thought how to fix this?
Easy way you could stop the folder from being deleted (and perhaps also find the culprit) is to open command prompt in that directory - it won't allow the folder to be removed in that case.
Related
I have an Eclipse RCP application which I need to launch from Windows Run dialog.
I tried it by setting a key in REGISTERY entry in
HKLM\SOFTWARES\Microsoft\Windows\Current Version\All Paths\**full path to exe**
but the app was not launching. How can I launch an RCP application from the RUN dialog?
File hierarchy in the folder:
Entry in registry(app name Hello.exe:
The exe is not loading because in the .ini file endorsed folder is specified to take from the current location (./endorsed). How can I tell the machine to load jars from an endorsed folder?
One approach I found to be working is that to modify the .ini file at run time, so we can specify the full path for the endorsed folder while run time. But is that a good design?
Dont use registry entries. Rather specify the full path.
We are using Websphere liberty profile 16.0.0.4 to deploy EAR application.
Nothing jee specific. the EAR has a simple WAR file. We put the EAR file inside
the dropins folder and it seems like websphere is extracting the content of EAR
file inside the workarea directory.
When reading the content of one jar sqljdbc.jar it puts the jar inside cache
folder. However the sqljdbc.jar seems to be a 0 sized file.
Here is a sample path to the sqljdbc.jar. All of them are directories
D:\comdata\wlp\usr\servers\defaultServer\workarea\org.eclipse.osgi\121\data\cach
e\com.ibm.ws.app.manager_88\Tax2290.war\WEB-INF\lib\.cache\sqljdbc.jar
The sqljdbc.jar inside sqljdbc.jar folder above turns out to be 0 byte sized.
Because of this ZipException is thrown.
There is also this exception thrown before the ZipException. I am not sure if
it is related to this or not.
java.lang.ClassNotFoundException: iconnectlogout
com.ibm.ws.jaxrs20.server.component.JaxRsWebModuleInfoBuilder
What are these org.eclipse.osgi, cache, com.ibm.ws.app.manager_88 folders.
We checked the WAR file inside EAR and it has the right sized sqljdbc.jar.
any ideas why this is happening? Is anything getting downloaded from internet?
Proxy / firewall issues.
First Edit:
-----------
Uploaded the problematic ear file.
Here is link to problematic ear file
https://wetransfer.com/downloads/3585882e88626f6e5a480075fba0c48e20170118170610/43e43f
The sqljdbc.jar file in the Tax2290.war's WEB-INF/lib directory contains an embedded JAR file with the same name - and that embedded sqljdbc.jar file is 0 length - with another another file, sqljdbc.jar.old, that seems like a valid archive. It is this embedded JAR file that Liberty is choking on.
You should be able to resolve the problem by removing that 0 length JAR file from the sqljdbc.jar -- or by replacing it with a valid JAR.
That said, Liberty should probably provide a better error message or be able to handle this case better, so I would suggest opening a PMR with IBM support to have this addressed.
Thanks, Andy
I'm trying to configure a SQLite database for an Spring Web App. The thing is that I'm not able to reach the database file that I've created in src/main/resources using a relative path.
I've tried several configurations for the jdbc url but none of them worked:
jdbc:sqlite:mydb.sqlite (here I changed the file location to the project root)
jdbc:sqlite:${jdbc.url} (here I passed the url as a parameter thru PropertyPlaceholderConfigurer)
jdbc:sqlite:src/main/resources/mydb.sqlite
A weird thing that I realized about is that the app is using Eclipse's directory as the directory to find the database file. I mean, when I put jdbc:sqlite:mydb.sqlite it creates an mydb.sqlite on Eclipse's directory not in project's root.
Check the JVM system property named "user.dir" and set the path relative to it. It is the "current dir" of your java app. It can be different if you run from eclipse or from cmd line or inside webserver(tomcat).
So, System.getPropery("user.dir") will tell you current dir of your running app. Set the path to db relative to that directory.
I would say eclipse does not run your app from the project dir, as it should by default. Check your "run" settings in the eclipse.
I am running jboss 7.1, maven 3, and a java ee6 application that generates an .ear
I am doing a mvn clean package jboss:as-deployand Jboss-as-maven-plugin 1.5 does its thing--I can view my app using http://localhost:8080...
just fine, but I want to know where the actual .ear is being put.
It is not in my jboss7.../standalone/deployments folder. So where is it? My app is obviously running in jboss 7.1 just fine, but I can't find the .ear file. I know that there is an .ear in Eclipse's 'target' directory, but that wasn't produced by jboss-as-maven-plugin is it? I hope you can understand my confusion--don't all .ear files need to be in the deployments directory? I also do see my .ear file inside my hidden .m2/repository directory, but does this have any interaction with jboss-as-maven-plugin? Maybe there is some hidden sym-linking between my Eclipse project's 'target' directory and the jboss7.1 standalone/deployment directory?
p.s. I am used to using a hard-deploy option with the other plugin jboss-maven that requires you to say jboss:hard-deploy which just copies the .ear to your deployments folder. Then jboss would pick up the new .ear and redeploy automatically. I get the sense that jboss-as-maven-plugin is the preferred plugin so that's why I am bothering.
The jboss-as-maven-plugin uses the deployment API so it doesn't copy the file to the deployments directory for the scanner to pick it up. It deploys just as if you deployed it from the web console or via CLI. The files should be located somewhere in the $JBOSS_HOME/standalone/data/ directory.
You're welcome to open an issue, for a discussion around it at least. I'm not sure how I feel about adding a goal for it, but here isn't the place to discuss that :)
I'm unable to use "Jar Bundler" on mac to create JMeter.app from ApacheJMeter.jar, I was wondering if anyone else had previous experience with configuring this tool? The problem for me seems to be that the lib folder being searched is set to an incorrect base path:
org.apache.jmeter.NewDriver: JMeter home directory was detected as: /Users/username/Applications/JMeter.app/Contents/Resources
I looked here: http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html
But no matter how I configured any of the said properties, the logs looked the same.
The real trick is making sure the bin and lib folders can be found. The only jar file you will need to add is ApacheJMeter.jar. Look in the bin/jmeter script for additional properties to put into the properties tab of the Jar Bundler. The java arguments in the bin/jmeter script should be copied into the VM Options field. Check Set Working Directory to Inside Application Package. Now create application. Open up the .app folder that was just created and copy the bin and lib folders into the Resources directory. Done.