We help IT Professionals succeed at work.

Java EE

17K

Solutions

9K

Contributors

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules and security requirements.

how to configure auto proxy to setting.xml in maven.



when you not configure any proxy and use auto configuration setting
0
hi table not showing in h2 database
tabletable32
0
hi am geting the following error
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.jpa.hibernate:app >------------------------
[INFO] Building app 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to C:\solution\app\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\solution\app\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to C:\solution\app\target\test-classes
[INFO] -------------------------------------------------------------
COMPILATION ERROR :
[INFO] -------------------------------------------------------------
/C:/solution/app/src/test/java/com/jpa/hibernate/app/repository/NativeQueryTest.java:[13,29] package org.junit.jupiter.api does not exist
0
With the attached code, I get a new frame with the canvas in the background and with the rgb color as specified. However the graphics from drawoval and filloval commands on lines 24, 25 are not showing in the frame. Can someone see the cause?DrawNotWorking.PNG
0
What is the error in this scenario in Eclipse and how do I resolve it? HelloWorld1.PNG
0
What is mean by Nucleus of the web application?
0
hi am geting the following error

 Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for guru.springframework:pet-clinic-web:jar:0.0.5
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.junit.jupiter:junit-jupiter-api:jar -> version (?) vs 5.5.0-RC1 @ line 97, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.mockito:mockito-junit-jupiter:jar -> version 2.22.0 vs (?) @ line 107, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] tdm-pet-clinic                                                     [pom]
[INFO] pet-clinic-data                                                    [jar]
[INFO] pet-clinic-web                                                     [jar]
[INFO]
[INFO] ----------------< guru.springframework:tdm-pet-clinic >-----------------
[INFO] Building tdm-pet-clinic 0.0.5                                      [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] ----------------< guru.springframework:pet-clinic-data
0
hi my wsdl is not loading in spring boot
wsdlstructure
0
Hi Team,



I have an issue with date time picker. i have 3 date fields that are Pdate,Qdate,bDate , i put the validation while selecting B Date is greater then Q Date and q Date is greater then P Date and B Date is greater then P Date simple you can say that P Date , Q Date and B Date is in increasing order when i am taking date picker it's working fine but when i am using the date time picker its comparing each column time separatly and checking the time also in increasing order but i want only date compare my code is below please check and let me know if you need more clarification . please help me out on my below code where
i m doing wrong.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.min.js"></script>



<script>
    function validateDates() {
	 //get values of dates
	 var array = [];
	 var error = false;
	 $(".chkValues:checked").each(function() {
	   var parent = $(this).closest('tr');
	   var last = 0;
	   //var lbl = 

Open in new window

0
I want to uninstall JAVA 8 on my PC and NEVER install another JAVA package again, but first want to run some type of LOG for 10 weeks to see what software packages are using JAVA.

How can I create the above LOG ?
0
https://ninite.com/oracle_java and https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html show JAVA on business PCs is NO longer free as of 10 months ago, therefore I plan to switch to a different package since I really don't have any APPS that need Java, but still would like to have installed if needed.

Has anyone switched to Amazon Corretto and AdoptOpenJDK ?

Any other suggestions ?
0
hi am having this error in my spring
spring
0
Hi Team,

my requirement is like select 1 from drop down it means January so only January should be enable on date picker , other months should be disable . if need more clarification please let me know .
below is my code please help me out where i m doing wrong.



var monthYear=0;
monthYear = $('#mYear').val();; 
		alert(mYear);
		$("#pdate").datepicker
			({
	   			minDate:"dateToday",
	   			dateFormat: 'dd/mm/yy',
	   			changeMonth: true,
	   			numberOfMonths: 1,
	   			onClose: function (selectedDate) {
	 						$("#pdate").datepicker("option", "minDate", selectedDate);
	   								},
	   							//Code to disable dates according to selection
	   							beforeShowDay: filterDate
			});
 var filterDate = function(date) {
     if(monthYear=='0'){
       return [true];
     }else{          
       return [(1+date.getMonth()) == monthYear];
     }
 }
  $(document).ready(function() {  
	 $("#sdata").click(function(evt) {
		evt.preventDefault();
		 if(save()){
			$.ajax({
				url: "Test.jsp",
				type: "post",
				data: {
				pS:$('#pS').val(),
				pType:$('#pT').val(),
				pCode:$('#pC').val(),
				mYear:$('#mYear').val(),
				pDate:$('#pdate').val(),
				ppDate:$('#ppdate').val(),
				bDate:$('#bdate').val()},
				success: function(responseFromServer) {
	            	$.each(responseFromServer, function(resultMessageKey,resultMessageValue) {	
	                    $('#content').html(resultMessageKey);
	                });
	            	getClearDateValues();
	    

Open in new window

0
hi am having this error
doc
0
hi am having this error in my spring
 .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::  (v2.3.0.BUILD-SNAPSHOT)

2020-02-16 06:54:23.777  INFO 4100 --- [  restartedMain] com.jpa.hibernate.app.AppApplication     : Starting AppApplication on Desmand-PC with PID 4100 (C:\Spring5\app\target\classes started by user in C:\Spring5\app)
2020-02-16 06:54:23.780  INFO 4100 --- [  restartedMain] com.jpa.hibernate.app.AppApplication     : No active profile set, falling back to default profiles: default
2020-02-16 06:54:23.858  INFO 4100 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in C:\Users\user\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.2\jaxb-runtime-2.3.2.jar referenced one or more files that do not exist:
0
Experts,
There is a need to add a small method to an existing class inside a JAR file. When I rename the JAR file to zip, I am able to see the Java Class into which I need to add the new method. I do not have a project for this jar as the developer who programmed it is not with the company anymore, and for various reasons the project he developed is not available in the repository. Considering we very rarely need any modification on that jar file, was wondering if it is possible for me to do the required modifications directly within the JAVA file in the JAR, recompile just the CLASS file, re-zip it and rename it to JAR. Since this is an immediate requirement, I felt constructing the project might take more time.

Any inputs/suggestions greatly appreciated :)
0
hi am having error in my spring boot
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
663 [main] INFO ncs.app.co.za.NcsApp - Starting NcsApp on Desmand-PC with PID 17780 (C:\projects\NcsApp\bin started by user in C:\projects\NcsApp)
663 [main] INFO ncs.app.co.za.NcsApp - No active profile set, falling back to default profiles: default
2072 [main] INFO ncs.app.co.za.NcsApp - Started NcsApp in 1.948 seconds (JVM running for 2.427)
2074 [main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2182 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter -

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean named 'NocIigJDBCTemplate' that could not be found.


Action:

Consider defining a bean named 'NocIigJDBCTemplate' in your configuration.

package ncs.app.co.za;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import 

Open in new window

0
is it better to represent as String and Object or will there be any issue in the future ?
Thanks Experts sir.

@Override
      public void buildObjectMap() {
            super.buildObjectMap();
            Map<String, Object> objectMap =  getObjectMap();
            objectMap.put("id", id);
            objectMap.put("status", this.getStatus());
            objectMap.put("scheduledDate", this.getScheduledDate());
            objectMap.put("visitationPoint", visitationPoint.toJsonizedMap());
            objectMap.put("teamId", this.getTeam().getId());
            objectMap.put("teamName", this.getTeam().getTeamname());
            
            objectMap.put("locationId", this.getVisitationPoint().getLocation().getId());
            objectMap.put("locationName", this.getVisitationPoint().getLocation().getName());
            objectMap.put("locationType", this.getVisitationPoint().getLocation().getLocationType().getName());
      }
1
why data format is being set like this below on createdDate ? IS this correct expert ?
@Override
      public void buildObjectMap() {
            super.buildObjectMap();
            Map<String, Object> objectMap =  getObjectMap();
            
            objectMap.put("user_id", worker.getUsername());
            objectMap.put("session_id", session_id);
            objectMap.put("imei1", imei1);
            objectMap.put("imei2", imei2);
            objectMap.put("macId", macId);
            objectMap.put("session_id", session_id);
            // Date format is defined but it is used in the created_Date format which has been specified here
          DateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");  
       // String strDate = dateFormat.format(super.getCreated());  
            objectMap.put("created_Date",createdDate);
      }
0
Sir,

I have issue with the code base can some body help me, i am working on JPA but issue is how to pass the value in the findByOrgUnits
which is not correct. The value need to pass is a List value to the other screen. The content is List value which need to be pass to the
 the JPa Below, but the issue is which passing orgUnitTypes i am getting variable is not set correct in the input itself.

public AdminDTO getAllLookupData(int pageNo, int pageSize, String sortType, List<String> sortFields, String locale)
throws CmsDaoException {
             
            OrgUnitsLang orgUnitsLang;
            Long orgUnitId = orgunit.getOrgunitId();
            Set<OrgTransactionTypes> orgTransactionTypes;
            Languages languages = languagesRepository.findByLocale(locale);
            OrgUnits orgUnit = orgUnitRepo.findByOrgunitId(orgUnitId);
            OrgUnitTypes[] orgUnitsLang;
                  
            List<OrgUnitsLang> orgUnitlang = orgTransactionTypesRepo.findByOrgUnits(orgUnitTypes);
            
            
            The code below
            
      
@Repository
    public interface OrgTransactionTypesRepository extends JpaRepository<OrgTransactionTypes, Long>, JpaSpecificationExecutor{

	
	//to retrieve transaction type ids 
	List<OrgTransactionTypes> findByOrgUnits(OrgUnits orgUnits);
	
	OrgTransactionTypes findByOrgUnitsAndTransactionTypes(OrgUnits orgUnits,
			LookupTransactionTypes transactionTypes);

	@Query("SELECT orgTransactionTypes from OrgTransactionTypes orgTransactionTypes where orgTransactionTypes.orgUnits in :unitList")
	public List<OrgTransactionTypes> 

Open in new window

0
Why DTO(data transfer object) are not so good than DAO. Is it my understanding is less or more?

RS sir.
0
why getAllLookupData method of the below two has to map . i got this code from  internet as i have to look at it as there is some issue in it and can be used in my college project.
any help sir ?

@GetMapping
	public ResponseEntity<?> fetch(@RequestHeader("userinfo") String userinfo,PageAttributes pageAttributes) throws AdminServiceException {

		HashMap<String, String> map=HeaderInfoUtility.getCredentials(userinfo);
		LOGGER.info("-----username--------{}--",map.get(USERNAME));
		LOGGER.info("------password-----{}---",map.get(PASSWORD));
		LOGGER.info("------passwordEncrypted-----{}---",map.get(ENCRYPTEDPASSWORD));
		
		UserContext userContext=new UserContext();
		userContext.setPassword(map.get(ENCRYPTEDPASSWORD));
		userContext.setUsername(map.get(USERNAME));
		
		AdminDTO adminDto = lookupActionsService.getAllLookupData(pageAttributes.getPageNumber(),
				pageAttributes.getPageSize(), pageAttributes.getSortType(), pageAttributes.getSortFields(),
				pageAttributes.getLocale(), userContext);

		return new ResponseEntity<>(adminDto, HttpStatus.OK);
	}

Open in new window


@Override
	public AdminDTO getAllLookupData(int pageNumber, int pageSize, String sortType, List<String> sortFields,
			String locale, UserContext userContext) {
		
		AdminDTO adminDto = null;
		String repositoryType = getRepositoryType();

		try {
			adminDto = adminFactory.getAdminFactory(repositoryType).
					getAllActionsLookupData(pageNumber, pageSize, sortType, sortFields, locale, userContext);
		} catch (CmsRevampFactoryException ce) {
			LOGGER.error(
					"Error occurred while retrieving actions lookup :getAllLookupData() {}",
					ce.fillInStackTrace());
			throw new AdminServiceException(
					"Exception occured while retrieving actions lookup ");

		}
		return adminDto;
	}
	

Open in new window

0
Hi,
How to upgrade JRE to 11+, or downgrade your JDBC driver to Java 8, within CentOS 6?

Here is exception I've got

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at Main.doConnect(Main.java:86)
at Main.main(Main.java:46)
0
Hi i have a table having 8 columns i want to retrieve data from database and show in jsp page tabular form. after that implement edit , insert and delete in particular row or multiple row simultaneously . please provide a possible code sample as well as.
0
Hi Experts,

String str = "rptFormat:xls|grpid:1234|langid:en|SchTime:00:00|ftype:xls|P_GENERATEDON:29-10-2019 18:27:55|custidval:10024|";
            
String str2 = "rptFormat:xls|langid:en|SchTime:00:00|grpid:1234|ftype:xls|P_GENERATEDON:29-10-2019 18:27:55|custidval:10024|";


how to get the string value with out iterating | then :
here two for loop iterations are happended
is there any to get direct value from the string without iterating

i have to get only grpid value as-->1234
0

Java EE

17K

Solutions

9K

Contributors

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules and security requirements.

Top Experts In
Java EE
<
Monthly
>