( hawtio version 1.4.27, karaf version 3.0.2 )
i'm not quite sure what i'm missing here. I ran the following console commands to deploy the hawtio feature to Karaf
karaf#local()> feature:repo-add mvn:io.hawt/hawtio-karaf/1.4.27/xml/features
Adding feature url mvn:io.hawt/hawtio-karaf/1.4.27/xml/features
karaf#local()> feature:install hawtio-core
karaf#local()> web:list
ID | State | Web-State | Level | Web-ContextPath | Name
-----------------------------------------------------------------------------------------
216 | Active | Deploying | 80 | /hawtio | hawtio :: hawtio-web (1.4.27)
karaf#local()>
As suggested here i'm installing only the hawtio-core feature.
however, the war bundle 207 ( hawtio-web ) is forever stuck in the "Deploying" web-state. I don't see any servlets installed either
karaf#local()> http:list
ID | Servlet | Servlet-Name | State | Alias | Url
-------------------------------------------------
karaf#local()>
According to log:display ( the root logger is running on INFO and logging to osgi:* ) these are the only relevant lines logged
2014-10-22 16:09:17,783 | WARN | e ssh user karaf | FeatureValidationUtil | 24 - org.apache.karaf.features.core - 3.0.1 | Old style feature file without namespace found (URI: mvn:io.hawt/hawtio-karaf/1.4.27/xml/features). This format is deprecated and support for it will soon be removed
2014-10-22 16:10:03,770 | INFO | e ssh user karaf | FeaturesServiceImpl | 24 - org.apache.karaf.features.core - 3.0.1 | Installing feature hawtio-core 1.4.27
2014-10-22 16:10:03,771 | INFO | e ssh user karaf | FeaturesServiceImpl | 24 - org.apache.karaf.features.core - 3.0.1 | Installing feature war 3.0.1
Any ideas on how i could debug this, as nothing indicating a problem is logged, the war is "stuck" and the /hawtio resource is not available?
thanks!
Andras
PBKAC - i had org.osgi.core and org.osgi.compendium downloaded by maven and added to the karaf "lib" folder. They creeped on to the classpath ( definitely not listed in -cp though ) - as karaf/felix provide the packages in these, they are redundant and apparently cause extremely difficult to debug problems ( again, not a single line logged indicating a problem )
tl;dr this is not reproducible with the 3.0.2 karaf release tar. Drop osgi.core and osgi.compendium in the lib folder however..
Related
I'm trying the Java Migration tutorial. After modifying a migrated Java class, the Java class got stuck in Future state and prevented new migration. I'm new with Flyway and not sure where I did wrong. Or is there any known issue with Future state?
I first added two SQL files and ran mvn flyway:migrate. Both files are migrated successfully. Then added a Java class V3__Anonymize, ran mvn flyway:migrate again. It's successful too. The info command shows
+-----------+--------+---------------------+------+---------------------+---------+
| Category | Version| Description | Type | Installed On | State |
+-----------+--------+---------------------+------+---------------------+---------+
| Versioned | 1 | Create person table | SQL | 2022-11-03 08:26:52 | Success |
| Versioned | 2 | Add people | SQL | 2022-11-03 08:28:45 | Success |
| Versioned | 3 | Anonymize | JDBC | 2022-11-03 09:05:29 | Success |
+-----------+--------+---------------------+------+---------------------+---------+
Then I modified V3__Anonymize class, adding just a line to migrate function for System.out.println("something"). The info commands show this third job with a Future state:
+-----------+--------+---------------------+------+---------------------+---------+
| Category | Version| Description | Type | Installed On | State |
+-----------+--------+---------------------+------+---------------------+---------+
| Versioned | 1 | Create person table | SQL | 2022-11-03 08:26:52 | Success |
| Versioned | 2 | Add people | SQL | 2022-11-03 08:28:45 | Success |
| Versioned | 3 | Anonymize | JDBC | 2022-11-03 09:05:29 | Future | +-----------+--------+---------------------+------+---------------------+---------+
Then ran mvn flyway:migrate, and it gave a WARNING shown below.
[INFO] --- flyway-maven-plugin:9.7.0:migrate (default-cli) # my-migration-service ---
[INFO] Flyway Community Edition 9.7.0 by Redgate
[INFO] See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.7.0
[INFO]
[INFO] Database: jdbc:h2:file:./target/foobar (H2 2.1)
[INFO] Successfully validated 3 migrations (execution time 00:00.020s)
[INFO] Current version of schema "PUBLIC": 3
[WARNING] Schema "PUBLIC" has a version (3) that is newer than the latest available migration (2) !
[INFO] Schema "PUBLIC" is up to date. No migration necessary.
I tried to run mvn compile, then mvn flyway:migrate, mvn flyway:info, but I still got the same WARNING and the third job stays in Future state.
I also added a new Java class V4__Add_another_person, then ran mvn compile, mvn flyway:migrate, but no change to the state of the third job. The new job isn't added to flyway:info output.
Then ran mvn flyway:migrate, and it gave a WARNING shown below.
Once you run a migration, you shouldn't touch any more its script. Here it was identified you did it, as the checksum is different. As long as this code is not pushed to the master branch (and someone run migration), you can remove the latest line from flyway_schema_history and then migrate again.
I'm trying to migrate project from Eclipse OSGi runtime environment to Karaf, and I prepare install script for depenendecies. It is quite a hard way, for example, transaction API requires javax.enterprise.cdi-api, and this requires
javax.el,version=3.0.0 from javax.el-api (6)
javax.inject,version=1.0.0 from com.eclipsesource.jaxrs.jersey-all (59)
javax.interceptor,version=1.2.0 from javax.interceptor-api (48)
For sure, I'm not the first and last person to go that way. Are there any ready features / bundle lists / install scripts which I could use for the process? And how / where to search for them?
Searching for "JPA 2.1 feature for Karaf" returns me the list of posts with problems people have building their feature list... no ready solutions...
I'm working on Apache ServiceMix 7.0.0 and I have a JPA 2.3.0 feature which is available.
Features list
karaf#root>feature:list | grep jpa
deltaspike-jpa | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike jpa support
camel-jpa | 2.16.4 | | Uninstalled | camel-2.16.4 |
jpa | 1.0.4 | | Uninstalled | enterprise-4.0.8 | OSGi Persistence Container
jpa | 2.3.0 | x | Started | enterprise-4.0.8 | OSGi Persistence Container
openjpa | 2.2.2 | | Uninstalled | enterprise-4.0.8 | Apache OpenJPA 2.2.x persistence engine support
openjpa | 2.3.0 | | Uninstalled | enterprise-4.0.8 | Apache OpenJPA 2.3.x persistence engine support
openjpa | 2.4.1 | | Uninstalled | enterprise-4.0.8 | Apache OpenJPA 2.4.x persistence engine support
deltaspike-jpa | 1.3.0 | | Uninstalled | org.ops4j.pax.cdi-1.0.0.RC1 | Apache Deltaspike jpa support
drools6-jpa | 6.2.0.Final | | Uninstalled | servicemix-kie-7.0.0 | Drools 6 JPA support
The JPA 2.3.0 is coming from enterprise-4.0.8 features repository with URL mvn:org.apache.karaf.features/enterprise/4.0.8/xml/features
Repository list
karaf#root>feature:repo-list
Repository | URL
-------------------------------------------------------------------------------------------------------
org.ops4j.pax.cdi-0.12.0 | mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
jclouds-1.9.1 | mvn:org.apache.jclouds.karaf/jclouds-karaf/1.9.1/xml/features
org.ops4j.pax.jdbc-0.9.0 | mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.9.0/xml/features
camel-2.16.4 | mvn:org.apache.camel.karaf/apache-camel/2.16.4/xml/features
activemq-core-5.14.3 | mvn:org.apache.activemq/activemq-karaf/5.14.3/xml/features-core
org.ops4j.pax.web-4.3.0 | mvn:org.ops4j.pax.web/pax-web-features/4.3.0/xml/features
enterprise-4.0.8 | mvn:org.apache.karaf.features/enterprise/4.0.8/xml/features
org.ops4j.pax.cdi-1.0.0.RC1 | mvn:org.ops4j.pax.cdi/pax-cdi-features/1.0.0.RC1/xml/features
framework-4.0.8 | mvn:org.apache.karaf.features/framework/4.0.8/xml/features
standard-4.0.8 | mvn:org.apache.karaf.features/standard/4.0.8/xml/features
cxf-3.1.5 | mvn:org.apache.cxf.karaf/apache-cxf/3.1.5/xml/features
activemq-5.14.3 | mvn:org.apache.activemq/activemq-karaf/5.14.3/xml/features
servicemix-kie-7.0.0 | mvn:org.apache.servicemix.features/servicemix-kie/7.0.0/xml/features
spring-4.0.8 | mvn:org.apache.karaf.features/spring/4.0.8/xml/features
servicemix-features-7.0.0 | mvn:org.apache.servicemix.features/servicemix-features/7.0.0/xml/features
servicemix-examples-7.0.0 | mvn:org.apache.servicemix.features/servicemix-examples/7.0.0/xml/features
I hope this can help.
I've some problems with publishing my Dynamic Web application in Tomcat, on my VPS server.
I developed an application which contains Servlet( creating Entity Manager and doing operations on the database), and jar files - also Entity components are packed in jar file.
Application uses eclipselink and postgresql.
On Tomcat 7 Server installed witch eclipse, everything works fine, but when I try to deploy it to Tomcat 7 Server on my VPS I'm getting an exception:
javax.servlet.ServletException: Error instantiating servlet class pl.marekbury.controller.StoreServer
and the root cause
javax.naming.NameNotFoundException: Name [pl.marekbury.controller.StoreServer/PERSISTENCE_UNIT_NAME] is not bound in this Context. Unable to find [pl.marekbury.controller.StoreServer].
I had also the same error on my localhost eclipse-integrated server, but i found a solution (somwere here, on stack) to chcange eclipselink version, after I did id, error's gone.
I'm deploying app in these way:
- export war from eclispe
- deploy it trough tomcat web manager
I tried:
- Change server to Tomee
- Place all jar libs in WEB-INF/lib
Structure of application folder after deploying to tomcat:
----krzyzyk
| |---index.jsp
|---META-INF
| |---MANIFEST.MF
|
|---WEB-INF
| |---web.xml
| |---lib
| | |---all jar files(entities,servlet-api itd..)
| |
| |---classes
| | |---META-INF(remain after making jar with entities)
| | |---pl
| | | |---marekbury
| | | | |---controller
| | | | | |---StoreServer.class
| | | | |---model
| | | | | |---entities
| | | | | | |---User.class (remain after making jar with entities)
index.jsp makes http request to servlet StoreServer
Any ideas how to make it run properly?
I have found solution. Error was caused by different Java versions on vps(oracle 1.7) and my computer(openJDK 1.7). I have made .WAR on VPS and everything works fine.
I'm trying to upgrade my webapp from JSF 1.2 to JSF 2.1.
Here's what I'm running now:
| Item | Version |
| ----- | ----------- |
| JBoss | 5.1.1 (EAP) |
| Seam | 2.2.1 (EAP) |
| JSF | 1.2 |
I want to upgrade to JSF 2.1. Here's what I'm currently trying to switch to:
| Item | Version |
| ----- | ----------- |
| JBoss | 5.1.1 (EAP) |
| Seam | 2.3.0 (EAP) |
| JSF | 2.1 |
I've included the following jars from the SEAM 2.3.0 package in the war file:
jboss-jsf-api_2.1_spec.jar
jsf-impl.jar
The jsf jars under the JBoss directory are:
./server/default/deploy/jbossweb.sar/jsf-libs/jsf-api.jar
./server/default/deploy/jbossweb.sar/jsf-libs/jsf-impl.jar
When I use my app, it seems like JSF 2.1 is working fine, but at startup, I see these lines in the server log:
2013-04-22 08:33:50,044 INFO [javax.enterprise.resource.webcontainer.jsf.config] (main) Initializing Mojarra (1.2_13-b01-FCS) for context '/myapp'
2013-04-22 08:34:06,811 INFO [javax.enterprise.resource.webcontainer.jsf.lifecycle] (main) JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.
Questions
Why Initializing Mojarra (1.2_13-b01-FCS)? Does it just show this at startup then switch to using JSF 2.1 at runtime?
If I swap out the 2 jars under ./server/default/deploy/jbossweb.sar/jsf-libs/ with the jsf 2.1 jars, I get Initializing Mojarra 2.1.7 (SNAPSHOT 20120206) instead. However, the packages that come with jboss all fail with ClassNotFoundExceptions.
Is there some way to have all of the jboss deployables (such as jbossweb.sar) continue to use JSF 1.2 while my app uses JSF 2.1?
Is there some way to get my app to spit out the JSF version at runtime?
What's the deal with the The ELResolvers for JSF were not registered with the JSP container. INFO message?
My app has always logged that message at startup.
On JBoss 5.1.1 EAP, I've upgaded JSF 1.2 to JSF 2.1 (Mojarra implementation).
My experience is related into this french article: http://javaetmoi.com/2014/06/notes-migration-jsf2-richfaces4-jboss5-eap/ (Google translate is your friend)
You will learn how to uninstall JSF 1.2. JSF 2.1 is embedded into the lib/ folder of your WAR / EAR.
It's working geat:
20:52:19,534 INFO [config] Initialisation de Mojarra 2.1.19 ( 20130213-1512 https://svn.java.net/svn/mojarra~svn/tags/2.1.19#11614) pour le contexte «/richfaces-showcase» - See more at: http://javaetmoi.com/2014/06/notes-migration-jsf2-richfaces4-jboss5-eap/#sthash.fDmunAGP.dpuf
I have a following problems with eclipse, when I installed ClearCase plugin from this url http://www3.software.ibm.com/ibmdl/pub/software/rationalsdp/clearcase/60/update/windows/ :
Has anyone experienced the similar problem? I'm using Windows 7 and eclipse galileo. I've installed the plugin from this URL, what can I do to work this problem out?
For those who can't see tinypic images
+----------------------------------------------------------------------+
| Connect to the Rational ClearCase failed |
| |
| Connect to the Rational ClearCase failed |
| |
| Reason: |
| Select Details >> for more information. |
| |
| +------------+ +------------+ |
| | OK | | << Details | |
| +------------+ +------------+ |
| |
|Could not connect to the Rational Clearcase. Please ensure that proper|
|version of ClearCase is installed with the proper patches. Consult the|
|ClearCase SCM Adapter documentation for further details. |
| |
| |
|Provider name: IBM |
|Plugin name: Rational ClearCase SCM Adapter |
|Plugin ID: com.rational.clearcase |
|Version: 7.5.0.v200910221234 |
+----------------------------------------------------------------------+
Google doesn't help much ..
I have no problem with that plugin (except the MVFS layer does not work for now, since dynamic views are not yet supported on windows7), provided you do have the exact tree
yourEclipse
eclipse
plugins
com.rational.clearcase.help_7.5.0.v200910221234
com.rational.clearcase.activities_7.5.0.v200910221234
com.rational.clearcase_7.5.0.v200910221234
features
com.rational.clearcase_7.5.0.v200910221234
com.ibm.rational.clearcase.ccrefresh_7.5.0.v200910221234
com.ibm.rational.clearcase.ccimport.feature_7.1.0.v200905202348--08422A2_242663
So you can start and check if you do see this configuration.
Note: I only install it on Eclipse Galileo 3.5 and Eclipse Helios 3.6Mx.
Currently, version 1.6 of the JVM is not supported. To use this integration successfully, you must downgrade to JVM 1.5.
As far as I know, the latest version of ClearCase available is 7.1, which is not qualified on Windows 7, maybe the issue is there.
Did you try with in the integration/plugin for other IDE ? (VisualStudio ?)
Can you access your views (snapshot or dynamic) outside of eclipse ?