Deploying application in domain failed; White spaces are required between publicId and systemId - deployment

While deploying any war file in glassfish server 2.1 I am getting the below issue. I have done with small sample web application with hello world in a welcome jsp file in that case as well getting the same issue. Already running war I have undeployed and tried to deploy again. Still the same issue. OS is Solaris.
Deploying application in domain failed; Error loading deployment descriptors for module [repreg_nov2] Line 1 Column 50 -- Deployment descriptor file WEB-INF/web.xml in archive [repreg_nov2]. White spaces are required between publicId and systemId. Error loading deployment descriptors for module [repreg_nov2] Line 1 Column 50 -- Deployment descriptor file WEB-INF/web.xml in archive [repreg_nov2]. White spaces are required between publicId and systemId
I have deleted the glassfish domain and created again Still the same issue...Please help me ...

Using the version 2.0 in web.xml solves the problem, it works.

Related

Why is Install4j executable signing not working any more?

I'm trying to build an Install4j project that was working fine a few weeks ago, but now it's complaining about a timestamp service not being available while the executable is being signed. Is there another timestamp service we should be using or is this one only temporarily offline?
I'm using Install4j 7.0.12.
Preparing configuration
Creating media file 'Windows':
Collecting files:
Compiling launchers:
Compiling launcher 'test':
Signing executable
Build failed.
Cause: java.io.IOException
http://timestamp.globalsign.com
You can set a different timestamp signing service by setting the VM parameter -Dinstall4j.timestampUrl=http://... in bin/install4j.vmoptions
or by setting the compiler variable sys.ext.timestampUrl in your project.
Cause: java.io.FileNotFoundException
http://timestamp.globalsign.com
Adding an entry to General Settings > Compiler Variables with the following details seems to do the trick:
sys.ext.timestampUrl = http://timestamp.sectigo.com
This is probably related to http://timestamp.verisign.com/scripts/timstamp.dll not available.

Debugging OfBiz in Eclipse gives MissingResourceException

I downloaded the OfBiz Java application and the following line throws an MissingResourceException:
ResourceBundle res = ResourceBundle.getBundle(settingsResourceName);
The value of settingsResourceName is "cache", but I cannot find any file called cache.properties or cache_en.properties.
Where should I be looking? I'm new to Java. All my research on SO says there should be such a file.
I imported OfBiz in Eclipse using the Import menu option and selecting Existing Project from File System (I'm not in front of my dev machine so I don't remember the exact wording). But I chose the root folder of the downloaded OfBiz.
I then added the appropriate VM Arguments in the Run Configuration to get it to run properly at least. And that's it, on the first Run I got the above error. I think it has to do with a missing class path but I don't know what to add to class path.
Here is the stack trace:
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.ofbiz.base.util.Debug.<clinit>(Debug.java:68)
at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:61)
at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:202)
at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:69)
at org.apache.ofbiz.base.start.Start.main(Start.java:84)
Caused by: java.util.MissingResourceException: Can't find bundle for base name cache, locale en
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:174)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:170)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:166)
at org.apache.ofbiz.base.util.cache.UtilCache.<init>(UtilCache.java:124)
at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(UtilCache.java:769)
at org.apache.ofbiz.base.util.UtilProperties.<clinit>(UtilProperties.java:75)
... 5 more
UPDATE:
My mistake, I found two files both called cache.properties in the following folders:
ofbiz-trunk/build/resources/main
ofbiz-trunk/framework/base/config
But these are folders, not packages. I tried putting them in the .classpath but that did not work, I still kept getting the same error.
As suspected, I knew it was because of a missing reference to a class path. After looking at a section on this page: http://www.opensourcestrategies.com/ofbiz/ofbiz_eclipse.php, I learned that I was supposed to go to the Java Build Path and in the Libraries tab, click on Add Class Folder, then point that to ofbiz-trunk/framework/base/config. Which is where I have one of the cache.properties files.

Unable to deploye ejb3 project on eclipse mars

I am developing an EJB 3.0 application on eclipse mars. I am unable to deploy project on glassfish 4 server. I use JDK 7.
My server log:
cannot Deploy SampleEJBProject
deploy is failing=Error occurred during deployment: Exception while deploying the app [SampleEJBProject] : A MultiException has 2 exceptions. They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [org.glassfish.main.web.weld-integration [296]], State = [RESOLVED]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
implementation=org.glassfish.weld.WeldContainer
name=org.glassfish.weld.WeldContainer
contracts={org.glassfish.weld.WeldContainer,org.glassfish.api.container.Container}
scope=javax.inject.Singleton
qualifiers={}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=Bundle-SymbolicName={org.glassfish.main.web.weld-integration},Bundle-Version={4.1.1}
rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [org.glassfish.main.web.weld-integration [296]], State = [RESOLVED],377949866)
proxiable=null
proxyForSameScope=null
analysisName=null
id=414
locatorId=0
identityHashCode=2094253683
reified=false)
. Please see server.log for more details.
Please help me.
I am referring this link for developing application
https://www.genuitec.com/products/myeclipse/learning-center/javaee/myeclipse-ejb-3-x-tutorial/
The problem got resolved automatically.

Oprofile not finding libraries

I'm trying to use OProfile on Eclipse (3.8). The Juno version of oprofile didn't work, so I installed the Luna one. This one at least starts up, but can never find the libraries.
Here is the error:
ns3-dev-lena-profiling-debug: error while loading shared libraries: libns3-dev-lte- debug.so: cannot open shared object file: No such file or directory
profiled app exited with the following status: 127
I know that that means I need to add the library path. So I went to Profiling Tools Configurations, and specified the path under environmental variables as:
name: LD_LIBRARY_PATH
value: {workspace_loc:ns3dev2}/build (appended)
I manually checked and the library is located in the build folder. Furthermore, this library path works fine if I debug the same project instead (or run it...).
I've deleted the configuration and remade it, but it's the same error.
I also tried adding the same path to PATH instead of LD_LIBRARY_PATH, but that doesn't make any difference. (Just tried it for the hell of it).
Any thoughts?
Edit, I get the same problem on Eclipse 4.4 (Luna). I found the logs for the errors and the error is:
!ENTRY org.eclipse.linuxtools.oprofile.core 4 0 2014-10-27 12:33:07.200
!MESSAGE opreport process error output: warning: /no-vmlinux could not be found.

karaf blueprint "Failure" while extending console

I am using Karaf 2.3.1. I was following Apache Karaf Manual exercise "Extending the console" page no. 105. I followed all the instruction ditto, with a few deviations. I am able to load the bundle HelloShellCommand into Karaf. It threw me a bundle Id. But the command "test.hello" is not working.
karaf#root> osgi:classes is showing org/apache/karaf.shell/samplesHelloShellCommand.class
karaf#root> test.hello is showing command not found
karaf#root> osgi:list is showing Blueprint "Failure" for the given bundle.
I did deviate from the given instruction in "Compiling the JAR" section in following steps:
Let's try to build the jar: I did build the jar from Eclipse. File-Export-Java-Jar File.
Then run "mvn install": This is where I did not understand how Maven will use the .jar file. It is looking for pom.xml. So, I went into root directory and ran "mvn install". It went through successfully.
osgi:install .., also went through successfully. But I suspect Blueprint.xml did not go through.
I need help in:
How to resolve this?
How to know in Karaf what commands are installed with each bundle?
.jar file created in step-1 is different from "mvn install" which uses pom.xml. Is there something I am missing? How to make mvn use the .jar?
And why blueprint.xml did not load?
Thanks in advance
Further, we have this stackoverflow:
2013-07-27 19:44:30,733 | ERROR | rint Extender: 2
| BlueprintContainerImpl
| container.BlueprintContainerImpl 393
| 7 - org.apache.aries.blueprint.core - 1.1.0
| Unable to start blueprint container for bundle null
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:570)[:1.7.0-ea]
at java.util.ArrayList.get(ArrayList.java:348)[:1.7.0-ea]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.readDirectives
(BlueprintContainerImpl.java:211)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun
(BlueprintContainerImpl.java:283)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run
(BlueprintContainerImpl.java:261)[7:org.apache.aries.blueprint.core:1.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call
(Executors.java:471)[:1.7.0-ea]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0-ea]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0-ea]
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run
(ExecutorServiceWrapper.java:106)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run
(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call
(Executors.java:471)[:1.7.0-ea]
at java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:334)[:1.7.0-ea]
at java.util.concurrent.FutureTask.run (FutureTask.java:166)[:1.7.0-ea]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201
(ScheduledThreadPoolExecutor.java:178)[:1.7.0-ea]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run
(ScheduledThreadPoolExecutor.java:292)[:1.7.0-ea]
at java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1110)[:1.7.0-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:603)[:1.7.0-ea]
at java.lang.Thread.run(Thread.java:717)[:1.7.0-ea]
Regarding 1)
Is the bundle started? Did you use osgi:install -s with starting? If not you should start the bundle with start [bundleId]
Regarding 2)
Issue help at command line, it'll list all available commands. Using command -h will give you a overview of the command itself.
Regarding 3)
forget about creating a jar file from eclipse that won't work. Only with the maven pom you'll have a bundle that contains a valid Manifest unless you added this yourself (which I didn't see in your description)
Regarding 4)
Most likely your bundle either isn't started or it doesn't contain a valid manifest which in turn doesn't start the blueprint extender.
Besides that all those questions are usually best asked at the karaf users mailinglist
EDIT:
For finding the reason why a bundle did fail do a bundle:info on the bundle with the given ID
it should also show you why a blueprint failed.