w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Glassfish Deployment: Unknown Schema Version 2.2
The xmlns in your faces-config.xml is wrong. Try this: <faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd" version="2.2"> </faces-config> But if you have look at this question you'll see that JSF 2.2 is not fully supported on Glassfish 3.

Categories : Java

Issue in setup and deployment project
Is the .Net Framework installed?: Right-click on your setup project, hover on View, and click Launch Conditions: You want to add .NET Framework to your launch conditions: After that, you can right-click on .NET Framework and click Properties Window. You can choose the Version number in that window. Install assemblies to the GAC: Right-click on your setup project, hover on View, and click File System: Then in that window, right-click on the root node (File System on Target Machine), hover on Add Special Folder, and click Global Assembly Cache Folder: Drag your assemblies to this folder to have them installed on the machine. If the correct version is not already there in the GAC, the setup program will install it.

Categories : Misc

Glassfish Server Error when deploy .war: Error occurred during deployment: Exception while preparing the app : Invalid resource
Now I have the solution. I forgot the JDBC Resource: Open the Glassfish-Server Webinterface and navigate to Resources -> JDBC -> JDBC Resources and create a new one with the right Connection Pool. If the Resource and the Connection Pool are missing, the deployment will fail!!! It worked for me without java:app/webservice...

Categories : Java

git setup dev-test-prod with deployment process - makes sense?
It depends on like how many people are there or how large the app is. But I believe this is quite useful to learn a best practice. http://nvie.com/posts/a-successful-git-branching-model/ I recommend to use the name "trunk" instead of "development" just to avoid confusion with the environment name:)

Categories : GIT

VS2012 Ultimate Setup and Deployment Disappeared after InstallShield 2012 Installation
No, it was never there in the first place. Visual Studio setup projects (vdproj) will not ship with future versions of VS

Categories : Visual Studio

Java EE 7 GlassFish 4.0 Restful Webservices using and Netbean and deploying on Glassfish 4.0
To Fix First problem, open your glassfish-resource.xml file from your project, it will look something like this. if you don't have glassfish-resource.xml in server-configuration folder you can also check the these details by clicking on services tab in netbeans and furhter clicking on connection pools as shown in this screenshot. Based on the information in it, and using Glassfish 4.0 web interface http://localhost:4848 Firstly Create new JDBC connection pool by navigating Common Tasks -> Resources -> JDBC -> JDBC Connection Pools. It will look something like this. Then Secondly create Connection resource by navigating Common Tasks -> Resources -> JDBC -> JDBC Resources It will look somehting like this. First Problem is sorted. you can test it using Ping button in connect

Categories : Web Services

Maven Glassfish plugin for glassfish 4
If you installed a default GlassFish 4 instance, then there is only the admin user with no password. The password file for that user is in the domain configuration directory named "admin-keyfile". In this situation when you access the GlassFish admin console no authentication is required. In your plugin configuration just provide the user and the password file (delete the adminPassword entry): <user>admin</user> <passwordFile>[...]domainsdomain1configadmin-keyfile</passwordFile> If you decide to change the admin password with the asadmin utility then change the plugin configuration in your pom.xml as follows: <user>admin</user> <adminPassword>YOUR_NEW_PASSWORD</adminPassword> For further details check the Security Guide

Categories : Maven

Azure worker role deployment fails if I don't delete the previous deployment
I did more research and I think I may know what's going on. Apparently Visual Studio tries to upgrade your worker roles in place when you deploy. If that fails, for some reason such as you changing service configuration between deployments, it just complains that there's something wrong with your role and that your instance is recycling. In deployment options there is an option called 'If deployment can't be updated, do a full deployment' which will delete the existing deployment and deploy from scratch if the existing deployment can't be updated. I'm not sure why this isn't checked by default instead of 'fail mysteriously'.

Categories : Azure

Move audio player 5 second fast-rewind & fast-forward
Put below methods for forward and rewind player time - (IBAction)btnForwardClicked:(id)sender { int currentTime = [player currentTime]; [player setCurrentTime:currentTime+5]; } - (IBAction)btnBackwardClicked:(id)sender { int currentTime = [player currentTime]; [player setCurrentTime:currentTime-5]; } here player is avaudio player's object AVAudioPlayer *player;

Categories : Iphone

Can I remove the fast scroll overlay without creating an entire custom fast scroll view?
You do not have to implement SectionHeader in your adapter to enable fast scroll, you can enable fast scroll separately. Xml: <se.emilsjolander.stickylistheaders.StickyListHeadersListView android:id="@android:id/list" android:fastScrollEnabled="true" android:layout_width="match_parent" android:layout_height="wrap_content" /> Code: stickyListView.setFastScrollEnabled(true); This applies to the standard ListView as well.

Categories : Android

How to add option that User to select a location to install in .Net Setup Project while installing setup?
Case of Winforms deplyment: Right click on the deployment project in the Solution window and select View, File System. Click on the Application Folder. Notice in the Properties window, change the Default location to whatever you want Case of Web: You can implement this by overriding the “Install” method, check this for an example Allow user to set physical directory path during Web Project deployment

Categories : Asp Net

MySQL full-text search: need fast insert and fast search
Answer based on eggyal's comment. I ended up installing Sphinx. It's awesome. I'm using its real time indexing. Fast search and fast insert. Way faster than mysql free-text insert/search. Granted, my database is pretty small. They have tricks for fast real time indexing with large databases (split into 2 indexes, one with old data, one with newer data), but I have not needed that. BTW: I'm using Python/Django and did not not need to install any api or library, besides sphinx itself: import MySQLdb connection = MySQLdb.connect(host='127.0.0.1', port = 9306) cursor = connection.cursor() cursor.execute("select id from my_index where match('stackoverflow')") results = cursor.fetchall() # I use my regular connection to insert the IDs into a table in my regular database and then join with th

Categories : Mysql

How to setup a HTTP Source for testing Flume setup?
Hopefully this helps you get started. I'm having some problems testing this on my machine and don't have time to fully troubleshoot it right now, but I'll get to that... Assuming you have Flume up and running right now, this should be what your flume.conf file needs to look like to use an HTTP POST source and local file sink (note: this goes to a local file, not HDFS) ########## NEW AGENT ########## # flume-ng agent -f /etc/flume/conf/flume.httptest.conf -n httpagent # # slagent = SysLogAgent ############################### httpagent.sources = http-source httpagent.sinks = local-file-sink httpagent.channels = ch3 # Define / Configure Source (multiport seems to support newer "stuff") ############################### httpagent.sources.http-source.type = org.apache.flume.source.http.HTTP

Categories : Java

How to close setup window after installation by Inno Setup?
You need to add the nowait flag to that [Run] section entry. So modify your script like this: [Run] Filename: {app}myexe.exe; Description: Launch my app; Flags: postinstall skipifsilent nowait

Categories : Windows

Is it possible to setup environment variables within noses setup.cfg
No nose does not have any current ability to set environment variables from a config file: def _configTuples(self, cfg, filename): config = [] if self._config_section in cfg.sections(): for name, value in cfg.items(self._config_section): config.append((name, value, filename)) return config def _readFromFilenames(self, filenames): config = [] for filename in filenames: cfg = ConfigParser.RawConfigParser() try: cfg.read(filename) except ConfigParser.Error, exc: raise ConfigError("Error reading config file %r: %s" % (filename, str(exc))) config.extend(self._configTuples(cfg, filename)) return config Any configuration options specified from a configuration file

Categories : Python

pyinstaller setup failed with "setup.py is not yet supposed to work. Please Use PyInstaller without installation."
As it says "it is not yet supposed to work" - if you read the documents you will find that you just unzip/unpack it into a local directory and run it from there. You are not supposed to run setup.py in pyinstaller at all - see here for how to set up pyinstaller. Once installed and on your path you run by typing pyinstaller your_main.py in your project directory. You may have to generate a specification file and edit it for things to work correctly - See the documentation!

Categories : Python

Cannot use JPA in Glassfish v4
You have two persistence.xml both at incorrect location : META-INF/persistence.xml WEB-INF/classes/persistence.xml The correct location relative to your war package root is WEB-INF/classes/META-INF/persistence.xml Avoid the ambiguity, do not place more than 1 persistence.xml. Also if you use maven you have to put persistence.xml on src/main/resources to have it assembled at the correct location on the war

Categories : Java

jsf 2.2 not supported on glassfish 3.1.2?
You can manually update the .jar file located at the Glassfish's /modules directory. More information: How do I upgrade Glassfish JSF api?

Categories : JSF

GlassFish Quandary
The 404 error is the HTTP page not found error. This means, the page you are trying to access does not exist. I believe your application is not deployed on the server. To deploy your application, go to server admin page localhost:4848 click on application from the navigation menu. From there click on Deploy and browse to the file location. You can also specify the context root where your application should be deployed. However, your application might be deployed on the server with a different context root. If you have a glassfish descriptor, then you can check your context root from there. However, If you do not have a glassfish descriptor then you need to create one. In this descriptor you need to define your context root name. <context-root>/foobar</context-root> this

Categories : Java

Arquillian with Glassfish V4
Latest 3.1 container adapter (CR4) should work with 4.x without any problems, as indicated on this blog entry.

Categories : Java

Does Glassfish v4 support SSL SNI?
According to the Glassfish 4 security guide, https://glassfish.java.net/docs/4.0/security-guide.pdf, there is NOT support for SNI. However, it's generally bad practice IMO (though still debated by many), to expose Glassfish directly to the internet. I usually solve this problem by running an Apache server with mod_ajp_proxy, connected to a jk-listener on Glassfish.

Categories : Ssl

Glassfish - Application name is already in use
here are some steps you can try: Fix your projects name :3 If your problem is the one the question title suggests, undeploy your application first, then redeploy. You can easily undeploy and force redeploy in the Glassfish Admin Gui (http://localhost:4848). If your application still does not work, update your question with proper formatted log messages of the actual problem.

Categories : Java

Java EE EJB 3.0 Glassfish
As Java EE 6 comes with different profiles (i.e. Web/Lite profile and Full) not all functionality is supported in the Web/Lite profile. Especially the web profile only supports "EJB Lite" which comes without support for asynchronous EJBs have a look at the following article which comes with a table describing the features in EJB Lite and 'regular' EJB So what you'd have to do is create a project with the full profile in Netbeans. This will give you access to @Asynchonous.

Categories : Java

glassfish v4 ClassNotFoundException
I had the same problem and according to this, you need to change the servlet class from com.sun.jersey.spi.container.servlet.ServletContainer to org.glassfish.jersey.servlet.ServletContainer in the web.xml config file.

Categories : Java

how to install ssl on glassfish 3.1.2.2
This configuration works for me: (on the SSL tab of http-listener-2) SSL3 - [enabled] TLS - [enabled] Client Authentication - [enabled] Certificate NickName: s1as Key Store: [empty] Trust Algorithm: [empty] Max Certificate Length: 5 Trust Store: [empty] Cipher Suites: [all selected] Hope it helps.

Categories : Java

Spring 3.2.4, EclipseLink 2.5, Glassfish 3.1.2 and JPA 2.1
I notice a couple of things with your configuration You have multiple <tx:annotation-driven ../> tags, this is at least confusing <context:annotation-driven ../> already implies the PersistenceAnnotationBeanPostProcessor, PersistenceExceptionTranslationPostProcessor and utowiredAnnotationBeanPostProcessor. The DefaultAdvisorAutoProxyCreator is also already present (your config can lead to proxing a proxy) What is it you want JTA or not? Your persistence.xml gives the impression you want JTA however you fail to configure a JtaTransactionManager, you have a JpaTransactionManager which is to be used for local transactions. Either remove JTA from persistence.xml or configure a JtaTransactionManager. When you want JtaTransaction you need to set the jtaDataSource property of the Lo

Categories : Java

Cassandra-jdbc and glassfish
It seems that slf4j wasn't loading correctly because it depends on log4j.jar. Add it in classpath, and make sure that all jars is there: apache-cassandra-{version}.jar apache-cassandra-clientutil-{version}.jar apache-cassandra-thrift-{version}.jar cassandra-jdbc-{version}.jar commons-lang-{version}.jar guava-{version}.jar libthrift-{version}.jar log4j-{version}.jar slf4j-api-{version}.jar slf4j-log4j12-{version}.jar

Categories : Cassandra

Can't get glassfish to connect to mysql
If you are using a Glassfish-initiated JDBC connection (I think you are since you say you sucessfully pinged the datasource), then you don't want to define the properties as you have them in the persistence.xml. You'll want to just specify a data-source by JNDI name. <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="HelloWorld"> <non-jta-data-source>jdbc/myds</non-jta-data-source> <class>model.HelloWorld</class> <properties> </properties> </persistence-uni

Categories : Mysql

Primefaces push with GlassFish 4.0
Atmosphere-2.0.0.RC5, Primefaces-4.0.RC1 I managed to do a workaround which isnt nice really, but pushing to all, made it work. Might be enough for your usecase pushContext.push("/*", facesMsg); Edit: So i did some further debuging and added some more logging if (BroadcasterFactory.getDefault() != null) { Collection<Broadcaster> list = BroadcasterFactory.getDefault().lookupAll(); for (Broadcaster b : list) { logger.warn("id={}", b.getID() ); } } output: Info: 2013-09-17 22:43:10,010 - id=/* Info: 2013-09-17 22:43:10,010 - id=/notificationsprimepush so finally i tried: pushContext.push("/notifications" + "primepush", facesMsg); WORKED! :)

Categories : JSF

Error deploying JSF app in Glassfish
Unable to parse document 'jar:file:/opt/glassfish3/glassfish/domains/domain1/applications/[name-of-the-application]/WEB-INF/lib/javax.faces.jar!/META-INF/mojarra_ext.taglib.xml The path to the taglib file suggests that you shipped JSF 2.2 along with the webapp inside its /WEB-INF/lib instead of upgrading GlassFish itself. As GlassFish 3 itself ships with a JSF 2.1 implementation out the box, you need to instruct it to not load it in order to avoid version conflicts. You didn't state anywhere that you were doing that, so I guess that this is the whole cause of your problem. Glassfish itself already ships with JSF bundled which get by default classloading precedence over the one bundled in the webapp. You basically need to tell Glassfish to use the webapp bundled JSF instead. In order

Categories : JSF

glassfish full gc once an hour
I suspect your RMI is triggering a Full clean up. http://docs.oracle.com/javase/6/docs/technotes/guides/rmi/sunrmiproperties.html both sun.rmi.dgc.server.gcInterval When it is necessary to ensure that unreachable remote objects are unexported and garbage collected in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the Java RMI runtime will allow between garbage collections of the local heap. The default value is 3600000 milliseconds (one hour). and sun.rmi.dgc.client.gcInterval When it is necessary to ensure that DGC clean calls for unreachable remote references are delivered in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the Java RMI runtime will allow between

Categories : Java

glassfish 4 & MySQL & JSTL
Include the following resource definition in your web.xml and it should work properly. <resource-ref> <res-ref-name>jdbc/SOMETHING</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <mapped-name>jdbc/SOMETHING</mapped-name> </resource-ref>

Categories : Mysql

glassfish not logging after deploy
The problem arises after these lines in the log: INFO: HHH000227: Running hbm2ddl schema export INFO: HHH000230: Schema export complete INFO: HHH000030: Cleaning up connection pool [jdbc:hsqldb:mem:richfaces_showcase] so, I guess the problem is caused by richfaces-showcase, when Hibernate is trying to clean up the connection pool. If you're not using the richfaces-showcase anyway (which you're probably not), you could exclude it from your dependencies, so it cannot cause any trouble. By running the dependency:tree goal, you can see, that the richfaces-distribution contains the following: +- org.richfaces.ui:richfaces-components-api:jar:4.3.2.Final:compile +- org.richfaces.ui:richfaces-components-ui:jar:4.3.2.Final:compile +- org.richfaces.core:richfaces-core-api:jar:4.3.2.Final

Categories : Maven

Distributed sessions with GlassFish
Obviously you want to have some sort of Single Sign-On. Have a look here for a description using an authentication realm in GlassFish: User Authentication for Single Sign-on The blog post Session Sharing between Java Web Applications explains how to not violate standards (Servlet, Java EE) and advises to use some backend like Memcached.

Categories : Java

run Spring 3 application on Glassfish 4
It seems to be an issue with the class loading of Hibernate Validator library - it's likely that you have another version of this library installed on your Glassfish. You can read more about classloading order in Glassfish 4.0 at GlassFish Server Development Guide 4.0 there is a whole Chapter 2 - Classloaders.

Categories : Java

Glassfish and JSF: Singleton not set for WebappClassLoader
JSF plugin works fine in IDEA for me. Make sure you have the JSF facet enabled on your project settings. Would also make sure that under idea the source directories are marked as such (usually src/main/java, src/main/webapp, src/main/resources, each separately). Hard to tell on the rest without taking a look at your pom.xml and project structure.

Categories : JSF

Glassfish increase maxParameterCount
I'm going to put the answer here for public knowledge, but it was someone else who I know who figured it out: I changed web-core.jar to be web-core.zip and then opened the zip and went into the org/apache/catalina/connector folder. I extracted the Connector.class file and opened it in a hex editor, searched for 0x2710 (10,000) and changed it to 0xFFFF (-1) Then I copied the Connector.class back into the zip file and renamed back to .jar I also opened the jar with java-decompiler to verify that the java code did actually look correct after manually editing the class file.

Categories : Java

How should I deploy PrimeFaces 3.5 into Glassfish 3.1.2?
Primefaces is a JSF library, not an EAR/WAR/EJB-jar module. It is supposed to be deployed along with the application (i.e. within an EAR/WAR), not separately on the server. Include it in you application and it will available after deployment.

Categories : JSF

GlassFish connection pool
A Driver and a DataSource are not the same. It looks from your configuration that you're setting a Driver class as the DataSource classname? Do you really need XA? Are you doing any distributed transaction? If so, set the data source to com.mysql.jdbc.jdbc2.optional.MysqlXADataSource If not, select a regular DataSource type and then set the classname to com.mysql.jdbc.jdbc2.optional.MysqlDataSource

Categories : Mysql

Is there a way to use Hibernate 4.2.2 with Java EE 7 and Glassfish 4?
Simply adding Hibernate as a dependency to your application won't work. You either have to add the Hibernate JARs to GlassFish's server classpath (in which case Hibernate would be available as a JPA provider for all applications), or you bundle the Hibernate JARs in the lib directory of an EAR (in which case only that application would use Hibernate). See this blog for an example of the later case: http://javafromthetrenches.wordpress.com/2011/01/15/using-hibernate-jpa-with-glassfish/ You don't need to do anything special to use JTA and an EclipseLink (or Hibernate) datasource. Session beans are automatically transactional, so inject an entity manager instance into your session bean and use it from the business methods. I should also point out that you'll need to add JDBC resources to Gl

Categories : Misc



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.